	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lan743x_dp_write
_lan743x_dp_write:                      ## @lan743x_dp_write
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	%edx, %r13d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	callq	_mutex_lock
	movq	_DP_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DP_SEL_DPRDY_@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$100, (%rsp)
	movq	%rbx, %rdi
	movl	$1, %ecx
	movl	$40, %r8d
	movl	$100, %r9d
	callq	_lan743x_csr_wait_for_bit
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	%r12d, %r15d
LBB0_8:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	%r13d, -48(%rbp)                ## 4-byte Spill
	movq	_DP_SEL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_lan743x_csr_read
	movq	_DP_SEL_MASK_@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	orl	-44(%rbp), %edx                 ## 4-byte Folded Reload
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_lan743x_csr_write
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, %eax
	jle	LBB0_8
## %bb.3:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movl	%eax, %r15d
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	_DP_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leal	(%r12,%r13), %edx
	movq	%rbx, %rdi
	callq	_lan743x_csr_write
	movq	_DP_DATA_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14,%r13,4), %edx
	movq	%rbx, %rdi
	callq	_lan743x_csr_write
	movq	_DP_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DP_CMD_WRITE_@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_lan743x_csr_write
	movq	_DP_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DP_SEL_DPRDY_@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$100, (%rsp)
	movq	%rbx, %rdi
	movl	$1, %ecx
	movl	$40, %r8d
	movl	$100, %r9d
	callq	_lan743x_csr_wait_for_bit
	testq	%rax, %rax
	jne	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%r13
	cmpq	%r13, %r15
	jne	LBB0_4
## %bb.6:
	xorl	%r15d, %r15d
	jmp	LBB0_8
LBB0_7:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_DP_SEL,4,2                     ## @DP_SEL
	.comm	_DP_SEL_DPRDY_,4,2              ## @DP_SEL_DPRDY_
	.comm	_DP_SEL_MASK_,4,2               ## @DP_SEL_MASK_
	.comm	_DP_ADDR,4,2                    ## @DP_ADDR
	.comm	_DP_DATA_0,4,2                  ## @DP_DATA_0
	.comm	_DP_CMD,4,2                     ## @DP_CMD
	.comm	_DP_CMD_WRITE_,4,2              ## @DP_CMD_WRITE_
	.no_dead_strip	_lan743x_dp_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lan743x_dp_write
_lan743x_dp_write:                      ; @lan743x_dp_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x21, x4
	mov	x23, x3
	mov	x22, x2
	mov	x24, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	bl	_mutex_lock
Lloh3:
	adrp	x25, _DP_SEL@GOTPAGE
Lloh4:
	ldr	x25, [x25, _DP_SEL@GOTPAGEOFF]
	ldr	w1, [x25]
Lloh5:
	adrp	x26, _DP_SEL_DPRDY_@GOTPAGE
Lloh6:
	ldr	x26, [x26, _DP_SEL_DPRDY_@GOTPAGEOFF]
	ldr	w2, [x26]
	mov	x0, x19
	mov	w3, #1
	mov	w4, #40
	mov	w5, #100
	mov	w6, #100
	bl	_lan743x_csr_wait_for_bit
	cbnz	x0, LBB0_7
; %bb.1:
	ldr	w1, [x25]
	mov	x0, x19
	bl	_lan743x_csr_read
Lloh7:
	adrp	x8, _DP_SEL_MASK_@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DP_SEL_MASK_@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	bic	w8, w0, w8
	orr	w2, w8, w24
	ldr	w1, [x25]
	mov	x0, x19
	bl	_lan743x_csr_write
	cmp	w23, #1
	b.lt	LBB0_5
; %bb.2:
	str	w20, [sp, #12]                  ; 4-byte Folded Spill
	mov	w23, w23
Lloh10:
	adrp	x24, _DP_ADDR@GOTPAGE
Lloh11:
	ldr	x24, [x24, _DP_ADDR@GOTPAGEOFF]
Lloh12:
	adrp	x27, _DP_DATA_0@GOTPAGE
Lloh13:
	ldr	x27, [x27, _DP_DATA_0@GOTPAGEOFF]
Lloh14:
	adrp	x28, _DP_CMD@GOTPAGE
Lloh15:
	ldr	x28, [x28, _DP_CMD@GOTPAGEOFF]
Lloh16:
	adrp	x20, _DP_CMD_WRITE_@GOTPAGE
Lloh17:
	ldr	x20, [x20, _DP_CMD_WRITE_@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x22
	bl	_lan743x_csr_write
	ldr	w1, [x27]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_lan743x_csr_write
	ldr	w1, [x28]
	ldr	w2, [x20]
	mov	x0, x19
	bl	_lan743x_csr_write
	ldr	w1, [x25]
	ldr	w2, [x26]
	mov	x0, x19
	mov	w3, #1
	mov	w4, #40
	mov	w5, #100
	mov	w6, #100
	bl	_lan743x_csr_wait_for_bit
	cbnz	x0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w22, w22, #1
	add	x21, x21, #4
	subs	x23, x23, #1
	b.ne	LBB0_3
LBB0_5:
	mov	w20, #0
	b	LBB0_7
LBB0_6:
	ldr	w20, [sp, #12]                  ; 4-byte Folded Reload
LBB0_7:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_DP_SEL,4,2                     ; @DP_SEL
	.comm	_DP_SEL_DPRDY_,4,2              ; @DP_SEL_DPRDY_
	.comm	_DP_SEL_MASK_,4,2               ; @DP_SEL_MASK_
	.comm	_DP_ADDR,4,2                    ; @DP_ADDR
	.comm	_DP_DATA_0,4,2                  ; @DP_DATA_0
	.comm	_DP_CMD,4,2                     ; @DP_CMD
	.comm	_DP_CMD_WRITE_,4,2              ; @DP_CMD_WRITE_
	.no_dead_strip	_lan743x_dp_write
.subsections_via_symbols
