	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnxt_alloc_ring
_bnxt_alloc_ring:                       ## @bnxt_alloc_ring
	.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
	movq	%rsi, %r13
	movl	(%rsi), %eax
	movq	_BNXT_RMEM_VALID_PTE_FLAG@GOTPCREL(%rip), %rcx
	movq	_BNXT_RMEM_RING_PTE_FLAG@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r12d
	orl	(%rcx), %r12d
	andl	%eax, %r12d
	je	LBB0_2
## %bb.1:
	movq	_PTU_PTE_VALID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
LBB0_2:
	movq	(%rdi), %r14
	movslq	4(%r13), %rsi
	cmpq	$1, %rsi
	jg	LBB0_4
## %bb.3:
	cmpq	$0, 8(%r13)
	jle	LBB0_10
LBB0_4:
	cmpq	$0, 56(%r13)
	je	LBB0_5
LBB0_10:
	testl	%esi, %esi
	jle	LBB0_24
LBB0_11:
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	_BNXT_RMEM_RING_PTE_FLAG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r13)
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	_PTU_PTE_NEXT_TO_LAST@GOTPCREL(%rip), %rax
LBB0_21:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	(%rax), %edi
	orl	%r12d, %edi
LBB0_22:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	32(%r13), %rax
	orl	(%rax,%r15,4), %edi
	callq	_cpu_to_le64
	movq	56(%r13), %rcx
	movl	%eax, (%rcx,%r15,4)
	movl	4(%r13), %eax
LBB0_23:                                ##   in Loop: Header=BB0_12 Depth=1
	incq	%r15
	cltq
	addq	$4, %rbx
	cmpq	%rax, %r15
	jge	LBB0_24
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r13), %rsi
	movq	32(%r13), %rdx
	addq	%rbx, %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	callq	_dma_alloc_coherent
	movq	64(%r13), %rcx
	movq	%rax, (%rcx,%r15,8)
	movq	64(%r13), %rax
	cmpq	$0, (%rax,%r15,8)
	je	LBB0_26
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	4(%r13), %eax
	cmpl	$1, %eax
	jg	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	cmpq	$0, 8(%r13)
	jle	LBB0_23
LBB0_15:                                ##   in Loop: Header=BB0_12 Depth=1
	leal	-2(%rax), %ecx
	cmpq	%rcx, %r15
	je	LBB0_16
LBB0_18:                                ##   in Loop: Header=BB0_12 Depth=1
	decl	%eax
	movl	%r12d, %edi
	cmpq	%rax, %r15
	jne	LBB0_22
## %bb.19:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	_BNXT_RMEM_RING_PTE_FLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%r12d, %edi
	testl	%eax, (%r13)
	je	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	_PTU_PTE_LAST@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_5:
	movq	_BNXT_RMEM_USE_FULL_PAGE_FLAG@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.7:
	movq	16(%r13), %rsi
	jmp	LBB0_8
LBB0_6:
	shlq	$3, %rsi
LBB0_8:
	leaq	24(%r13), %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	callq	_dma_alloc_coherent
	movq	%rax, 56(%r13)
	testq	%rax, %rax
	je	LBB0_26
## %bb.9:
	movl	4(%r13), %esi
	testl	%esi, %esi
	jg	LBB0_11
LBB0_24:
	movq	48(%r13), %rdi
	xorl	%r14d, %r14d
	testq	%rdi, %rdi
	je	LBB0_27
## %bb.25:
	callq	_vzalloc
	movq	40(%r13), %rcx
	movl	%eax, (%rcx)
	testl	%eax, %eax
	jne	LBB0_27
LBB0_26:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_27:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BNXT_RMEM_VALID_PTE_FLAG,4,2   ## @BNXT_RMEM_VALID_PTE_FLAG
	.comm	_BNXT_RMEM_RING_PTE_FLAG,4,2    ## @BNXT_RMEM_RING_PTE_FLAG
	.comm	_PTU_PTE_VALID,4,2              ## @PTU_PTE_VALID
	.comm	_BNXT_RMEM_USE_FULL_PAGE_FLAG,4,2 ## @BNXT_RMEM_USE_FULL_PAGE_FLAG
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PTU_PTE_NEXT_TO_LAST,4,2       ## @PTU_PTE_NEXT_TO_LAST
	.comm	_PTU_PTE_LAST,4,2               ## @PTU_PTE_LAST
	.no_dead_strip	_bnxt_alloc_ring
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnxt_alloc_ring
_bnxt_alloc_ring:                       ; @bnxt_alloc_ring
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x1
	ldr	x20, [x0]
Lloh0:
	adrp	x8, _BNXT_RMEM_VALID_PTE_FLAG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BNXT_RMEM_VALID_PTE_FLAG@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x21, _BNXT_RMEM_RING_PTE_FLAG@GOTPAGE
Lloh4:
	ldr	x21, [x21, _BNXT_RMEM_RING_PTE_FLAG@GOTPAGEOFF]
	ldr	w9, [x21]
	orr	w10, w9, w8
	ldp	w9, w8, [x1]
	tst	w10, w9
