	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2_alloc_bad_rbuf
_bnx2_alloc_bad_rbuf:                   ## @bnx2_alloc_bad_rbuf
	.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	%rdi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$512, %edi                      ## imm = 0x200
	movl	$4, %esi
	callq	_kmalloc_array
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_BNX2_MISC_ENABLE_SET_BITS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_BNX2_MISC_ENABLE_SET_BITS_RX_MBUF_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_BNX2_WR
	movq	_BNX2_RBUF_STATUS1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_bnx2_reg_rd_ind
	movq	_BNX2_RBUF_STATUS1_FREE_COUNT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
## %bb.3:
	xorl	%r12d, %r12d
	movq	_BNX2_RBUF_COMMAND_ALLOC_REQ@GOTPCREL(%rip), %rbx
	movq	_BNX2_RBUF_FW_BUF_ALLOC@GOTPCREL(%rip), %r13
	movq	_BNX2_RBUF_FW_BUF_ALLOC_VALUE@GOTPCREL(%rip), %r14
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_BNX2_RBUF_STATUS1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_bnx2_reg_rd_ind
	movq	_BNX2_RBUF_STATUS1_FREE_COUNT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	_BNX2_RBUF_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	movq	%r15, %rdi
	callq	_bnx2_reg_wr_ind
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_bnx2_reg_rd_ind
	andl	(%r14), %eax
	testl	$512, %eax                      ## imm = 0x200
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movslq	%r12d, %r12
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx,%r12,4)
	incl	%r12d
	jmp	LBB0_6
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_11
LBB0_7:
	testl	%r12d, %r12d
	je	LBB0_10
## %bb.8:
	movslq	%r12d, %rax
	negl	%r12d
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %r14
	addq	$-4, %r14
	xorl	%ebx, %ebx
	movq	_BNX2_RBUF_FW_BUF_FREE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14,%rbx,4), %eax
	movl	%eax, %edx
	shll	$9, %edx
	orl	%eax, %edx
	orl	$1, %edx
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_bnx2_reg_wr_ind
	decq	%rbx
	cmpl	%ebx, %r12d
	jne	LBB0_9
LBB0_10:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_kfree
	xorl	%eax, %eax
LBB0_11:
	addq	$8, %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
	.comm	_BNX2_MISC_ENABLE_SET_BITS,4,2  ## @BNX2_MISC_ENABLE_SET_BITS
	.comm	_BNX2_MISC_ENABLE_SET_BITS_RX_MBUF_ENABLE,4,2 ## @BNX2_MISC_ENABLE_SET_BITS_RX_MBUF_ENABLE
	.comm	_BNX2_RBUF_STATUS1,4,2          ## @BNX2_RBUF_STATUS1
	.comm	_BNX2_RBUF_STATUS1_FREE_COUNT,4,2 ## @BNX2_RBUF_STATUS1_FREE_COUNT
	.comm	_BNX2_RBUF_COMMAND,4,2          ## @BNX2_RBUF_COMMAND
	.comm	_BNX2_RBUF_COMMAND_ALLOC_REQ,4,2 ## @BNX2_RBUF_COMMAND_ALLOC_REQ
	.comm	_BNX2_RBUF_FW_BUF_ALLOC,4,2     ## @BNX2_RBUF_FW_BUF_ALLOC
	.comm	_BNX2_RBUF_FW_BUF_ALLOC_VALUE,4,2 ## @BNX2_RBUF_FW_BUF_ALLOC_VALUE
	.comm	_BNX2_RBUF_FW_BUF_FREE,4,2      ## @BNX2_RBUF_FW_BUF_FREE
	.no_dead_strip	_bnx2_alloc_bad_rbuf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2_alloc_bad_rbuf
_bnx2_alloc_bad_rbuf:                   ; @bnx2_alloc_bad_rbuf
	.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, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w0, #512
	mov	w1, #4
	bl	_kmalloc_array
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x8, _BNX2_MISC_ENABLE_SET_BITS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BNX2_MISC_ENABLE_SET_BITS@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _BNX2_MISC_ENABLE_SET_BITS_RX_MBUF_ENABLE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BNX2_MISC_ENABLE_SET_BITS_RX_MBUF_ENABLE@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_BNX2_WR
Lloh9:
	adrp	x22, _BNX2_RBUF_STATUS1@GOTPAGE
