granularity level: instruction

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


.field public final synthetic a:I
.field public final synthetic b:Ljava/lang/Object;
.field public final synthetic c:Ljava/lang/Object;
.field public final synthetic d:Ljava/lang/Object;


.method public synthetic constructor <init>(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;I)V
	.locals 0

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

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

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

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

	move-object/from16 v0, p0
	sget-object v1, Lo/c;->d:Lo/c;
	iget v2, v0, Lp/b;->a:I
	const/4 v3, 0x0
	invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
	move-result-object v4
	const-string v5, "PRAGMA page_size"
	const-string v6, "PRAGMA page_count"
	const/4 v7, 0x3
	const/4 v8, 0x5
	const/4 v10, 0x4
	const/4 v11, 0x0
	const/4 v12, 0x1
	const-string v13, "bytes"
	const/4 v14, 0x2
	packed-switch v2, :pswitch_data_0
	goto/16 :goto_a
	:pswitch_0
	iget-object v2, v0, Lp/b;->b:Ljava/lang/Object;
	check-cast v2, Lr/k;
	iget-object v4, v0, Lp/b;->c:Ljava/lang/Object;
	check-cast v4, Ljava/util/Map;
	iget-object v11, v0, Lp/b;->d:Ljava/lang/Object;
	check-cast v11, Lh1/z;
	move-object/from16 v13, p1
	check-cast v13, Landroid/database/Cursor;
	sget-object v15, Lr/k;->f:Li/b;
	invoke-virtual {v2}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
	sget-object v15, Lo/c;->b:Lo/c;
	:goto_0
	invoke-interface {v13}, Landroid/database/Cursor;->moveToNext()Z
	move-result v16
	if-eqz v16, :cond_8
	invoke-interface {v13, v3}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
	move-result-object v9
	invoke-interface {v13, v12}, Landroid/database/Cursor;->getInt(I)I
	move-result v3
	if-nez v3, :cond_0
	goto :goto_2
	:cond_0
	sget-object v18, Lo/c;->c:Lo/c;
	if-ne v3, v12, :cond_1
	goto :goto_1
	:cond_1
	if-ne v3, v14, :cond_2
	move-object v3, v1
	goto :goto_3
	:cond_2
	sget-object v18, Lo/c;->e:Lo/c;
	if-ne v3, v7, :cond_3
	goto :goto_1
	:cond_3
	sget-object v18, Lo/c;->f:Lo/c;
	if-ne v3, v10, :cond_4
	goto :goto_1
	:cond_4
	sget-object v18, Lo/c;->g:Lo/c;
	if-ne v3, v8, :cond_5
	goto :goto_1
	:cond_5
	sget-object v18, Lo/c;->h:Lo/c;
	const/4 v8, 0x6
	if-ne v3, v8, :cond_6
	:goto_1
	move-object/from16 v3, v18
	goto :goto_3
	:cond_6
	invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
	move-result-object v3
	const-string v8, "SQLiteEventStore"
	const-string v10, "%n is not valid. No matched LogEventDropped-Reason found. Treated it as REASON_UNKNOWN"
	invoke-static {v8, v10, v3}, Lf0/a;->f(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)V
	:goto_2
	move-object v3, v15
	:goto_3
	invoke-interface {v13, v14}, Landroid/database/Cursor;->getLong(I)J
	move-result-wide v7
	invoke-interface {v4, v9}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
	move-result v20
	if-nez v20, :cond_7
	new-instance v10, Ljava/util/ArrayList;
	invoke-direct {v10}, Ljava/util/ArrayList;-><init>()V
	invoke-interface {v4, v9, v10}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
	:cond_7
	invoke-interface {v4, v9}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
	move-result-object v9
	check-cast v9, Ljava/util/List;
	new-instance v10, Lo/d;
	invoke-direct {v10, v7, v8, v3}, Lo/d;-><init>(JLo/c;)V
	invoke-interface {v9, v10}, Ljava/util/List;->add(Ljava/lang/Object;)Z
	const/4 v3, 0x0
	const/4 v7, 0x3
	const/4 v8, 0x5
	const/4 v10, 0x4
	goto :goto_0
	:cond_8
	invoke-interface {v4}, Ljava/util/Map;->entrySet()Ljava/util/Set;
	move-result-object v1
	invoke-interface {v1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
	move-result-object v1
	:goto_4
	invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
	move-result v3
	if-eqz v3, :cond_9
	invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
	move-result-object v3
	check-cast v3, Ljava/util/Map$Entry;
	sget v4, Lo/e;->c:I
	new-instance v4, Ljava/util/ArrayList;
	invoke-direct {v4}, Ljava/util/ArrayList;-><init>()V
	invoke-interface {v3}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
	move-result-object v4
	check-cast v4, Ljava/lang/String;
	invoke-interface {v3}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
	move-result-object v3
	check-cast v3, Ljava/util/List;
	new-instance v7, Lo/e;
	invoke-static {v3}, Ljava/util/Collections;->unmodifiableList(Ljava/util/List;)Ljava/util/List;
	move-result-object v3
	invoke-direct {v7, v4, v3}, Lo/e;-><init>(Ljava/lang/String;Ljava/util/List;)V
	iget-object v3, v11, Lh1/z;->c:Ljava/io/Serializable;
	check-cast v3, Ljava/util/List;
	invoke-interface {v3, v7}, Ljava/util/List;->add(Ljava/lang/Object;)Z
	goto :goto_4
	:cond_9
	iget-object v1, v2, Lr/k;->b:Lt/a;
	check-cast v1, Lt/b;
	invoke-virtual {v1}, Lt/b;->a()J
	move-result-wide v3
	new-instance v1, Lr/h;
	const/4 v7, 0x0
	invoke-direct {v1, v7, v3, v4}, Lr/h;-><init>(IJ)V
	invoke-virtual {v2, v1}, Lr/k;->c(Lr/i;)Ljava/lang/Object;
	move-result-object v1
	check-cast v1, Lo/g;
	iput-object v1, v11, Lh1/z;->b:Ljava/lang/Object;
	invoke-virtual {v2}, Lr/k;->a()Landroid/database/sqlite/SQLiteDatabase;
	move-result-object v1
	invoke-virtual {v1, v6}, Landroid/database/sqlite/SQLiteDatabase;->compileStatement(Ljava/lang/String;)Landroid/database/sqlite/SQLiteStatement;
	move-result-object v1
	invoke-virtual {v1}, Landroid/database/sqlite/SQLiteStatement;->simpleQueryForLong()J
	move-result-wide v3
	invoke-virtual {v2}, Lr/k;->a()Landroid/database/sqlite/SQLiteDatabase;
	move-result-object v1
	invoke-virtual {v1, v5}, Landroid/database/sqlite/SQLiteDatabase;->compileStatement(Ljava/lang/String;)Landroid/database/sqlite/SQLiteStatement;
	move-result-object v1
	invoke-virtual {v1}, Landroid/database/sqlite/SQLiteStatement;->simpleQueryForLong()J
	move-result-wide v5
	mul-long v5, v5, v3
	sget-object v1, Lr/a;->f:Lr/a;
	iget-wide v3, v1, Lr/a;->a:J
	new-instance v1, Lo/f;
	invoke-direct {v1, v5, v6, v3, v4}, Lo/f;-><init>(JJ)V
	new-instance v3, Lo/b;
	invoke-direct {v3, v1}, Lo/b;-><init>(Lo/f;)V
	iput-object v3, v11, Lh1/z;->d:Ljava/lang/Object;
	iget-object v1, v2, Lr/k;->e:Lk1/a;
	invoke-interface {v1}, Lk1/a;->get()Ljava/lang/Object;
	move-result-object v1
	check-cast v1, Ljava/lang/String;
	iput-object v1, v11, Lh1/z;->a:Ljava/lang/Object;
	new-instance v1, Lo/a;
	iget-object v2, v11, Lh1/z;->b:Ljava/lang/Object;
	check-cast v2, Lo/g;
	iget-object v3, v11, Lh1/z;->c:Ljava/io/Serializable;
	check-cast v3, Ljava/util/List;
	invoke-static {v3}, Ljava/util/Collections;->unmodifiableList(Ljava/util/List;)Ljava/util/List;
	move-result-object v3
	iget-object v4, v11, Lh1/z;->d:Ljava/lang/Object;
	check-cast v4, Lo/b;
	iget-object v5, v11, Lh1/z;->a:Ljava/lang/Object;
	check-cast v5, Ljava/lang/String;
	invoke-direct {v1, v2, v3, v4, v5}, Lo/a;-><init>(Lo/g;Ljava/util/List;Lo/b;Ljava/lang/String;)V
	return-object v1
	:pswitch_1
	iget-object v1, v0, Lp/b;->b:Ljava/lang/Object;
	check-cast v1, Lr/k;
	iget-object v2, v0, Lp/b;->d:Ljava/lang/Object;
	check-cast v2, Ljava/util/List;
	iget-object v3, v0, Lp/b;->c:Ljava/lang/Object;
	check-cast v3, Ll/l;
	move-object/from16 v4, p1
	check-cast v4, Landroid/database/Cursor;
	sget-object v5, Lr/k;->f:Li/b;
	invoke-virtual {v1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
	:goto_5
	invoke-interface {v4}, Landroid/database/Cursor;->moveToNext()Z
	move-result v5
	if-eqz v5, :cond_f
	const/4 v5, 0x0
	invoke-interface {v4, v5}, Landroid/database/Cursor;->getLong(I)J
	move-result-wide v6
	const/4 v5, 0x7
	invoke-interface {v4, v5}, Landroid/database/Cursor;->getInt(I)I
	move-result v5
	if-eqz v5, :cond_a
	const/4 v5, 0x1
	goto :goto_6
	:cond_a
	const/4 v5, 0x0
	:goto_6
	new-instance v8, Ll/h;
	invoke-direct {v8}, Ll/h;-><init>()V
	new-instance v9, Ljava/util/HashMap;
	invoke-direct {v9}, Ljava/util/HashMap;-><init>()V
	iput-object v9, v8, Ll/h;->f:Ljava/lang/Object;
	invoke-interface {v4, v12}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
	move-result-object v9
	invoke-virtual {v8, v9}, Ll/h;->g(Ljava/lang/String;)V
	invoke-interface {v4, v14}, Landroid/database/Cursor;->getLong(I)J
	move-result-wide v9
	invoke-static {v9, v10}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
	move-result-object v9
	iput-object v9, v8, Ll/h;->d:Ljava/lang/Object;
	const/4 v9, 0x3
	invoke-interface {v4, v9}, Landroid/database/Cursor;->getLong(I)J
	move-result-wide v20
	invoke-static/range {v20 .. v21}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
	move-result-object v10
	iput-object v10, v8, Ll/h;->e:Ljava/lang/Object;
	if-eqz v5, :cond_c
	new-instance v5, Ll/o;
	const/4 v10, 0x4
	invoke-interface {v4, v10}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
	move-result-object v15
	if-nez v15, :cond_b
	sget-object v10, Lr/k;->f:Li/b;
	goto :goto_7
	:cond_b
	new-instance v10, Li/b;
	invoke-direct {v10, v15}, Li/b;-><init>(Ljava/lang/String;)V
	:goto_7
	const/4 v15, 0x5
	invoke-interface {v4, v15}, Landroid/database/Cursor;->getBlob(I)[B
	move-result-object v9
	invoke-direct {v5, v10, v9}, Ll/o;-><init>(Li/b;[B)V
	goto :goto_9
	:cond_c
	const/4 v15, 0x5
	new-instance v5, Ll/o;
	const/4 v9, 0x4
	invoke-interface {v4, v9}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
	move-result-object v10
	if-nez v10, :cond_d
	sget-object v10, Lr/k;->f:Li/b;
	goto :goto_8
	:cond_d
	new-instance v9, Li/b;
	invoke-direct {v9, v10}, Li/b;-><init>(Ljava/lang/String;)V
	move-object v10, v9
	:goto_8
	invoke-virtual {v1}, Lr/k;->a()Landroid/database/sqlite/SQLiteDatabase;
	move-result-object v21
	filled-new-array {v13}, [Ljava/lang/String;
	move-result-object v23
	new-array v9, v12, [Ljava/lang/String;
	invoke-static {v6, v7}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
	move-result-object v19
	const/16 v17, 0x0
	aput-object v19, v9, v17
	const/16 v26, 0x0
	const/16 v27, 0x0
	const-string v22, "event_payloads"
	const-string v24, "event_id = ?"
	const-string v28, "sequence_num"
	move-object/from16 v25, v9
	invoke-virtual/range {v21 .. v28}, 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 v9
	new-instance v12, Lj/c;
	const/16 v15, 0x9
	invoke-direct {v12, v15}, Lj/c;-><init>(I)V
	invoke-static {v9, v12}, Lr/k;->g(Landroid/database/Cursor;Lr/i;)Ljava/lang/Object;
	move-result-object v9
	check-cast v9, [B
	invoke-direct {v5, v10, v9}, Ll/o;-><init>(Li/b;[B)V
	:goto_9
	invoke-virtual {v8, v5}, Ll/h;->f(Ll/o;)V
	const/4 v5, 0x6
	invoke-interface {v4, v5}, Landroid/database/Cursor;->isNull(I)Z
	move-result v9
	if-nez v9, :cond_e
	invoke-interface {v4, v5}, Landroid/database/Cursor;->getInt(I)I
	move-result v9
	invoke-static {v9}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
	move-result-object v9
	iput-object v9, v8, Ll/h;->b:Ljava/lang/Object;
	:cond_e
	invoke-virtual {v8}, Ll/h;->b()Ll/i;
	move-result-object v8
	new-instance v9, Lr/b;
	invoke-direct {v9, v6, v7, v3, v8}, Lr/b;-><init>(JLl/l;Ll/i;)V
	invoke-interface {v2, v9}, Ljava/util/List;->add(Ljava/lang/Object;)Z
	const/4 v12, 0x1
	goto/16 :goto_5
	:cond_f
	return-object v11
	:pswitch_2
	iget-object v1, v0, Lp/b;->b:Ljava/lang/Object;
	check-cast v1, Lr/k;
	iget-object v2, v0, Lp/b;->c:Ljava/lang/Object;
	check-cast v2, Ljava/lang/String;
	iget-object v3, v0, Lp/b;->d:Ljava/lang/Object;
	check-cast v3, Ljava/lang/String;
	move-object/from16 v4, p1
	check-cast v4, Landroid/database/sqlite/SQLiteDatabase;
	sget-object v5, Lr/k;->f:Li/b;
	invoke-virtual {v1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
	invoke-virtual {v4, v2}, Landroid/database/sqlite/SQLiteDatabase;->compileStatement(Ljava/lang/String;)Landroid/database/sqlite/SQLiteStatement;
	move-result-object v2
	invoke-virtual {v2}, Landroid/database/sqlite/SQLiteStatement;->execute()V
	invoke-virtual {v4, v3, v11}, Landroid/database/sqlite/SQLiteDatabase;->rawQuery(Ljava/lang/String;[Ljava/lang/String;)Landroid/database/Cursor;
	move-result-object v2
	new-instance v3, Lr/g;
	invoke-direct {v3, v1, v14}, Lr/g;-><init>(Lr/k;I)V
	invoke-static {v2, v3}, Lr/k;->g(Landroid/database/Cursor;Lr/i;)Ljava/lang/Object;
	const-string v1, "DELETE FROM events WHERE num_attempts >= 16"
	invoke-virtual {v4, v1}, Landroid/database/sqlite/SQLiteDatabase;->compileStatement(Ljava/lang/String;)Landroid/database/sqlite/SQLiteStatement;
	move-result-object v1
	invoke-virtual {v1}, Landroid/database/sqlite/SQLiteStatement;->execute()V
	return-object v11
	:goto_a
	iget-object v2, v0, Lp/b;->b:Ljava/lang/Object;
	check-cast v2, Lr/k;
	iget-object v3, v0, Lp/b;->d:Ljava/lang/Object;
	check-cast v3, Ll/i;
	iget-object v7, v0, Lp/b;->c:Ljava/lang/Object;
	check-cast v7, Ll/l;
	move-object/from16 v8, p1
	check-cast v8, Landroid/database/sqlite/SQLiteDatabase;
	sget-object v9, Lr/k;->f:Li/b;
	invoke-virtual {v2}, Lr/k;->a()Landroid/database/sqlite/SQLiteDatabase;
	move-result-object v9
	invoke-virtual {v9, v6}, Landroid/database/sqlite/SQLiteDatabase;->compileStatement(Ljava/lang/String;)Landroid/database/sqlite/SQLiteStatement;
	move-result-object v6
	invoke-virtual {v6}, Landroid/database/sqlite/SQLiteStatement;->simpleQueryForLong()J
	move-result-wide v9
	invoke-virtual {v2}, Lr/k;->a()Landroid/database/sqlite/SQLiteDatabase;
	move-result-object v6
	invoke-virtual {v6, v5}, Landroid/database/sqlite/SQLiteDatabase;->compileStatement(Ljava/lang/String;)Landroid/database/sqlite/SQLiteStatement;
	move-result-object v5
	invoke-virtual {v5}, Landroid/database/sqlite/SQLiteStatement;->simpleQueryForLong()J
	move-result-wide v5
	mul-long v5, v5, v9
	iget-object v9, v2, Lr/k;->d:Lr/a;
	iget-wide v9, v9, Lr/a;->a:J
	cmp-long v12, v5, v9
	if-ltz v12, :cond_10
	const/4 v5, 0x1
	goto :goto_b
	:cond_10
	const/4 v5, 0x0
	:goto_b
	if-eqz v5, :cond_11
	const-wide/16 v4, 0x1
	iget-object v3, v3, Ll/i;->a:Ljava/lang/String;
	new-instance v6, Lq/k;
	invoke-direct {v6, v3, v1, v4, v5}, Lq/k;-><init>(Ljava/lang/Object;Ljava/lang/Object;J)V
	invoke-virtual {v2, v6}, Lr/k;->c(Lr/i;)Ljava/lang/Object;
	const-wide/16 v1, -0x1
	invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
	move-result-object v1
	goto/16 :goto_11
	:cond_11
	invoke-static {v8, v7}, Lr/k;->b(Landroid/database/sqlite/SQLiteDatabase;Ll/l;)Ljava/lang/Long;
	move-result-object v1
	if-eqz v1, :cond_12
	invoke-virtual {v1}, Ljava/lang/Long;->longValue()J
	move-result-wide v5
	goto :goto_c
	:cond_12
	new-instance v1, Landroid/content/ContentValues;
	invoke-direct {v1}, Landroid/content/ContentValues;-><init>()V
	iget-object v5, v7, Ll/l;->a:Ljava/lang/String;
	const-string v6, "backend_name"
	invoke-virtual {v1, v6, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V
	iget-object v5, v7, Ll/l;->c:Li/c;
	invoke-static {v5}, Lu/a;->a(Li/c;)I
	move-result v5
	invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
	move-result-object v5
	const-string v6, "priority"
	invoke-virtual {v1, v6, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V
	const-string v5, "next_request_ms"
	invoke-virtual {v1, v5, v4}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V
	iget-object v5, v7, Ll/l;->b:[B
	if-eqz v5, :cond_13
	const/4 v6, 0x0
	invoke-static {v5, v6}, Landroid/util/Base64;->encodeToString([BI)Ljava/lang/String;
	move-result-object v5
	const-string v6, "extras"
	invoke-virtual {v1, v6, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V
	:cond_13
	const-string v5, "transport_contexts"
	invoke-virtual {v8, v5, v11, v1}, Landroid/database/sqlite/SQLiteDatabase;->insert(Ljava/lang/String;Ljava/lang/String;Landroid/content/ContentValues;)J
	move-result-wide v5
	:goto_c
	iget-object v1, v2, Lr/k;->d:Lr/a;
	iget v1, v1, Lr/a;->e:I
	iget-object v2, v3, Ll/i;->c:Ll/o;
	iget-object v2, v2, Ll/o;->b:[B
	array-length v7, v2
	if-gt v7, v1, :cond_14
	const/4 v7, 0x1
	goto :goto_d
	:cond_14
	const/4 v7, 0x0
	:goto_d
	new-instance v9, Landroid/content/ContentValues;
	invoke-direct {v9}, Landroid/content/ContentValues;-><init>()V
	invoke-static {v5, v6}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
	move-result-object v5
	const-string v6, "context_id"
	invoke-virtual {v9, v6, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V
	iget-object v5, v3, Ll/i;->a:Ljava/lang/String;
	const-string v6, "transport_name"
	invoke-virtual {v9, v6, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V
	iget-wide v5, v3, Ll/i;->d:J
	invoke-static {v5, v6}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
	move-result-object v5
	const-string v6, "timestamp_ms"
	invoke-virtual {v9, v6, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V
	iget-wide v5, v3, Ll/i;->e:J
	invoke-static {v5, v6}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
	move-result-object v5
	const-string v6, "uptime_ms"
	invoke-virtual {v9, v6, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V
	iget-object v5, v3, Ll/i;->c:Ll/o;
	iget-object v5, v5, Ll/o;->a:Li/b;
	iget-object v5, v5, Li/b;->a:Ljava/lang/String;
	const-string v6, "payload_encoding"
	invoke-virtual {v9, v6, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V
	iget-object v5, v3, Ll/i;->b:Ljava/lang/Integer;
	const-string v6, "code"
	invoke-virtual {v9, v6, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V
	const-string v5, "num_attempts"
	invoke-virtual {v9, v5, v4}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V
	invoke-static {v7}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
	move-result-object v4
	const-string v5, "inline"
	invoke-virtual {v9, v5, v4}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Boolean;)V
	if-eqz v7, :cond_15
	move-object v4, v2
	goto :goto_e
	:cond_15
	const/4 v4, 0x0
	new-array v4, v4, [B
	:goto_e
	const-string v5, "payload"
	invoke-virtual {v9, v5, v4}, Landroid/content/ContentValues;->put(Ljava/lang/String;[B)V
	const-string v4, "events"
	invoke-virtual {v8, v4, v11, v9}, Landroid/database/sqlite/SQLiteDatabase;->insert(Ljava/lang/String;Ljava/lang/String;Landroid/content/ContentValues;)J
	move-result-wide v4
	const-string v6, "event_id"
	if-nez v7, :cond_16
	array-length v7, v2
	int-to-double v9, v7
	int-to-double v14, v1
	div-double/2addr v9, v14
	invoke-static {v9, v10}, Ljava/lang/Math;->ceil(D)D
	move-result-wide v9
	double-to-int v7, v9
	const/4 v12, 0x1
	:goto_f
	if-gt v12, v7, :cond_16
	add-int/lit8 v9, v12, -0x1
	mul-int v9, v9, v1
	mul-int v10, v12, v1
	array-length v14, v2
	invoke-static {v10, v14}, Ljava/lang/Math;->min(II)I
	move-result v10
	invoke-static {v2, v9, v10}, Ljava/util/Arrays;->copyOfRange([BII)[B
	move-result-object v9
	new-instance v10, Landroid/content/ContentValues;
	invoke-direct {v10}, Landroid/content/ContentValues;-><init>()V
	invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
	move-result-object v14
	invoke-virtual {v10, v6, v14}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V
	invoke-static {v12}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
	move-result-object v14
	const-string v15, "sequence_num"
	invoke-virtual {v10, v15, v14}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V
	invoke-virtual {v10, v13, v9}, Landroid/content/ContentValues;->put(Ljava/lang/String;[B)V
	const-string v9, "event_payloads"
	invoke-virtual {v8, v9, v11, v10}, Landroid/database/sqlite/SQLiteDatabase;->insert(Ljava/lang/String;Ljava/lang/String;Landroid/content/ContentValues;)J
	add-int/lit8 v12, v12, 0x1
	goto :goto_f
	:cond_16
	iget-object v1, v3, Ll/i;->f:Ljava/util/Map;
	invoke-static {v1}, Ljava/util/Collections;->unmodifiableMap(Ljava/util/Map;)Ljava/util/Map;
	move-result-object v1
	invoke-interface {v1}, Ljava/util/Map;->entrySet()Ljava/util/Set;
	move-result-object v1
	invoke-interface {v1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
	move-result-object v1
	:goto_10
	invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
	move-result v2
	if-eqz v2, :cond_17
	invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
	move-result-object v2
	check-cast v2, Ljava/util/Map$Entry;
	new-instance v3, Landroid/content/ContentValues;
	invoke-direct {v3}, Landroid/content/ContentValues;-><init>()V
	invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
	move-result-object v7
	invoke-virtual {v3, v6, v7}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V
	invoke-interface {v2}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
	move-result-object v7
	check-cast v7, Ljava/lang/String;
	const-string v9, "name"
	invoke-virtual {v3, v9, v7}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V
	invoke-interface {v2}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
	move-result-object v2
	check-cast v2, Ljava/lang/String;
	const-string v7, "value"
	invoke-virtual {v3, v7, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V
	const-string v2, "event_metadata"
	invoke-virtual {v8, v2, v11, v3}, Landroid/database/sqlite/SQLiteDatabase;->insert(Ljava/lang/String;Ljava/lang/String;Landroid/content/ContentValues;)J
	goto :goto_10
	:cond_17
	invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
	move-result-object v1
	:goto_11
	return-object v1
	nop
	:pswitch_data_0
	.packed-switch 0x1
	:pswitch_2
	:pswitch_1
	:pswitch_0
	.end packed-switch
.end method

.method public final d()Ljava/lang/Object;
	.locals 10

	iget-object v0, p0, Lp/b;->b:Ljava/lang/Object;
	check-cast v0, Lp/c;
	iget-object v1, p0, Lp/b;->c:Ljava/lang/Object;
	check-cast v1, Ll/l;
	iget-object v2, p0, Lp/b;->d:Ljava/lang/Object;
	check-cast v2, Ll/i;
	iget-object v3, v0, Lp/c;->d:Lr/d;
	check-cast v3, Lr/k;
	invoke-virtual {v3}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
	const/4 v4, 0x3
	new-array v5, v4, [Ljava/lang/Object;
	iget-object v6, v1, Ll/l;->c:Li/c;
	const/4 v7, 0x0
	aput-object v6, v5, v7
	iget-object v6, v2, Ll/i;->a:Ljava/lang/String;
	const/4 v8, 0x1
	aput-object v6, v5, v8
	iget-object v6, v1, Ll/l;->a:Ljava/lang/String;
	const/4 v9, 0x2
	aput-object v6, v5, v9
	const-string v6, "SQLiteEventStore"
	invoke-static {v6}, Lf0/a;->k(Ljava/lang/String;)Ljava/lang/String;
	move-result-object v6
	invoke-static {v6, v4}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
	move-result v4
	if-eqz v4, :cond_0
	const-string v4, "Storing event with priority=%s, name=%s for destination %s"
	invoke-static {v4, v5}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
	move-result-object v4
	invoke-static {v6, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
	:cond_0
	new-instance v4, Lp/b;
	const/4 v5, 0x4
	invoke-direct {v4, v3, v2, v1, v5}, Lp/b;-><init>(Lr/k;Ljava/lang/Object;Ll/l;I)V
	invoke-virtual {v3, v4}, Lr/k;->c(Lr/i;)Ljava/lang/Object;
	move-result-object v2
	check-cast v2, Ljava/lang/Long;
	invoke-virtual {v2}, Ljava/lang/Long;->longValue()J
	iget-object v0, v0, Lp/c;->a:Lq/p;
	check-cast v0, Lq/d;
	invoke-virtual {v0, v1, v8, v7}, Lq/d;->a(Ll/l;IZ)V
	const/4 v0, 0x0
	return-object v0
.end method