	.file	"extr_zap.c_fzap_add_cd.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	fzap_add_cd
	.type	fzap_add_cd, @function
fzap_add_cd:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, r9
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, edx
	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, 72
	.cfi_def_cfa_offset 128
	mov	rbx, QWORD PTR [rdi]
	mov	QWORD PTR 8[rsp], rcx
	mov	r14, QWORD PTR 128[rsp]
	mov	DWORD PTR 20[rsp], r8d
	lea	rdi, 4[rbx]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	mov	QWORD PTR [rsp], rbx
	call	RW_LOCK_HELD@PLT
	mov	edi, eax
	call	ASSERT@PLT
	mov	esi, DWORD PTR [rbx]
	xor	edi, edi
	test	esi, esi
	sete	dil
	call	ASSERT@PLT
	mov	edx, r12d
	mov	esi, ebp
	mov	rdi, r15
	call	fzap_check@PLT
	xor	edi, edi
	test	rax, rax
	sete	dil
	call	ASSERT@PLT
	lea	rax, 48[rsp]
	mov	rdx, r14
	mov	rdi, rbx
	mov	esi, DWORD PTR 8[r15]
	mov	ecx, DWORD PTR RW_WRITER[rip]
	mov	r8, rax
	mov	QWORD PTR 24[rsp], rax
	call	zap_deref_leaf@PLT
	mov	r8d, eax
	test	eax, eax
	jne	.L1
	mov	rax, r14
	lea	rbx, 44[rsp]
	mov	r14, r13
	mov	r13, r15
	mov	r15, rax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	cmp	DWORD PTR ENOENT[rip], eax
	jne	.L14
	sub	rsp, 8
	.cfi_def_cfa_offset 136
	mov	ecx, ebp
	mov	r8d, r12d
	mov	rsi, r13
	push	rbx
	.cfi_def_cfa_offset 144
	mov	r9, QWORD PTR 24[rsp]
	mov	edx, DWORD PTR 36[rsp]
	mov	rdi, QWORD PTR 64[rsp]
	call	zap_entry_create@PLT
	pop	rdx
	.cfi_def_cfa_offset 136
	pop	rcx
	.cfi_def_cfa_offset 128
	test	eax, eax
	je	.L17
	cmp	DWORD PTR EAGAIN[rip], eax
	jne	.L14
	mov	r8, QWORD PTR 24[rsp]
	mov	rsi, QWORD PTR 48[rsp]
	mov	rcx, r15
	mov	rdx, r14
	mov	rdi, r13
	call	zap_expand_leaf@PLT
	mov	rcx, QWORD PTR 0[r13]
	mov	QWORD PTR [rsp], rcx
	test	eax, eax
	jne	.L18
.L3:
	mov	rdi, QWORD PTR 48[rsp]
	mov	rdx, rbx
	mov	rsi, r13
	call	zap_leaf_lookup@PLT
	test	eax, eax
	jne	.L4
	mov	edi, DWORD PTR EEXIST[rip]
	mov	rax, r15
	mov	r15, r13
	mov	r13, r14
	mov	r14, rax
	call	SET_ERROR@PLT
	cmp	QWORD PTR [rsp], 0
	mov	r8d, eax
	jne	.L19
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L20
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r8d
	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
.L14:
	.cfi_restore_state
	mov	r8d, eax
	mov	rax, r15
	mov	r15, r13
	mov	r13, r14
	mov	r14, rax
.L5:
	cmp	QWORD PTR [rsp], 0
	je	.L1
.L19:
	mov	rsi, QWORD PTR 48[rsp]
	mov	rcx, r14
	mov	rdx, r13
	mov	rdi, r15
	mov	DWORD PTR [rsp], r8d
	call	zap_put_leaf_maybe_grow_ptrtbl@PLT
	mov	r8d, DWORD PTR [rsp]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L17:
	mov	DWORD PTR 8[rsp], eax
	mov	rdi, QWORD PTR [rsp]
	mov	rax, r15
	mov	esi, 1
	mov	rdx, rax
	mov	r15, r13
	mov	r13, r14
	mov	r14, rax
	call	zap_increment_num_entries@PLT
	mov	r8d, DWORD PTR 8[rsp]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L18:
	mov	r8d, eax
	mov	rax, r15
	cmp	DWORD PTR ENOSPC[rip], r8d
	mov	r15, r13
	mov	r13, r14
	mov	r14, rax
	jne	.L5
	jmp	.L1
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	fzap_add_cd, .-fzap_add_cd
	.comm	RW_WRITER,4,4
	.comm	ENOSPC,4,4
	.comm	ENOENT,4,4
	.comm	EEXIST,4,4
	.comm	EAGAIN,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_zap.c_fzap_add_cd.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	fzap_add_cd
	.syntax unified
	.arm
	.fpu softvfp
	.type	fzap_add_cd, %function
