	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function m5602_start_transfer
_m5602_start_transfer:                  ## @m5602_start_transfer
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	8(%rdi), %r14
	movaps	L___const.m5602_start_transfer.buffer(%rip), %xmm0
	movaps	%xmm0, -48(%rbp)
	movq	(%rdi), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	*%rax
LBB0_2:
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	movl	$16, %edx
	callq	_memcpy
	movl	(%r15), %ebx
	movl	%ebx, %edi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movq	_M5602_URB_MSG_TIMEOUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	subq	$8, %rsp
	movl	%ebx, %edi
	movl	%eax, %esi
	movl	$4, %edx
	movl	$64, %ecx
	movl	$25, %r8d
	xorl	%r9d, %r9d
	pushq	%r10
	pushq	$16
	pushq	%r14
	callq	_usb_control_msg
	addq	$32, %rsp
	movl	%eax, %ebx
	movq	_D_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	callq	_gspca_dbg
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_4
## %bb.3:
	movl	%ebx, %eax
	sarl	$31, %eax
	andl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## @__const.m5602_start_transfer.buffer
L___const.m5602_start_transfer.buffer:
	.long	19                              ## 0x13
	.long	249                             ## 0xf9
	.long	15                              ## 0xf
	.long	1                               ## 0x1

	.comm	_M5602_URB_MSG_TIMEOUT,4,2      ## @M5602_URB_MSG_TIMEOUT
	.comm	_D_STREAM,4,2                   ## @D_STREAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Transfer started\n"

	.no_dead_strip	_m5602_start_transfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function m5602_start_transfer
_m5602_start_transfer:                  ; @m5602_start_transfer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	adrp	x9, l___const.m5602_start_transfer.buffer@PAGE
	add	x9, x9, l___const.m5602_start_transfer.buffer@PAGEOFF
	str	x8, [sp, #40]
	ldr	q0, [x9]
	str	q0, [sp, #16]
	ldp	x8, x20, [x0]
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	blr	x8
LBB0_2:
	add	x1, sp, #16
	mov	x0, x20
	mov	w2, #16
	bl	_memcpy
	ldr	w21, [x19]
	mov	x0, x21
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x1, x0
Lloh3:
	adrp	x8, _M5602_URB_MSG_TIMEOUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _M5602_URB_MSG_TIMEOUT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp]
	mov	x0, x21
	mov	w2, #4
	mov	w3, #64
	mov	w4, #25
	mov	w5, #0
	mov	x6, x20
	mov	w7, #16
	bl	_usb_control_msg
	mov	x20, x0
Lloh6:
	adrp	x8, _D_STREAM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _D_STREAM@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_gspca_dbg
	cmp	w20, #0
	csel	w0, w20, wzr, lt
	ldr	x8, [sp, #40]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	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
	add	sp, sp, #96
	ret
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ; @__const.m5602_start_transfer.buffer
l___const.m5602_start_transfer.buffer:
	.long	19                              ; 0x13
	.long	249                             ; 0xf9
	.long	15                              ; 0xf
	.long	1                               ; 0x1

	.comm	_M5602_URB_MSG_TIMEOUT,4,2      ; @M5602_URB_MSG_TIMEOUT
	.comm	_D_STREAM,4,2                   ; @D_STREAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Transfer started\n"

	.no_dead_strip	_m5602_start_transfer
.subsections_via_symbols
