	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setexposure
_setexposure:                           ## @setexposure
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rdi, %r14
	movl	4(%rdi), %edx
	cmpl	$3264, %edx                     ## imm = 0xCC0
	je	LBB0_4
## %bb.1:
	cmpl	$1600, %edx                     ## imm = 0x640
	je	LBB0_6
## %bb.2:
	cmpl	$800, %edx                      ## imm = 0x320
	jne	LBB0_5
## %bb.3:
	leal	(%rsi,%rsi,4), %ebx
	jmp	LBB0_7
LBB0_4:
	leal	(%rsi,%rsi,2), %eax
	movl	%eax, %ebx
	shrl	$31, %ebx
	addl	%eax, %ebx
	sarl	%ebx
	jmp	LBB0_7
LBB0_6:
	leal	(%rsi,%rsi,2), %ebx
LBB0_7:
	movq	_D_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	movl	%ebx, %ecx
	callq	_gspca_dbg
	movq	_REG_COARSE_INTEGRATION_TIME_@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_reg_w
	movl	(%r15), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_reg_w                          ## TAILCALL
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_gspca_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, (%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid width %u\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_D_STREAM,4,2                   ## @D_STREAM
L_.str.1:                               ## @.str.1
	.asciz	"exposure: 0x%04X ms\n\n"

	.comm	_REG_COARSE_INTEGRATION_TIME_,4,2 ## @REG_COARSE_INTEGRATION_TIME_
	.no_dead_strip	_setexposure
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setexposure
_setexposure:                           ; @setexposure
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	w2, [x0, #4]
	cmp	w2, #3264
	b.eq	LBB0_4
; %bb.1:
	cmp	w2, #1600
	b.eq	LBB0_5
; %bb.2:
	cmp	w2, #800
	b.ne	LBB0_7
; %bb.3:
	add	w20, w1, w1, lsl #2
	b	LBB0_6
LBB0_4:
	add	w8, w1, w1, lsl #1
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w20, w8, #1
	b	LBB0_6
LBB0_5:
	add	w20, w1, w1, lsl #1
LBB0_6:
Lloh0:
	adrp	x8, _D_STREAM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _D_STREAM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str.1@PAGE
Lloh4:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x3, x20
	bl	_gspca_dbg
Lloh5:
	adrp	x21, _REG_COARSE_INTEGRATION_TIME_@GOTPAGE
Lloh6:
	ldr	x21, [x21, _REG_COARSE_INTEGRATION_TIME_@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x19
	mov	x1, x20
	bl	_reg_w
	ldr	w2, [x21]
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_reg_w
LBB0_7:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_gspca_err
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w8, w8
	str	w8, [x19]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid width %u\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_D_STREAM,4,2                   ; @D_STREAM
l_.str.1:                               ; @.str.1
	.asciz	"exposure: 0x%04X ms\n\n"

	.comm	_REG_COARSE_INTEGRATION_TIME_,4,2 ; @REG_COARSE_INTEGRATION_TIME_
	.no_dead_strip	_setexposure
.subsections_via_symbols
