	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_res_chunk_list
_alloc_res_chunk_list:                  ## @alloc_res_chunk_list
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	(%rsi), %rax
	movq	_USNIC_VNIC_RES_TYPE_EOL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	incl	%edi
	leaq	16(%rax), %rdx
	cmpq	%rcx, (%rax)
	movq	%rdx, %rax
	jne	LBB0_1
## %bb.2:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$8, %esi
	callq	_kcalloc
	testq	%rax, %rax
	je	LBB0_16
## %bb.3:
	movq	%rax, %r13
	movq	(%r12), %rax
	movq	(%rax), %rbx
	movq	_USNIC_VNIC_RES_TYPE_EOL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rbx
	je	LBB0_15
## %bb.4:
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%rax,%r15), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	callq	_usnic_vnic_get_resources
	movq	%rax, (%r13,%r14,8)
	movq	%rax, %rdi
	callq	_IS_ERR_OR_NULL
	testq	%rax, %rax
	jne	LBB0_6
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	incq	%r14
	movq	(%r12), %rax
	movq	16(%rax,%r15), %rbx
	addq	$16, %r15
	movq	_USNIC_VNIC_RES_TYPE_EOL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rbx
	jne	LBB0_5
LBB0_15:
	movq	%r13, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_13
LBB0_6:
	movl	%r14d, %eax
	movq	(%r13,%rax,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:
	callq	_PTR_ERR
	movl	%eax, %r15d
	jmp	LBB0_9
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_9:
	movl	%ebx, %edi
	callq	_usnic_vnic_res_type_to_str
	movl	%eax, %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_usnic_vnic_pci_name
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	movl	%r15d, %ecx
	callq	_usnic_err
	testl	%r14d, %r14d
	je	LBB0_12
## %bb.10:
	movl	%r14d, %ebx
	decq	%rbx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %eax
	movq	(%r13,%rax,8), %rdi
	callq	_usnic_vnic_put_resources
	decq	%rbx
	leal	2(%rbx), %eax
	cmpl	$1, %eax
	jg	LBB0_11
LBB0_12:
	movq	%r13, %rdi
	callq	_kfree
LBB0_13:
	movl	%r15d, %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_USNIC_VNIC_RES_TYPE_EOL,8,3    ## @USNIC_VNIC_RES_TYPE_EOL
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to get %s from %s with err %d\n"

	.no_dead_strip	_alloc_res_chunk_list
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alloc_res_chunk_list
_alloc_res_chunk_list:                  ; @alloc_res_chunk_list
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
	mov	w0, #0
	ldr	x8, [x1]
Lloh0:
	adrp	x25, _USNIC_VNIC_RES_TYPE_EOL@GOTPAGE
Lloh1:
	ldr	x25, [x25, _USNIC_VNIC_RES_TYPE_EOL@GOTPAGEOFF]
	ldr	x9, [x25]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x8], #16
	add	w0, w0, #1
	cmp	x10, x9
	b.ne	LBB0_1
; %bb.2:
Lloh2:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	w1, #8
	bl	_kcalloc
	cbz	x0, LBB0_8
; %bb.3:
	mov	x19, x0
	ldr	x8, [x22]
	ldr	x23, [x8]
	ldr	x9, [x25]
	cmp	x23, x9
	b.eq	LBB0_7
; %bb.4:
	mov	x26, #0
	mov	x24, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x8, x26
	ldr	w2, [x8, #8]
	mov	x0, x20
	mov	x1, x23
	mov	x3, x21
	bl	_usnic_vnic_get_resources
	str	x0, [x19, x24, lsl #3]
	bl	_IS_ERR_OR_NULL
	cbnz	x0, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x24, x24, #1
	ldr	x8, [x22]
	add	x9, x8, x26
	ldr	x23, [x9, #16]
	ldr	x9, [x25]
	add	x26, x26, #16
	cmp	x23, x9
	b.ne	LBB0_5
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_8:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_16
LBB0_9:
	ldr	x0, [x19, w24, uxtw #3]
	cbz	x0, LBB0_11
; %bb.10:
	bl	_PTR_ERR
	mov	x21, x0
	b	LBB0_12
LBB0_11:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_12:
	mov	x0, x23
	bl	_usnic_vnic_res_type_to_str
	mov	x22, x0
	mov	x0, x20
	bl	_usnic_vnic_pci_name
	mov	x2, x0
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	mov	x3, x21
	bl	_usnic_err
	cbz	w24, LBB0_15
; %bb.13:
	and	x8, x24, #0xffffffff
	sub	x20, x8, #1
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19, w20, uxtw #3]
	bl	_usnic_vnic_put_resources
	sub	x20, x20, #1
	add	w8, w20, #2
	cmp	w8, #1
	b.gt	LBB0_14
LBB0_15:
	mov	x0, x19
	bl	_kfree
LBB0_16:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_ERR_PTR
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_USNIC_VNIC_RES_TYPE_EOL,8,3    ; @USNIC_VNIC_RES_TYPE_EOL
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to get %s from %s with err %d\n"

	.no_dead_strip	_alloc_res_chunk_list
.subsections_via_symbols
