	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sd_config
_sd_config:                             ## @sd_config
	.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
	movq	%rsi, %r15
	movq	%rdi, %rbx
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_reg_r
	movq	(%rbx), %rax
	cmpl	$16, (%rax)
	jne	LBB0_1
## %bb.2:
	movl	(%r15), %eax
	movzbl	%al, %ecx
	sarl	$8, %eax
	movl	%eax, (%rbx)
	movl	%ecx, 4(%rbx)
	movq	_sensor_data@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	cltq
	movl	(%rcx,%rax,8), %edx
	movl	%edx, 8(%rbx)
	movq	_F_SIF@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	4(%rcx,%rax,8), %edx
	jne	LBB0_3
## %bb.4:
	movq	_vga_mode@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_9
LBB0_3:
	movq	_sif_mode@GOTPCREL(%rip), %rax
LBB0_5:
	movq	(%rax), %rdi
	movq	%rdi, 32(%rbx)
	callq	_ARRAY_SIZE
	movq	%rax, 24(%rbx)
	movq	_BRIGHTNESS_DEF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	_GAIN_DEF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movq	(%r14), %rax
	movslq	(%rbx), %rcx
	movq	_F_COARSE_EXPO@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	4(%rax,%rcx,8), %edx
	movq	_COARSE_EXPOSURE_DEF@GOTPCREL(%rip), %rax
	cmoveq	_EXPOSURE_DEF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_EXPOSURE_IDX@GOTPCREL(%rip), %rcx
	cmoveq	_COARSE_EXPOSURE_IDX@GOTPCREL(%rip), %rcx
	movl	%eax, 24(%rbx)
	movb	(%rcx), %al
	movl	8(%rbx), %ecx
	btsl	%eax, %ecx
	movq	_AUTOGAIN_IDX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r14d, %r14d
	btl	%eax, %ecx
	jb	LBB0_6
## %bb.7:
	movq	_AUTOGAIN_DEF@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_8
LBB0_6:
	xorl	%eax, %eax
LBB0_8:
	movq	%rax, 16(%rbx)
	movq	_FREQ_DEF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
LBB0_9:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_sensor_data,8,3                ## @sensor_data
	.comm	_F_SIF,4,2                      ## @F_SIF
	.comm	_vga_mode,8,3                   ## @vga_mode
	.comm	_sif_mode,8,3                   ## @sif_mode
	.comm	_BRIGHTNESS_DEF,4,2             ## @BRIGHTNESS_DEF
	.comm	_GAIN_DEF,4,2                   ## @GAIN_DEF
	.comm	_F_COARSE_EXPO,4,2              ## @F_COARSE_EXPO
	.comm	_COARSE_EXPOSURE_DEF,4,2        ## @COARSE_EXPOSURE_DEF
	.comm	_EXPOSURE_IDX,4,2               ## @EXPOSURE_IDX
	.comm	_EXPOSURE_DEF,4,2               ## @EXPOSURE_DEF
	.comm	_COARSE_EXPOSURE_IDX,4,2        ## @COARSE_EXPOSURE_IDX
	.comm	_AUTOGAIN_IDX,4,2               ## @AUTOGAIN_IDX
	.comm	_AUTOGAIN_DEF,8,3               ## @AUTOGAIN_DEF
	.comm	_FREQ_DEF,4,2                   ## @FREQ_DEF
	.no_dead_strip	_sd_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sd_config
_sd_config:                             ; @sd_config
	.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
	mov	x20, x1
	mov	x19, x0
	mov	w1, #0
	bl	_reg_r
	ldr	x8, [x19]
	ldr	w8, [x8]
	cmp	w8, #16
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x20]
	asr	w9, w8, #8
	and	w8, w8, #0xff
	stp	w9, w8, [x19]
Lloh0:
	adrp	x20, _sensor_data@GOTPAGE
