	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgbe_phy_i2c_mdio_reset
_xgbe_phy_i2c_mdio_reset:               ## @xgbe_phy_i2c_mdio_reset
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	(%rdi), %r14
	movl	$2, -48(%rbp)
	movl	4(%r14), %esi
	leaq	-48(%rbp), %rdx
	leaq	-32(%rbp), %r8
	movl	$4, %ecx
	movl	$8, %r9d
	callq	_xgbe_phy_i2c_read
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	movl	$2, -44(%rbp)
	movl	-32(%rbp), %eax
	movl	-28(%rbp), %ecx
	movl	%eax, -40(%rbp)
	movl	%ecx, -36(%rbp)
	movl	(%r14), %edx
	movl	%edx, %esi
	andb	$7, %sil
	xorl	%edi, %edi
	cmpl	$8, %edx
	cmovll	%eax, %ecx
	setge	%dil
	btsl	%esi, %ecx
	movl	%ecx, -40(%rbp,%rdi,4)
	movl	4(%r14), %esi
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$12, %ecx
	callq	_xgbe_phy_i2c_write
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movl	(%r14), %ecx
	xorl	%eax, %eax
	cmpl	$8, %ecx
	setge	%al
	andb	$7, %cl
	movl	$-2, %edx
                                        ## kill: def $cl killed $cl killed $ecx
	roll	%cl, %edx
	andl	%edx, -40(%rbp,%rax,4)
	movl	4(%r14), %esi
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$12, %ecx
	callq	_xgbe_phy_i2c_write
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_5
## %bb.4:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_xgbe_phy_i2c_mdio_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgbe_phy_i2c_mdio_reset
_xgbe_phy_i2c_mdio_reset:               ; @xgbe_phy_i2c_mdio_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	x20, [x0]
	mov	w21, #2
	str	w21, [sp]
	ldr	w1, [x20, #4]
	mov	x2, sp
	add	x4, sp, #16
	mov	w3, #4
	mov	w5, #8
	bl	_xgbe_phy_i2c_read
	cbnz	w0, LBB0_3
; %bb.1:
	ldp	w8, w9, [sp, #16]
	stp	w21, w8, [sp, #4]
	str	w9, [sp, #12]
	ldr	w10, [x20]
	and	x11, x10, #0x7
	mov	w21, #1
	lsl	w11, w21, w11
	cmp	w10, #8
	csel	w8, w8, w9, lt
	mov	w9, #8
	mov	w10, #4
	csel	x9, x10, x9, lt
	orr	w8, w11, w8
	add	x22, sp, #4
	str	w8, [x22, x9]
	ldr	w1, [x20, #4]
	add	x2, sp, #4
	mov	x0, x19
	mov	w3, #12
	bl	_xgbe_phy_i2c_write
	cbnz	w0, LBB0_3
; %bb.2:
	ldr	w8, [x20]
	and	x9, x8, #0x7
	lsl	w9, w21, w9
	cmp	w8, #8
	mov	w8, #8
	mov	w10, #4
	csel	x8, x10, x8, lt
	ldr	w10, [x22, x8]
	bic	w9, w10, w9
	str	w9, [x22, x8]
	ldr	w1, [x20, #4]
	add	x2, sp, #4
	mov	x0, x19
	mov	w3, #12
	bl	_xgbe_phy_i2c_write
LBB0_3:
	ldr	x8, [sp, #24]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	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
	add	sp, sp, #80
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_xgbe_phy_i2c_mdio_reset
.subsections_via_symbols
