	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_STK1135_REG_GCTRL@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	addq	$2, %rsi
	movl	$120, %edx
	callq	_reg_w
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	movl	$32, %edx
	callq	_reg_w
	movq	(%r14), %rsi
	addq	$3, %rsi
	movq	%rbx, %rdi
	movl	$128, %edx
	callq	_reg_w
	movq	_STK1135_REG_ICTRL@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	incq	%rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_reg_w
	movq	(%r14), %rsi
	addq	$3, %rsi
	movq	%rbx, %rdi
	movl	$3, %edx
	callq	_reg_w
	movq	_STK1135_REG_RMCTL@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	incq	%rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_reg_w
	movq	(%r14), %rsi
	addq	$3, %rsi
	movq	%rbx, %rdi
	movl	$2, %edx
	callq	_reg_w
	movq	_STK1135_REG_SICTL@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	movl	$128, %edx
	callq	_reg_w
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_reg_w
	movq	(%r14), %rsi
	addq	$3, %rsi
	movq	%rbx, %rdi
	movl	$186, %edx
	callq	_reg_w
	movq	_STK1135_REG_ASIC@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	$3, %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_reg_w
	movq	%rbx, %rdi
	callq	_stk1135_configure_clock
	movl	$255, (%rbx)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_sensor_read
	cmpl	$5260, %eax                     ## imm = 0x148C
	leaq	L_.str(%rip), %rcx
	leaq	L_.str.1(%rip), %rsi
	cmoveq	%rcx, %rsi
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %edx
	callq	_pr_info
	movq	%rbx, %rdi
	callq	_stk1135_camera_disable
	movl	(%rbx), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STK1135_REG_GCTRL,8,3          ## @STK1135_REG_GCTRL
	.comm	_STK1135_REG_ICTRL,8,3          ## @STK1135_REG_ICTRL
	.comm	_STK1135_REG_RMCTL,8,3          ## @STK1135_REG_RMCTL
	.comm	_STK1135_REG_SICTL,8,3          ## @STK1135_REG_SICTL
	.comm	_STK1135_REG_ASIC,8,3           ## @STK1135_REG_ASIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MT9M112"

L_.str.1:                               ## @.str.1
	.asciz	"unknown"

L_.str.2:                               ## @.str.2
	.asciz	"Detected sensor type %s (0x%x)\n"

	.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:
	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	x19, x0
Lloh0:
	adrp	x20, _STK1135_REG_GCTRL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _STK1135_REG_GCTRL@GOTPAGEOFF]
	ldr	x8, [x20]
	add	x1, x8, #2
	mov	w2, #120
	bl	_reg_w
	ldr	x1, [x20]
	mov	x0, x19
	mov	w2, #32
	bl	_reg_w
	ldr	x8, [x20]
	add	x1, x8, #3
	mov	x0, x19
	mov	w2, #128
	bl	_reg_w
Lloh2:
	adrp	x20, _STK1135_REG_ICTRL@GOTPAGE
Lloh3:
	ldr	x20, [x20, _STK1135_REG_ICTRL@GOTPAGEOFF]
	ldr	x8, [x20]
	add	x1, x8, #1
	mov	x0, x19
	mov	w2, #0
	bl	_reg_w
	ldr	x8, [x20]
	add	x1, x8, #3
	mov	x0, x19
	mov	w2, #3
	bl	_reg_w
Lloh4:
	adrp	x20, _STK1135_REG_RMCTL@GOTPAGE
Lloh5:
	ldr	x20, [x20, _STK1135_REG_RMCTL@GOTPAGEOFF]
	ldr	x8, [x20]
	add	x1, x8, #1
	mov	x0, x19
	mov	w2, #0
	bl	_reg_w
	ldr	x8, [x20]
	add	x1, x8, #3
	mov	x0, x19
	mov	w2, #2
	bl	_reg_w
Lloh6:
	adrp	x20, _STK1135_REG_SICTL@GOTPAGE
Lloh7:
	ldr	x20, [x20, _STK1135_REG_SICTL@GOTPAGEOFF]
	ldr	x1, [x20]
	mov	x0, x19
	mov	w2, #128
	bl	_reg_w
	ldr	x1, [x20]
	mov	x0, x19
	mov	w2, #0
	bl	_reg_w
	ldr	x8, [x20]
	add	x1, x8, #3
	mov	x0, x19
	mov	w2, #186
	bl	_reg_w
Lloh8:
	adrp	x8, _STK1135_REG_ASIC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _STK1135_REG_ASIC@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	add	x1, x8, #3
	mov	x0, x19
	mov	w2, #0
	bl	_reg_w
	mov	x0, x19
	bl	_stk1135_configure_clock
	mov	w8, #255
	str	w8, [x19]
	mov	x0, x19
	mov	w1, #0
	bl	_sensor_read
	mov	x2, x0
Lloh11:
	adrp	x8, l_.str.1@PAGE
Lloh12:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh13:
	adrp	x9, l_.str@PAGE
Lloh14:
	add	x9, x9, l_.str@PAGEOFF
	mov	w10, #5260
	cmp	w0, w10
	csel	x1, x9, x8, eq
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_info
	mov	x0, x19
	bl	_stk1135_camera_disable
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_STK1135_REG_GCTRL,8,3          ; @STK1135_REG_GCTRL
	.comm	_STK1135_REG_ICTRL,8,3          ; @STK1135_REG_ICTRL
	.comm	_STK1135_REG_RMCTL,8,3          ; @STK1135_REG_RMCTL
	.comm	_STK1135_REG_SICTL,8,3          ; @STK1135_REG_SICTL
	.comm	_STK1135_REG_ASIC,8,3           ; @STK1135_REG_ASIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MT9M112"

l_.str.1:                               ; @.str.1
	.asciz	"unknown"

l_.str.2:                               ; @.str.2
	.asciz	"Detected sensor type %s (0x%x)\n"

	.no_dead_strip	_sd_init
.subsections_via_symbols
