	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ep93xx_alloc_buffers
_ep93xx_alloc_buffers:                  ## @ep93xx_alloc_buffers
	.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
	movq	%rdi, %rbx
	leaq	24(%rdi), %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movq	_GFP_DMA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	xorl	%edi, %edi
	movl	$4, %esi
	callq	_dma_alloc_coherent
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, (%rbx)
	movl	$1, %ecx
	testq	%rax, %rax
	je	LBB0_15
## %bb.1:
	movq	_RX_QUEUE_ENTRIES@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_6
## %bb.2:
	xorl	%r14d, %r14d
	movl	$1, %r13d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_GFP_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	callq	___get_free_page
	testq	%rax, %rax
	je	LBB0_13
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %r12
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%edi, %edi
	movq	%r12, %rsi
	callq	_dma_map_single
	movq	%rax, %rbx
	xorl	%edi, %edi
	movq	%rax, %rsi
	callq	_dma_mapping_error
	testq	%rax, %rax
	jne	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	16(%rdx), %rax
	movq	%r12, (%rax,%r15,8)
	movq	(%rdx), %rax
	movq	8(%rax), %rax
	movq	%rbx, (%rax,%r13,8)
	movq	_PKT_BUF_SIZE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %ecx
	orl	%r14d, %ecx
	movl	%ecx, -8(%rax,%r13,8)
	movslq	(%rsi), %rax
	addq	%rax, %r12
	movq	16(%rdx), %rcx
	movq	%r12, 8(%rcx,%r15,8)
	addq	%rax, %rbx
	movq	(%rdx), %rcx
	movq	8(%rcx), %rcx
	movq	%rbx, 16(%rcx,%r13,8)
	leal	65536(%r14), %edx
	orl	%eax, %edx
	movl	%edx, 8(%rcx,%r13,8)
	addq	$2, %r15
	addl	$131072, %r14d                  ## imm = 0x20000
	addq	$4, %r13
	movq	_RX_QUEUE_ENTRIES@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jg	LBB0_3
LBB0_6:
	movq	_TX_QUEUE_ENTRIES@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_14
## %bb.7:
	xorl	%r15d, %r15d
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	_GFP_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	callq	___get_free_page
	testq	%rax, %rax
	je	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	%rax, %r12
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r13), %ecx
	xorl	%edi, %edi
	movq	%r12, %rsi
	callq	_dma_map_single
	movq	%rax, %rbx
	xorl	%edi, %edi
	movq	%rax, %rsi
	callq	_dma_mapping_error
	testq	%rax, %rax
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	8(%rdx), %rax
	movq	%r12, (%rax,%r15,8)
	movq	(%rdx), %rax
	movq	(%rax), %rax
	movq	%rbx, (%rax,%r15,8)
	movq	_PKT_BUF_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	%rax, %r12
	movq	8(%rdx), %rcx
	movq	%r12, 8(%rcx,%r15,8)
	addq	%rax, %rbx
	movq	(%rdx), %rax
	movq	(%rax), %rax
	movq	%rbx, 8(%rax,%r15,8)
	addq	$2, %r15
	cmpl	%r15d, (%r14)
	jg	LBB0_8
LBB0_14:
	xorl	%ecx, %ecx
	jmp	LBB0_15
LBB0_12:
	movq	%r12, %rdi
	callq	_free_page
LBB0_13:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_ep93xx_free_buffers
	movl	$1, %ecx
