	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	(%rdi), %rax
	movq	_CAM_TYPE_CIF@GOTPCREL(%rip), %rsi
	movl	8(%rdi), %ecx
	cmpq	(%rsi), %rax
	jne	LBB0_5
## %bb.1:
	cmpl	$1, %ecx
	jne	LBB0_5
## %bb.2:
	imull	$9267, %r14d, %eax              ## imm = 0x2433
	cltq
	imulq	$1759218605, %rax, %rax         ## imm = 0x68DB8BAD
	movq	%rax, %rcx
	sarq	$44, %rcx
	shrq	$63, %rax
	leal	(%rcx,%rax), %ebx
	addl	$300, %ebx                      ## imm = 0x12C
	movl	%ebx, %edx
	sarl	$4, %edx
	movq	%r12, %rdi
	movl	$3, %esi
	callq	_sensor_write1
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_10
## %bb.3:
	andl	$15, %ebx
	movq	%r12, %rdi
	movl	$4, %esi
	movl	%ebx, %edx
	jmp	LBB0_4
LBB0_5:
	cmpl	$2, %ecx
	jne	LBB0_8
## %bb.6:
	movl	%r14d, %edx
	sarl	$11, %edx
	movq	%r12, %rdi
	movl	$3, %esi
	callq	_sensor_write1
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_10
## %bb.7:
	shrl	$3, %r14d
	movzbl	%r14b, %edx
	movq	%r12, %rdi
	movl	$4, %esi
LBB0_4:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sensor_write1                  ## TAILCALL
LBB0_8:
	imull	$60, %r14d, %ecx
	addl	$7999, %ecx                     ## imm = 0x1F3F
	movslq	%ecx, %rcx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rsi
	shrq	$63, %rsi
	sarq	$41, %rcx
	addl	%esi, %ecx
	cmpl	$3, %ecx
	movl	$2, %esi
	cmovgel	%ecx, %esi
	cmpl	$320, %eax                      ## imm = 0x140
	movl	%esi, %edi
	cmovgel	%edx, %edi
	cmpl	%edx, %ecx
	cmovgel	%esi, %edi
	movq	_CAM_TYPE_VGA@GOTPCREL(%rip), %rcx
	cmpl	$4, %edi
	movl	$4, %r15d
	cmovgel	%edi, %r15d
	cmpq	(%rcx), %rax
	cmovnel	%edi, %r15d
	imull	$30660, %r14d, %eax             ## imm = 0x77C4
	imull	$8000, %r15d, %ecx              ## imm = 0x1F40
	cltd
	idivl	%ecx
	cmpl	$511, %eax                      ## imm = 0x1FF
	movl	$511, %ecx                      ## imm = 0x1FF
	cmovgel	%ecx, %eax
	subl	%eax, %ecx
	movzbl	%cl, %eax
	movl	%eax, -48(%rbp)
	shrl	$8, %ecx
	movl	%ecx, -44(%rbp)
	leaq	-48(%rbp), %rcx
	movq	%r12, %rdi
	movl	$14, %esi
	xorl	%edx, %edx
	movl	$2, %r8d
	callq	_sensor_write_reg
	movq	%r12, %rdi
	movl	$2, %esi
	movl	%r15d, %edx
	callq	_sensor_write1
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MR97310A_EXPOSURE_DEFAULT,4,2  ## @MR97310A_EXPOSURE_DEFAULT
	.comm	_CAM_TYPE_CIF,8,3               ## @CAM_TYPE_CIF
	.comm	_CAM_TYPE_VGA,8,3               ## @CAM_TYPE_VGA
	.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:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _CAM_TYPE_CIF@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CAM_TYPE_CIF@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x9]
	ldr	w9, [x0, #8]
	cmp	x8, x10
	ccmp	w9, #1, #0, eq
	b.eq	LBB0_4
; %bb.1:
	cmp	w9, #2
	b.ne	LBB0_7
; %bb.2:
	asr	w2, w20, #11
	mov	x0, x19
	mov	w1, #3
	bl	_sensor_write1
	ldr	x8, [sp, #8]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.3:
	ubfx	w2, w20, #3, #8
	b	LBB0_6
LBB0_4:
	mov	w8, #9267
	mul	w8, w20, w8
	mov	w9, #35757
	movk	w9, #26843, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #44
	add	w8, w8, w9
	add	w20, w8, #300
	asr	w2, w20, #4
	mov	x0, x19
	mov	w1, #3
	bl	_sensor_write1
	ldr	x8, [sp, #8]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.5:
	and	w2, w20, #0xf
LBB0_6:
	mov	x0, x19
	mov	w1, #4
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_sensor_write1
LBB0_7:
	mov	w9, #60
	mov	w10, #7999
	madd	w9, w20, w9, w10
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	smull	x9, w9, w10
	lsr	x10, x9, #63
	asr	x9, x9, #41
	add	w9, w9, w10
	mov	w10, #2
	cmp	w9, #2
	csel	w10, w9, w10, gt
	cmp	w8, #319
	ccmp	w9, w2, #0, gt
	csel	w9, w2, w10, lt
Lloh12:
	adrp	x10, _CAM_TYPE_VGA@GOTPAGE
Lloh13:
	ldr	x10, [x10, _CAM_TYPE_VGA@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	cmp	w9, #4
	ccmp	x8, x10, #0, lt
	mov	w8, #4
	csel	w21, w8, w9, eq
	mov	w8, #30660
	mul	w8, w20, w8
	mov	w9, #8000
	mul	w9, w21, w9
	sdiv	w8, w8, w9
	mov	w9, #511
	cmp	w8, #511
	csel	w8, w8, w9, lt
	sub	w8, w9, w8
	and	w9, w8, #0xff
	lsr	w8, w8, #8
	stp	w9, w8, [sp]
	mov	x3, sp
	mov	x0, x19
	mov	w1, #14
	mov	w2, #0
	mov	w4, #2
	bl	_sensor_write_reg
	mov	x0, x19
	mov	w1, #2
	mov	x2, x21
	bl	_sensor_write1
	ldr	x8, [sp, #8]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MR97310A_EXPOSURE_DEFAULT,4,2  ; @MR97310A_EXPOSURE_DEFAULT
	.comm	_CAM_TYPE_CIF,8,3               ; @CAM_TYPE_CIF
	.comm	_CAM_TYPE_VGA,8,3               ; @CAM_TYPE_VGA
	.no_dead_strip	_setexposure
.subsections_via_symbols
