	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function send_cmd
_send_cmd:                              ## @send_cmd
	.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	%ecx, %r12d
	cmpl	$1000, %ecx                     ## imm = 0x3E8
	ja	LBB0_6
## %bb.1:
	movl	%r12d, %eax
	andl	$1, %eax
	jne	LBB0_6
## %bb.2:
	movl	%r9d, -52(%rbp)                 ## 4-byte Spill
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	(%rdi), %r15
	movq	8(%rdi), %r13
	movq	16(%rdi), %rbx
	movq	(%rbx), %rax
	movabsq	$330712481863, %rcx             ## imm = 0x4D00000047
	movq	%rcx, (%rax)
	movq	%rdi, %r14
	movl	%esi, %edi
	movl	%esi, -56(%rbp)                 ## 4-byte Spill
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	callq	_cpu_to_le16
	movl	%eax, 8(%rbx)
	movl	(%r14), %edi
	callq	_cpu_to_le16
	movl	%eax, 12(%rbx)
	movl	%r12d, %edi
	shrl	%edi
	callq	_cpu_to_le16
	movq	%rax, 16(%rbx)
	leaq	24(%rbx), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%r12d, %edx
	callq	_memcpy
	leal	24(%r12), %edx
	movq	%r15, %rdi
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rsi
	callq	_kinect_write
	movl	%eax, %ebx
	movq	_D_USBO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %r8d
	movl	%ebx, (%rsp)
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	movl	%r12d, %r9d
	xorl	%eax, %eax
	callq	_gspca_dbg
	testl	%ebx, %ebx
	js	LBB0_7
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	$512, %edx                      ## imm = 0x200
	callq	_kinect_read
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	%eax, %ebx
	movq	_D_USBO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	xorl	%r15d, %r15d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_gspca_dbg
	cmpl	$23, %ebx
	jg	LBB0_8
