	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __g_volatile_ctrl
___g_volatile_ctrl:                     ## @__g_volatile_ctrl
	.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
	xorl	%r14d, %r14d
	cmpl	$0, 24(%rdi)
	je	LBB0_17
## %bb.1:
	movq	%rdi, %rbx
	movl	(%rsi), %eax
	cmpl	$128, %eax
	je	LBB0_7
## %bb.2:
	cmpl	$129, %eax
	jne	LBB0_17
## %bb.3:
	cmpl	$0, 4(%rsi)
	je	LBB0_17
## %bb.4:
	movq	_REG_GAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_ov965x_read
	testl	%eax, %eax
	js	LBB0_16
## %bb.5:
	movq	_REG_VREF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_ov965x_read
	testl	%eax, %eax
	js	LBB0_16
## %bb.6:
	movl	-28(%rbp), %edi
	andl	$-64, %edi
	shll	$2, %edi
	movl	-32(%rbp), %r15d
	orl	%r15d, %edi
	shrl	$4, %edi
	callq	_fls
	andl	$15, %r15d
	orl	$16, %r15d
	movl	%eax, %ecx
	shll	%cl, %r15d
	movq	16(%rbx), %rax
	movl	%r15d, (%rax)
	jmp	LBB0_17
LBB0_7:
	movl	4(%rsi), %eax
	movq	_V4L2_EXPOSURE_MANUAL@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_17
## %bb.8:
	movq	_REG_COM1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_ov965x_read
	testl	%eax, %eax
	js	LBB0_16
## %bb.9:
	movq	_REG_AECH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_ov965x_read
	testl	%eax, %eax
	js	LBB0_16
## %bb.10:
	movq	_REG_AECHM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_ov965x_read
	testl	%eax, %eax
	js	LBB0_16
## %bb.11:
	movl	-36(%rbp), %eax
	shll	$10, %eax
	movzwl	%ax, %eax
	movl	-28(%rbp), %ecx
	shll	$2, %ecx
	orl	%eax, %ecx
	movl	-32(%rbp), %eax
	andl	$3, %eax
	orl	%ecx, %eax
	imull	(%rbx), %eax
	addl	$50, %eax
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	shrq	$37, %rax
	movq	8(%rbx), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_17
LBB0_16:
	movl	%eax, %r14d
LBB0_17:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_GAIN,4,2                   ## @REG_GAIN
	.comm	_REG_VREF,4,2                   ## @REG_VREF
	.comm	_V4L2_EXPOSURE_MANUAL,4,2       ## @V4L2_EXPOSURE_MANUAL
	.comm	_REG_COM1,4,2                   ## @REG_COM1
	.comm	_REG_AECH,4,2                   ## @REG_AECH
	.comm	_REG_AECHM,4,2                  ## @REG_AECHM
	.no_dead_strip	___g_volatile_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __g_volatile_ctrl
___g_volatile_ctrl:                     ; @__g_volatile_ctrl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	ldr	w8, [x0, #24]
	cbz	w8, LBB0_8
; %bb.1:
	mov	x19, x0
	ldr	w8, [x1]
	cmp	w8, #128
	b.eq	LBB0_7
; %bb.2:
	cmp	w8, #129
	b.ne	LBB0_8
; %bb.3:
	ldr	w8, [x1, #4]
	cbz	w8, LBB0_8
; %bb.4:
Lloh0:
	adrp	x8, _REG_GAIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_GAIN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_ov965x_read
	tbnz	w0, #31, LBB0_9
; %bb.5:
Lloh3:
	adrp	x8, _REG_VREF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_VREF@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	bl	_ov965x_read
	tbnz	w0, #31, LBB0_9
; %bb.6:
	ldp	w8, w20, [sp, #8]
	lsl	w8, w8, #2
	and	w8, w8, #0xffffff00
	orr	w8, w8, w20
	lsr	w0, w8, #4
	bl	_fls
	mov	x8, x0
	mov	w0, #0
	mov	w9, #16
	bfxil	w9, w20, #0, #4
	lsl	w8, w9, w8
	ldr	x9, [x19, #16]
	str	w8, [x9]
	b	LBB0_9
LBB0_7:
	ldr	w8, [x1, #4]
Lloh6:
	adrp	x9, _V4L2_EXPOSURE_MANUAL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _V4L2_EXPOSURE_MANUAL@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_10
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_10:
Lloh9:
	adrp	x8, _REG_COM1@GOTPAGE
Lloh10:
	ldr	x8, [x8, _REG_COM1@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_ov965x_read
	tbnz	w0, #31, LBB0_9
; %bb.11:
Lloh12:
	adrp	x8, _REG_AECH@GOTPAGE
Lloh13:
	ldr	x8, [x8, _REG_AECH@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	bl	_ov965x_read
	tbnz	w0, #31, LBB0_9
; %bb.12:
Lloh15:
	adrp	x8, _REG_AECHM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _REG_AECHM@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	add	x2, sp, #4
	mov	x0, x19
	bl	_ov965x_read
	tbnz	w0, #31, LBB0_9
; %bb.13:
	mov	w0, #0
	ldp	w8, w9, [sp, #4]
	ubfiz	w8, w8, #10, #6
	orr	w8, w8, w9, lsl #2
	ldr	w9, [sp, #12]
	bfxil	w8, w9, #0, #2
	ldr	w9, [x19]
	mul	w8, w8, w9
	add	w8, w8, #50
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	umull	x8, w8, w9
	lsr	x8, x8, #37
	ldr	x9, [x19, #8]
	str	w8, [x9]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_GAIN,4,2                   ; @REG_GAIN
	.comm	_REG_VREF,4,2                   ; @REG_VREF
	.comm	_V4L2_EXPOSURE_MANUAL,4,2       ; @V4L2_EXPOSURE_MANUAL
	.comm	_REG_COM1,4,2                   ; @REG_COM1
	.comm	_REG_AECH,4,2                   ; @REG_AECH
	.comm	_REG_AECHM,4,2                  ; @REG_AECHM
	.no_dead_strip	___g_volatile_ctrl
.subsections_via_symbols
