	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_register
_write_register:                        ## @write_register
	.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
	movl	%edx, %r15d
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movl	%esi, %edi
	callq	_cpu_to_le16
	movl	%eax, -48(%rbp)
	movl	%r15d, %edi
	callq	_cpu_to_le16
	movl	%eax, -44(%rbp)
	movq	_D_USBO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	%ebx, %ecx
	movl	%r15d, %r8d
	callq	_gspca_dbg
	leaq	-48(%rbp), %rdx
	leaq	-40(%rbp), %r8
	movq	%r14, %rdi
	movl	$3, %esi
	movl	$4, %ecx
	movl	$4, %r9d
	callq	_send_cmd
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	xorl	%ebx, %ebx
	cmpl	$2, %eax
	je	LBB0_4
## %bb.3:
	movl	-40(%rbp), %edx
	movl	-36(%rbp), %ecx
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_warn
	jmp	LBB0_4
LBB0_1:
	movl	%eax, %ebx
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_6
## %bb.5:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_D_USBO,4,2                     ## @D_USBO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Write Reg 0x%04x <= 0x%02x\n"

L_.str.1:                               ## @.str.1
	.asciz	"send_cmd returned %d [%04x %04x], 0000 expected\n"

	.no_dead_strip	_write_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_register
_write_register:                        ; @write_register
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	mov	x0, x1
	bl	_cpu_to_le16
	str	w0, [sp, #8]
	mov	x0, x19
	bl	_cpu_to_le16
	str	w0, [sp, #12]
Lloh3:
	adrp	x8, _D_USBO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _D_USBO@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	mov	x3, x20
	mov	x4, x19
	bl	_gspca_dbg
	add	x2, sp, #8
	add	x4, sp, #16
	mov	x0, x21
	mov	w1, #3
	mov	w3, #4
	mov	w5, #4
	bl	_send_cmd
	mov	x1, x0
	tbnz	w0, #31, LBB0_4
; %bb.1:
	cmp	w1, #2
	b.eq	LBB0_3
; %bb.2:
	ldp	w2, w3, [sp, #16]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_warn
LBB0_3:
	mov	w1, #0
LBB0_4:
	ldr	x8, [sp, #24]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x1
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_D_USBO,4,2                     ; @D_USBO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Write Reg 0x%04x <= 0x%02x\n"

l_.str.1:                               ; @.str.1
	.asciz	"send_cmd returned %d [%04x %04x], 0000 expected\n"

	.no_dead_strip	_write_register
.subsections_via_symbols
