	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sd_init
_sd_init:                               ## @sd_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movabsq	$498216206377, %rax             ## imm = 0x7400000029
	movq	%rax, -24(%rbp)
	movl	$241, %esi
	movl	$1, %edx
	callq	_reg_w1
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_reg_r
	movq	%rbx, %rdi
	movl	$241, %esi
	xorl	%edx, %edx
	callq	_reg_w1
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_reg_r
	movq	8(%rbx), %rax
	testq	%rax, %rax
	js	LBB0_23
## %bb.1:
	movq	(%rbx), %rax
	movl	(%rax), %r14d
	movq	_D_PROBE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_PDEBUG
	movl	(%rbx), %eax
	andl	$-2, %eax
	cmpl	$134, %eax
	jne	LBB0_4
## %bb.2:
	cmpl	$17, %r14d
	je	LBB0_5
LBB0_3:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_23
LBB0_4:
	cmpl	$18, %r14d
	jne	LBB0_3
LBB0_5:
	movl	4(%rbx), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_11
## %bb.6:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_7:
	movq	%rbx, %rdi
	callq	_po2030n_probe
	jmp	LBB0_11
LBB0_8:
	movq	%rbx, %rdi
	callq	_ov7648_probe
	jmp	LBB0_11
LBB0_9:
	movq	%rbx, %rdi
	callq	_ov7630_probe
	jmp	LBB0_11
LBB0_10:
	movq	%rbx, %rdi
	callq	_mi0360_probe
LBB0_11:
	movl	$-132, %eax
	addl	(%rbx), %eax
	cmpl	$3, %eax
	ja	LBB0_18
