	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vv6410_set_exposure
_vv6410_set_exposure:                   ## @vv6410_set_exposure
	.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, %r15
	movl	%esi, %ecx
	imull	%esi, %ecx
	shrl	$14, %ecx
	leal	3(%rsi), %eax
	testl	%esi, %esi
	cmovnsl	%esi, %eax
	sarl	$2, %eax
	addl	%ecx, %eax
	movq	_VV6410_CIF_LINELENGTH@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%edx, %ebx
	movl	$512, %edi                      ## imm = 0x200
	movl	%eax, %esi
	callq	_min
	movl	%eax, %r14d
	movq	_D_CONF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	%r14d, %ecx
	movl	%ebx, %r8d
	callq	_gspca_dbg
	movq	_VV6410_FINEH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	shrl	$8, %edx
	movq	%r15, %rdi
	callq	_stv06xx_write_sensor
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	movq	_VV6410_FINEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	%bl, %edx
	movq	%r15, %rdi
	callq	_stv06xx_write_sensor
	testl	%eax, %eax
	js	LBB0_3
## %bb.2:
	movq	_VV6410_COARSEH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	shrl	$8, %edx
	movq	%r15, %rdi
	callq	_stv06xx_write_sensor
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	_VV6410_COARSEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	%r14b, %edx
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_stv06xx_write_sensor           ## TAILCALL
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VV6410_CIF_LINELENGTH,4,2      ## @VV6410_CIF_LINELENGTH
	.comm	_D_CONF,4,2                     ## @D_CONF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Set coarse exposure to %d, fine exposure to %d\n"

	.comm	_VV6410_FINEH,4,2               ## @VV6410_FINEH
	.comm	_VV6410_FINEL,4,2               ## @VV6410_FINEL
	.comm	_VV6410_COARSEH,4,2             ## @VV6410_COARSEH
	.comm	_VV6410_COARSEL,4,2             ## @VV6410_COARSEL
	.no_dead_strip	_vv6410_set_exposure
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vv6410_set_exposure
_vv6410_set_exposure:                   ; @vv6410_set_exposure
	.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
	mul	w8, w1, w1
	lsr	w8, w8, #14
	add	w9, w1, #3
	cmp	w1, #0
	csel	w9, w9, w1, lt
	add	w8, w8, w9, asr #2
Lloh0:
	adrp	x9, _VV6410_CIF_LINELENGTH@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VV6410_CIF_LINELENGTH@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	sdiv	w1, w8, w9
	msub	w21, w1, w9, w8
	mov	w0, #512
	bl	_min
	mov	x20, x0
Lloh3:
	adrp	x8, _D_CONF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _D_CONF@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x3, x20
	mov	x4, x21
	bl	_gspca_dbg
Lloh8:
	adrp	x8, _VV6410_FINEH@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VV6410_FINEH@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	lsr	w2, w21, #8
	mov	x0, x19
	bl	_stv06xx_write_sensor
	tbnz	w0, #31, LBB0_4
; %bb.1:
Lloh11:
	adrp	x8, _VV6410_FINEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VV6410_FINEL@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	and	w2, w21, #0xff
	mov	x0, x19
	bl	_stv06xx_write_sensor
	tbnz	w0, #31, LBB0_4
; %bb.2:
Lloh14:
	adrp	x8, _VV6410_COARSEH@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VV6410_COARSEH@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	lsr	w2, w20, #8
	mov	x0, x19
	bl	_stv06xx_write_sensor
	tbnz	w0, #31, LBB0_4
; %bb.3:
Lloh17:
	adrp	x8, _VV6410_COARSEL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _VV6410_COARSEL@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	and	w2, w20, #0xff
	mov	x0, 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
	b	_stv06xx_write_sensor
LBB0_4:
	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 AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_VV6410_CIF_LINELENGTH,4,2      ; @VV6410_CIF_LINELENGTH
	.comm	_D_CONF,4,2                     ; @D_CONF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Set coarse exposure to %d, fine exposure to %d\n"

	.comm	_VV6410_FINEH,4,2               ; @VV6410_FINEH
	.comm	_VV6410_FINEL,4,2               ; @VV6410_FINEL
	.comm	_VV6410_COARSEH,4,2             ; @VV6410_COARSEH
	.comm	_VV6410_COARSEL,4,2             ; @VV6410_COARSEL
	.no_dead_strip	_vv6410_set_exposure
.subsections_via_symbols
