	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qlcnic_alloc_hw_resources      ## -- Begin function qlcnic_alloc_hw_resources
	.p2align	4, 0x90
_qlcnic_alloc_hw_resources:             ## @qlcnic_alloc_hw_resources
	.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	%rdi, %rcx
	movq	32(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%rdi)
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	jle	LBB0_5
## %bb.1:
	movq	16(%rcx), %r15
	xorl	%ebx, %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r14
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%rcx), %r13
	leaq	(%rbx,%r13), %rdx
	addq	$24, %rdx
	movl	(%r14), %ecx
	movq	%r15, %rdi
	movl	$4, %esi
	callq	_dma_alloc_coherent
	testq	%rax, %rax
	je	LBB0_14
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%rbx,%r13), %rdi
	movq	%rax, 16(%r13,%rbx)
	callq	_TX_DESC_RINGSIZE
	leaq	(%rbx,%r13), %rdx
	addq	$8, %rdx
	movl	(%r14), %ecx
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_dma_alloc_coherent
	testq	%rax, %rax
	je	LBB0_14
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, (%r13,%rbx)
	incq	%r12
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movslq	(%rcx), %rax
	addq	$32, %rbx
	cmpq	%rax, %r12
	jl	LBB0_2
LBB0_5:
	cmpl	$0, 4(%rcx)
	jle	LBB0_9
## %bb.6:
	xorl	%ebx, %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %r12
	leaq	(%r12,%rbx), %rdi
	movq	16(%rcx), %r14
	callq	_RCV_DESC_RINGSIZE
	leaq	(%r12,%rbx), %rdx
	addq	$8, %rdx
	movl	(%r15), %ecx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_dma_alloc_coherent
	testq	%rax, %rax
	je	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%rax, (%r12,%rbx)
	incq	%r13
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movslq	4(%rcx), %rax
	addq	$16, %rbx
	cmpq	%rax, %r13
	jl	LBB0_7
LBB0_9:
	cmpl	$0, 8(%rcx)
	jle	LBB0_16
## %bb.10:
	xorl	%ebx, %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r12
	leaq	(%r12,%rbx), %rdi
	movq	16(%rcx), %r14
	callq	_STATUS_DESC_RINGSIZE
	leaq	(%r12,%rbx), %rdx
	addq	$8, %rdx
	movl	(%r15), %ecx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_dma_alloc_coherent
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%rax, (%r12,%rbx)
	incq	%r13
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movslq	8(%rcx), %rax
	addq	$16, %rbx
	cmpq	%rax, %r13
	jl	LBB0_11
LBB0_16:
	xorl	%r14d, %r14d
	jmp	LBB0_15
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_qlcnic_free_hw_resources
LBB0_15:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qlcnic_alloc_hw_resources      ; -- Begin function qlcnic_alloc_hw_resources
	.p2align	2
_qlcnic_alloc_hw_resources:             ; @qlcnic_alloc_hw_resources
	.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	x19, x0
	ldr	x22, [x0, #32]
	ldr	w8, [x0]
Lloh0:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x24, #0
	mov	x25, #0
	ldr	x20, [x19, #16]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x26, [x19, #24]
	add	x21, x26, x24
	add	x2, x21, #24
	ldr	w3, [x23]
	mov	x0, x20
	mov	w1, #4
	bl	_dma_alloc_coherent
	cbz	x0, LBB0_14
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	str	x0, [x21, #16]
	mov	x0, x21
	bl	_TX_DESC_RINGSIZE
	mov	x1, x0
	add	x2, x21, #8
	ldr	w3, [x23]
	mov	x0, x20
	bl	_dma_alloc_coherent
	cbz	x0, LBB0_14
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	str	x0, [x26, x24]
	add	x25, x25, #1
	ldrsw	x8, [x19]
	add	x24, x24, #32
	cmp	x25, x8
	b.lt	LBB0_2
LBB0_5:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.6:
	mov	x24, #0
	mov	x25, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x26, [x22, #8]
	add	x20, x26, x24
	ldr	x21, [x19, #16]
	mov	x0, x20
	bl	_RCV_DESC_RINGSIZE
	mov	x1, x0
	add	x2, x20, #8
	ldr	w3, [x23]
	mov	x0, x21
	bl	_dma_alloc_coherent
	cbz	x0, LBB0_14
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	str	x0, [x26, x24]
	add	x25, x25, #1
	ldrsw	x8, [x19, #4]
	add	x24, x24, #16
	cmp	x25, x8
	b.lt	LBB0_7
LBB0_9:
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.10:
	mov	x24, #0
	mov	x25, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x26, [x22]
	add	x20, x26, x24
	ldr	x21, [x19, #16]
	mov	x0, x20
	bl	_STATUS_DESC_RINGSIZE
	mov	x1, x0
	add	x2, x20, #8
	ldr	w3, [x23]
	mov	x0, x21
	bl	_dma_alloc_coherent
	cbz	x0, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	str	x0, [x26, x24]
	add	x25, x25, #1
	ldrsw	x8, [x19, #8]
	add	x24, x24, #16
	cmp	x25, x8
	b.lt	LBB0_11
LBB0_13:
	mov	w20, #0
	b	LBB0_15
LBB0_14:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
	mov	x0, x19
	bl	_qlcnic_free_hw_resources
LBB0_15:
	mov	x0, x20
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
