	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function socket_reset
_socket_reset:                          ## @socket_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	_SS_OUTPUT_ENA@GOTPCREL(%rip), %rax
	movq	_SS_RESET@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	orl	(%rax), %ecx
	leaq	16(%r12), %r14
	orl	%ecx, 16(%r12)
	movq	8(%r12), %rax
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	*8(%rax)
	movq	_reset_time@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_udelay
	movl	(%rbx), %eax
	notl	%eax
	andl	%eax, 16(%r12)
	movq	8(%r12), %rax
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	*8(%rax)
	movq	_unreset_delay@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %edi
	callq	_msleep
	movq	_unreset_limit@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_7
## %bb.1:
	xorl	%ebx, %ebx
	leaq	-44(%rbp), %r14
	movq	_SS_DETECT@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	*(%rax)
	movl	-44(%rbp), %eax
	testl	%eax, (%r13)
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_SS_READY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_unreset_check@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %edi
	callq	_msleep
	incl	%ebx
	cmpl	(%r15), %ebx
	jl	LBB0_2
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_3:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
LBB0_8:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_5:
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reset\n"

	.comm	_SS_OUTPUT_ENA,4,2              ## @SS_OUTPUT_ENA
	.comm	_SS_RESET,4,2                   ## @SS_RESET
	.comm	_reset_time,8,3                 ## @reset_time
	.comm	_unreset_delay,4,2              ## @unreset_delay
	.comm	_unreset_limit,4,2              ## @unreset_limit
	.comm	_SS_DETECT,4,2                  ## @SS_DETECT
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_SS_READY,4,2                   ## @SS_READY
	.comm	_unreset_check,4,2              ## @unreset_check
L_.str.1:                               ## @.str.1
	.asciz	"time out after reset\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function socket_reset
_socket_reset:                          ; @socket_reset
	.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	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
Lloh2:
	adrp	x8, _SS_OUTPUT_ENA@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SS_OUTPUT_ENA@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x21, _SS_RESET@GOTPAGE
Lloh6:
	ldr	x21, [x21, _SS_RESET@GOTPAGEOFF]
	ldr	w9, [x21]
	orr	w8, w9, w8
	mov	x20, x19
	ldr	w9, [x20, #16]!
	orr	w8, w8, w9
	str	w8, [x20]
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	mov	x0, x19
	mov	x1, x20
	blr	x8
Lloh7:
	adrp	x8, _reset_time@GOTPAGE
Lloh8:
	ldr	x8, [x8, _reset_time@GOTPAGEOFF]
Lloh9:
	ldr	x0, [x8]
	bl	_udelay
	ldr	w8, [x21]
	ldr	w9, [x20]
	bic	w8, w9, w8
	str	w8, [x20]
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	mov	x0, x19
	mov	x1, x20
	blr	x8
Lloh10:
	adrp	x8, _unreset_delay@GOTPAGE
Lloh11:
	ldr	x8, [x8, _unreset_delay@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	add	w8, w8, w8, lsl #2
	lsl	w0, w8, #1
	bl	_msleep
Lloh13:
	adrp	x20, _unreset_limit@GOTPAGE
Lloh14:
	ldr	x20, [x20, _unreset_limit@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	w21, #0
Lloh15:
	adrp	x22, _SS_DETECT@GOTPAGE
Lloh16:
	ldr	x22, [x22, _SS_DETECT@GOTPAGEOFF]
Lloh17:
	adrp	x23, _SS_READY@GOTPAGE
Lloh18:
	ldr	x23, [x23, _SS_READY@GOTPAGEOFF]
Lloh19:
	adrp	x24, _unreset_check@GOTPAGE
Lloh20:
	ldr	x24, [x24, _unreset_check@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	add	x1, sp, #12
	mov	x0, x19
	blr	x8
	ldr	w8, [sp, #12]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w9, [x23]
	tst	w9, w8
	b.ne	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x24]
	add	w8, w8, w8, lsl #2
	lsl	w0, w8, #1
	bl	_msleep
	add	w21, w21, #1
	ldr	w8, [x20]
	cmp	w21, w8
	b.lt	LBB0_2
LBB0_5:
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh23:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh25:
	adrp	x8, _ENODEV@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_8:
	mov	w0, #0
LBB0_9:
	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
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reset\n"

	.comm	_SS_OUTPUT_ENA,4,2              ; @SS_OUTPUT_ENA
	.comm	_SS_RESET,4,2                   ; @SS_RESET
	.comm	_reset_time,8,3                 ; @reset_time
	.comm	_unreset_delay,4,2              ; @unreset_delay
	.comm	_unreset_limit,4,2              ; @unreset_limit
	.comm	_SS_DETECT,4,2                  ; @SS_DETECT
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_SS_READY,4,2                   ; @SS_READY
	.comm	_unreset_check,4,2              ; @unreset_check
l_.str.1:                               ; @.str.1
	.asciz	"time out after reset\n"

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