	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fe_reset_phy
_fe_reset_phy:                          ## @fe_reset_phy
	.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	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	$30, -20(%rbp)
	movq	(%rdi), %rdi
	movq	_GPIOD_OUT_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	callq	_devm_gpiod_get_optional
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	(%rbx), %rbx
	testq	%rax, %rax
	je	LBB0_2
## %bb.10:
	movq	%r14, %rdi
	callq	_PTR_ERR
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_2:
	movl	(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	leaq	-20(%rbp), %rdx
	callq	_of_property_read_u32
	movl	-20(%rbp), %edi
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	cmpl	$1001, %edi                     ## imm = 0x3E9
	jl	LBB0_5
## %bb.4:
	movl	$30, -20(%rbp)
	movl	$30, %edi
	callq	_msleep
	jmp	LBB0_8
LBB0_5:
	cmpl	$21, %edi
	jl	LBB0_7
## %bb.6:
	callq	_msleep
	jmp	LBB0_8
LBB0_7:
	imull	$1000, %edi, %edi               ## imm = 0x3E8
	leal	1000(%rdi), %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_usleep_range
LBB0_8:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_gpiod_set_value
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"phy-reset"

	.comm	_GPIOD_OUT_HIGH,4,2             ## @GPIOD_OUT_HIGH
L_.str.1:                               ## @.str.1
	.asciz	"Error acquiring reset gpio pins: %ld\n"

L_.str.2:                               ## @.str.2
	.asciz	"phy-reset-duration"

	.no_dead_strip	_fe_reset_phy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fe_reset_phy
_fe_reset_phy:                          ; @fe_reset_phy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x0
	mov	w8, #30
	str	w8, [sp, #12]
	ldr	x0, [x0]
Lloh0:
	adrp	x8, _GPIOD_OUT_HIGH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GPIOD_OUT_HIGH@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_devm_gpiod_get_optional
	cbz	x0, LBB0_10
; %bb.1:
	mov	x19, x0
	bl	_IS_ERR
	ldr	x20, [x20]
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_PTR_ERR
	mov	x2, x0
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_dev_err
LBB0_3:
	ldr	w0, [x20]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x2, sp, #12
	bl	_of_property_read_u32
	mov	x8, x0
	ldr	w0, [sp, #12]
	cbnz	w8, LBB0_6
; %bb.4:
	cmp	w0, #1001
	b.lt	LBB0_6
; %bb.5:
	mov	w0, #30
	str	w0, [sp, #12]
	bl	_msleep
	b	LBB0_9
LBB0_6:
	cmp	w0, #21
	b.lt	LBB0_8
; %bb.7:
	bl	_msleep
	b	LBB0_9
LBB0_8:
	mov	w8, #1000
	mul	w0, w0, w8
	add	w1, w0, #1000
	bl	_usleep_range
LBB0_9:
	mov	x0, x19
	mov	w1, #0
	bl	_gpiod_set_value
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"phy-reset"

	.comm	_GPIOD_OUT_HIGH,4,2             ; @GPIOD_OUT_HIGH
l_.str.1:                               ; @.str.1
	.asciz	"Error acquiring reset gpio pins: %ld\n"

l_.str.2:                               ; @.str.2
	.asciz	"phy-reset-duration"

	.no_dead_strip	_fe_reset_phy
.subsections_via_symbols
