	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lan743x_dmac_init
_lan743x_dmac_init:                     ## @lan743x_dmac_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_DMAC_CMD@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_DMAC_CMD_SWR_@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	callq	_lan743x_csr_write
	movl	(%r14), %esi
	movl	(%rbx), %edx
	movl	$100, (%rsp)
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	movl	$1000, %r8d                     ## imm = 0x3E8
	movl	$20000, %r9d                    ## imm = 0x4E20
	callq	_lan743x_csr_wait_for_bit
	movq	_DEFAULT_DMA_DESCRIPTOR_SPACING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	$-128, %eax
	cmpl	$4, %eax
	jae	LBB0_1
## %bb.2:
	cltq
	leaq	l_switch.table.lan743x_dmac_init(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movq	_LAN743X_CSR_FLAG_IS_A0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	$0, %ebx
	andl	(%r15), %ecx
	jne	LBB0_4
## %bb.3:
	movq	_DMAC_CFG_COAL_EN_@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
LBB0_4:
	movq	_DMAC_CFG_CH_ARB_SEL_RX_HIGH_@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	orl	(%rax), %r12d
	movl	$6, %edi
	callq	_DMAC_CFG_MAX_READ_REQ_SET_
	orl	%eax, %ebx
	orl	%r12d, %ebx
	movq	_DMAC_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_lan743x_csr_write
	movl	$1, %edi
	callq	_DMAC_COAL_CFG_TIMER_LIMIT_SET_
	movl	%eax, %ebx
	movq	_DMAC_COAL_CFG_TIMER_TX_START_@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_DMAC_COAL_CFG_FLUSH_INTS_@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_DMAC_COAL_CFG_INT_EXIT_COAL_@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_DMAC_COAL_CFG_CSR_EXIT_COAL_@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	$10, %edi
	callq	_DMAC_COAL_CFG_TX_THRES_SET_
	movl	%eax, %r12d
	movl	$12, %edi
	callq	_DMAC_COAL_CFG_RX_THRES_SET_
	orl	%eax, %r12d
	orl	%ebx, %r12d
	movq	_DMAC_COAL_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_lan743x_csr_write
	movl	$8, %edi
	callq	_DMAC_OBFF_TX_THRES_SET_
	movl	%eax, %ebx
	movl	$10, %edi
	callq	_DMAC_OBFF_RX_THRES_SET_
	orl	%eax, %ebx
	movq	_DMAC_OBFF_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_lan743x_csr_write
	jmp	LBB0_5
LBB0_1:
	movq	_EPERM@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_5:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMAC_CMD,4,2                   ## @DMAC_CMD
	.comm	_DMAC_CMD_SWR_,4,2              ## @DMAC_CMD_SWR_
	.comm	_DEFAULT_DMA_DESCRIPTOR_SPACING,4,2 ## @DEFAULT_DMA_DESCRIPTOR_SPACING
	.comm	_DMAC_CFG_MAX_DSPACE_16_,4,2    ## @DMAC_CFG_MAX_DSPACE_16_
	.comm	_DMAC_CFG_MAX_DSPACE_32_,4,2    ## @DMAC_CFG_MAX_DSPACE_32_
	.comm	_DMAC_CFG_MAX_DSPACE_64_,4,2    ## @DMAC_CFG_MAX_DSPACE_64_
	.comm	_DMAC_CFG_MAX_DSPACE_128_,4,2   ## @DMAC_CFG_MAX_DSPACE_128_
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_LAN743X_CSR_FLAG_IS_A0,4,2     ## @LAN743X_CSR_FLAG_IS_A0
	.comm	_DMAC_CFG_COAL_EN_,4,2          ## @DMAC_CFG_COAL_EN_
	.comm	_DMAC_CFG_CH_ARB_SEL_RX_HIGH_,4,2 ## @DMAC_CFG_CH_ARB_SEL_RX_HIGH_
	.comm	_DMAC_CFG,4,2                   ## @DMAC_CFG
	.comm	_DMAC_COAL_CFG_TIMER_TX_START_,4,2 ## @DMAC_COAL_CFG_TIMER_TX_START_
	.comm	_DMAC_COAL_CFG_FLUSH_INTS_,4,2  ## @DMAC_COAL_CFG_FLUSH_INTS_
	.comm	_DMAC_COAL_CFG_INT_EXIT_COAL_,4,2 ## @DMAC_COAL_CFG_INT_EXIT_COAL_
	.comm	_DMAC_COAL_CFG_CSR_EXIT_COAL_,4,2 ## @DMAC_COAL_CFG_CSR_EXIT_COAL_
	.comm	_DMAC_COAL_CFG,4,2              ## @DMAC_COAL_CFG
	.comm	_DMAC_OBFF_CFG,4,2              ## @DMAC_OBFF_CFG
	.no_dead_strip	_lan743x_dmac_init
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.lan743x_dmac_init
l_switch.table.lan743x_dmac_init:
	.quad	_DMAC_CFG_MAX_DSPACE_64_
	.quad	_DMAC_CFG_MAX_DSPACE_32_
	.quad	_DMAC_CFG_MAX_DSPACE_16_
	.quad	_DMAC_CFG_MAX_DSPACE_128_

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lan743x_dmac_init
_lan743x_dmac_init:                     ; @lan743x_dmac_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x20, _DMAC_CMD@GOTPAGE
Lloh1:
	ldr	x20, [x20, _DMAC_CMD@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh2:
	adrp	x21, _DMAC_CMD_SWR_@GOTPAGE
Lloh3:
	ldr	x21, [x21, _DMAC_CMD_SWR_@GOTPAGEOFF]
	ldr	w2, [x21]
	bl	_lan743x_csr_write
	ldr	w1, [x20]
	ldr	w2, [x21]
	mov	x0, x19
	mov	w3, #0
	mov	w4, #1000
	mov	w5, #20000
	mov	w6, #100
	bl	_lan743x_csr_wait_for_bit
Lloh4:
	adrp	x8, _DEFAULT_DMA_DESCRIPTOR_SPACING@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DEFAULT_DMA_DESCRIPTOR_SPACING@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	sub	w8, w8, #128
	cmp	w8, #4
	b.hs	LBB0_2
; %bb.1:
Lloh7:
	adrp	x9, l_switch.table.lan743x_dmac_init@PAGE
Lloh8:
	add	x9, x9, l_switch.table.lan743x_dmac_init@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldr	w20, [x8]
	ldr	w8, [x19]
Lloh9:
	adrp	x9, _LAN743X_CSR_FLAG_IS_A0@GOTPAGE
Lloh10:
	ldr	x9, [x9, _LAN743X_CSR_FLAG_IS_A0@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _DMAC_CFG_COAL_EN_@GOTPAGE
Lloh13:
	ldr	x10, [x10, _DMAC_CFG_COAL_EN_@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	tst	w9, w8
	csel	w21, w10, wzr, eq
Lloh15:
	adrp	x8, _DMAC_CFG_CH_ARB_SEL_RX_HIGH_@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DMAC_CFG_CH_ARB_SEL_RX_HIGH_@GOTPAGEOFF]
Lloh17:
	ldr	w22, [x8]
	mov	w0, #6
	bl	_DMAC_CFG_MAX_READ_REQ_SET_
	orr	w8, w22, w20
	orr	w8, w8, w21
	orr	w2, w8, w0
Lloh18:
	adrp	x8, _DMAC_CFG@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DMAC_CFG@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_lan743x_csr_write
	mov	w0, #1
	bl	_DMAC_COAL_CFG_TIMER_LIMIT_SET_
Lloh21:
	adrp	x8, _DMAC_COAL_CFG_TIMER_TX_START_@GOTPAGE
Lloh22:
	ldr	x8, [x8, _DMAC_COAL_CFG_TIMER_TX_START_@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	orr	w8, w8, w0
Lloh24:
	adrp	x9, _DMAC_COAL_CFG_FLUSH_INTS_@GOTPAGE
Lloh25:
	ldr	x9, [x9, _DMAC_COAL_CFG_FLUSH_INTS_@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh27:
	adrp	x9, _DMAC_COAL_CFG_INT_EXIT_COAL_@GOTPAGE
Lloh28:
	ldr	x9, [x9, _DMAC_COAL_CFG_INT_EXIT_COAL_@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh30:
	adrp	x9, _DMAC_COAL_CFG_CSR_EXIT_COAL_@GOTPAGE
Lloh31:
	ldr	x9, [x9, _DMAC_COAL_CFG_CSR_EXIT_COAL_@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	orr	w20, w8, w9
	mov	w0, #10
	bl	_DMAC_COAL_CFG_TX_THRES_SET_
	orr	w20, w20, w0
	mov	w0, #12
	bl	_DMAC_COAL_CFG_RX_THRES_SET_
	orr	w2, w20, w0
Lloh33:
	adrp	x8, _DMAC_COAL_CFG@GOTPAGE
Lloh34:
	ldr	x8, [x8, _DMAC_COAL_CFG@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_lan743x_csr_write
	mov	w0, #8
	bl	_DMAC_OBFF_TX_THRES_SET_
	mov	x20, x0
	mov	w0, #10
	bl	_DMAC_OBFF_RX_THRES_SET_
	orr	w2, w0, w20
Lloh36:
	adrp	x8, _DMAC_OBFF_CFG@GOTPAGE
Lloh37:
	ldr	x8, [x8, _DMAC_OBFF_CFG@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_lan743x_csr_write
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh39:
	adrp	x8, _EPERM@GOTPAGE
Lloh40:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_DMAC_CMD,4,2                   ; @DMAC_CMD
	.comm	_DMAC_CMD_SWR_,4,2              ; @DMAC_CMD_SWR_
	.comm	_DEFAULT_DMA_DESCRIPTOR_SPACING,4,2 ; @DEFAULT_DMA_DESCRIPTOR_SPACING
	.comm	_DMAC_CFG_MAX_DSPACE_16_,4,2    ; @DMAC_CFG_MAX_DSPACE_16_
	.comm	_DMAC_CFG_MAX_DSPACE_32_,4,2    ; @DMAC_CFG_MAX_DSPACE_32_
	.comm	_DMAC_CFG_MAX_DSPACE_64_,4,2    ; @DMAC_CFG_MAX_DSPACE_64_
	.comm	_DMAC_CFG_MAX_DSPACE_128_,4,2   ; @DMAC_CFG_MAX_DSPACE_128_
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_LAN743X_CSR_FLAG_IS_A0,4,2     ; @LAN743X_CSR_FLAG_IS_A0
	.comm	_DMAC_CFG_COAL_EN_,4,2          ; @DMAC_CFG_COAL_EN_
	.comm	_DMAC_CFG_CH_ARB_SEL_RX_HIGH_,4,2 ; @DMAC_CFG_CH_ARB_SEL_RX_HIGH_
	.comm	_DMAC_CFG,4,2                   ; @DMAC_CFG
	.comm	_DMAC_COAL_CFG_TIMER_TX_START_,4,2 ; @DMAC_COAL_CFG_TIMER_TX_START_
	.comm	_DMAC_COAL_CFG_FLUSH_INTS_,4,2  ; @DMAC_COAL_CFG_FLUSH_INTS_
	.comm	_DMAC_COAL_CFG_INT_EXIT_COAL_,4,2 ; @DMAC_COAL_CFG_INT_EXIT_COAL_
	.comm	_DMAC_COAL_CFG_CSR_EXIT_COAL_,4,2 ; @DMAC_COAL_CFG_CSR_EXIT_COAL_
	.comm	_DMAC_COAL_CFG,4,2              ; @DMAC_COAL_CFG
	.comm	_DMAC_OBFF_CFG,4,2              ; @DMAC_OBFF_CFG
	.no_dead_strip	_lan743x_dmac_init
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.lan743x_dmac_init
l_switch.table.lan743x_dmac_init:
	.quad	_DMAC_CFG_MAX_DSPACE_64_
	.quad	_DMAC_CFG_MAX_DSPACE_32_
	.quad	_DMAC_CFG_MAX_DSPACE_16_
	.quad	_DMAC_CFG_MAX_DSPACE_128_

.subsections_via_symbols
