	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vp7045_usb_op                  ## -- Begin function vp7045_usb_op
	.p2align	4, 0x90
_vp7045_usb_op:                         ## @vp7045_usb_op
	.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
	subq	$152, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r12d
	movq	%r8, -192(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movaps	%xmm0, -176(%rbp)
	movaps	%xmm0, -112(%rbp)
	movaps	%xmm0, -128(%rbp)
	movaps	%xmm0, -144(%rbp)
	movaps	%xmm0, -160(%rbp)
	movl	%esi, -176(%rbp)
	cmpl	$19, %ecx
	movl	$19, %ebx
	cmovll	%ecx, %ebx
	cmpl	$11, %r9d
	movl	$11, %r13d
	cmovll	%r9d, %r13d
	testq	%rdx, %rdx
	je	LBB0_3
## %bb.1:
	testl	%ecx, %ecx
	jle	LBB0_3
## %bb.2:
	leaq	-172(%rbp), %rdi
	movq	%rdx, %rsi
	movl	%ebx, %edx
	callq	_memcpy
LBB0_3:
	leaq	L_.str(%rip), %rdi
	callq	_deb_xfer
	movq	_deb_xfer@GOTPCREL(%rip), %rdx
	incl	%ebx
	leaq	-176(%rbp), %r14
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_debug_dump
	movq	%r15, %rdi
	callq	_mutex_lock_interruptible
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.4:
	movq	%r15, -184(%rbp)                ## 8-byte Spill
	movl	4(%r15), %r15d
	xorl	%ebx, %ebx
	movl	%r15d, %edi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movq	_TH_COMMAND_OUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rsi
	movq	_USB_DIR_OUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rsi), %ecx
	subq	$8, %rsp
	movl	%r15d, %edi
	movl	%eax, %esi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	$2000                           ## imm = 0x7D0
	pushq	$20
	pushq	%r14
	callq	_usb_control_msg
	addq	$32, %rsp
	cmpl	$20, %eax
	jne	LBB0_5
## %bb.6:
	movl	16(%rbp), %edi
	callq	_msleep
	movq	-184(%rbp), %r15                ## 8-byte Reload
	movl	4(%r15), %r14d
	xorl	%ebx, %ebx
	movl	%r14d, %edi
	xorl	%esi, %esi
	callq	_usb_rcvctrlpipe
	movq	_TH_COMMAND_IN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_USB_DIR_IN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rsi
	orl	(%rsi), %ecx
	subq	$8, %rsp
	leaq	-96(%rbp), %r10
	movl	%r14d, %edi
	movl	%eax, %esi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	$2000                           ## imm = 0x7D0
	pushq	$12
	pushq	%r10
	callq	_usb_control_msg
	addq	$32, %rsp
	cmpl	$12, %eax
	movq	%r15, %r14
	jne	LBB0_7
## %bb.8:
	leaq	L_.str.3(%rip), %rdi
	callq	_deb_xfer
	movq	_deb_xfer@GOTPCREL(%rip), %rdx
	leaq	-96(%rbp), %rdi
	movl	$12, %esi
	callq	_debug_dump
	movq	-192(%rbp), %rdi                ## 8-byte Reload
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.9:
	testl	%r12d, %r12d
	jle	LBB0_11
## %bb.10:
	leaq	-92(%rbp), %rsi
	movl	%r13d, %edx
	callq	_memcpy
	jmp	LBB0_11
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	callq	_err
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movq	-184(%rbp), %r14                ## 8-byte Reload
	jmp	LBB0_11
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	callq	_err
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_11:
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	movl	%ebx, %eax
	addq	$152, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"out buffer: "

	.comm	_TH_COMMAND_OUT,4,2             ## @TH_COMMAND_OUT
	.comm	_USB_TYPE_VENDOR,4,2            ## @USB_TYPE_VENDOR
	.comm	_USB_DIR_OUT,4,2                ## @USB_DIR_OUT
L_.str.1:                               ## @.str.1
	.asciz	"USB control message 'out' went wrong."

	.comm	_EIO,4,2                        ## @EIO
	.comm	_TH_COMMAND_IN,4,2              ## @TH_COMMAND_IN
	.comm	_USB_DIR_IN,4,2                 ## @USB_DIR_IN
L_.str.2:                               ## @.str.2
	.asciz	"USB control message 'in' went wrong."

L_.str.3:                               ## @.str.3
	.asciz	"in buffer: "

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vp7045_usb_op                  ; -- Begin function vp7045_usb_op
	.p2align	2
