	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atl1e_setup_ring_resources
_atl1e_setup_ring_resources:            ## @atl1e_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	%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	%r14d, %r14d
	cmpq	$0, 16(%rdi)
	je	LBB0_1
LBB0_21:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %r12
	movq	80(%rdi), %r15
	movl	(%rdi), %ebx
	leaq	4(%rdi), %rdx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_pci_zalloc_consistent
	movq	%rax, 16(%r12)
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	40(%r12), %r13
	movl	4(%r12), %edi
	movl	$8, %esi
	callq	_roundup
	movq	%rax, %rbx
	movl	%ebx, 48(%r12)
	subl	4(%r12), %ebx
	leal	(,%rbx,4), %eax
	addl	16(%r12), %eax
	movl	%eax, 72(%r12)
	movl	52(%r12), %edi
	shll	$2, %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	movq	%rax, 64(%r12)
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movl	52(%r12), %eax
	leal	(%rbx,%rax,4), %edi
	movl	$32, %esi
	callq	_roundup
	movl	8(%r12), %r8d
	testl	%r8d, %r8d
	jle	LBB0_11
## %bb.6:
	movq	_AT_PAGE_NUM_PER_QUEUE@GOTPCREL(%rip), %r10
	movl	(%r10), %edi
	xorl	%r9d, %r9d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%r9
	cmpq	%r8, %r9
	je	LBB0_11
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	testl	%edi, %edi
	jle	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	4(%r12), %r11d
	movq	(%r13,%r9,8), %rbx
	movq	16(%r12), %rsi
	movl	32(%r12), %edx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leal	(%r11,%rax), %edi
	movl	%edi, (%rbx)
	leal	(%rsi,%rax,4), %edi
	movl	%edi, 12(%rbx)
	addl	%edx, %eax
	incq	%rcx
	movslq	(%r10), %rdi
	addq	$16, %rbx
	cmpq	%rdi, %rcx
	jl	LBB0_9
	jmp	LBB0_10
LBB0_11:
	movl	4(%r12), %edx
	leal	(%rdx,%rax), %ecx
	leal	4(%rax), %ebx
	movl	%ecx, 56(%r12)
	movq	16(%r12), %rsi
	leal	(%rsi,%rax,4), %eax
	movl	%eax, 60(%r12)
	testl	%r8d, %r8d
	jle	LBB0_17
## %bb.12:
	movq	_AT_PAGE_NUM_PER_QUEUE@GOTPCREL(%rip), %r10
	movl	(%r10), %ecx
	xorl	%r9d, %r9d
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%r9
	cmpq	%r8, %r9
	je	LBB0_17
LBB0_13:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
	testl	%ecx, %ecx
	jle	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	(%r13,%r9,8), %rdi
	addq	$8, %rdi
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_13 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leal	(%rdx,%rbx), %ecx
	movl	%ecx, -4(%rdi)
	leal	(%rsi,%rbx,4), %ecx
	movl	%ecx, (%rdi)
	addl	$4, %ebx
	incq	%rax
	movslq	(%r10), %rcx
	addq	$16, %rdi
	cmpq	%rcx, %rax
	jl	LBB0_15
	jmp	LBB0_16
LBB0_17:
	xorl	%edi, %edi
	cmpl	(%r12), %ebx
	setg	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_21
