	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atl1_setup_ring_resources
_atl1_setup_ring_resources:             ## @atl1_setup_ring_resources
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	80(%rdi), %ebx
	addl	112(%rdi), %ebx
	movq	32(%rdi), %r14
	shll	$2, %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_kzalloc
	movq	%rax, 136(%r15)
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%r15, %rdi
	callq	_netif_msg_drv
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_6
LBB0_3:
	movslq	112(%r15), %rax
	movq	%rax, %rcx
	addq	136(%r15), %rcx
	movq	%rcx, 104(%r15)
	movl	80(%r15), %ecx
	addl	%eax, %ecx
	addl	56(%r15), %ecx
	leal	48(,%rcx,4), %esi
	movl	%esi, 40(%r15)
	leaq	44(%r15), %rdx
	movq	%r14, %rdi
	callq	_pci_alloc_consistent
	movq	%rax, 48(%r15)
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	movq	%r15, %rdi
	callq	_netif_msg_drv
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_6:
	movq	136(%r15), %rdi
	callq	_kfree
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	44(%r15), %esi
	movl	56(%r15), %r8d
	movl	%esi, %eax
	andl	$7, %eax
	movl	$8, %edx
	subl	%eax, %edx
	testl	%eax, %eax
	cmovel	%eax, %edx
	addl	%edx, %esi
	movl	%esi, 116(%r15)
	shlq	$2, %rdx
	addq	48(%r15), %rdx
	movl	$8, %eax
	movq	%rdx, 120(%r15)
	movl	112(%r15), %edi
	leal	(,%rdi,4), %ebx
	movl	%ebx, 128(%r15)
	leal	(%rsi,%rdi,4), %esi
	movl	%esi, %ebx
	andl	$7, %ebx
	movl	$8, %ecx
	subl	%ebx, %ecx
	testl	%ebx, %ebx
	cmovel	%ebx, %ecx
	addl	%ecx, %esi
	movl	%esi, 84(%r15)
	leal	(%rcx,%rdi,4), %ecx
	movslq	%ecx, %rcx
	leaq	(%rdx,%rcx,4), %rcx
	movq	%rcx, 88(%r15)
	movl	80(%r15), %edx
	leal	(,%rdx,4), %edi
	movl	%edi, 96(%r15)
	leal	(%rsi,%rdx,4), %esi
	movl	%esi, %edi
	andl	$7, %edi
	movl	$8, %ebx
	subl	%edi, %ebx
	testl	%edi, %edi
	cmovel	%edi, %ebx
	addl	%ebx, %esi
	movl	%esi, 60(%r15)
	leal	(%rbx,%rdx,4), %edx
	movslq	%edx, %rdx
	leaq	(%rcx,%rdx,4), %rcx
	movq	%rcx, 64(%r15)
	leal	(,%r8,4), %edx
	movl	%edx, 72(%r15)
	leal	(%rsi,%r8,4), %edx
	movl	%edx, %esi
	andl	$7, %esi
	movl	$8, %edi
	subl	%esi, %edi
	testl	%esi, %esi
	cmovel	%esi, %edi
	leal	(%rdi,%rdx), %esi
	movl	%esi, (%r15)
	leal	(%rdi,%r8,4), %ebx
	movslq	%ebx, %rbx
	leaq	(%rcx,%rbx,4), %rcx
	movq	%rcx, 8(%r15)
	addl	%edi, %edx
	addl	$4, %edx
	andl	$7, %edx
	subl	%edx, %eax
	testl	%edx, %edx
	cmovel	%edx, %eax
	leal	(%rax,%rsi), %edx
	addl	$4, %edx
	movl	%edx, 16(%r15)
	leaq	(%rcx,%rax,4), %rax
	addq	$16, %rax
	movq	%rax, 24(%r15)
	xorl	%eax, %eax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"kzalloc failed , size = D%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"pci_alloc_consistent failed\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_atl1_setup_ring_resources
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atl1_setup_ring_resources
_atl1_setup_ring_resources:             ; @atl1_setup_ring_resources
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x20, [x0, #32]
	ldr	w8, [x0, #112]
	ldr	w9, [x0, #80]
	add	w8, w9, w8
	lsl	w21, w8, #2
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_kzalloc
	str	x0, [x19, #136]
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_netif_msg_drv
	cbz	x0, LBB0_7
; %bb.2:
	str	x21, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_3:
	ldr	x8, [x19, #136]
	ldrsw	x9, [x19, #112]
	add	x8, x8, x9
	str	x8, [x19, #104]
	ldr	w8, [x19, #80]
	ldr	w10, [x19, #56]
	add	w8, w8, w9
	add	w8, w8, w10
	lsl	w8, w8, #2
	add	w1, w8, #48
	str	w1, [x19, #40]
	add	x2, x19, #44
	mov	x0, x20
	bl	_pci_alloc_consistent
	str	x0, [x19, #48]
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_9
; %bb.4:
	mov	x0, x19
	bl	_netif_msg_drv
	cbz	x0, LBB0_7
; %bb.5:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_6:
	mov	x0, x20
	bl	_dev_err
LBB0_7:
	ldr	x0, [x19, #136]
	bl	_kfree
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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
	add	sp, sp, #64
	ret
LBB0_9:
	ldr	w8, [x19, #44]
	ands	w9, w8, #0x7
	mov	w10, #8
	sub	w9, w10, w9
	tst	w8, #0x7
	csel	w9, wzr, w9, eq
	ldr	w11, [x19, #112]
	lsl	w11, w11, #2
	add	w8, w9, w8
	add	w12, w11, w8
	ands	w13, w12, #0x7
	sub	w13, w10, w13
	tst	w12, #0x7
	csel	w13, wzr, w13, eq
	ldr	w14, [x19, #80]
	lsl	w14, w14, #2
	add	w12, w13, w12
	add	w15, w12, w14
	ands	w16, w15, #0x7
	sub	w16, w10, w16
	tst	w15, #0x7
	csel	w16, wzr, w16, eq
	ldr	w17, [x19, #56]
	lsl	w17, w17, #2
	add	w15, w16, w15
	add	w1, w15, w17
	ands	w2, w1, #0x7
	sub	w2, w10, w2
	tst	w1, #0x7
	csel	w2, wzr, w2, eq
	add	w1, w2, w1
	add	w3, w1, #4
	ands	w4, w3, #0x7
	sub	w10, w10, w4
	tst	w3, #0x7
	str	w8, [x19, #116]
	ldr	x8, [x19, #48]
	add	x8, x8, w9, uxtw #2
	str	x8, [x19, #120]
	str	w11, [x19, #128]
	str	w12, [x19, #84]
	add	w9, w13, w11
	add	x8, x8, w9, sxtw #2
	str	x8, [x19, #88]
	str	w14, [x19, #96]
	str	w15, [x19, #60]
	add	w9, w16, w14
	add	x8, x8, w9, sxtw #2
	str	x8, [x19, #64]
	str	w17, [x19, #72]
	str	w1, [x19]
	add	w9, w2, w17
	add	x8, x8, w9, sxtw #2
	str	x8, [x19, #8]
	csel	w9, wzr, w10, eq
	add	w10, w9, w3
	str	w10, [x19, #16]
	add	w9, w9, #4
	add	x8, x8, w9, uxtw #2
	str	x8, [x19, #24]
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"kzalloc failed , size = D%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"pci_alloc_consistent failed\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_atl1_setup_ring_resources
.subsections_via_symbols