Lloh10:
	ldr	x22, [x22, _BNX2_RBUF_STATUS1@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_bnx2_reg_rd_ind
Lloh11:
	adrp	x23, _BNX2_RBUF_STATUS1_FREE_COUNT@GOTPAGE
Lloh12:
	ldr	x23, [x23, _BNX2_RBUF_STATUS1_FREE_COUNT@GOTPAGEOFF]
	ldr	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_10
; %bb.2:
	mov	w21, #0
Lloh13:
	adrp	x24, _BNX2_RBUF_COMMAND@GOTPAGE
Lloh14:
	ldr	x24, [x24, _BNX2_RBUF_COMMAND@GOTPAGEOFF]
Lloh15:
	adrp	x25, _BNX2_RBUF_COMMAND_ALLOC_REQ@GOTPAGE
Lloh16:
	ldr	x25, [x25, _BNX2_RBUF_COMMAND_ALLOC_REQ@GOTPAGEOFF]
Lloh17:
	adrp	x26, _BNX2_RBUF_FW_BUF_ALLOC@GOTPAGE
Lloh18:
	ldr	x26, [x26, _BNX2_RBUF_FW_BUF_ALLOC@GOTPAGEOFF]
Lloh19:
	adrp	x27, _BNX2_RBUF_FW_BUF_ALLOC_VALUE@GOTPAGE
Lloh20:
	ldr	x27, [x27, _BNX2_RBUF_FW_BUF_ALLOC_VALUE@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	bl	_bnx2_reg_rd_ind
	ldr	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24]
	ldr	w2, [x25]
	mov	x0, x19
	bl	_bnx2_reg_wr_ind
	ldr	w1, [x26]
	mov	x0, x19
	bl	_bnx2_reg_rd_ind
	ldr	w8, [x27]
	and	w8, w8, w0
	tbnz	w8, #9, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	str	w8, [x20, w21, sxtw #2]
	add	w21, w21, #1
	b	LBB0_3
LBB0_6:
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_7:
	cbz	w21, LBB0_10
; %bb.8:
	add	x8, x20, w21, sxtw #2
	sub	x22, x8, #4
Lloh24:
	adrp	x23, _BNX2_RBUF_FW_BUF_FREE@GOTPAGE
Lloh25:
	ldr	x23, [x23, _BNX2_RBUF_FW_BUF_FREE@GOTPAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22], #-4
	orr	w8, w8, w8, lsl #9
	orr	w2, w8, #0x1
	ldr	w1, [x23]
	mov	x0, x19
	bl	_bnx2_reg_wr_ind
	subs	w21, w21, #1
	b.ne	LBB0_9
LBB0_10:
	mov	x0, x20
	bl	_kfree
	mov	w0, #0
LBB0_11:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_BNX2_MISC_ENABLE_SET_BITS,4,2  ; @BNX2_MISC_ENABLE_SET_BITS
	.comm	_BNX2_MISC_ENABLE_SET_BITS_RX_MBUF_ENABLE,4,2 ; @BNX2_MISC_ENABLE_SET_BITS_RX_MBUF_ENABLE
	.comm	_BNX2_RBUF_STATUS1,4,2          ; @BNX2_RBUF_STATUS1
	.comm	_BNX2_RBUF_STATUS1_FREE_COUNT,4,2 ; @BNX2_RBUF_STATUS1_FREE_COUNT
	.comm	_BNX2_RBUF_COMMAND,4,2          ; @BNX2_RBUF_COMMAND
	.comm	_BNX2_RBUF_COMMAND_ALLOC_REQ,4,2 ; @BNX2_RBUF_COMMAND_ALLOC_REQ
	.comm	_BNX2_RBUF_FW_BUF_ALLOC,4,2     ; @BNX2_RBUF_FW_BUF_ALLOC
	.comm	_BNX2_RBUF_FW_BUF_ALLOC_VALUE,4,2 ; @BNX2_RBUF_FW_BUF_ALLOC_VALUE
	.comm	_BNX2_RBUF_FW_BUF_FREE,4,2      ; @BNX2_RBUF_FW_BUF_FREE
	.no_dead_strip	_bnx2_alloc_bad_rbuf
.subsections_via_symbols