fzap_add_cd:
	@ args = 12, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #52
	str	r3, [sp, #24]
	ldr	r3, .L21
	str	r2, [sp, #20]
	ldr	r7, [r0]
	ldr	r3, [r3]
	str	r3, [sp, #44]
	mov	r3,#0
	ldr	r3, [sp, #92]
	mov	r5, r0
	add	r0, r7, #4
	str	r3, [sp, #28]
	mov	r4, r2
	mov	r8, r1
	ldr	r9, [sp, #96]
	bl	RW_LOCK_HELD
	bl	ASSERT
	ldr	r0, [r7]
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ASSERT
	mov	r2, r4
	mov	r1, r8
	mov	r0, r5
	bl	fzap_check
	clz	r0, r0
	lsr	r0, r0, #5
	bl	ASSERT
	ldr	r3, .L21+4
	add	ip, sp, #36
	ldr	r1, [r5, #4]
	ldr	r3, [r3]
	mov	r0, r7
	mov	r2, r9
	str	ip, [sp]
	bl	zap_deref_leaf
	subs	r4, r0, #0
	bne	.L1
	str	r7, [sp, #16]
	ldr	r10, .L21+8
	ldr	fp, .L21+12
	ldr	r4, [sp, #88]
	ldr	r7, [sp, #28]
	add	r6, sp, #40
	b	.L3
.L4:
	ldr	r3, [r10]
	cmp	r3, r0
	bne	.L14
	ldr	r3, [sp, #24]
	mov	r2, r4
	str	r3, [sp, #4]
	ldr	r3, [sp, #20]
	mov	r1, r5
	str	r3, [sp]
	ldr	r0, [sp, #36]
	mov	r3, r8
	str	r6, [sp, #8]
	bl	zap_entry_create
	cmp	r0, #0
	beq	.L17
	ldr	r3, [fp]
	cmp	r3, r0
	bne	.L14
	add	r3, sp, #36
	str	r3, [sp]
	mov	r2, r7
	mov	r3, r9
	mov	r0, r5
	ldr	r1, [sp, #36]
	bl	zap_expand_leaf
	ldr	r3, [r5]
	cmp	r0, #0
	str	r3, [sp, #16]
	bne	.L18
.L3:
	mov	r2, r6
	mov	r1, r5
	ldr	r0, [sp, #36]
	bl	zap_leaf_lookup
	cmp	r0, #0
	bne	.L4
	ldr	r3, .L21+16
	ldr	r7, [sp, #16]
	ldr	r0, [r3]
	bl	SET_ERROR
	cmp	r7, #0
	mov	r4, r0
	bne	.L19
.L1:
	ldr	r3, .L21
	ldr	r2, [r3]
	ldr	r3, [sp, #44]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L20
	mov	r0, r4
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L14:
	mov	r4, r0
	ldr	r7, [sp, #16]
.L5:
	cmp	r7, #0
	beq	.L1
.L19:
	mov	r3, r9
	mov	r0, r5
	ldr	r2, [sp, #28]
	ldr	r1, [sp, #36]
	bl	zap_put_leaf_maybe_grow_ptrtbl
	b	.L1
.L17:
	ldr	r7, [sp, #16]
	mov	r4, r0
	mov	r2, r9
	mov	r1, #1
	mov	r0, r7
	bl	zap_increment_num_entries
	b	.L5
.L18:
	mov	r7, r3
	ldr	r3, .L21+20
	mov	r4, r0
	ldr	r3, [r3]
	cmp	r3, r0
	bne	.L5
	b	.L1
.L20:
	bl	__stack_chk_fail
.L22:
	.align	2
.L21:
	.word	.LC0
	.word	RW_WRITER
	.word	ENOENT
	.word	EAGAIN
	.word	EEXIST
	.word	ENOSPC
	.size	fzap_add_cd, .-fzap_add_cd
	.comm	RW_WRITER,4,4
	.comm	ENOSPC,4,4
	.comm	ENOENT,4,4
	.comm	EEXIST,4,4
	.comm	EAGAIN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
