	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ael_i2c_rd
_ael_i2c_rd:                            ## @ael_i2c_rd
	.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
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	_MDIO_MMD_PMAPMD@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_AEL_I2C_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %ecx
	shll	$8, %ecx
	orl	%r14d, %ecx
	orl	$256, %ecx                      ## imm = 0x100
	callq	_t3_mdio_write
	testl	%eax, %eax
	je	LBB0_1
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movl	$200, %r14d
	movq	_AEL_I2C_STAT@GOTPCREL(%rip), %r15
	leaq	-56(%rbp), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_msleep
	movl	(%r13), %esi
	movl	(%r15), %edx
	movq	%rbx, %rdi
	movq	%r12, %rcx
	callq	_t3_mdio_read
	testl	%eax, %eax
	jne	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	-56(%rbp), %eax
	andl	$3, %eax
	cmpl	$1, %eax
	je	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	decl	%r14d
	jne	LBB0_3
## %bb.7:
	movl	(%rbx), %edx
	movl	4(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	callq	_CH_WARN
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_5:
	movl	(%r13), %esi
	movq	_AEL_I2C_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-52(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_t3_mdio_read
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:
	movl	-52(%rbp), %eax
	shrl	$8, %eax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_MDIO_MMD_PMAPMD,4,2            ## @MDIO_MMD_PMAPMD
	.comm	_AEL_I2C_CTRL,4,2               ## @AEL_I2C_CTRL
	.comm	_AEL_I2C_STAT,4,2               ## @AEL_I2C_STAT
	.comm	_AEL_I2C_DATA,4,2               ## @AEL_I2C_DATA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PHY %u i2c read of dev.addr %#x.%#x timed out\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_ael_i2c_rd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ael_i2c_rd
_ael_i2c_rd:                            ; @ael_i2c_rd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _MDIO_MMD_PMAPMD@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MDIO_MMD_PMAPMD@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh2:
	adrp	x8, _AEL_I2C_CTRL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AEL_I2C_CTRL@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	orr	w8, w20, w21, lsl #8
	orr	w3, w8, #0x100
	bl	_t3_mdio_write
	cbz	w0, LBB0_2
LBB0_1:
	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
	add	sp, sp, #80
	ret
LBB0_2:
	mov	w23, #200
Lloh5:
	adrp	x24, _AEL_I2C_STAT@GOTPAGE
Lloh6:
	ldr	x24, [x24, _AEL_I2C_STAT@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x22]
	ldr	w2, [x24]
	add	x3, sp, #12
	mov	x0, x19
	bl	_t3_mdio_read
	cbnz	w0, LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [sp, #12]
	and	w8, w8, #0x3
	cmp	w8, #1
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	subs	w23, w23, #1
	b.ne	LBB0_3
; %bb.6:
	ldp	w2, w0, [x19]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x21
	mov	x4, x20
	bl	_CH_WARN
Lloh9:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_1
LBB0_7:
	ldr	w1, [x22]
Lloh12:
	adrp	x8, _AEL_I2C_DATA@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AEL_I2C_DATA@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	add	x3, sp, #8
	mov	x0, x19
	bl	_t3_mdio_read
	cbnz	w0, LBB0_1
; %bb.8:
	ldr	w8, [sp, #8]
	lsr	w0, w8, #8
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MDIO_MMD_PMAPMD,4,2            ; @MDIO_MMD_PMAPMD
	.comm	_AEL_I2C_CTRL,4,2               ; @AEL_I2C_CTRL
	.comm	_AEL_I2C_STAT,4,2               ; @AEL_I2C_STAT
	.comm	_AEL_I2C_DATA,4,2               ; @AEL_I2C_DATA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PHY %u i2c read of dev.addr %#x.%#x timed out\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_ael_i2c_rd
.subsections_via_symbols
