	.file	"extr_sqlite3.c_sqlite3_backup_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"source and destination must be distinct"
	.text
	.p2align 4
	.globl	sqlite3_backup_init
	.type	sqlite3_backup_init, @function
sqlite3_backup_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rcx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	edi, DWORD PTR [rdx]
	call	sqlite3_mutex_enter@PLT
	mov	edi, DWORD PTR [rbx]
	call	sqlite3_mutex_enter@PLT
	cmp	rbp, rbx
	je	.L12
	mov	edi, 48
	call	sqlite3MallocZero@PLT
	mov	r13, rax
	test	rax, rax
	je	.L13
	mov	rdx, r15
	mov	rsi, rbp
	mov	rdi, rbx
	mov	r12, rax
	call	findBtree@PLT
	mov	rsi, rbx
	mov	rdx, r14
	mov	rdi, rbx
	mov	QWORD PTR 16[r13], rax
	call	findBtree@PLT
	cmp	QWORD PTR 16[r13], 0
	mov	QWORD PTR 40[r13], rbx
	mov	QWORD PTR 0[r13], rax
	mov	rsi, rax
	mov	QWORD PTR 32[r13], rbp
	mov	DWORD PTR 8[r13], 1
	mov	QWORD PTR 24[r13], 0
	je	.L6
	test	rax, rax
	je	.L6
	mov	rdi, rbx
	call	checkReadTransaction@PLT
	cmp	rax, QWORD PTR SQLITE_OK[rip]
	jne	.L6
	mov	rax, QWORD PTR 16[r12]
	add	DWORD PTR [rax], 1
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L13:
	mov	esi, DWORD PTR SQLITE_NOMEM_BKPT[rip]
	mov	rdi, rbx
	xor	r12d, r12d
	call	sqlite3Error@PLT
.L3:
	mov	edi, DWORD PTR [rbx]
	call	sqlite3_mutex_leave@PLT
	mov	edi, DWORD PTR 0[rbp]
	call	sqlite3_mutex_leave@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r12
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	rdi, r13
	xor	r12d, r12d
	call	sqlite3_free@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L12:
	mov	esi, DWORD PTR SQLITE_ERROR[rip]
	lea	rdx, .LC0[rip]
	mov	rdi, rbp
	xor	r12d, r12d
	call	sqlite3ErrorWithMsg@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	sqlite3_backup_init, .-sqlite3_backup_init
	.comm	SQLITE_OK,8,8
	.comm	SQLITE_NOMEM_BKPT,4,4
	.comm	SQLITE_MISUSE_BKPT,4,4
	.comm	SQLITE_ERROR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_sqlite3.c_sqlite3_backup_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"source and destination must be distinct\000"
	.text
	.align	2
	.global	sqlite3_backup_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	sqlite3_backup_init, %function
sqlite3_backup_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	mov	r5, r2
	ldr	r0, [r2]
	mov	r8, r1
	mov	r6, r3
	bl	sqlite3_mutex_enter
	ldr	r0, [r4]
	bl	sqlite3_mutex_enter
	cmp	r5, r4
	beq	.L12
	mov	r0, #24
	bl	sqlite3MallocZero
	subs	r7, r0, #0
	beq	.L13
	mov	r2, r6
	mov	r1, r5
	mov	r0, r4
	bl	findBtree
	mov	r2, r8
	mov	r1, r4
	str	r0, [r7, #8]
	mov	r0, r4
	bl	findBtree
	ldr	r3, [r7, #8]
	mov	r2, #1
	cmp	r0, #0
	cmpne	r3, #0
	mov	r3, #0
	mov	r6, r7
	mov	r1, r0
	str	r0, [r7]
	str	r4, [r7, #20]
	str	r5, [r7, #16]
	str	r2, [r7, #4]
	str	r3, [r7, #12]
	beq	.L6
	mov	r0, r4
	bl	checkReadTransaction
	ldr	r3, .L14
	ldr	r3, [r3]
	cmp	r0, r3
	bne	.L6
	ldr	r2, [r6, #8]
	ldr	r3, [r2]
	add	r3, r3, #1
	str	r3, [r2]
	b	.L3
.L13:
	ldr	r3, .L14+4
	mov	r0, r4
	ldr	r1, [r3]
	mov	r6, r7
	bl	sqlite3Error
.L3:
	ldr	r0, [r4]
	bl	sqlite3_mutex_leave
	ldr	r0, [r5]
	bl	sqlite3_mutex_leave
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, pc}
.L6:
	mov	r0, r7
	bl	sqlite3_free
	mov	r6, #0
	b	.L3
.L12:
	ldr	r3, .L14+8
	mov	r0, r5
	ldr	r2, .L14+12
	ldr	r1, [r3]
	bl	sqlite3ErrorWithMsg
	mov	r6, #0
	b	.L3
.L15:
	.align	2
.L14:
	.word	SQLITE_OK
	.word	SQLITE_NOMEM_BKPT
	.word	SQLITE_ERROR
	.word	.LC0
	.size	sqlite3_backup_init, .-sqlite3_backup_init
	.comm	SQLITE_OK,4,4
	.comm	SQLITE_NOMEM_BKPT,4,4
	.comm	SQLITE_MISUSE_BKPT,4,4
	.comm	SQLITE_ERROR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