_vp7045_usb_op:                         ; @vp7045_usb_op
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #240
	.cfi_def_cfa_offset 240
	stp	x26, x25, [sp, #160]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #176]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #192]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #208]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #224]            ; 16-byte Folded Spill
	add	x29, sp, #224
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x6
	mov	x21, x5
	mov	x20, x4
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #112]
	stp	q0, q0, [sp, #80]
	stur	q0, [sp, #68]
	stur	q0, [sp, #52]
	stur	q0, [sp, #36]
	stur	q0, [sp, #20]
	str	w1, [sp, #16]
	mov	w8, #19
	cmp	w3, #19
	csel	w24, w3, w8, lt
	mov	w8, #11
	cmp	w5, #11
	csel	w22, w5, w8, lt
	cbz	x2, LBB0_3
; %bb.1:
	cmp	w3, #1
	b.lt	LBB0_3
; %bb.2:
	add	x8, sp, #16
	add	x0, x8, #4
	mov	x1, x2
	mov	x2, x24
	bl	_memcpy
LBB0_3:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_deb_xfer
Lloh5:
	adrp	x2, _deb_xfer@GOTPAGE
Lloh6:
	ldr	x2, [x2, _deb_xfer@GOTPAGEOFF]
	add	w1, w24, #1
	add	x0, sp, #16
	bl	_debug_dump
	mov	x0, x19
	bl	_mutex_lock_interruptible
	mov	x24, x0
	cbnz	w0, LBB0_13
; %bb.4:
	ldr	w24, [x19, #4]
	mov	x0, x24
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x1, x0
Lloh7:
	adrp	x8, _TH_COMMAND_OUT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _TH_COMMAND_OUT@GOTPAGEOFF]
Lloh9:
	adrp	x25, _USB_TYPE_VENDOR@GOTPAGE
Lloh10:
	ldr	x25, [x25, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	ldr	w8, [x25]
Lloh12:
	adrp	x9, _USB_DIR_OUT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _USB_DIR_OUT@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	w26, #2000
	str	w26, [sp]
	add	x6, sp, #16
	mov	x0, x24
	mov	w4, #0
	mov	w5, #0
	mov	w7, #20
	bl	_usb_control_msg
	cmp	w0, #20
	b.ne	LBB0_9
; %bb.5:
	mov	x0, x23
	bl	_msleep
	ldr	w23, [x19, #4]
	mov	x0, x23
	mov	w1, #0
	bl	_usb_rcvctrlpipe
	mov	x1, x0
Lloh15:
	adrp	x8, _TH_COMMAND_IN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TH_COMMAND_IN@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	ldr	w8, [x25]
Lloh18:
	adrp	x9, _USB_DIR_IN@GOTPAGE
Lloh19:
	ldr	x9, [x9, _USB_DIR_IN@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w3, w9, w8
	str	w26, [sp]
	add	x6, sp, #96
	mov	x0, x23
	mov	w4, #0
	mov	w5, #0
	mov	w7, #12
	bl	_usb_control_msg
	cmp	w0, #12
	b.ne	LBB0_10
; %bb.6:
Lloh21:
	adrp	x0, l_.str.3@PAGE
Lloh22:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_deb_xfer
Lloh23:
	adrp	x2, _deb_xfer@GOTPAGE
Lloh24:
	ldr	x2, [x2, _deb_xfer@GOTPAGEOFF]
	add	x0, sp, #96
	mov	w1, #12
	bl	_debug_dump
	mov	w24, #0
	cbz	x20, LBB0_12
; %bb.7:
	cmp	w21, #1
	b.lt	LBB0_12
; %bb.8:
	add	x8, sp, #96
	orr	x1, x8, #0x4
	mov	x0, x20
	mov	x2, x22
	bl	_memcpy
	mov	w24, #0
	b	LBB0_12
LBB0_9:
Lloh25:
	adrp	x0, l_.str.1@PAGE
Lloh26:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_10:
Lloh27:
	adrp	x0, l_.str.2@PAGE
Lloh28:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_11:
	bl	_err
Lloh29:
	adrp	x8, _EIO@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_12:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_13:
	ldur	x8, [x29, #-72]
Lloh32:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh33:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	mov	x0, x24
	ldp	x29, x30, [sp, #224]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #208]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #192]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #176]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #160]            ; 16-byte Folded Reload
	add	sp, sp, #240
	ret
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"out buffer: "

	.comm	_TH_COMMAND_OUT,4,2             ; @TH_COMMAND_OUT
	.comm	_USB_TYPE_VENDOR,4,2            ; @USB_TYPE_VENDOR
	.comm	_USB_DIR_OUT,4,2                ; @USB_DIR_OUT
l_.str.1:                               ; @.str.1
	.asciz	"USB control message 'out' went wrong."

	.comm	_EIO,4,2                        ; @EIO
	.comm	_TH_COMMAND_IN,4,2              ; @TH_COMMAND_IN
	.comm	_USB_DIR_IN,4,2                 ; @USB_DIR_IN
l_.str.2:                               ; @.str.2
	.asciz	"USB control message 'in' went wrong."

l_.str.3:                               ; @.str.3
	.asciz	"in buffer: "

.subsections_via_symbols
