	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function addtgt
_addtgt:                                ## @addtgt
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	8(%rdi), %rbx
	movslq	(%rdi), %rcx
	leaq	(%rbx,%rcx,8), %rax
	testq	%rcx, %rcx
	jle	LBB0_3
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rbx)
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	addq	$8, %rbx
	cmpq	%rax, %rbx
	jb	LBB0_1
LBB0_3:
	cmpq	%rax, %rbx
	jne	LBB0_5
## %bb.4:
	movq	%r12, %rdi
	callq	_grow_targets
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_7
LBB0_5:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%rax, %r13
	movl	%r15d, (%rax)
	movq	%r12, 24(%rax)
	movl	20(%rax), %edi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_memcpy
	movl	12(%r13), %eax
	movl	%eax, 16(%r13)
	movq	%r13, %rdi
	callq	_aoecmd_wreset
	movl	(%r13), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movl	%ecx, 4(%r13)
	movq	%r13, %rdi
	addq	$8, %rdi
	callq	_INIT_LIST_HEAD
	movq	%r13, (%rbx)
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str(%rip), %rdi
	callq	_pr_info
	xorl	%r13d, %r13d
LBB0_8:
	movq	%r13, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"aoe: cannot allocate memory to add target\n"

	.no_dead_strip	_addtgt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function addtgt
_addtgt:                                ; @addtgt
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x2
	mov	x20, x1
	mov	x22, x0
	ldr	x19, [x0, #8]
	ldrsw	x9, [x0]
	add	x8, x19, x9, lsl #3
	cmp	w9, #1
	b.lt	LBB0_3
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19]
	cbz	x9, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x19, x19, #8
	cmp	x19, x8
	b.lo	LBB0_1
LBB0_3:
	cmp	x19, x8
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x22
	bl	_grow_targets
	mov	x19, x0
	cbz	x0, LBB0_7
LBB0_5:
Lloh0:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_7
; %bb.6:
	mov	x23, x0
	str	w21, [x0]
	str	x22, [x0, #24]
	ldr	w0, [x0, #20]
	mov	x1, x20
	mov	w2, #4
	bl	_memcpy
	ldr	w8, [x23, #12]
	str	w8, [x23, #16]
	mov	x0, x23
	bl	_aoecmd_wreset
	ldr	w8, [x23]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	str	w8, [x23, #4]
	add	x0, x23, #8
	bl	_INIT_LIST_HEAD
	str	x23, [x19]
	b	LBB0_8
LBB0_7:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
	mov	x23, #0
LBB0_8:
	mov	x0, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"aoe: cannot allocate memory to add target\n"

	.no_dead_strip	_addtgt
.subsections_via_symbols
