	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cpia_usb_transferCmd
_cpia_usb_transferCmd:                  ## @cpia_usb_transferCmd
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	28(%rsi), %eax
	shll	$8, %eax
	orl	24(%rsi), %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %edx
	movq	_DATA_IN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jne	LBB0_2
## %bb.1:
	movl	4(%r14), %edi
	xorl	%esi, %esi
	callq	_usb_rcvctrlpipe
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_USB_DIR_IN@GOTPCREL(%rip), %rax
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	orl	(%rax), %r12d
	movq	_USB_RECIP_DEVICE@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_DATA_OUT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jne	LBB0_11
## %bb.3:
	movl	4(%r14), %edi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_USB_RECIP_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rax
LBB0_4:
	orl	(%rax), %r12d
	movl	$-3, %r15d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %eax
	movl	4(%r14), %edi
	movl	4(%rbx), %edx
	movl	12(%rbx), %r8d
	shll	$8, %r8d
	orl	8(%rbx), %r8d
	movl	20(%rbx), %r9d
	shll	$8, %r9d
	orl	16(%rbx), %r9d
	subq	$8, %rsp
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r12d, %ecx
	pushq	$1000                           ## imm = 0x3E8
	pushq	-56(%rbp)                       ## 8-byte Folded Reload
	pushq	%rax
	callq	_usb_control_msg
	addq	$32, %rsp
	movl	%eax, %r13d
	testl	%eax, %eax
	jns	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	4(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	movl	%r13d, %edx
	callq	_pr_err
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	_EPIPE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r13d, %eax
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	leal	1(%r15), %eax
	testl	%r15d, %r15d
	movl	%eax, %r15d
	jne	LBB0_5
LBB0_9:
	movl	%r13d, %eax
	sarl	$31, %eax
	andl	%r13d, %eax
	jmp	LBB0_10
LBB0_11:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_gspca_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DATA_IN,4,2                    ## @DATA_IN
	.comm	_USB_DIR_IN,4,2                 ## @USB_DIR_IN
	.comm	_USB_TYPE_VENDOR,4,2            ## @USB_TYPE_VENDOR
	.comm	_USB_RECIP_DEVICE,4,2           ## @USB_RECIP_DEVICE
	.comm	_DATA_OUT,4,2                   ## @DATA_OUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unexpected first byte of command: %x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"usb_control_msg %02x, error %d\n"

	.comm	_EPIPE,4,2                      ## @EPIPE
	.no_dead_strip	_cpia_usb_transferCmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cpia_usb_transferCmd
_cpia_usb_transferCmd:                  ; @cpia_usb_transferCmd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x1
	mov	x20, x0
	ldp	w22, w23, [x1, #24]
	ldr	w2, [x1]
Lloh0:
	adrp	x8, _DATA_IN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DATA_IN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w2, w8
	b.ne	LBB0_2
; %bb.1:
	ldr	w0, [x20, #4]
	mov	w1, #0
	bl	_usb_rcvctrlpipe
	mov	x21, x0
Lloh3:
	adrp	x8, _USB_DIR_IN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _USB_DIR_IN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _USB_TYPE_VENDOR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh9:
	adrp	x9, _USB_RECIP_DEVICE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _USB_RECIP_DEVICE@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
Lloh11:
	adrp	x8, _DATA_OUT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DATA_OUT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w2, w8
	b.ne	LBB0_16
; %bb.3:
	ldr	w0, [x20, #4]
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x21, x0
Lloh14:
	adrp	x8, _USB_RECIP_DEVICE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _USB_RECIP_DEVICE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _USB_TYPE_VENDOR@GOTPAGE
Lloh18:
	ldr	x9, [x9, _USB_TYPE_VENDOR@GOTPAGEOFF]
LBB0_4:
	orr	w22, w22, w23, lsl #8
	ldr	w9, [x9]
	orr	w23, w8, w9
	ldp	w2, w8, [x19, #4]
	ldp	w9, w10, [x19, #12]
	orr	w4, w8, w9, lsl #8
	ldr	w8, [x19, #20]
	orr	w5, w10, w8, lsl #8
	ldp	w6, w0, [x20]
	mov	w8, #1000
	str	w8, [sp]
	mov	x1, x21
	mov	x3, x23
	mov	x7, x22
	bl	_usb_control_msg
	mov	x24, x0
	tbz	w0, #31, LBB0_6
; %bb.5:
	ldr	w1, [x19, #4]
Lloh19:
	adrp	x0, l_.str.1@PAGE
Lloh20:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x24
	bl	_pr_err
LBB0_6:
Lloh21:
	adrp	x25, _EPIPE@GOTPAGE
Lloh22:
	ldr	x25, [x25, _EPIPE@GOTPAGEOFF]
	ldr	w8, [x25]
	cmn	w24, w8
	b.ne	LBB0_15
; %bb.7:
	ldp	w2, w8, [x19, #4]
	ldp	w9, w10, [x19, #12]
	orr	w4, w8, w9, lsl #8
	ldr	w8, [x19, #20]
	orr	w5, w10, w8, lsl #8
	ldp	w6, w0, [x20]
	mov	w8, #1000
	str	w8, [sp]
	mov	x1, x21
	mov	x3, x23
	mov	x7, x22
	bl	_usb_control_msg
	mov	x24, x0
	tbz	w0, #31, LBB0_9
; %bb.8:
	ldr	w1, [x19, #4]
Lloh23:
	adrp	x0, l_.str.1@PAGE
Lloh24:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x24
	bl	_pr_err
LBB0_9:
	ldr	w8, [x25]
	cmn	w24, w8
	b.ne	LBB0_15
; %bb.10:
	ldp	w2, w8, [x19, #4]
	ldp	w9, w10, [x19, #12]
	orr	w4, w8, w9, lsl #8
	ldr	w8, [x19, #20]
	orr	w5, w10, w8, lsl #8
	ldp	w6, w0, [x20]
	mov	w8, #1000
	str	w8, [sp]
	mov	x1, x21
	mov	x3, x23
	mov	x7, x22
	bl	_usb_control_msg
	mov	x24, x0
	tbz	w0, #31, LBB0_12
; %bb.11:
	ldr	w1, [x19, #4]
Lloh25:
	adrp	x0, l_.str.1@PAGE
Lloh26:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x24
	bl	_pr_err
LBB0_12:
	ldr	w8, [x25]
	cmn	w24, w8
	b.ne	LBB0_15
; %bb.13:
	ldp	w2, w8, [x19, #4]
	ldp	w9, w10, [x19, #12]
	orr	w4, w8, w9, lsl #8
	ldr	w8, [x19, #20]
	orr	w5, w10, w8, lsl #8
	ldp	w6, w0, [x20]
	mov	w8, #1000
	str	w8, [sp]
	mov	x1, x21
	mov	x3, x23
	mov	x7, x22
	bl	_usb_control_msg
	mov	x24, x0
	tbz	w0, #31, LBB0_15
; %bb.14:
	ldr	w1, [x19, #4]
Lloh27:
	adrp	x0, l_.str.1@PAGE
Lloh28:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x24
	bl	_pr_err
LBB0_15:
	cmp	w24, #0
	csel	w0, w24, wzr, lt
	b	LBB0_17
LBB0_16:
Lloh29:
	adrp	x1, l_.str@PAGE
Lloh30:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_gspca_err
Lloh31:
	adrp	x8, _EINVAL@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_17:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_DATA_IN,4,2                    ; @DATA_IN
	.comm	_USB_DIR_IN,4,2                 ; @USB_DIR_IN
	.comm	_USB_TYPE_VENDOR,4,2            ; @USB_TYPE_VENDOR
	.comm	_USB_RECIP_DEVICE,4,2           ; @USB_RECIP_DEVICE
	.comm	_DATA_OUT,4,2                   ; @DATA_OUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unexpected first byte of command: %x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"usb_control_msg %02x, error %d\n"

	.comm	_EPIPE,4,2                      ; @EPIPE
	.no_dead_strip	_cpia_usb_transferCmd
.subsections_via_symbols
