package R1;

import java.io.IOException;
import java.util.Locale;

/* JADX INFO: loaded from: classes.dex */
public final class a implements X1.a, AutoCloseable {

    /* JADX INFO: renamed from: q, reason: collision with root package name */
    public final Y1.a f6027q;

    public a(Y1.a aVar) {
        P6.g.e(aVar, "db");
        this.f6027q = aVar;
    }

    @Override // X1.a
    /* JADX INFO: renamed from: a, reason: merged with bridge method [inline-methods] */
    public final g h0(String str) {
        P6.g.e(str, "sql");
        Y1.a aVar = this.f6027q;
        P6.g.e(aVar, "db");
        String string = X6.e.j0(str).toString();
        if (string.length() >= 3) {
            String strSubstring = string.substring(0, 3);
            P6.g.d(strSubstring, "substring(...)");
            String upperCase = strSubstring.toUpperCase(Locale.ROOT);
            P6.g.d(upperCase, "toUpperCase(...)");
            int iHashCode = upperCase.hashCode();
            if (iHashCode == 79487 ? upperCase.equals("PRA") : !(iHashCode == 81978 ? !upperCase.equals("SEL") : !(iHashCode == 85954 && upperCase.equals("WIT")))) {
                e eVar = new e(aVar, str);
                eVar.f6035t = new int[0];
                eVar.f6036u = new long[0];
                eVar.f6037v = new double[0];
                eVar.f6038w = new String[0];
                eVar.f6039x = new byte[0][];
                return eVar;
            }
        }
        return new f(aVar, str);
    }

    @Override // java.lang.AutoCloseable
    public final void close() throws IOException {
        this.f6027q.close();
    }
}
