	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xrx200_dma_init
_xrx200_dma_init:                       ## @xrx200_dma_init
	.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, %r14
	movq	_DMA_PORT_ETOP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ltq_dma_init_port
	movq	_XRX200_DMA_RX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	movl	32(%r14), %eax
	movl	%eax, 8(%r14)
	movq	%r14, 24(%r14)
	movq	%r14, %rdi
	callq	_ltq_dma_alloc_rx
	movl	$0, (%r14)
	movq	_LTQ_DESC_NUM@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_4
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_xrx200_alloc_skb
	testl	%eax, %eax
	jne	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r14), %eax
	incl	%eax
	movl	%eax, (%r14)
	cmpl	(%r13), %eax
	jl	LBB0_1
LBB0_4:
	movl	$0, (%r14)
	movl	4(%r14), %esi
	movl	32(%r14), %edi
	movq	_xrx200_dma_irq@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	leaq	L_.str(%rip), %r8
	xorl	%r15d, %r15d
	xorl	%ecx, %ecx
	movq	%r14, %r9
	callq	_devm_request_irq
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	movl	4(%r14), %edx
	movl	32(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movl	%ebx, %r15d
	jmp	LBB0_8
LBB0_2:
	movl	%eax, %r15d
	jmp	LBB0_13
LBB0_6:
	leaq	40(%r14), %rbx
	movq	_XRX200_DMA_TX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%r14)
	movl	32(%r14), %eax
	movl	%eax, 48(%r14)
	movq	%r14, 64(%r14)
	movq	%rbx, %rdi
	callq	_ltq_dma_alloc_tx
	movl	32(%r14), %edi
	movl	44(%r14), %esi
	movl	(%r12), %edx
	leaq	L_.str.2(%rip), %r8
	xorl	%ecx, %ecx
	movq	%rbx, %r9
	callq	_devm_request_irq
	testl	%eax, %eax
	je	LBB0_14
## %bb.7:
	movl	%eax, %r12d
	movl	32(%r14), %edi
	movl	44(%r14), %edx
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_err
	movq	%rbx, %rdi
	callq	_ltq_dma_free
	movl	%r12d, %r15d
LBB0_8:
	movl	(%r13), %eax
	testl	%eax, %eax
	jle	LBB0_13
## %bb.9:
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_13
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %rcx
	movq	(%rcx,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	callq	_dev_kfree_skb_any
	movl	(%r13), %eax
	jmp	LBB0_12
LBB0_13:
	movq	%r14, %rdi
	callq	_ltq_dma_free
LBB0_14:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_PORT_ETOP,4,2              ## @DMA_PORT_ETOP
	.comm	_XRX200_DMA_RX,4,2              ## @XRX200_DMA_RX
	.comm	_LTQ_DESC_NUM,4,2               ## @LTQ_DESC_NUM
	.comm	_xrx200_dma_irq,4,2             ## @xrx200_dma_irq
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"xrx200_net_rx"

L_.str.1:                               ## @.str.1
	.asciz	"failed to request RX irq %d\n"

	.comm	_XRX200_DMA_TX,4,2              ## @XRX200_DMA_TX
L_.str.2:                               ## @.str.2
	.asciz	"xrx200_net_tx"

L_.str.3:                               ## @.str.3
	.asciz	"failed to request TX irq %d\n"

	.no_dead_strip	_xrx200_dma_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xrx200_dma_init
_xrx200_dma_init:                       ; @xrx200_dma_init
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _DMA_PORT_ETOP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_PORT_ETOP@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_ltq_dma_init_port
Lloh3:
	adrp	x8, _XRX200_DMA_RX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _XRX200_DMA_RX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x19, #32]
	stp	w9, w8, [x19, #8]
	str	x19, [x19, #24]
	mov	x0, x19
	bl	_ltq_dma_alloc_rx
	str	wzr, [x19]
Lloh6:
	adrp	x22, _LTQ_DESC_NUM@GOTPAGE
Lloh7:
	ldr	x22, [x22, _LTQ_DESC_NUM@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_3
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_xrx200_alloc_skb
	cbnz	w0, LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	ldr	w9, [x22]
	cmp	w8, w9
	b.lt	LBB0_1
LBB0_3:
	str	wzr, [x19]
	ldr	w0, [x19, #32]
	ldr	w1, [x19, #4]
Lloh8:
	adrp	x23, _xrx200_dma_irq@GOTPAGE
Lloh9:
	ldr	x23, [x23, _xrx200_dma_irq@GOTPAGEOFF]
	ldr	w2, [x23]
Lloh10:
	adrp	x4, l_.str@PAGE
Lloh11:
	add	x4, x4, l_.str@PAGEOFF
	mov	w3, #0
	mov	x5, x19
	bl	_devm_request_irq
	cbz	w0, LBB0_6
; %bb.4:
	mov	x20, x0
	ldr	w0, [x19, #32]
	ldr	w2, [x19, #4]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_8
LBB0_5:
	mov	x20, x0
	b	LBB0_13
LBB0_6:
Lloh14:
	adrp	x8, _XRX200_DMA_TX@GOTPAGE
Lloh15:
	ldr	x8, [x8, _XRX200_DMA_TX@GOTPAGEOFF]
	add	x21, x19, #40
Lloh16:
	ldr	w8, [x8]
	ldr	w9, [x19, #32]
	stp	w9, w8, [x19, #48]
	str	x19, [x19, #64]
	mov	x0, x21
	bl	_ltq_dma_alloc_tx
	ldr	w0, [x19, #32]
	ldr	w1, [x19, #44]
	ldr	w2, [x23]
Lloh17:
	adrp	x4, l_.str.2@PAGE
Lloh18:
	add	x4, x4, l_.str.2@PAGEOFF
	mov	w3, #0
	mov	x5, x21
	bl	_devm_request_irq
	mov	x20, x0
	cbz	w0, LBB0_14
; %bb.7:
	ldr	w0, [x19, #32]
	ldr	w2, [x19, #44]
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
	mov	x0, x21
	bl	_ltq_dma_free
LBB0_8:
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.9:
	mov	x21, #0
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x21, x21, #1
	cmp	x21, w8, sxtw
	b.ge	LBB0_13
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #16]
	ldr	x0, [x9, x21, lsl #3]
	cbz	x0, LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	bl	_dev_kfree_skb_any
	ldr	w8, [x22]
	b	LBB0_10
LBB0_13:
	mov	x0, x19
	bl	_ltq_dma_free
LBB0_14:
	mov	x0, x20
	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	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_PORT_ETOP,4,2              ; @DMA_PORT_ETOP
	.comm	_XRX200_DMA_RX,4,2              ; @XRX200_DMA_RX
	.comm	_LTQ_DESC_NUM,4,2               ; @LTQ_DESC_NUM
	.comm	_xrx200_dma_irq,4,2             ; @xrx200_dma_irq
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"xrx200_net_rx"

l_.str.1:                               ; @.str.1
	.asciz	"failed to request RX irq %d\n"

	.comm	_XRX200_DMA_TX,4,2              ; @XRX200_DMA_TX
l_.str.2:                               ; @.str.2
	.asciz	"xrx200_net_tx"

l_.str.3:                               ; @.str.3
	.asciz	"failed to request TX irq %d\n"

	.no_dead_strip	_xrx200_dma_init
.subsections_via_symbols
