	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r13d
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r14d
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	%esi, (%rax)
	cmpl	$19, %ecx
	movl	$19, %r12d
	cmovll	%ecx, %r12d
	cmpl	$11, %r9d
	movl	$11, %ebx
	cmovll	%r9d, %ebx
	callq	_mutex_lock_interruptible
	testl	%eax, %eax
	jne	LBB0_13
## %bb.1:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movl	%r13d, -56(%rbp)                ## 4-byte Spill
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_4
## %bb.2:
	testl	%r14d, %r14d
	jle	LBB0_4
## %bb.3:
	leaq	4(%r15), %rdi
	movl	%r12d, %edx
	callq	_memcpy
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	_deb_xfer
	movq	_deb_xfer@GOTPCREL(%rip), %rdx
	incl	%r12d
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_debug_dump
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movl	4(%r13), %ebx
	xorl	%r14d, %r14d
	movl	%ebx, %edi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movq	_TH_COMMAND_OUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %r12
	movq	_USB_DIR_OUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%r12), %ecx
	subq	$8, %rsp
	movl	%ebx, %edi
	movl	%eax, %esi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	$2000                           ## imm = 0x7D0
	pushq	$20
	pushq	%r15
	callq	_usb_control_msg
	addq	$32, %rsp
	cmpl	$20, %eax
	jne	LBB0_9
## %bb.5:
	movl	16(%rbp), %edi
	callq	_msleep
	movl	4(%r13), %ebx
	xorl	%r14d, %r14d
	movl	%ebx, %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
	orl	(%r12), %ecx
	subq	$8, %rsp
	movl	%ebx, %edi
	movl	%eax, %esi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	$2000                           ## imm = 0x7D0
	pushq	$12
	pushq	%r15
	callq	_usb_control_msg
	addq	$32, %rsp
	cmpl	$12, %eax
	jne	LBB0_10
## %bb.6:
	xorl	%r14d, %r14d
	leaq	L_.str.3(%rip), %rdi
	callq	_deb_xfer
	movq	_deb_xfer@GOTPCREL(%rip), %rdx
	movq	%r15, %rdi
	movl	$12, %esi
	callq	_debug_dump
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.7:
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jle	LBB0_12
## %bb.8:
	addq	$4, %r15
	movq	%r15, %rsi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_memcpy
	jmp	LBB0_12
LBB0_9:
	leaq	L_.str.1(%rip), %rdi
	callq	_err
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	movq	%r13, %rbx
	jmp	LBB0_12
LBB0_10:
	leaq	L_.str.2(%rip), %rdi
	callq	_err
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_11:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_12:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movl	%r14d, %eax
LBB0_13:
	addq	$40, %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	"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, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x24, x6
	mov	x21, x5
	mov	x20, x4
	mov	x28, x3
	mov	x26, x2
	mov	x19, x0
	ldr	x22, [x0, #8]
	str	w1, [x22]
	mov	w8, #19
	cmp	w3, #19
	csel	w25, w3, w8, lt
	mov	w8, #11
	cmp	w5, #11
	csel	w23, w5, w8, lt
	bl	_mutex_lock_interruptible
	mov	x27, x0
	cbnz	w0, LBB0_13
; %bb.1:
	cbz	x26, LBB0_4
; %bb.2:
	cmp	w28, #1
	b.lt	LBB0_4
; %bb.3:
	add	x0, x22, #4
	mov	x1, x26
	mov	x2, x25
	bl	_memcpy
LBB0_4:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_deb_xfer
Lloh2:
	adrp	x2, _deb_xfer@GOTPAGE
Lloh3:
	ldr	x2, [x2, _deb_xfer@GOTPAGEOFF]
	add	w1, w25, #1
	mov	x0, x22
	bl	_debug_dump
	ldr	w25, [x19, #4]
	mov	x0, x25
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x1, x0
Lloh4:
	adrp	x8, _TH_COMMAND_OUT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _TH_COMMAND_OUT@GOTPAGEOFF]
Lloh6:
	adrp	x26, _USB_TYPE_VENDOR@GOTPAGE
Lloh7:
	ldr	x26, [x26, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	ldr	w8, [x26]
Lloh9:
	adrp	x9, _USB_DIR_OUT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _USB_DIR_OUT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	w27, #2000
	str	w27, [sp]
	mov	x0, x25
	mov	w4, #0
	mov	w5, #0
	mov	x6, x22
	mov	w7, #20
	bl	_usb_control_msg
	cmp	w0, #20
	b.ne	LBB0_9
; %bb.5:
	mov	x0, x24
	bl	_msleep
	ldr	w24, [x19, #4]
	mov	x0, x24
	mov	w1, #0
	bl	_usb_rcvctrlpipe
	mov	x1, x0
Lloh12:
	adrp	x8, _TH_COMMAND_IN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TH_COMMAND_IN@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	ldr	w8, [x26]
Lloh15:
	adrp	x9, _USB_DIR_IN@GOTPAGE
Lloh16:
	ldr	x9, [x9, _USB_DIR_IN@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w3, w9, w8
	str	w27, [sp]
	mov	x0, x24
	mov	w4, #0
	mov	w5, #0
	mov	x6, x22
	mov	w7, #12
	bl	_usb_control_msg
	cmp	w0, #12
	b.ne	LBB0_10
; %bb.6:
Lloh18:
	adrp	x0, l_.str.3@PAGE
Lloh19:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_deb_xfer
Lloh20:
	adrp	x2, _deb_xfer@GOTPAGE
Lloh21:
	ldr	x2, [x2, _deb_xfer@GOTPAGEOFF]
	mov	x0, x22
	mov	w1, #12
	bl	_debug_dump
	mov	w27, #0
	cbz	x20, LBB0_12
; %bb.7:
	cmp	w21, #1
	b.lt	LBB0_12
; %bb.8:
	add	x1, x22, #4
	mov	x0, x20
	mov	x2, x23
	bl	_memcpy
	mov	w27, #0
	b	LBB0_12
LBB0_9:
Lloh22:
	adrp	x0, l_.str.1@PAGE
Lloh23:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_10:
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_11:
	bl	_err
Lloh26:
	adrp	x8, _EIO@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w27, w8
LBB0_12:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_13:
	mov	x0, x27
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh8
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.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
