	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function myri10ge_allocate_rings
_myri10ge_allocate_rings:               ## @myri10ge_allocate_rings
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	136(%rdi), %r12
	movq	32(%r12), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rax
	subq	24(%r12), %rax
	shrq	$4, %rax
	imull	$954437177, %eax, %r15d         ## imm = 0x38E38E39
	movl	%r15d, -48(%rbp)
	movq	_MXGEFW_CMD_GET_SEND_RING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rbx
	movq	%r12, %rdi
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	callq	_myri10ge_send_cmd
	movl	%eax, %r14d
	movl	-48(%rbp), %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	%r15d, -48(%rbp)
	movq	_MXGEFW_CMD_GET_RX_RING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	callq	_myri10ge_send_cmd
	movl	%eax, %ebx
	orl	%r14d, %ebx
	jne	LBB0_24
## %bb.1:
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	movl	-48(%rbp), %ebx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	sarl	$2, %eax
	sarl	$2, %ebx
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	decl	%eax
	movl	%eax, (%r13)
	leal	-1(%rbx), %eax
	movl	%eax, 88(%r13)
	movl	%eax, 40(%r13)
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	movq	_MYRI10GE_MAX_SEND_DESC_TSO@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	24(,%rax,4), %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movq	%rax, %r12
	movl	(%rax), %esi
	callq	_kzalloc
	movq	%rax, 16(%r13)
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%r13, %r15
	movl	%r14d, -68(%rbp)                ## 4-byte Spill
	movq	%rax, %rdi
	movl	$8, %esi
	callq	_ALIGN
	movq	%rax, 8(%r13)
	movq	$0, 32(%r13)
	movslq	%ebx, %r13
	shlq	$2, %r13
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_kzalloc
	movq	%rax, 56(%r15)
	testq	%rax, %rax
	je	LBB0_23
## %bb.4:
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_kzalloc
	movq	%rax, 104(%r15)
	testq	%rax, %rax
	je	LBB0_22
## %bb.5:
	movslq	-64(%rbp), %rdi                 ## 4-byte Folded Reload
	shlq	$2, %rdi
	movl	(%r12), %esi
	callq	_kzalloc
	movq	%rax, 24(%r15)
	testq	%rax, %rax
	je	LBB0_21
## %bb.6:
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_kzalloc
	movq	%rax, 64(%r15)
	testq	%rax, %rax
	je	LBB0_20
## %bb.7:
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_kzalloc
	movq	%rax, 112(%r15)
	testq	%rax, %rax
	je	LBB0_19
## %bb.8:
	movq	$0, 92(%r15)
	movq	$0, 44(%r15)
	movq	_MYRI10GE_ALLOC_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 80(%r15)
	movq	%rax, 128(%r15)
	movq	$0, 72(%r15)
	movq	$0, 120(%r15)
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movq	(%r14), %rdx
	testq	%rdx, %rdx
	je	LBB0_9
## %bb.14:
	leaq	40(%r15), %rsi
	movq	_MXGEFW_PAD@GOTPCREL(%rip), %rax
	addq	(%rax), %rdx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	callq	_myri10ge_alloc_rx_pages
	movl	48(%r15), %ecx
	cmpl	40(%r15), %ecx
	jg	LBB0_10
## %bb.15:
	leaq	L_.str(%rip), %rsi
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_netdev_err
LBB0_16:
	movq	(%r14), %rdx
	movl	44(%r15), %ebx
	testq	%rdx, %rdx
	je	LBB0_17
## %bb.25:
	cmpl	48(%r15), %ebx
	jge	LBB0_18
## %bb.26:
	movq	_MXGEFW_PAD@GOTPCREL(%rip), %r12
LBB0_27:                                ## =>This Inner Loop Header: Depth=1
	addq	(%r12), %rdx
	movl	40(%r15), %eax
	andl	%ebx, %eax
	movslq	%eax, %r13
	movl	16(%r14), %edi
	leaq	(,%r13,4), %rsi
	addq	64(%r15), %rsi
	callq	_myri10ge_unmap_rx_page
	movq	64(%r15), %rax
	movl	(%rax,%r13,4), %edi
	callq	_put_page
	incl	%ebx
	cmpl	48(%r15), %ebx
	jge	LBB0_18
## %bb.28:                              ##   in Loop: Header=BB0_27 Depth=1
	movq	(%r14), %rdx
	jmp	LBB0_27
LBB0_2:
	movl	%r14d, %ebx
	jmp	LBB0_24
LBB0_9:
	movl	40(%r15), %eax
	incl	%eax
	movl	%eax, 48(%r15)
LBB0_10:
	leaq	88(%r15), %rsi
	movq	8(%r14), %rdx
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	callq	_myri10ge_alloc_rx_pages
	movl	96(%r15), %ecx
	cmpl	88(%r15), %ecx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	jg	LBB0_24