## %bb.18:
	movl	(%r12), %ecx
	movl	24(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_netdev_err
	movl	$-1, %r14d
	jmp	LBB0_19
LBB0_2:
	movl	24(%r12), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_netdev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_21
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_19:
	movq	16(%r12), %rdx
	testq	%rdx, %rdx
	je	LBB0_21
## %bb.20:
	movl	(%r12), %esi
	movl	4(%r12), %ecx
	movq	%r15, %rdi
	callq	_pci_free_consistent
	movq	$0, 16(%r12)
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pci_alloc_consistent failed, size = D%d\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_AT_PAGE_NUM_PER_QUEUE,4,2      ## @AT_PAGE_NUM_PER_QUEUE
L_.str.1:                               ## @.str.1
	.asciz	"offset(%d) > ring size(%d) !!\n"

	.no_dead_strip	_atl1e_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 atl1e_setup_ring_resources
_atl1e_setup_ring_resources:            ; @atl1e_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
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_3
LBB0_1:
	mov	w21, #0
LBB0_2:
	mov	x0, x21
	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_3:
	mov	x19, x0
	ldr	x20, [x0, #80]
	ldr	w21, [x0]
	add	x2, x0, #4
	mov	x0, x20
	mov	x1, x21
	bl	_pci_zalloc_consistent
	str	x0, [x19, #16]
	cbz	x0, LBB0_11
; %bb.4:
	ldr	x22, [x19, #40]
	ldr	w0, [x19, #4]
	mov	w1, #8
	bl	_roundup
	str	w0, [x19, #48]
	ldr	w8, [x19, #4]
	sub	w21, w0, w8
	ldr	w8, [x19, #16]
	add	w8, w8, w21, lsl #2
	str	w8, [x19, #72]
	ldr	w8, [x19, #52]
	lsl	w0, w8, #2
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_kzalloc
	str	x0, [x19, #64]
	cbz	x0, LBB0_17
; %bb.5:
	ldr	w8, [x19, #52]
	add	w0, w21, w8, lsl #2
	mov	w1, #32
	bl	_roundup
	ldr	w8, [x19, #8]
	cmp	w8, #0
	b.le	LBB0_18
; %bb.6:
	mov	x10, #0
Lloh3:
	adrp	x9, _AT_PAGE_NUM_PER_QUEUE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AT_PAGE_NUM_PER_QUEUE@GOTPAGEOFF]
	ldr	w11, [x9]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x10, x10, #1
	cmp	x10, x8
	b.eq	LBB0_12
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	cmp	w11, #1
	b.lt	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x12, #0
	ldr	w13, [x19, #4]
	ldr	x14, [x22, x10, lsl #3]
	ldr	x15, [x19, #16]
	ldr	w16, [x19, #32]
LBB0_10:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w11, w13, w0
	str	w11, [x14]
	add	w11, w15, w0, lsl #2
	str	w11, [x14, #12]
	add	w0, w0, w16
	add	x12, x12, #1
	ldrsw	x11, [x9]
	add	x14, x14, #16
	cmp	x12, x11
	b.lt	LBB0_10
	b	LBB0_7
LBB0_11:
	ldr	w0, [x19, #24]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_netdev_err
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_2
LBB0_12:
	mov	x10, #0
	ldr	w11, [x19, #4]
	add	w13, w11, w0
	ldr	x12, [x19, #16]
	add	w14, w12, w0, lsl #2
	stp	w13, w14, [x19, #56]
	add	w21, w0, #4
	ldr	w13, [x9]
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x10, x10, #1
	cmp	x10, x8
	b.eq	LBB0_19
LBB0_14:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_16 Depth 2
	cmp	w13, #1
	b.lt	LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x14, #0
	ldr	x13, [x22, x10, lsl #3]
	add	x15, x13, #8
LBB0_16:                                ;   Parent Loop BB0_14 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w13, w11, w21
	stur	w13, [x15, #-4]
	add	w13, w12, w21, lsl #2
	str	w13, [x15], #16
	add	w21, w21, #4
	add	x14, x14, #1
	ldrsw	x13, [x9]
	cmp	x14, x13
	b.lt	LBB0_16
	b	LBB0_13
LBB0_17:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w21, w8
	ldr	x2, [x19, #16]
	cbnz	x2, LBB0_21
	b	LBB0_2
LBB0_18:
	ldr	w8, [x19, #4]
	add	w8, w8, w0
	ldr	w9, [x19, #16]
	add	w9, w9, w0, lsl #2
	stp	w8, w9, [x19, #56]
	add	w21, w0, #4
LBB0_19:
	ldr	w8, [x19]
	cmp	w21, w8
	cset	w0, gt
	bl	_unlikely
	cbz	x0, LBB0_1
; %bb.20:
	ldr	w0, [x19, #24]
	ldr	w8, [x19]
	str	x8, [sp]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_netdev_err
	mov	w21, #-1
	ldr	x2, [x19, #16]
	cbz	x2, LBB0_2
LBB0_21:
	ldp	w1, w3, [x19]
	mov	x0, x20
	bl	_pci_free_consistent
	str	xzr, [x19, #16]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pci_alloc_consistent failed, size = D%d\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_AT_PAGE_NUM_PER_QUEUE,4,2      ; @AT_PAGE_NUM_PER_QUEUE
l_.str.1:                               ; @.str.1
	.asciz	"offset(%d) > ring size(%d) !!\n"

	.no_dead_strip	_atl1e_setup_ring_resources
.subsections_via_symbols