## %bb.5:
	leaq	L_.str.4(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_err
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	testl	%ebx, %ebx
	cmovnsl	%r15d, %ebx
	jmp	LBB0_22
LBB0_6:
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_21
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_22
LBB0_8:
	movq	(%r13), %rax
	movl	(%rax), %esi
	movl	4(%rax), %edx
	cmpl	$82, %esi
	jne	LBB0_16
## %bb.9:
	cmpl	$66, %edx
	jne	LBB0_16
## %bb.10:
	movl	8(%r13), %esi
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %edx
	cmpl	%edx, %esi
	jne	LBB0_17
## %bb.11:
	movl	12(%r13), %esi
	movl	12(%rax), %edx
	cmpl	%edx, %esi
	jne	LBB0_18
## %bb.12:
	addl	$-24, %ebx
	movq	16(%r13), %rdi
	callq	_le16_to_cpu
	movl	%ebx, %r14d
	shrl	%r14d
	cmpl	%r14d, %eax
	jne	LBB0_19
## %bb.13:
	movl	%ebx, %edx
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	cmpl	%r14d, %ebx
	jbe	LBB0_15
## %bb.14:
	leaq	L_.str.9(%rip), %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_pr_warn
	movl	%r14d, %edx
LBB0_15:
	addq	$24, %r13
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_memcpy
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	incl	(%rax)
	jmp	LBB0_22
LBB0_16:
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_20
LBB0_17:
	leaq	L_.str.6(%rip), %rdi
	jmp	LBB0_20
LBB0_18:
	leaq	L_.str.7(%rip), %rdi
	jmp	LBB0_20
LBB0_19:
	movq	16(%r13), %rdi
	callq	_le16_to_cpu
	leaq	L_.str.8(%rip), %rdi
	movl	%eax, %esi
	movl	%r14d, %edx
LBB0_20:
	xorl	%eax, %eax
	callq	_pr_err
LBB0_21:
	movl	$-1, %ebx
LBB0_22:
	movl	%ebx, %eax
	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	"send_cmd: Invalid command length (0x%x)\n"

	.comm	_D_USBO,4,2                     ## @D_USBO
L_.str.1:                               ## @.str.1
	.asciz	"Control cmd=%04x tag=%04x len=%04x: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"send_cmd: Output control transfer failed (%d)\n"

L_.str.3:                               ## @.str.3
	.asciz	"Control reply: %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"send_cmd: Input control transfer failed (%d)\n"

	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
L_.str.5:                               ## @.str.5
	.asciz	"send_cmd: Bad magic %02x %02x\n"

L_.str.6:                               ## @.str.6
	.asciz	"send_cmd: Bad cmd %02x != %02x\n"

L_.str.7:                               ## @.str.7
	.asciz	"send_cmd: Bad tag %04x != %04x\n"

L_.str.8:                               ## @.str.8
	.asciz	"send_cmd: Bad len %04x != %04x\n"

L_.str.9:                               ## @.str.9
	.asciz	"send_cmd: Data buffer is %d bytes long, but got %d bytes\n"

	.no_dead_strip	_send_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function send_cmd
lCPI0_0:
	.long	71                              ; 0x47
	.long	77                              ; 0x4d
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_send_cmd:                              ; @send_cmd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x26, x3
	cmp	w3, #1000
	b.hi	LBB0_6
; %bb.1:
	tbnz	w26, #0, LBB0_6
; %bb.2:
	mov	x21, x5
	mov	x20, x4
	mov	x24, x2
	mov	x27, x1
	mov	x19, x0
	ldp	x25, x22, [x0]
	ldr	x23, [x0, #16]
	ldr	x8, [x23]
Lloh0:
	adrp	x9, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
	str	d0, [x8]
	mov	x0, x1
	bl	_cpu_to_le16
	str	w0, [x23, #8]
	ldr	w0, [x19]
	bl	_cpu_to_le16
	str	w0, [x23, #12]
	lsr	w0, w26, #1
	bl	_cpu_to_le16
	str	x0, [x23, #16]
	add	x0, x23, #24
	mov	x1, x24
	mov	x2, x26
	bl	_memcpy
	add	w2, w26, #24
	mov	x0, x25
	mov	x1, x23
	bl	_kinect_write
	mov	x24, x0
Lloh2:
	adrp	x28, _D_USBO@GOTPAGE
Lloh3:
	ldr	x28, [x28, _D_USBO@GOTPAGEOFF]
	ldr	w1, [x28]
	ldr	w8, [x19]
	stp	x26, x24, [sp, #8]
	str	x8, [sp]
Lloh4:
	adrp	x2, l_.str.1@PAGE
Lloh5:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x3, x27
	bl	_gspca_dbg
	tbnz	w24, #31, LBB0_8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x25
	mov	x1, x22
	mov	w2, #512
	bl	_kinect_read
	cbz	w0, LBB0_3
; %bb.4:
	mov	x24, x0
	ldr	w1, [x28]
Lloh6:
	adrp	x2, l_.str.3@PAGE
Lloh7:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x3, x24
	bl	_gspca_dbg
	cmp	w24, #23
	b.gt	LBB0_10
; %bb.5:
Lloh8:
	adrp	x0, l_.str.4@PAGE
Lloh9:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x24
	bl	_pr_err
Lloh10:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w24, #0
	csneg	w24, w24, w8, lt
	b	LBB0_9
LBB0_6:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x26
LBB0_7:
	bl	_pr_err
	mov	w24, #-1
	b	LBB0_9
LBB0_8:
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x24
	bl	_pr_err
LBB0_9:
	mov	x0, x24
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_10:
	ldr	x8, [x22]
	ldp	w1, w8, [x8]
	cmp	w1, #82
	b.ne	LBB0_18
; %bb.11:
	cmp	w8, #66
	b.ne	LBB0_18
; %bb.12:
	ldr	w1, [x22, #8]
	ldr	w8, [x23, #8]
	cmp	w1, w8
	b.ne	LBB0_19
; %bb.13:
	ldr	w1, [x22, #12]
	ldr	w8, [x23, #12]
	cmp	w1, w8
	b.ne	LBB0_20
; %bb.14:
	sub	w24, w24, #24
	ldr	x0, [x22, #16]
	bl	_le16_to_cpu
	lsr	w23, w24, #1
	cmp	w0, w23
	b.ne	LBB0_21
; %bb.15:
	mov	x2, x24
	cmp	w24, w21
	b.ls	LBB0_17
; %bb.16:
Lloh17:
	adrp	x0, l_.str.9@PAGE
Lloh18:
	add	x0, x0, l_.str.9@PAGEOFF
	mov	x1, x21
	mov	x2, x24
	bl	_pr_warn
	mov	x2, x21
LBB0_17:
	add	x1, x22, #24
	mov	x0, x20
	bl	_memcpy
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	b	LBB0_9
LBB0_18:
	str	x8, [sp]
Lloh19:
	adrp	x0, l_.str.5@PAGE
Lloh20:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_7
LBB0_19:
	str	x8, [sp]
Lloh21:
	adrp	x0, l_.str.6@PAGE
Lloh22:
	add	x0, x0, l_.str.6@PAGEOFF
	b	LBB0_7
LBB0_20:
	str	x8, [sp]
Lloh23:
	adrp	x0, l_.str.7@PAGE
Lloh24:
	add	x0, x0, l_.str.7@PAGEOFF
	b	LBB0_7
LBB0_21:
	ldr	x0, [x22, #16]
	bl	_le16_to_cpu
	mov	x1, x0
	str	x23, [sp]
Lloh25:
	adrp	x0, l_.str.8@PAGE
Lloh26:
	add	x0, x0, l_.str.8@PAGEOFF
	b	LBB0_7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"send_cmd: Invalid command length (0x%x)\n"

	.comm	_D_USBO,4,2                     ; @D_USBO
l_.str.1:                               ; @.str.1
	.asciz	"Control cmd=%04x tag=%04x len=%04x: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"send_cmd: Output control transfer failed (%d)\n"

l_.str.3:                               ; @.str.3
	.asciz	"Control reply: %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"send_cmd: Input control transfer failed (%d)\n"

	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
l_.str.5:                               ; @.str.5
	.asciz	"send_cmd: Bad magic %02x %02x\n"

l_.str.6:                               ; @.str.6
	.asciz	"send_cmd: Bad cmd %02x != %02x\n"

l_.str.7:                               ; @.str.7
	.asciz	"send_cmd: Bad tag %04x != %04x\n"

l_.str.8:                               ; @.str.8
	.asciz	"send_cmd: Bad len %04x != %04x\n"

l_.str.9:                               ; @.str.9
	.asciz	"send_cmd: Data buffer is %d bytes long, but got %d bytes\n"

	.no_dead_strip	_send_cmd
.subsections_via_symbols