## %bb.12:
	leaq	LJTI0_1(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_13:
	movl	$112, -20(%rbp)
LBB0_14:
	leaq	-24(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$2, %ecx
	callq	_reg_w
	jmp	LBB0_18
LBB0_15:
	movq	%rbx, %rdi
	movl	$2, %esi
	movl	$98, %edx
	jmp	LBB0_17
LBB0_16:
	movq	%rbx, %rdi
	movl	$2, %esi
	movl	$116, %edx
LBB0_17:
	callq	_reg_w1
LBB0_18:
	movl	4(%rbx), %eax
	movq	_SENSOR_OM6802@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_20
## %bb.19:
	movq	16(%rbx), %rax
	movq	_SHARPNESS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	$16, (%rax,%rcx,4)
LBB0_20:
	movq	%rbx, %rdi
	movl	$241, %esi
	xorl	%edx, %edx
	callq	_reg_w1
	movq	_sn_tb@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	4(%rbx), %rcx
	movq	(%rax,%rcx,8), %rax
	movl	36(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	_ctrl_dis@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rcx,4), %eax
	movl	%eax, 16(%rbx)
	movq	_F_ILLUM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 12(%rbx)
	jne	LBB0_22
## %bb.21:
	movq	_ILLUM@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	btsl	%ecx, %eax
	movl	%eax, 16(%rbx)
LBB0_22:
	movl	8(%rbx), %eax
LBB0_23:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
LJTI0_0:
	.long	L0_0_set_7
	.long	L0_0_set_8
	.long	L0_0_set_9
	.long	L0_0_set_10
.set L0_1_set_13, LBB0_13-LJTI0_1
.set L0_1_set_15, LBB0_15-LJTI0_1
.set L0_1_set_14, LBB0_14-LJTI0_1
.set L0_1_set_16, LBB0_16-LJTI0_1
LJTI0_1:
	.long	L0_1_set_13
	.long	L0_1_set_15
	.long	L0_1_set_14
	.long	L0_1_set_16
	.end_data_region
                                        ## -- End function
	.comm	_D_PROBE,4,2                    ## @D_PROBE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Sonix chip id: %02x"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_SENSOR_OM6802,4,2              ## @SENSOR_OM6802
	.comm	_SHARPNESS,8,3                  ## @SHARPNESS
	.comm	_sn_tb,8,3                      ## @sn_tb
	.comm	_ctrl_dis,8,3                   ## @ctrl_dis
	.comm	_F_ILLUM,4,2                    ## @F_ILLUM
	.comm	_ILLUM,4,2                      ## @ILLUM
	.no_dead_strip	_sd_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sd_init
_sd_init:                               ; @sd_init
	.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
	mov	x19, x0
	mov	x8, #41
	movk	x8, #116, lsl #32
	str	x8, [sp, #8]
	mov	w1, #241
	mov	w2, #1
	bl	_reg_w1
	mov	x0, x19
	mov	w1, #0
	mov	w2, #1
	bl	_reg_r
	mov	x0, x19
	mov	w1, #241
	mov	w2, #0
	bl	_reg_w1
	mov	x0, x19
	mov	w1, #0
	mov	w2, #1
	bl	_reg_r
	ldr	x0, [x19, #8]
	tbnz	x0, #63, LBB0_23
; %bb.1:
	ldr	x8, [x19]
	ldr	w20, [x8]
Lloh0:
	adrp	x8, _D_PROBE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _D_PROBE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_PDEBUG
	ldr	w8, [x19]
	and	w8, w8, #0xfffffffe
	cmp	w8, #134
	b.ne	LBB0_4
; %bb.2:
	cmp	w20, #17
	b.eq	LBB0_5
LBB0_3:
Lloh5:
	adrp	x8, _ENODEV@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_23
LBB0_4:
	cmp	w20, #18
	b.ne	LBB0_3
LBB0_5:
	ldr	w8, [x19, #4]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_11
; %bb.6:
Lloh8:
	adrp	x9, lJTI0_0@PAGE
Lloh9:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_7
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_7:
	mov	x0, x19
	bl	_po2030n_probe
	b	LBB0_11
LBB0_8:
	mov	x0, x19
	bl	_ov7648_probe
	b	LBB0_11
LBB0_9:
	mov	x0, x19
	bl	_ov7630_probe
	b	LBB0_11
LBB0_10:
	mov	x0, x19
	bl	_mi0360_probe
LBB0_11:
	ldr	w8, [x19]
	sub	w8, w8, #132
	cmp	w8, #3
	b.hi	LBB0_18
; %bb.12:
Lloh10:
	adrp	x9, lJTI0_1@PAGE
Lloh11:
	add	x9, x9, lJTI0_1@PAGEOFF
	adr	x10, LBB0_13
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_13:
	mov	w8, #112
	str	w8, [sp, #12]
LBB0_14:
	add	x2, sp, #8
	mov	x0, x19
	mov	w1, #1
	mov	w3, #2
	bl	_reg_w
	b	LBB0_18
LBB0_15:
	mov	x0, x19
	mov	w1, #2
	mov	w2, #98
	b	LBB0_17
LBB0_16:
	mov	x0, x19
	mov	w1, #2
	mov	w2, #116
LBB0_17:
	bl	_reg_w1
LBB0_18:
	ldr	w8, [x19, #4]
Lloh12:
	adrp	x9, _SENSOR_OM6802@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SENSOR_OM6802@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_20
; %bb.19:
	ldr	x8, [x19, #16]
Lloh15:
	adrp	x9, _SHARPNESS@GOTPAGE
Lloh16:
	ldr	x9, [x9, _SHARPNESS@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	mov	w10, #16
	str	w10, [x8, x9, lsl #2]
LBB0_20:
	mov	x0, x19
	mov	w1, #241
	mov	w2, #0
	bl	_reg_w1
Lloh18:
	adrp	x8, _sn_tb@GOTPAGE
Lloh19:
	ldr	x8, [x8, _sn_tb@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	ldrsw	x9, [x19, #4]
	ldr	x8, [x8, x9, lsl #3]
	ldr	w8, [x8, #36]
	str	w8, [x19, #8]
Lloh21:
	adrp	x8, _ctrl_dis@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ctrl_dis@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	ldr	w8, [x8, x9, lsl #2]
	str	w8, [x19, #16]
	ldr	w9, [x19, #12]
Lloh24:
	adrp	x10, _F_ILLUM@GOTPAGE
Lloh25:
	ldr	x10, [x10, _F_ILLUM@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x10]
	tst	w10, w9
	b.ne	LBB0_22
; %bb.21:
Lloh27:
	adrp	x9, _ILLUM@GOTPAGE
Lloh28:
	ldr	x9, [x9, _ILLUM@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	mov	w10, #1
	lsl	w9, w10, w9
	orr	w8, w9, w8
	str	w8, [x19, #16]
LBB0_22:
	ldr	w0, [x19, #8]
LBB0_23:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_8-LBB0_7)>>2
	.byte	(LBB0_9-LBB0_7)>>2
	.byte	(LBB0_10-LBB0_7)>>2
lJTI0_1:
	.byte	(LBB0_13-LBB0_13)>>2
	.byte	(LBB0_15-LBB0_13)>>2
	.byte	(LBB0_14-LBB0_13)>>2
	.byte	(LBB0_16-LBB0_13)>>2
                                        ; -- End function
	.comm	_D_PROBE,4,2                    ; @D_PROBE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Sonix chip id: %02x"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_SENSOR_OM6802,4,2              ; @SENSOR_OM6802
	.comm	_SHARPNESS,8,3                  ; @SHARPNESS
	.comm	_sn_tb,8,3                      ; @sn_tb
	.comm	_ctrl_dis,8,3                   ; @ctrl_dis
	.comm	_F_ILLUM,4,2                    ; @F_ILLUM
	.comm	_ILLUM,4,2                      ; @ILLUM
	.no_dead_strip	_sd_init
.subsections_via_symbols