## %bb.11:
	leaq	L_.str.1(%rip), %rsi
	callq	_netdev_err
	movl	92(%r15), %ebx
	cmpl	96(%r15), %ebx
	jge	LBB0_16
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	88(%r15), %eax
	andl	%ebx, %eax
	movslq	%eax, %r12
	movl	16(%r14), %edi
	leaq	(,%r12,4), %rsi
	addq	112(%r15), %rsi
	movq	8(%r14), %rdx
	callq	_myri10ge_unmap_rx_page
	movq	112(%r15), %rax
	movl	(%rax,%r12,4), %edi
	callq	_put_page
	incl	%ebx
	cmpl	96(%r15), %ebx
	jl	LBB0_13
	jmp	LBB0_16
LBB0_17:
	movl	%ebx, 48(%r15)
LBB0_18:
	movq	112(%r15), %rdi
	callq	_kfree
LBB0_19:
	movq	64(%r15), %rdi
	callq	_kfree
LBB0_20:
	movq	24(%r15), %rdi
	callq	_kfree
LBB0_21:
	movq	104(%r15), %rdi
	callq	_kfree
LBB0_22:
	movq	56(%r15), %rdi
	callq	_kfree
LBB0_23:
	movq	16(%r15), %rdi
	addq	$8, %r15
	callq	_kfree
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r15)
	movl	-68(%rbp), %ebx                 ## 4-byte Reload
LBB0_24:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MXGEFW_CMD_GET_SEND_RING_SIZE,4,2 ## @MXGEFW_CMD_GET_SEND_RING_SIZE
	.comm	_MXGEFW_CMD_GET_RX_RING_SIZE,4,2 ## @MXGEFW_CMD_GET_RX_RING_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MYRI10GE_MAX_SEND_DESC_TSO,4,2 ## @MYRI10GE_MAX_SEND_DESC_TSO
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_MYRI10GE_ALLOC_SIZE,8,3        ## @MYRI10GE_ALLOC_SIZE
	.comm	_MXGEFW_PAD,8,3                 ## @MXGEFW_PAD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"slice-%d: alloced only %d small bufs\n"

L_.str.1:                               ## @.str.1
	.asciz	"slice-%d: alloced only %d big bufs\n"

	.no_dead_strip	_myri10ge_allocate_rings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function myri10ge_allocate_rings
