	.file	"extr_aoecmd.c_addtgt.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"aoe: cannot allocate memory to add target\n"
	.text
	.p2align 4
	.type	addtgt, @function
addtgt:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14d, edx
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, QWORD PTR 8[rdi]
	movsx	rax, DWORD PTR [rdi]
	lea	rax, [rbx+rax*8]
	cmp	rbx, rax
	jb	.L2
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	add	rbx, 8
	cmp	rax, rbx
	jbe	.L3
.L2:
	cmp	QWORD PTR [rbx], 0
	jne	.L4
.L3:
	cmp	rax, rbx
	je	.L17
.L5:
	mov	esi, DWORD PTR GFP_ATOMIC[rip]
	mov	edi, 32
	call	kzalloc@PLT
	mov	r12, rax
	test	rax, rax
	je	.L6
	mov	DWORD PTR [rax], r14d
	mov	edi, DWORD PTR 20[rax]
	mov	rsi, r13
	mov	edx, 4
	mov	QWORD PTR 24[rax], rbp
	call	memcpy@PLT
	mov	eax, DWORD PTR 12[r12]
	mov	rdi, r12
	mov	DWORD PTR 16[r12], eax
	call	aoecmd_wreset@PLT
	mov	edx, DWORD PTR [r12]
	lea	rdi, 8[r12]
	mov	eax, edx
	shr	eax, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR 4[r12], eax
	call	INIT_LIST_HEAD@PLT
	mov	QWORD PTR [rbx], r12
	mov	rax, r12
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	rdi, rbp
	call	grow_targets@PLT
	mov	rbx, rax
	test	rax, rax
	jne	.L5
.L6:
	xor	r12d, r12d
	lea	rdi, .LC0[rip]
	call	pr_info@PLT
	pop	rbx
	.cfi_def_cfa_offset 40
	mov	rax, r12
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	addtgt, .-addtgt
	.comm	GFP_ATOMIC,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_aoecmd.c_addtgt.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"aoe: cannot allocate memory to add target\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	addtgt, %function
addtgt:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r4, [r0, #4]
	ldr	lr, [r0]
	mov	r6, r0
	add	lr, r4, lr, lsl #2
	cmp	r4, lr
	mov	r7, r1
	mov	r8, r2
	bcs	.L2
	mov	r3, r4
	b	.L3
.L4:
	cmp	lr, r3
	mov	r4, r3
	bls	.L2
.L3:
	ldr	ip, [r3]
	mov	r4, r3
	cmp	ip, #0
	add	r3, r3, #4
	bne	.L4
.L2:
	cmp	lr, r4
	beq	.L16
.L5:
	ldr	r3, .L17
	mov	r0, #28
	ldr	r1, [r3]
	bl	kzalloc
	subs	r5, r0, #0
	beq	.L6
	mov	r1, r7
	mov	r2, #4
	ldr	r0, [r5, #20]
	str	r8, [r5]
	str	r6, [r5, #24]
	bl	memcpy
	ldr	r3, [r5, #12]
	mov	r0, r5
	str	r3, [r5, #16]
	bl	aoecmd_wreset
	ldr	r3, [r5]
	add	r0, r5, #8
	add	r3, r3, r3, lsr #31
	asr	r3, r3, #1
	str	r3, [r5, #4]
	bl	INIT_LIST_HEAD
	mov	r0, r5
	str	r5, [r4]
	pop	{r4, r5, r6, r7, r8, pc}
.L16:
	mov	r0, r6
	bl	grow_targets
	subs	r4, r0, #0
	bne	.L5
.L6:
	mov	r5, #0
	ldr	r0, .L17+4
	bl	pr_info
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L18:
	.align	2
.L17:
	.word	GFP_ATOMIC
	.word	.LC0
	.size	addtgt, .-addtgt
	.comm	GFP_ATOMIC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
