	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nes_write_1G_phy_reg           ## -- Begin function nes_write_1G_phy_reg
	.p2align	4, 0x90
_nes_write_1G_phy_reg:                  ## @nes_write_1G_phy_reg
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_NES_IDX_MAC_MDIO_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$18, %esi
	shll	$23, %edx
	orl	%ecx, %esi
	orl	%esi, %edx
	orl	$1342308352, %edx               ## imm = 0x50020000
	movl	%eax, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_nes_write_indexed
	movl	$100, %ebx
	movq	_NES_IDX_MAC_INT_STATUS@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$30, %edi
	callq	_udelay
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_nes_read_indexed
	testb	$1, %al
	jne	LBB0_3
## %bb.1:                               ##   in Loop: Header=BB0_2 Depth=1
	decl	%ebx
	jne	LBB0_2
## %bb.4:
	movq	_NES_DBG_PHY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nes_debug                      ## TAILCALL
LBB0_3:
	movl	(%r15), %esi
	movq	%r14, %rdi
	movl	$1, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nes_write_indexed              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NES_IDX_MAC_MDIO_CONTROL,4,2   ## @NES_IDX_MAC_MDIO_CONTROL
	.comm	_NES_IDX_MAC_INT_STATUS,4,2     ## @NES_IDX_MAC_INT_STATUS
	.comm	_NES_DBG_PHY,4,2                ## @NES_DBG_PHY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Phy is not responding. interrupt status = 0x%X.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nes_write_1G_phy_reg           ; -- Begin function nes_write_1G_phy_reg
	.p2align	2
_nes_write_1G_phy_reg:                  ; @nes_write_1G_phy_reg
	.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	x8, _NES_IDX_MAC_MDIO_CONTROL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NES_IDX_MAC_MDIO_CONTROL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	orr	w9, w3, w1, lsl #18
	orr	w9, w9, w2, lsl #23
	mov	w10, #1342308352
	orr	w2, w9, w10
	mov	x1, x8
	bl	_nes_write_indexed
	mov	w20, #100
Lloh3:
	adrp	x21, _NES_IDX_MAC_INT_STATUS@GOTPAGE
Lloh4:
	ldr	x21, [x21, _NES_IDX_MAC_INT_STATUS@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #30
	bl	_udelay
	ldr	w1, [x21]
	mov	x0, x19
	bl	_nes_read_indexed
	tbnz	w0, #0, LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x2, x0
	subs	w20, w20, #1
	b.ne	LBB0_1
; %bb.3:
Lloh5:
	adrp	x8, _NES_DBG_PHY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NES_DBG_PHY@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	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
	b	_nes_debug
LBB0_4:
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #1
	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
	b	_nes_write_indexed
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_NES_IDX_MAC_MDIO_CONTROL,4,2   ; @NES_IDX_MAC_MDIO_CONTROL
	.comm	_NES_IDX_MAC_INT_STATUS,4,2     ; @NES_IDX_MAC_INT_STATUS
	.comm	_NES_DBG_PHY,4,2                ; @NES_DBG_PHY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Phy is not responding. interrupt status = 0x%X.\n"

.subsections_via_symbols
