granularity level: instruction

		.class public final synthetic Lr/f;
.super Ljava/lang/Object;
.source "SourceFile"
.implements Lr/i;


.field public final synthetic a:I
.field public final synthetic b:Lr/k;
.field public final synthetic c:Ll/l;


.method public synthetic constructor <init>(Lr/k;Ll/l;I)V
	.locals 0

	iput p3, p0, Lr/f;->a:I
	iput-object p1, p0, Lr/f;->b:Lr/k;
	iput-object p2, p0, Lr/f;->c:Ll/l;
	invoke-direct {p0}, Ljava/lang/Object;-><init>()V
	return-void
.end method

.method public final apply(Ljava/lang/Object;)Ljava/lang/Object;
	.locals 11

	iget v0, p0, Lr/f;->a:I
	const/4 v1, 0x0
	packed-switch v0, :pswitch_data_0
	goto :goto_1
	:pswitch_0
	iget-object v0, p0, Lr/f;->b:Lr/k;
	iget-object v2, p0, Lr/f;->c:Ll/l;
	check-cast p1, Landroid/database/sqlite/SQLiteDatabase;
	invoke-virtual {v0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
	invoke-static {p1, v2}, Lr/k;->b(Landroid/database/sqlite/SQLiteDatabase;Ll/l;)Ljava/lang/Long;
	move-result-object p1
	if-nez p1, :cond_0
	sget-object p1, Ljava/lang/Boolean;->FALSE:Ljava/lang/Boolean;
	goto :goto_0
	:cond_0
	invoke-virtual {v0}, Lr/k;->a()Landroid/database/sqlite/SQLiteDatabase;
	move-result-object v0
	const/4 v2, 0x1
	new-array v2, v2, [Ljava/lang/String;
	invoke-virtual {p1}, Ljava/lang/Long;->toString()Ljava/lang/String;
	move-result-object p1
	aput-object p1, v2, v1
	const-string p1, "SELECT 1 FROM events WHERE context_id = ? LIMIT 1"
	invoke-virtual {v0, p1, v2}, Landroid/database/sqlite/SQLiteDatabase;->rawQuery(Ljava/lang/String;[Ljava/lang/String;)Landroid/database/Cursor;
	move-result-object p1
	new-instance v0, Lj/c;
	const/16 v1, 0x8
	invoke-direct {v0, v1}, Lj/c;-><init>(I)V
	invoke-static {p1, v0}, Lr/k;->g(Landroid/database/Cursor;Lr/i;)Ljava/lang/Object;
	move-result-object p1
	check-cast p1, Ljava/lang/Boolean;
	:goto_0
	return-object p1
	:goto_1
	iget-object v0, p0, Lr/f;->b:Lr/k;
	iget-object v2, p0, Lr/f;->c:Ll/l;
	move-object v3, p1
	check-cast v3, Landroid/database/sqlite/SQLiteDatabase;
	iget-object p1, v0, Lr/k;->d:Lr/a;
	iget p1, p1, Lr/a;->b:I
	invoke-virtual {v0, v3, v2, p1}, Lr/k;->d(Landroid/database/sqlite/SQLiteDatabase;Ll/l;I)Ljava/util/ArrayList;
	move-result-object p1
	invoke-static {}, Li/c;->values()[Li/c;
	move-result-object v4
	array-length v5, v4
	const/4 v6, 0x0
	:goto_2
	if-ge v6, v5, :cond_3
	aget-object v7, v4, v6
	iget-object v8, v2, Ll/l;->c:Li/c;
	if-ne v7, v8, :cond_1
	goto :goto_3
	:cond_1
	iget-object v8, v0, Lr/k;->d:Lr/a;
	iget v8, v8, Lr/a;->b:I
	invoke-virtual {p1}, Ljava/util/ArrayList;->size()I
	move-result v9
	sub-int/2addr v8, v9
	if-gtz v8, :cond_2
	goto :goto_4
	:cond_2
	invoke-static {}, Ll/l;->a()Ll/k;
	move-result-object v9
	iget-object v10, v2, Ll/l;->a:Ljava/lang/String;
	invoke-virtual {v9, v10}, Ll/k;->g(Ljava/lang/String;)V
	invoke-virtual {v9, v7}, Ll/k;->h(Li/c;)V
	iget-object v7, v2, Ll/l;->b:[B
	iput-object v7, v9, Ll/k;->b:Ljava/lang/Object;
	invoke-virtual {v9}, Ll/k;->c()Ll/l;
	move-result-object v7
	invoke-virtual {v0, v3, v7, v8}, Lr/k;->d(Landroid/database/sqlite/SQLiteDatabase;Ll/l;I)Ljava/util/ArrayList;
	move-result-object v7
	invoke-virtual {p1, v7}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z
	:goto_3
	add-int/lit8 v6, v6, 0x1
	goto :goto_2
	:goto_4
	:cond_3
	new-instance v0, Ljava/util/HashMap;
	invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
	new-instance v2, Ljava/lang/StringBuilder;
	const-string v4, "event_id IN ("
	invoke-direct {v2, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
	:goto_5
	invoke-virtual {p1}, Ljava/util/ArrayList;->size()I
	move-result v4
	if-ge v1, v4, :cond_5
	invoke-virtual {p1, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
	move-result-object v4
	check-cast v4, Lr/b;
	iget-wide v4, v4, Lr/b;->a:J
	invoke-virtual {v2, v4, v5}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
	invoke-virtual {p1}, Ljava/util/ArrayList;->size()I
	move-result v4
	add-int/lit8 v4, v4, -0x1
	if-ge v1, v4, :cond_4
	const/16 v4, 0x2c
	invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
	:cond_4
	add-int/lit8 v1, v1, 0x1
	goto :goto_5
	:cond_5
	const/16 v1, 0x29
	invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
	const-string v1, "event_id"
	const-string v4, "name"
	const-string v5, "value"
	filled-new-array {v1, v4, v5}, [Ljava/lang/String;
	move-result-object v5
	invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
	move-result-object v6
	const/4 v7, 0x0
	const/4 v8, 0x0
	const/4 v9, 0x0
	const/4 v10, 0x0
	const-string v4, "event_metadata"
	invoke-virtual/range {v3 .. v10}, Landroid/database/sqlite/SQLiteDatabase;->query(Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
	move-result-object v1
	new-instance v2, Lj/b;
	const/4 v3, 0x7
	invoke-direct {v2, v3, v0}, Lj/b;-><init>(ILjava/lang/Object;)V
	invoke-static {v1, v2}, Lr/k;->g(Landroid/database/Cursor;Lr/i;)Ljava/lang/Object;
	invoke-virtual {p1}, Ljava/util/ArrayList;->listIterator()Ljava/util/ListIterator;
	move-result-object v1
	:goto_6
	invoke-interface {v1}, Ljava/util/ListIterator;->hasNext()Z
	move-result v2
	if-eqz v2, :cond_8
	invoke-interface {v1}, Ljava/util/ListIterator;->next()Ljava/lang/Object;
	move-result-object v2
	check-cast v2, Lr/b;
	iget-wide v3, v2, Lr/b;->a:J
	invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
	move-result-object v3
	invoke-virtual {v0, v3}, Ljava/util/HashMap;->containsKey(Ljava/lang/Object;)Z
	move-result v3
	if-nez v3, :cond_6
	goto :goto_6
	:cond_6
	iget-object v3, v2, Lr/b;->c:Ll/i;
	invoke-virtual {v3}, Ll/i;->c()Ll/h;
	move-result-object v3
	iget-wide v4, v2, Lr/b;->a:J
	invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
	move-result-object v4
	invoke-virtual {v0, v4}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
	move-result-object v4
	check-cast v4, Ljava/util/Set;
	invoke-interface {v4}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
	move-result-object v4
	:goto_7
	invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z
	move-result v5
	if-eqz v5, :cond_7
	invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object;
	move-result-object v5
	check-cast v5, Lr/j;
	iget-object v6, v5, Lr/j;->a:Ljava/lang/String;
	iget-object v5, v5, Lr/j;->b:Ljava/lang/String;
	invoke-virtual {v3, v6, v5}, Ll/h;->a(Ljava/lang/String;Ljava/lang/String;)V
	goto :goto_7
	:cond_7
	iget-wide v4, v2, Lr/b;->a:J
	iget-object v2, v2, Lr/b;->b:Ll/l;
	invoke-virtual {v3}, Ll/h;->b()Ll/i;
	move-result-object v3
	new-instance v6, Lr/b;
	invoke-direct {v6, v4, v5, v2, v3}, Lr/b;-><init>(JLl/l;Ll/i;)V
	invoke-interface {v1, v6}, Ljava/util/ListIterator;->set(Ljava/lang/Object;)V
	goto :goto_6
	:cond_8
	return-object p1
	:pswitch_data_0
	.packed-switch 0x0
	:pswitch_0
	.end packed-switch
.end method