	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2_alloc_rx_mem
_bnx2_alloc_rx_mem:                     ## @bnx2_alloc_rx_mem
	.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
	cmpl	$0, (%rdi)
	jle	LBB0_15
## %bb.1:
	movq	%rdi, %r13
	xorl	%ebx, %ebx
	movq	_SW_RXBD_RING_SIZE@GOTPCREL(%rip), %rax
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
                                        ##     Child Loop BB0_12 Depth 2
	movq	32(%r13), %r15
	movl	(%rax), %edi
	movl	4(%r13), %esi
	callq	_array_size
	movl	%eax, %edi
	callq	_vzalloc
	leaq	(%rbx,%rbx,2), %rcx
	shlq	$4, %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, 40(%r15,%rcx)
	testq	%rax, %rax
	je	LBB0_13
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	cmpl	$0, 4(%r13)
	jle	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	(%r15,%rax), %r12
	addq	$32, %r12
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	16(%r13), %rdi
	movq	_RXBD_RING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r12), %rdx
	addq	%rbx, %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_alloc_coherent
	movq	-8(%r12), %rcx
	movq	%rax, (%rcx,%rbx,2)
	movq	-8(%r12), %rax
	cmpq	$0, (%rax,%rbx,2)
	je	LBB0_13
## %bb.5:                               ##   in Loop: Header=BB0_6 Depth=2
	incq	%r14
	movslq	4(%r13), %rax
	addq	$4, %rbx
	cmpq	%rax, %r14
	jl	LBB0_6
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 24(%r13)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_SW_RXPG_RING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r13), %esi
	callq	_array_size
	movl	%eax, %edi
	callq	_vzalloc
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 16(%r15,%rcx)
	testq	%rax, %rax
	je	LBB0_13
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, 8(%r13)
	jle	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	(%r15,%rax), %r12
	addq	$8, %r12
	addq	%rax, %r15
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	16(%r13), %rdi
	movq	_RXBD_RING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r12), %rdx
	addq	%rbx, %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_alloc_coherent
	movq	(%r15), %rcx
	movq	%rax, (%rcx,%rbx,2)
	movq	(%r15), %rax
	cmpq	$0, (%rax,%rbx,2)
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_12 Depth=2
	incq	%r14
	movslq	8(%r13), %rax
	addq	$4, %rbx
	cmpq	%rax, %r14
	jl	LBB0_12
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	incq	%rbx
	movslq	(%r13), %rax
	cmpq	%rax, %rbx
	movq	_SW_RXBD_RING_SIZE@GOTPCREL(%rip), %rax
	jl	LBB0_2
LBB0_15:
	xorl	%eax, %eax
	jmp	LBB0_16
LBB0_13:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SW_RXBD_RING_SIZE,4,2          ## @SW_RXBD_RING_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_RXBD_RING_SIZE,4,2             ## @RXBD_RING_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_SW_RXPG_RING_SIZE,4,2          ## @SW_RXPG_RING_SIZE
	.no_dead_strip	_bnx2_alloc_rx_mem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2_alloc_rx_mem
_bnx2_alloc_rx_mem:                     ; @bnx2_alloc_rx_mem
	.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
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.1:
	mov	x19, x0
	mov	x20, #0
Lloh0:
	adrp	x22, _SW_RXBD_RING_SIZE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SW_RXBD_RING_SIZE@GOTPAGEOFF]
	mov	w21, #48
Lloh2:
	adrp	x23, _RXBD_RING_SIZE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _RXBD_RING_SIZE@GOTPAGEOFF]
Lloh4:
	adrp	x24, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x24, [x24, _GFP_KERNEL@GOTPAGEOFF]
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
                                        ;     Child Loop BB0_11 Depth 2
	ldr	x26, [x19, #32]
	ldr	w0, [x22]
	ldr	w1, [x19, #4]
	bl	_array_size
	bl	_vzalloc
	madd	x8, x20, x21, x26
	str	x0, [x8, #40]
	cbz	x0, LBB0_15
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w9, #48
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x27, #0
	mov	x28, #0
	madd	x8, x20, x9, x26
	add	x25, x8, #32
	add	x21, x8, #24
LBB0_5:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x0, [x19, #16]
	ldr	w1, [x23]
	ldr	x8, [x25]
	add	x2, x8, x27
	ldr	w3, [x24]
	bl	_dma_alloc_coherent
	ldr	x8, [x21]
	lsl	x9, x28, #3
	str	x0, [x8, x9]
	ldr	x8, [x21]
	ldr	x8, [x8, x9]
	cbz	x8, LBB0_15
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	add	x28, x28, #1
	ldrsw	x8, [x19, #4]
	add	x27, x27, #4
	cmp	x28, x8
	b.lt	LBB0_5
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #24]
	mov	w21, #48
	cbz	x8, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh6:
	adrp	x8, _SW_RXPG_RING_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SW_RXPG_RING_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldr	w1, [x19, #8]
	bl	_array_size
	bl	_vzalloc
	madd	x8, x20, x21, x26
	str	x0, [x8, #16]
	cbz	x0, LBB0_15
LBB0_9:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	x27, #0
	mov	x28, #0
	madd	x25, x20, x21, x26
	add	x26, x25, #8
LBB0_11:                                ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x0, [x19, #16]
	ldr	w1, [x23]
	ldr	x8, [x26]
	add	x2, x8, x27
	ldr	w3, [x24]
	bl	_dma_alloc_coherent
	ldr	x8, [x25]
	lsl	x9, x28, #3
	str	x0, [x8, x9]
	ldr	x8, [x25]
	ldr	x8, [x8, x9]
	cbz	x8, LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	add	x28, x28, #1
	ldrsw	x8, [x19, #8]
	add	x27, x27, #4
	cmp	x28, x8
	b.lt	LBB0_11
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x20, x20, #1
	ldrsw	x8, [x19]
	cmp	x20, x8
	b.lt	LBB0_2
LBB0_14:
	mov	w0, #0
	b	LBB0_16
LBB0_15:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_16:
	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 AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SW_RXBD_RING_SIZE,4,2          ; @SW_RXBD_RING_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_RXBD_RING_SIZE,4,2             ; @RXBD_RING_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_SW_RXPG_RING_SIZE,4,2          ; @SW_RXPG_RING_SIZE
	.no_dead_strip	_bnx2_alloc_rx_mem
.subsections_via_symbols
