	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gm_phy_write
_gm_phy_write:                          ## @gm_phy_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_GM_SMI_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_gma_write16
	movq	_GM_SMI_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	8(%rbx), %edi
	callq	_GM_SMI_CT_PHY_AD
	movl	%eax, %r13d
	movl	%r12d, %edi
	callq	_GM_SMI_CT_REG_AD
	orl	%eax, %r13d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	movl	%r13d, %ecx
	callq	_gma_write16
	movq	_PHY_RETRIES@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_5
## %bb.1:
	movq	_GM_SMI_CT_BUSY@GOTPCREL(%rip), %r15
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_udelay
	movq	_GM_SMI_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_gma_read16
	testl	%eax, (%r15)
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%r12d
	cmpl	(%r13), %r12d
	jl	LBB0_3
LBB0_5:
	movq	(%rbx), %rax
	movslq	%r14d, %rcx
	movq	(%rax,%rcx,8), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_pr_warn
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_4:
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GM_SMI_DATA,4,2                ## @GM_SMI_DATA
	.comm	_GM_SMI_CTRL,4,2                ## @GM_SMI_CTRL
	.comm	_PHY_RETRIES,4,2                ## @PHY_RETRIES
	.comm	_GM_SMI_CT_BUSY,4,2             ## @GM_SMI_CT_BUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: phy write timeout\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_gm_phy_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gm_phy_write
_gm_phy_write:                          ; @gm_phy_write
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _GM_SMI_DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GM_SMI_DATA@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_gma_write16
Lloh3:
	adrp	x24, _GM_SMI_CTRL@GOTPAGE
Lloh4:
	ldr	x24, [x24, _GM_SMI_CTRL@GOTPAGEOFF]
	ldr	w22, [x24]
	ldr	w0, [x20, #8]
	bl	_GM_SMI_CT_PHY_AD
	mov	x23, x0
	mov	x0, x21
	bl	_GM_SMI_CT_REG_AD
	orr	w3, w0, w23
	mov	x0, x20
	mov	x1, x19
	mov	x2, x22
	bl	_gma_write16
Lloh5:
	adrp	x21, _PHY_RETRIES@GOTPAGE
Lloh6:
	ldr	x21, [x21, _PHY_RETRIES@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	w22, #0
Lloh7:
	adrp	x23, _GM_SMI_CT_BUSY@GOTPAGE
Lloh8:
	ldr	x23, [x23, _GM_SMI_CT_BUSY@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	bl	_udelay
	ldr	w2, [x24]
	mov	x0, x20
	mov	x1, x19
	bl	_gma_read16
	ldr	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w22, w22, #1
	ldr	w8, [x21]
	cmp	w22, w8
	b.lt	LBB0_2
LBB0_4:
	ldr	x8, [x20]
	ldr	x8, [x8, w19, sxtw #3]
	ldr	w1, [x8]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
Lloh11:
	adrp	x8, _EIO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	mov	w0, #0
LBB0_6:
	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	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_GM_SMI_DATA,4,2                ; @GM_SMI_DATA
	.comm	_GM_SMI_CTRL,4,2                ; @GM_SMI_CTRL
	.comm	_PHY_RETRIES,4,2                ; @PHY_RETRIES
	.comm	_GM_SMI_CT_BUSY,4,2             ; @GM_SMI_CT_BUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: phy write timeout\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_gm_phy_write
.subsections_via_symbols
