	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2c_mii_read
_i2c_mii_read:                          ## @i2c_mii_read
	.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	%r12
	pushq	%rbx
	subq	$80, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	(%rdi), %r14
	movl	%edx, -108(%rbp)
	movl	%esi, %edi
	callq	_i2c_mii_valid_phy_id
	movl	$65535, %r15d                   ## imm = 0xFFFF
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	%ebx, %edi
	callq	_i2c_mii_phy_addr
	movl	%eax, -96(%rbp)
	movq	$0, -80(%rbp)
	movl	$1, -92(%rbp)
	leaq	-108(%rbp), %rcx
	movq	%rcx, -88(%rbp)
	movl	%eax, -72(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)
	movl	$8, -68(%rbp)
	leaq	-104(%rbp), %rax
	movq	%rax, -64(%rbp)
	leaq	-96(%rbp), %r12
	movq	%r12, %rdi
	callq	_ARRAY_SIZE
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_i2c_transfer
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %ebx
	jne	LBB0_3
## %bb.2:
	movl	-104(%rbp), %r15d
	shll	$8, %r15d
	orl	-100(%rbp), %r15d
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	movl	%r15d, %eax
	addq	$80, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,8,3                   ## @I2C_M_RD
	.no_dead_strip	_i2c_mii_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2c_mii_read
_i2c_mii_read:                          ; @i2c_mii_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x20, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	ldr	x19, [x0]
	str	w2, [sp, #12]
	mov	x0, x1
	bl	_i2c_mii_valid_phy_id
	cbz	w0, LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_i2c_mii_phy_addr
	mov	w8, #1
	stp	w0, w8, [sp, #24]
	add	x8, sp, #12
	stp	x8, xzr, [sp, #32]
Lloh3:
	adrp	x8, _I2C_M_RD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I2C_M_RD@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	mov	w9, #8
	stp	w0, w9, [sp, #48]
	add	x9, sp, #16
	stp	x9, x8, [sp, #56]
	add	x0, sp, #24
	bl	_ARRAY_SIZE
	mov	x2, x0
	add	x1, sp, #24
	mov	x0, x19
	bl	_i2c_transfer
	mov	x19, x0
	add	x0, sp, #24
	bl	_ARRAY_SIZE
	cmp	w19, w0
	b.ne	LBB0_3
; %bb.2:
	ldp	w8, w9, [sp, #16]
	orr	w0, w9, w8, lsl #8
	b	LBB0_4
LBB0_3:
	mov	w0, #65535
LBB0_4:
	ldur	x8, [x29, #-24]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,8,3                   ; @I2C_M_RD
	.no_dead_strip	_i2c_mii_read
.subsections_via_symbols