LBB0_15:
	movl	%ecx, %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	_GFP_DMA,4,2                    ## @GFP_DMA
	.comm	_RX_QUEUE_ENTRIES,4,2           ## @RX_QUEUE_ENTRIES
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_PKT_BUF_SIZE,4,2               ## @PKT_BUF_SIZE
	.comm	_TX_QUEUE_ENTRIES,4,2           ## @TX_QUEUE_ENTRIES
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.no_dead_strip	_ep93xx_alloc_buffers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ep93xx_alloc_buffers
_ep93xx_alloc_buffers:                  ; @ep93xx_alloc_buffers
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
	add	x2, x0, #24
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x23, _GFP_DMA@GOTPAGE
Lloh4:
	ldr	x23, [x23, _GFP_DMA@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w3, w9, w8
	mov	x0, #0
	mov	w1, #4
	bl	_dma_alloc_coherent
	str	x0, [x19]
	cbz	x0, LBB0_14
; %bb.1:
Lloh5:
	adrp	x24, _RX_QUEUE_ENTRIES@GOTPAGE
Lloh6:
	ldr	x24, [x24, _RX_QUEUE_ENTRIES@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x25, #0
	mov	w26, #0
	mov	x27, #0
Lloh7:
	adrp	x28, _DMA_FROM_DEVICE@GOTPAGE
Lloh8:
	ldr	x28, [x28, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh9:
	adrp	x22, _PKT_BUF_SIZE@GOTPAGE
Lloh10:
	ldr	x22, [x22, _PKT_BUF_SIZE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
Lloh11:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	w9, [x23]
	orr	w0, w9, w8
	bl	___get_free_page
	cbz	x0, LBB0_13
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x20, x0
Lloh14:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	ldr	w3, [x28]
	mov	x0, #0
	mov	x1, x20
	bl	_dma_map_single
	mov	x21, x0
	mov	x0, #0
	mov	x1, x21
	bl	_dma_mapping_error
	cbnz	x0, LBB0_12
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #16]
	lsl	x9, x27, #3
	str	x20, [x8, x9]
	ldr	x8, [x19]
	ldr	x8, [x8, #8]
	add	x8, x8, x25
	str	x21, [x8, #8]
	ldr	w10, [x22]
	orr	w10, w10, w26
	str	w10, [x8]
	ldrsw	x8, [x22]
	add	x10, x20, x8
	ldr	x11, [x19, #16]
	add	x9, x11, x9
	str	x10, [x9, #8]
	add	x9, x21, x8
	ldr	x10, [x19]
	ldr	x10, [x10, #8]
	add	x10, x10, x25
	str	x9, [x10, #24]
	add	w9, w26, #16, lsl #12           ; =65536
	orr	w8, w8, w9
	str	w8, [x10, #16]
	add	x27, x27, #2
	ldr	w8, [x24]
	add	w26, w26, #32, lsl #12          ; =131072
	add	x25, x25, #32
	cmp	w8, w27
	b.gt	LBB0_3
LBB0_6:
Lloh17:
	adrp	x22, _TX_QUEUE_ENTRIES@GOTPAGE
Lloh18:
	ldr	x22, [x22, _TX_QUEUE_ENTRIES@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.7:
	mov	x24, #0
Lloh19:
	adrp	x25, _PAGE_SIZE@GOTPAGE
Lloh20:
	ldr	x25, [x25, _PAGE_SIZE@GOTPAGEOFF]
Lloh21:
	adrp	x26, _DMA_TO_DEVICE@GOTPAGE
Lloh22:
	ldr	x26, [x26, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh23:
	adrp	x27, _PKT_BUF_SIZE@GOTPAGE
Lloh24:
	ldr	x27, [x27, _PKT_BUF_SIZE@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
Lloh25:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	ldr	w9, [x23]
	orr	w0, w9, w8
	bl	___get_free_page
	cbz	x0, LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x20, x0
	ldr	w2, [x25]
	ldr	w3, [x26]
	mov	x0, #0
	mov	x1, x20
	bl	_dma_map_single
	mov	x21, x0
	mov	x0, #0
	mov	x1, x21
	bl	_dma_mapping_error
	cbnz	x0, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x19, #8]
	lsl	x9, x24, #3
	str	x20, [x8, x9]
	ldp	x8, x10, [x19]
	ldr	x8, [x8]
	str	x21, [x8, x9]
	ldrsw	x8, [x27]
	add	x11, x20, x8
	add	x10, x10, x9
	str	x11, [x10, #8]
	add	x8, x21, x8
	ldr	x10, [x19]
	ldr	x10, [x10]
	add	x9, x10, x9
	str	x8, [x9, #8]
	add	x24, x24, #2
	ldr	w8, [x22]
	cmp	w8, w24
	b.gt	LBB0_8
LBB0_11:
	mov	w0, #0
	b	LBB0_15
LBB0_12:
	mov	x0, x20
	bl	_free_page
LBB0_13:
	mov	x0, x19
	bl	_ep93xx_free_buffers
LBB0_14:
	mov	w0, #1
LBB0_15:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_GFP_DMA,4,2                    ; @GFP_DMA
	.comm	_RX_QUEUE_ENTRIES,4,2           ; @RX_QUEUE_ENTRIES
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_PKT_BUF_SIZE,4,2               ; @PKT_BUF_SIZE
	.comm	_TX_QUEUE_ENTRIES,4,2           ; @TX_QUEUE_ENTRIES
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.no_dead_strip	_ep93xx_alloc_buffers
.subsections_via_symbols