Lloh1:
	ldr	x20, [x20, _sensor_data@GOTPAGEOFF]
	ldr	x8, [x20]
	add	x8, x8, w9, sxtw #3
	ldp	w9, w8, [x8]
	str	w9, [x19, #8]
Lloh2:
	adrp	x9, _F_SIF@GOTPAGE
Lloh3:
	ldr	x9, [x9, _F_SIF@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x10, _vga_mode@GOTPAGE
Lloh6:
	ldr	x10, [x10, _vga_mode@GOTPAGEOFF]
Lloh7:
	adrp	x11, _sif_mode@GOTPAGE
Lloh8:
	ldr	x11, [x11, _sif_mode@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x10, x11, eq
	ldr	x0, [x8]
	str	x0, [x19, #32]
	bl	_ARRAY_SIZE
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19, #24]
Lloh9:
	adrp	x8, _BRIGHTNESS_DEF@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BRIGHTNESS_DEF@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _GAIN_DEF@GOTPAGE
Lloh13:
	ldr	x9, [x9, _GAIN_DEF@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #28]
	ldr	x8, [x20]
	ldrsw	x9, [x19]
	add	x8, x8, x9, lsl #3
	ldr	w8, [x8, #4]
Lloh15:
	adrp	x9, _F_COARSE_EXPO@GOTPAGE
Lloh16:
	ldr	x9, [x9, _F_COARSE_EXPO@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
Lloh18:
	adrp	x10, _EXPOSURE_DEF@GOTPAGE
Lloh19:
	ldr	x10, [x10, _EXPOSURE_DEF@GOTPAGEOFF]
	tst	w9, w8
Lloh20:
	adrp	x8, _COARSE_EXPOSURE_DEF@GOTPAGE
Lloh21:
	ldr	x8, [x8, _COARSE_EXPOSURE_DEF@GOTPAGEOFF]
	csel	x8, x10, x8, eq
	ldr	w8, [x8]
	str	w8, [x19, #24]
Lloh22:
	adrp	x8, _COARSE_EXPOSURE_IDX@GOTPAGE
Lloh23:
	ldr	x8, [x8, _COARSE_EXPOSURE_IDX@GOTPAGEOFF]
Lloh24:
	adrp	x9, _EXPOSURE_IDX@GOTPAGE
Lloh25:
	ldr	x9, [x9, _EXPOSURE_IDX@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w8, w9, w8
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
Lloh26:
	adrp	x9, _AUTOGAIN_IDX@GOTPAGE
Lloh27:
	ldr	x9, [x9, _AUTOGAIN_IDX@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
Lloh29:
	adrp	x10, _AUTOGAIN_DEF@GOTPAGE
Lloh30:
	ldr	x10, [x10, _AUTOGAIN_DEF@GOTPAGEOFF]
Lloh31:
	ldr	x10, [x10]
	lsr	w8, w8, w9
	tst	w8, #0x1
	csel	x8, x10, xzr, eq
	str	x8, [x19, #16]
Lloh32:
	adrp	x8, _FREQ_DEF@GOTPAGE
Lloh33:
	ldr	x8, [x8, _FREQ_DEF@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	b	LBB0_3
LBB0_2:
Lloh35:
	adrp	x8, _ENODEV@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_sensor_data,8,3                ; @sensor_data
	.comm	_F_SIF,4,2                      ; @F_SIF
	.comm	_vga_mode,8,3                   ; @vga_mode
	.comm	_sif_mode,8,3                   ; @sif_mode
	.comm	_BRIGHTNESS_DEF,4,2             ; @BRIGHTNESS_DEF
	.comm	_GAIN_DEF,4,2                   ; @GAIN_DEF
	.comm	_F_COARSE_EXPO,4,2              ; @F_COARSE_EXPO
	.comm	_COARSE_EXPOSURE_DEF,4,2        ; @COARSE_EXPOSURE_DEF
	.comm	_EXPOSURE_IDX,4,2               ; @EXPOSURE_IDX
	.comm	_EXPOSURE_DEF,4,2               ; @EXPOSURE_DEF
	.comm	_COARSE_EXPOSURE_IDX,4,2        ; @COARSE_EXPOSURE_IDX
	.comm	_AUTOGAIN_IDX,4,2               ; @AUTOGAIN_IDX
	.comm	_AUTOGAIN_DEF,8,3               ; @AUTOGAIN_DEF
	.comm	_FREQ_DEF,4,2                   ; @FREQ_DEF
	.no_dead_strip	_sd_config
.subsections_via_symbols
