	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hip04_alloc_ring
_hip04_alloc_ring:                      ## @hip04_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	callq	_netdev_priv
	movq	%rax, %r12
	movq	_TX_DESC_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shll	$2, %esi
	leaq	20(%r12), %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	callq	_dma_alloc_coherent
	movl	%eax, 16(%r12)
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	movq	_RX_BUF_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movl	$4, %edi
	callq	_SKB_DATA_ALIGN
	addq	%rbx, %rax
	movq	%rax, 8(%r12)
	movq	_RX_DESC_NUM@GOTPCREL(%rip), %r15
	xorl	%r14d, %r14d
	cmpl	$0, (%r15)
	jle	LBB0_7
## %bb.2:
	movq	%rax, %rdi
	callq	_netdev_alloc_frag
	movq	(%r12), %rcx
	movl	%eax, (%rcx)
	testl	%eax, %eax
	je	LBB0_6
## %bb.3:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jge	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%r12), %rdi
	callq	_netdev_alloc_frag
	movq	(%r12), %rcx
	movl	%eax, (%rcx,%rbx,4)
	incq	%rbx
	testl	%eax, %eax
	jne	LBB0_4
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_7:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TX_DESC_NUM,4,2                ## @TX_DESC_NUM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_RX_BUF_SIZE,8,3                ## @RX_BUF_SIZE
	.comm	_RX_DESC_NUM,4,2                ## @RX_DESC_NUM
	.no_dead_strip	_hip04_alloc_ring
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hip04_alloc_ring
_hip04_alloc_ring:                      ; @hip04_alloc_ring
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	bl	_netdev_priv
	mov	x19, x0
Lloh0:
	adrp	x8, _TX_DESC_NUM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TX_DESC_NUM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	lsl	w1, w8, #2
	add	x2, x0, #20
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x0, x20
	bl	_dma_alloc_coherent
	str	w0, [x19, #16]
	cbz	w0, LBB0_6
; %bb.1:
Lloh6:
	adrp	x8, _RX_BUF_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RX_BUF_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	x20, [x8]
	mov	w0, #4
	bl	_SKB_DATA_ALIGN
	add	x0, x0, x20
	str	x0, [x19, #8]
Lloh9:
	adrp	x20, _RX_DESC_NUM@GOTPAGE
Lloh10:
	ldr	x20, [x20, _RX_DESC_NUM@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.2:
	bl	_netdev_alloc_frag
	ldr	x8, [x19]
	str	w0, [x8]
	cbz	w0, LBB0_6
; %bb.3:
	mov	w21, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x8, [x20]
	cmp	x21, x8
	b.ge	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x19, #8]
	bl	_netdev_alloc_frag
	ldr	x8, [x19]
	str	w0, [x8, x21, lsl #2]
	add	x21, x21, #1
	cbnz	w0, LBB0_4
LBB0_6:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_7:
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_TX_DESC_NUM,4,2                ; @TX_DESC_NUM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_RX_BUF_SIZE,8,3                ; @RX_BUF_SIZE
	.comm	_RX_DESC_NUM,4,2                ; @RX_DESC_NUM
	.no_dead_strip	_hip04_alloc_ring
.subsections_via_symbols