Lloh5:
	adrp	x10, _PTU_PTE_VALID@GOTPAGE
Lloh6:
	ldr	x10, [x10, _PTU_PTE_VALID@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	csel	w22, wzr, w10, eq
	cmp	w8, #1
	b.gt	LBB0_2
; %bb.1:
	ldr	x10, [x19, #8]
	cmp	x10, #1
	b.lt	LBB0_3
LBB0_2:
	ldr	x10, [x19, #56]
	cbz	x10, LBB0_17
LBB0_3:
	cmp	w8, #1
	b.lt	LBB0_22
LBB0_4:
	mov	x23, #0
	mov	x24, #0
Lloh8:
	adrp	x25, _GFP_KERNEL@GOTPAGE
Lloh9:
	ldr	x25, [x25, _GFP_KERNEL@GOTPAGEOFF]
Lloh10:
	adrp	x26, _PTU_PTE_NEXT_TO_LAST@GOTPAGE
Lloh11:
	ldr	x26, [x26, _PTU_PTE_NEXT_TO_LAST@GOTPAGEOFF]
Lloh12:
	adrp	x27, _PTU_PTE_LAST@GOTPAGE
Lloh13:
	ldr	x27, [x27, _PTU_PTE_LAST@GOTPAGEOFF]
	b	LBB0_10
LBB0_5:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x19]
	ldr	w10, [x21]
	tst	w10, w8
	b.eq	LBB0_14
; %bb.6:                                ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x26]
LBB0_7:                                 ;   in Loop: Header=BB0_10 Depth=1
	orr	w8, w8, w22
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	x9, [x19, #32]
	lsl	x28, x24, #2
	ldr	w9, [x9, x28]
	orr	w0, w9, w8
	bl	_cpu_to_le64
	ldr	x8, [x19, #56]
	str	w0, [x8, x28]
	ldr	w8, [x19, #4]
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x24, x24, #1
	add	x23, x23, #4
	cmp	x24, w8, sxtw
	b.ge	LBB0_22
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x19, #16]
	ldr	x8, [x19, #32]
	add	x2, x8, x23
	ldr	w3, [x25]
	mov	x0, x20
	bl	_dma_alloc_coherent
	ldr	x8, [x19, #64]
	lsl	x9, x24, #3
	str	x0, [x8, x9]
	ldr	x8, [x19, #64]
	ldr	x8, [x8, x9]
	cbz	x8, LBB0_25
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x19, #4]
	subs	w9, w8, #1
	b.gt	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x10, [x19, #8]
	cmp	x10, #1
	b.lt	LBB0_9
LBB0_13:                                ;   in Loop: Header=BB0_10 Depth=1
	sub	w8, w8, #2
	cmp	x24, x8
	b.eq	LBB0_5
LBB0_14:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	x8, x22
	cmp	x24, x9
	b.ne	LBB0_8
; %bb.15:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w9, [x19]
	ldr	w10, [x21]
	mov	x8, x22
	tst	w10, w9
	b.eq	LBB0_8
; %bb.16:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x27]
	b	LBB0_7
LBB0_17:
Lloh14:
	adrp	x10, _BNXT_RMEM_USE_FULL_PAGE_FLAG@GOTPAGE
Lloh15:
	ldr	x10, [x10, _BNXT_RMEM_USE_FULL_PAGE_FLAG@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_19
; %bb.18:
	ldr	x1, [x19, #16]
	b	LBB0_20
LBB0_19:
	sxtw	x8, w8
	lsl	x1, x8, #3
LBB0_20:
	add	x2, x19, #24
Lloh17:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x8]
	mov	x0, x20
	bl	_dma_alloc_coherent
	str	x0, [x19, #56]
	cbz	x0, LBB0_25
; %bb.21:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.ge	LBB0_4
LBB0_22:
	ldr	x0, [x19, #48]
	cbz	x0, LBB0_26
; %bb.23:
	bl	_vzalloc
	ldr	x8, [x19, #40]
	str	w0, [x8]
	cbz	w0, LBB0_25
; %bb.24:
	mov	w0, #0
	b	LBB0_26
LBB0_25:
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_26:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_BNXT_RMEM_VALID_PTE_FLAG,4,2   ; @BNXT_RMEM_VALID_PTE_FLAG
	.comm	_BNXT_RMEM_RING_PTE_FLAG,4,2    ; @BNXT_RMEM_RING_PTE_FLAG
	.comm	_PTU_PTE_VALID,4,2              ; @PTU_PTE_VALID
	.comm	_BNXT_RMEM_USE_FULL_PAGE_FLAG,4,2 ; @BNXT_RMEM_USE_FULL_PAGE_FLAG
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PTU_PTE_NEXT_TO_LAST,4,2       ; @PTU_PTE_NEXT_TO_LAST
	.comm	_PTU_PTE_LAST,4,2               ; @PTU_PTE_LAST
	.no_dead_strip	_bnxt_alloc_ring
.subsections_via_symbols
