	.file	"extr_attach.c_detachFunc.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	""
.LC1:
	.string	"no such database: %s"
.LC2:
	.string	"cannot detach database %s"
.LC3:
	.string	"database %s is locked"
	.text
	.p2align 4
	.type	detachFunc, @function
detachFunc:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 152
	.cfi_def_cfa_offset 208
	mov	rdi, QWORD PTR [rdx]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 136[rsp], rax
	xor	eax, eax
	call	sqlite3_value_text@PLT
	mov	rdi, r13
	mov	r15, rax
	call	sqlite3_context_db_handle@PLT
	mov	edi, ebp
	mov	r12, rax
	call	UNUSED_PARAMETER@PLT
	mov	eax, DWORD PTR [r12]
	test	r15, r15
	lea	rcx, .LC0[rip]
	cmove	r15, rcx
	xor	ebx, ebx
	test	eax, eax
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rdx, QWORD PTR 8[r12]
	lea	rax, [rbx+rbx*2]
	lea	rbp, [rdx+rax*8]
	cmp	QWORD PTR 0[rbp], 0
	je	.L7
	mov	edi, DWORD PTR 16[rbp]
	mov	rsi, r15
	call	sqlite3StrICmp@PLT
	test	rax, rax
	je	.L20
.L7:
	add	rbx, 1
	cmp	DWORD PTR [r12], ebx
	jg	.L3
.L6:
	mov	rbp, rsp
	mov	rcx, r15
	mov	edi, 128
	lea	rdx, .LC1[rip]
	mov	rsi, rbp
	call	sqlite3_snprintf@PLT
.L4:
	mov	edx, -1
	mov	rsi, rbp
	mov	rdi, r13
	call	sqlite3_result_error@PLT
.L1:
	mov	rax, QWORD PTR 136[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L21
	add	rsp, 152
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L20:
	.cfi_restore_state
	cmp	DWORD PTR [r12], ebx
	jle	.L6
	cmp	ebx, 1
	jle	.L22
	mov	rdi, QWORD PTR 0[rbp]
	call	sqlite3BtreeIsInReadTrans@PLT
	test	rax, rax
	jne	.L10
	mov	rdi, QWORD PTR 0[rbp]
	call	sqlite3BtreeIsInBackup@PLT
	test	rax, rax
	je	.L23
.L10:
	mov	rbp, rsp
	mov	rcx, r15
	mov	edi, 128
	lea	rdx, .LC3[rip]
	mov	rsi, rbp
	call	sqlite3_snprintf@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L22:
	mov	rbp, rsp
	mov	rcx, r15
	mov	edi, 128
	lea	rdx, .LC2[rip]
	mov	rsi, rbp
	call	sqlite3_snprintf@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L23:
	mov	rdi, QWORD PTR 0[rbp]
	call	sqlite3BtreeClose@PLT
	mov	QWORD PTR 0[rbp], 0
	mov	rdi, r12
	mov	QWORD PTR 8[rbp], 0
	call	sqlite3CollapseDatabaseArray@PLT
	jmp	.L1
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	detachFunc, .-detachFunc
	.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_attach.c_detachFunc.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"\000"
	.align	2
.LC1:
	.ascii	"no such database: %s\000"
	.align	2
.LC2:
	.ascii	"cannot detach database %s\000"
	.align	2
.LC3:
	.ascii	"database %s is locked\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	detachFunc, %function
detachFunc:
	@ args = 0, pretend = 0, frame = 136
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L23
	sub	sp, sp, #140
	mov	r8, r0
	ldr	r0, [r2]
	mov	r4, r1
	ldr	r3, [r3]
	str	r3, [sp, #132]
	mov	r3,#0
	bl	sqlite3_value_text
	mov	r9, r0
	mov	r0, r8
	bl	sqlite3_context_db_handle
	mov	r7, r0
	mov	r0, r4
	bl	UNUSED_PARAMETER
	ldr	r3, .L23+4
	ldr	lr, [r7]
	cmp	r9, #0
	moveq	r9, r3
	cmp	lr, #0
	movgt	r4, #0
	movgt	r5, r4
	ble	.L6
.L3:
	ldr	r2, [r7, #4]
	ldr	ip, [r2, r4]
	add	r6, r2, r4
	cmp	ip, #0
	beq	.L7
	mov	r1, r9
	ldr	r0, [r6, #8]
	bl	sqlite3StrICmp
	cmp	r0, #0
	beq	.L17
	ldr	lr, [r7]
.L7:
	add	r5, r5, #1
	cmp	lr, r5
	add	r4, r4, #12
	bgt	.L3
.L6:
	add	r4, sp, #4
	mov	r3, r9
	mov	r1, r4
	mov	r0, #128
	ldr	r2, .L23+8
	bl	sqlite3_snprintf
.L4:
	mov	r1, r4
	mov	r0, r8
	mvn	r2, #0
	bl	sqlite3_result_error
.L1:
	ldr	r3, .L23
	ldr	r2, [r3]
	ldr	r3, [sp, #132]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L20
	add	sp, sp, #140
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L17:
	ldr	r3, [r7]
	cmp	r3, r5
	ble	.L6
	cmp	r5, #1
	ble	.L21
	ldr	r0, [r6]
	bl	sqlite3BtreeIsInReadTrans
	cmp	r0, #0
	bne	.L10
	ldr	r0, [r6]
	bl	sqlite3BtreeIsInBackup
	subs	r4, r0, #0
	beq	.L22
.L10:
	add	r4, sp, #4
	mov	r3, r9
	mov	r1, r4
	ldr	r2, .L23+12
	mov	r0, #128
	bl	sqlite3_snprintf
	b	.L4
.L21:
	add	r4, sp, #4
	mov	r3, r9
	mov	r1, r4
	ldr	r2, .L23+16
	mov	r0, #128
	bl	sqlite3_snprintf
	b	.L4
.L22:
	ldr	r0, [r6]
	bl	sqlite3BtreeClose
	mov	r0, r7
	str	r4, [r6]
	str	r4, [r6, #4]
	bl	sqlite3CollapseDatabaseArray
	b	.L1
.L20:
	bl	__stack_chk_fail
.L24:
	.align	2
.L23:
	.word	.LC4
	.word	.LC0
	.word	.LC1
	.word	.LC3
	.word	.LC2
	.size	detachFunc, .-detachFunc
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
