	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ezusb_hard_reset
_ezusb_hard_reset:                      ## @ezusb_hard_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rbx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ezusb_8051_cpucs
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ezusb_8051_cpucs
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	4(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_netdev_dbg
	movl	(%rbx), %ebx
	movl	%ebx, %edi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movq	_EZUSB_REQUEST_TRIGER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rsi
	movq	_USB_RECIP_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rsi), %ecx
	movq	_USB_DIR_OUT@GOTPCREL(%rip), %rsi
	orl	(%rsi), %ecx
	movq	_DEF_TIMEOUT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r10d
	subq	$8, %rsp
	movl	%ebx, %edi
	movl	%eax, %esi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%r10
	pushq	$0
	pushq	$0
	callq	_usb_control_msg
	addq	$32, %rsp
	testl	%eax, %eax
	jns	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_err
	movl	%ebx, %r14d
	jmp	LBB0_6
LBB0_1:
	movl	%eax, %r14d
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_err
	jmp	LBB0_6
LBB0_3:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_err
	movl	%r15d, %r14d
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to reset"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to unreset"

L_.str.2:                               ## @.str.2
	.asciz	"sending control message\n"

	.comm	_EZUSB_REQUEST_TRIGER,4,2       ## @EZUSB_REQUEST_TRIGER
	.comm	_USB_TYPE_VENDOR,4,2            ## @USB_TYPE_VENDOR
	.comm	_USB_RECIP_DEVICE,4,2           ## @USB_RECIP_DEVICE
	.comm	_USB_DIR_OUT,4,2                ## @USB_DIR_OUT
	.comm	_DEF_TIMEOUT,4,2                ## @DEF_TIMEOUT
L_.str.3:                               ## @.str.3
	.asciz	"EZUSB_REQUEST_TRIGER failed retval %d"

	.comm	_EZUSB_REQUEST_TRIG_AC,4,2      ## @EZUSB_REQUEST_TRIG_AC
	.no_dead_strip	_ezusb_hard_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ezusb_hard_reset
_ezusb_hard_reset:                      ; @ezusb_hard_reset
	.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
	ldr	x20, [x0]
	mov	x0, x20
	mov	w1, #1
	bl	_ezusb_8051_cpucs
	tbnz	w0, #31, LBB0_4
; %bb.1:
	mov	x0, x20
	mov	w1, #0
	bl	_ezusb_8051_cpucs
	tbnz	w0, #31, LBB0_5
; %bb.2:
	ldr	w0, [x20, #4]
Lloh0:
	adrp	x1, l_.str.2@PAGE
Lloh1:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_netdev_dbg
	ldr	w19, [x20]
	mov	x0, x19
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x1, x0
Lloh2:
	adrp	x8, _EZUSB_REQUEST_TRIGER@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EZUSB_REQUEST_TRIGER@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
Lloh5:
	adrp	x8, _USB_TYPE_VENDOR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _USB_RECIP_DEVICE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _USB_RECIP_DEVICE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _USB_DIR_OUT@GOTPAGE
Lloh12:
	ldr	x10, [x10, _USB_DIR_OUT@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh13:
	ldr	w9, [x10]
	orr	w3, w8, w9
Lloh14:
	adrp	x8, _DEF_TIMEOUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DEF_TIMEOUT@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [sp]
	mov	x0, x19
	mov	w4, #0
	mov	w5, #0
	mov	x6, #0
	mov	w7, #0
	bl	_usb_control_msg
	mov	w19, #0
	tbz	w0, #31, LBB0_7
; %bb.3:
	mov	x20, x0
	str	x20, [sp]
Lloh17:
	adrp	x0, l_.str.3@PAGE
Lloh18:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_err
	mov	x19, x20
	b	LBB0_7
LBB0_4:
	mov	x19, x0
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_6
LBB0_5:
	mov	x19, x0
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_6:
	bl	_err
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to reset"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to unreset"

l_.str.2:                               ; @.str.2
	.asciz	"sending control message\n"

	.comm	_EZUSB_REQUEST_TRIGER,4,2       ; @EZUSB_REQUEST_TRIGER
	.comm	_USB_TYPE_VENDOR,4,2            ; @USB_TYPE_VENDOR
	.comm	_USB_RECIP_DEVICE,4,2           ; @USB_RECIP_DEVICE
	.comm	_USB_DIR_OUT,4,2                ; @USB_DIR_OUT
	.comm	_DEF_TIMEOUT,4,2                ; @DEF_TIMEOUT
l_.str.3:                               ; @.str.3
	.asciz	"EZUSB_REQUEST_TRIGER failed retval %d"

	.comm	_EZUSB_REQUEST_TRIG_AC,4,2      ; @EZUSB_REQUEST_TRIG_AC
	.no_dead_strip	_ezusb_hard_reset
.subsections_via_symbols
