	.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	16(%rdi), %r12
	movq	32(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%rdi)
	jle	LBB0_5
## %bb.1:
	xorl	%ebx, %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%rdi), %r14
	leaq	(%r14,%rbx), %rdx
	addq	$24, %rdx
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movl	$4, %esi
	movq	%rax, %r15
	callq	_dma_alloc_coherent
	testq	%rax, %rax
	je	LBB0_3
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%r14,%rbx), %rdi
	movq	%rax, 16(%r14,%rbx)
	callq	_TX_DESC_RINGSIZE
	leaq	(%r14,%rbx), %rdx
	addq	$8, %rdx
	movl	(%r15), %ecx
	movq	%r12, %r15
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_dma_alloc_coherent
	testq	%rax, %rax
	je	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, (%r14,%rbx)
	incq	%r13
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movslq	(%rdi), %rax
	addq	$32, %rbx
	cmpq	%rax, %r13
	movq	%r15, %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	jl	LBB0_2
LBB0_5:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	cmpl	$0, 4(%rdi)
	movq	%rdi, %r15
	jle	LBB0_14
## %bb.6:
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %r14
	leaq	(%r14,%rbx), %rdi
	movq	16(%r15), %r12
	callq	_RCV_DESC_RINGSIZE
	leaq	(%r14,%rbx), %rdx
	addq	$8, %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_dma_alloc_coherent
	testq	%rax, %rax
	je	LBB0_8
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%rax, (%r14,%rbx)
	incq	%r13
	movslq	4(%r15), %rax
	addq	$16, %rbx
	cmpq	%rax, %r13
	jl	LBB0_7
LBB0_14:
	cmpl	$0, 8(%r15)
	jle	LBB0_19
## %bb.15:
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r14
	leaq	(%r14,%rbx), %rdi
	movq	16(%r15), %r12
	callq	_STATUS_DESC_RINGSIZE
	leaq	(%r14,%rbx), %rdx
	addq	$8, %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_dma_alloc_coherent
	testq	%rax, %rax
	je	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	%rax, (%r14,%rbx)
	incq	%r13
	movslq	8(%r15), %rax
	addq	$16, %rbx
	cmpq	%rax, %r13
	jl	LBB0_16
LBB0_19:
	xorl	%ebx, %ebx
	jmp	LBB0_20
LBB0_3:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_20
LBB0_11:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_12
LBB0_8:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_9
LBB0_17:
	leaq	L_.str.3(%rip), %rsi
LBB0_9:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_12:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_qlcnic_free_hw_resources
LBB0_20:
	movl	%ebx, %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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to allocate tx consumer\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"failed to allocate tx desc ring\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to allocate rds ring [%d]\n"

L_.str.3:                               ## @.str.3
	.asciz	"failed to allocate sds ring [%d]\n"

.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:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	x20, [x0, #16]
	ldr	x23, [x0, #32]
	ldr	w8, [x0]
Lloh0:
	adrp	x24, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x24, [x24, _GFP_KERNEL@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x22, #0
	mov	x25, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x26, [x19, #24]
	add	x21, x26, x22
	add	x2, x21, #24
	ldr	w3, [x24]
	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, [x24]
	mov	x0, x20
	bl	_dma_alloc_coherent
	cbz	x0, LBB0_15
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	str	x0, [x26, x22]
	add	x25, x25, #1
	ldrsw	x8, [x19]
	add	x22, x22, #32
	cmp	x25, x8
	b.lt	LBB0_2
LBB0_5:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.6:
	mov	x26, #0
	mov	x25, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x27, [x23, #8]
	add	x21, x27, x26
	ldr	x22, [x19, #16]
	mov	x0, x21
	bl	_RCV_DESC_RINGSIZE
	mov	x1, x0
	add	x2, x21, #8
	ldr	w3, [x24]
	mov	x0, x22
	bl	_dma_alloc_coherent
	cbz	x0, LBB0_16
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	str	x0, [x27, x26]
	add	x25, x25, #1
	ldrsw	x8, [x19, #4]
	add	x26, x26, #16
	cmp	x25, x8
	b.lt	LBB0_7
LBB0_9:
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.10:
	mov	x26, #0
	mov	x25, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x27, [x23]
	add	x21, x27, x26
	ldr	x22, [x19, #16]
	mov	x0, x21
	bl	_STATUS_DESC_RINGSIZE
	mov	x1, x0
	add	x2, x21, #8
	ldr	w3, [x24]
	mov	x0, x22
	bl	_dma_alloc_coherent
	cbz	x0, LBB0_17
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	str	x0, [x27, x26]
	add	x25, x25, #1
	ldrsw	x8, [x19, #8]
	add	x26, x26, #16
	cmp	x25, x8
	b.lt	LBB0_11
LBB0_13:
	mov	w20, #0
	b	LBB0_19
LBB0_14:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_19
LBB0_15:
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_18
LBB0_16:
	str	x25, [sp]
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_18
LBB0_17:
	str	x25, [sp]
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_18:
	mov	x0, x20
	bl	_dev_err
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w20, w8
	mov	x0, x19
	bl	_qlcnic_free_hw_resources
LBB0_19:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to allocate tx consumer\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"failed to allocate tx desc ring\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to allocate rds ring [%d]\n"

l_.str.3:                               ; @.str.3
	.asciz	"failed to allocate sds ring [%d]\n"

.subsections_via_symbols
