	.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, %ebx
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_GM_SMI_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_gma_write16
	movq	_GM_SMI_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_PHY_ADDR_MARV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_GM_SMI_CT_PHY_AD
	movl	%eax, %r13d
	movl	%ebx, %edi
	callq	_GM_SMI_CT_REG_AD
	orl	%eax, %r13d
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%r12d, %edx
	movl	%r13d, %ecx
	callq	_gma_write16
	movq	_PHY_RETRIES@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_6
## %bb.1:
	xorl	%ebx, %ebx
	movq	_GM_SMI_CT_BUSY@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_GM_SMI_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_gma_read16
	cmpl	$65535, %eax                    ## imm = 0xFFFF
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%eax, (%r13)
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$10, %edi
	callq	_udelay
	incl	%ebx
	cmpl	(%r12), %ebx
	jl	LBB0_2
LBB0_6:
	movq	(%r15), %rax
	movq	8(%r15), %rdi
	movl	%r14d, %ecx
	movq	(%rax,%rcx,8), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_7:
	movq	(%r15), %rax
	movq	8(%r15), %rdi
	movl	%r14d, %ecx
	movq	(%rax,%rcx,8), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_8:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_4:
	xorl	%eax, %eax
LBB0_9:
	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_ADDR_MARV,4,2              ## @PHY_ADDR_MARV
	.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	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
L_.str.1:                               ## @.str.1
	.asciz	"%s: phy I/O error\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	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	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]
Lloh5:
	adrp	x8, _PHY_ADDR_MARV@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PHY_ADDR_MARV@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	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
Lloh8:
	adrp	x21, _PHY_RETRIES@GOTPAGE
Lloh9:
	ldr	x21, [x21, _PHY_RETRIES@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	w22, #0
	mov	w23, #65535
Lloh10:
	adrp	x25, _GM_SMI_CT_BUSY@GOTPAGE
Lloh11:
	ldr	x25, [x25, _GM_SMI_CT_BUSY@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x24]
	mov	x0, x20
	mov	x1, x19
	bl	_gma_read16
	cmp	w0, w23
	b.eq	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #10
	bl	_udelay
	add	w22, w22, #1
	ldr	w8, [x21]
	cmp	w22, w8
	b.lt	LBB0_2
LBB0_5:
	ldp	x8, x0, [x20]
	ldr	x8, [x8, w19, uxtw #3]
	ldr	w2, [x8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
Lloh14:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
	ldp	x8, x0, [x20]
	ldr	x8, [x8, w19, uxtw #3]
	ldr	w2, [x8]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh18:
	adrp	x8, _EIO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_GM_SMI_DATA,4,2                ; @GM_SMI_DATA
	.comm	_GM_SMI_CTRL,4,2                ; @GM_SMI_CTRL
	.comm	_PHY_ADDR_MARV,4,2              ; @PHY_ADDR_MARV
	.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	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
l_.str.1:                               ; @.str.1
	.asciz	"%s: phy I/O error\n"

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