_myri10ge_allocate_rings:               ; @myri10ge_allocate_rings
	.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, #136]
	ldp	x8, x21, [x20, #24]
	sub	x8, x0, x8
	lsr	x8, x8, #4
	mov	w9, #36409
	movk	w9, #14563, lsl #16
	mul	w22, w8, w9
	str	w22, [sp, #8]
Lloh0:
	adrp	x8, _MXGEFW_CMD_GET_SEND_RING_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MXGEFW_CMD_GET_SEND_RING_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x20
	mov	w3, #0
	bl	_myri10ge_send_cmd
	mov	x23, x0
	ldr	w24, [sp, #8]
	str	w22, [sp, #8]
Lloh3:
	adrp	x8, _MXGEFW_CMD_GET_RX_RING_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MXGEFW_CMD_GET_RX_RING_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x20
	mov	w3, #0
	bl	_myri10ge_send_cmd
	orr	w0, w0, w23
	cbnz	w0, LBB0_28
; %bb.1:
	ldr	w8, [sp, #8]
	asr	w26, w24, #2
	asr	w25, w8, #2
	sub	w8, w26, #1
	str	w8, [x19]
	sub	w8, w25, #1
	mov	x23, x19
	str	w8, [x23, #88]!
	mov	x24, x19
	str	w8, [x24, #40]!
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w27, w8
Lloh9:
	adrp	x8, _MYRI10GE_MAX_SEND_DESC_TSO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MYRI10GE_MAX_SEND_DESC_TSO@GOTPAGEOFF]
Lloh11:
	ldrsw	x8, [x8]
	lsl	x8, x8, #2
	add	x0, x8, #24
Lloh12:
	adrp	x28, _GFP_KERNEL@GOTPAGE
Lloh13:
	ldr	x28, [x28, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x28]
	bl	_kzalloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_15
; %bb.2:
	str	w27, [sp, #4]                   ; 4-byte Folded Spill
	mov	w1, #8
	bl	_ALIGN
	mov	x27, x19
	str	x0, [x27, #8]!
	str	xzr, [x27, #24]
	sbfiz	x25, x25, #2, #32
	ldr	w1, [x28]
	mov	x0, x25
	bl	_kzalloc
	str	x0, [x27, #48]
	cbz	x0, LBB0_27
; %bb.3:
	ldr	w1, [x28]
	mov	x0, x25
	bl	_kzalloc
	str	x0, [x19, #104]
	cbz	x0, LBB0_26
; %bb.4:
	sbfiz	x0, x26, #2, #32
	ldr	w1, [x28]
	bl	_kzalloc
	str	x0, [x19, #24]
	cbz	x0, LBB0_25
; %bb.5:
	ldr	w1, [x28]
	mov	x0, x25
	bl	_kzalloc
	str	x0, [x19, #64]
	cbz	x0, LBB0_24
; %bb.6:
	ldr	w1, [x28]
	mov	x0, x25
	bl	_kzalloc
	str	x0, [x19, #112]
	cbz	x0, LBB0_23
; %bb.7:
	movi.2d	v0, #0000000000000000
	stur	d0, [x19, #92]
	stur	d0, [x19, #44]
Lloh14:
	adrp	x8, _MYRI10GE_ALLOC_SIZE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MYRI10GE_ALLOC_SIZE@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	stp	xzr, x8, [x19, #72]
	stp	xzr, x8, [x19, #120]
	ldr	x8, [x20]
	cbz	x8, LBB0_16
; %bb.8:
Lloh17:
	adrp	x9, _MXGEFW_PAD@GOTPAGE
Lloh18:
	ldr	x9, [x9, _MXGEFW_PAD@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	add	x2, x9, x8
	mov	x0, x20
	mov	x1, x24
	mov	w3, #0
	bl	_myri10ge_alloc_rx_pages
	ldr	w3, [x19, #48]
	ldr	w8, [x19, #40]
	cmp	w3, w8
	b.gt	LBB0_17
; %bb.9:
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x22
	bl	_netdev_err
LBB0_10:
	ldr	x8, [x20]
	ldr	w21, [x19, #44]
	cbz	x8, LBB0_21
; %bb.11:
	ldr	w9, [x19, #48]
	cmp	w21, w9
	b.ge	LBB0_22
; %bb.12:
Lloh22:
	adrp	x22, _MXGEFW_PAD@GOTPAGE
Lloh23:
	ldr	x22, [x22, _MXGEFW_PAD@GOTPAGEOFF]
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x19, #40]
	and	w9, w9, w21
	ldr	w0, [x20, #16]
	ldr	x10, [x19, #64]
	sbfiz	x23, x9, #2, #32
	add	x1, x10, x23
	ldr	x9, [x22]
	add	x2, x9, x8
	bl	_myri10ge_unmap_rx_page
	ldr	x8, [x19, #64]
	ldr	w0, [x8, x23]
	bl	_put_page
	add	w21, w21, #1
	ldr	w8, [x19, #48]
	cmp	w21, w8
	b.ge	LBB0_22
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x8, [x20]
	b	LBB0_13
LBB0_15:
	mov	x0, x27
	b	LBB0_28
LBB0_16:
	ldr	w8, [x19, #40]
	add	w8, w8, #1
	str	w8, [x19, #48]
LBB0_17:
	ldr	x2, [x20, #8]
	mov	x0, x20
	mov	x1, x23
	mov	w3, #0
	bl	_myri10ge_alloc_rx_pages
	mov	w0, #0
	ldr	w3, [x19, #96]
	ldr	w8, [x19, #88]
	cmp	w3, w8
	b.gt	LBB0_28
; %bb.18:
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x2, x22
	bl	_netdev_err
	ldr	w21, [x19, #92]
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19, #96]
	cmp	w21, w8
	b.ge	LBB0_10
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	ldr	w8, [x19, #88]
	and	w8, w8, w21
	ldr	w0, [x20, #16]
	ldr	x9, [x19, #112]
	sbfiz	x22, x8, #2, #32
	add	x1, x9, x22
	ldr	x2, [x20, #8]
	bl	_myri10ge_unmap_rx_page
	ldr	x8, [x19, #112]
	ldr	w0, [x8, x22]
	bl	_put_page
	add	w21, w21, #1
	b	LBB0_19
LBB0_21:
	str	w21, [x19, #48]
LBB0_22:
	ldr	x0, [x19, #112]
	bl	_kfree
LBB0_23:
	ldr	x0, [x19, #64]
	bl	_kfree
LBB0_24:
	ldr	x0, [x19, #24]
	bl	_kfree
LBB0_25:
	ldr	x0, [x19, #104]
	bl	_kfree
LBB0_26:
	ldr	x0, [x19, #56]
	bl	_kfree
LBB0_27:
	ldr	x0, [x19, #16]
	bl	_kfree
	stp	xzr, xzr, [x27]
	ldr	w0, [sp, #4]                    ; 4-byte Folded Reload
LBB0_28:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_MXGEFW_CMD_GET_SEND_RING_SIZE,4,2 ; @MXGEFW_CMD_GET_SEND_RING_SIZE
	.comm	_MXGEFW_CMD_GET_RX_RING_SIZE,4,2 ; @MXGEFW_CMD_GET_RX_RING_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MYRI10GE_MAX_SEND_DESC_TSO,4,2 ; @MYRI10GE_MAX_SEND_DESC_TSO
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_MYRI10GE_ALLOC_SIZE,8,3        ; @MYRI10GE_ALLOC_SIZE
	.comm	_MXGEFW_PAD,8,3                 ; @MXGEFW_PAD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"slice-%d: alloced only %d small bufs\n"

l_.str.1:                               ; @.str.1
	.asciz	"slice-%d: alloced only %d big bufs\n"

	.no_dead_strip	_myri10ge_allocate_rings
.subsections_via_symbols
