	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xlgmac_init_ring
_xlgmac_init_ring:                      ## @xlgmac_init_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
	xorl	%r12d, %r12d
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.1:
	movl	%edx, %r13d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	%edx, (%rsi)
	movl	4(%rdi), %edi
	leal	(,%r13,4), %esi
	leaq	8(%rbx), %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdx
	callq	_dma_alloc_coherent
	movl	%eax, 12(%rbx)
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r13d, %edi
	movl	$4, %esi
	callq	_kcalloc
	movl	%eax, 4(%rbx)
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:
	movq	_drv@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	(%r14), %edx
	movl	12(%rbx), %r8d
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rcx
	movq	%r14, %rdi
	movq	%r15, %r9
	callq	_netif_dbg
	jmp	LBB0_5
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_5:
	movl	%r12d, %eax
	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	_drv,4,2                        ## @drv
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dma_desc_head=%p, dma_desc_head_addr=%pad, desc_data_head=%p\n"

	.no_dead_strip	_xlgmac_init_ring
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xlgmac_init_ring
_xlgmac_init_ring:                      ; @xlgmac_init_ring
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	cbz	x1, LBB0_4
; %bb.1:
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	str	w2, [x1]
	ldr	w0, [x0, #4]
	lsl	w1, w2, #2
	add	x20, x21, #8
Lloh0:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w3, [x23]
	mov	x2, x20
	bl	_dma_alloc_coherent
	str	w0, [x21, #12]
	cbz	w0, LBB0_5
; %bb.2:
	ldr	w2, [x23]
	mov	x0, x22
	mov	w1, #4
	bl	_kcalloc
	str	w0, [x21, #4]
	cbz	w0, LBB0_5
; %bb.3:
	mov	x6, x0
Lloh2:
	adrp	x8, _drv@GOTPAGE
Lloh3:
	ldr	x8, [x8, _drv@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	ldr	w2, [x19]
	ldr	w4, [x21, #12]
Lloh5:
	adrp	x3, l_.str@PAGE
Lloh6:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	x5, x20
	bl	_netif_dbg
LBB0_4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_drv,4,2                        ; @drv
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dma_desc_head=%p, dma_desc_head_addr=%pad, desc_data_head=%p\n"

	.no_dead_strip	_xlgmac_init_ring
.subsections_via_symbols
