	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sd_setautogain
_sd_setautogain:                        ## @sd_setautogain
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rsi, 24(%rdi)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%rdi)
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.1:
	movq	%rdi, %rbx
	movq	_sensor_data@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	(%rdi), %rax
	movq	_F_COARSE_EXPO@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rcx,%rax,4)
	jne	LBB0_4
## %bb.2:
	movq	_EXPOSURE_DEF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%rbx)
	movq	_GAIN_DEF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 12(%rbx)
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_AUTOGAIN_IGNORE_FRAMES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	%rbx, %rdi
	callq	_setexposure
	movq	%rbx, %rdi
	callq	_setgain
LBB0_4:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sensor_data,8,3                ## @sensor_data
	.comm	_F_COARSE_EXPO,4,2              ## @F_COARSE_EXPO
	.comm	_EXPOSURE_DEF,4,2               ## @EXPOSURE_DEF
	.comm	_GAIN_DEF,4,2                   ## @GAIN_DEF
	.comm	_AUTOGAIN_IGNORE_FRAMES,4,2     ## @AUTOGAIN_IGNORE_FRAMES
	.no_dead_strip	_sd_setautogain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sd_setautogain
_sd_setautogain:                        ; @sd_setautogain
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	stp	xzr, xzr, [x0, #32]
	str	x1, [x0, #24]
	cbz	x1, LBB0_4
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _sensor_data@GOTPAGE
Lloh1:
	ldr	x8, [x8, _sensor_data@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x8]
	ldr	x8, [x0]
	ldr	w9, [x9, x8, lsl #2]
Lloh3:
	adrp	x10, _F_COARSE_EXPO@GOTPAGE
Lloh4:
	ldr	x10, [x10, _F_COARSE_EXPO@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w9
	b.ne	LBB0_4
; %bb.2:
Lloh6:
	adrp	x9, _EXPOSURE_DEF@GOTPAGE
Lloh7:
	ldr	x9, [x9, _EXPOSURE_DEF@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _GAIN_DEF@GOTPAGE
Lloh10:
	ldr	x10, [x10, _GAIN_DEF@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	stp	w10, w9, [x19, #12]
	cbz	x8, LBB0_4
; %bb.3:
Lloh12:
	adrp	x8, _AUTOGAIN_IGNORE_FRAMES@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AUTOGAIN_IGNORE_FRAMES@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	mov	x0, x19
	bl	_setexposure
	mov	x0, x19
	bl	_setgain
LBB0_4:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_sensor_data,8,3                ; @sensor_data
	.comm	_F_COARSE_EXPO,4,2              ; @F_COARSE_EXPO
	.comm	_EXPOSURE_DEF,4,2               ; @EXPOSURE_DEF
	.comm	_GAIN_DEF,4,2                   ; @GAIN_DEF
	.comm	_AUTOGAIN_IGNORE_FRAMES,4,2     ; @AUTOGAIN_IGNORE_FRAMES
	.no_dead_strip	_sd_setautogain
.subsections_via_symbols
