	.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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$64, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movl	$128, -80(%rbp)
	movl	(%rdi), %eax
	movl	%eax, -76(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -72(%rbp)
	movq	$0, -56(%rbp)
	movl	$3, -48(%rbp)
	movq	_bridge_init@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	xorl	%ebx, %ebx
	leaq	-84(%rbp), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rax
	movl	4(%rax), %ecx
	movl	%ecx, -84(%rbp)
	movl	(%rax), %esi
	movq	%r15, %rdi
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	_reg_w
	cmpq	$0, (%r15)
	js	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_3
LBB0_5:
	movq	_LED_REVERSE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edx, %edx
	andl	4(%r15), %eax
	sete	%dl
	shll	$5, %edx
	movq	%r15, %rdi
	movl	$4102, %esi                     ## imm = 0x1006
	callq	_reg_w1
	leaq	-80(%rbp), %rdx
	movq	%r15, %rdi
	movl	$4288, %esi                     ## imm = 0x10C0
	movl	$9, %ecx
	callq	_reg_w
	cmpq	$0, (%r15)
	js	LBB0_4
## %bb.6:
	movl	8(%r15), %eax
	addl	$-128, %eax
	cmpl	$9, %eax
	ja	LBB0_27
## %bb.7:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_12:
	movq	%r15, %rdi
	callq	_soi968_init_sensor
	cmpq	$0, (%r15)
	js	LBB0_28
## %bb.13:
	leaq	L_.str.3(%rip), %rdi
	callq	_pr_info
	jmp	LBB0_28
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
LBB0_28:
	movl	(%r15), %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_30
## %bb.29:
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	leaq	L_.str.10(%rip), %rdi
	callq	_pr_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subq	(%rax), %rcx
	movq	%rcx, (%r15)
	jmp	LBB0_28
LBB0_10:
	movq	%r15, %rdi
	callq	_ov9655_init_sensor
	cmpq	$0, (%r15)
	js	LBB0_28
## %bb.11:
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_info
	jmp	LBB0_28
LBB0_8:
	movq	%r15, %rdi
	callq	_ov9650_init_sensor
	cmpq	$0, (%r15)
	js	LBB0_28
## %bb.9:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_info
	jmp	LBB0_28
LBB0_16:
	movq	%r15, %rdi
	callq	_ov7670_init_sensor
	cmpq	$0, (%r15)
	js	LBB0_28
## %bb.17:
	leaq	L_.str.5(%rip), %rdi
	callq	_pr_info
	jmp	LBB0_28
LBB0_14:
	movq	%r15, %rdi
	callq	_ov7660_init_sensor
	cmpq	$0, (%r15)
	js	LBB0_28
## %bb.15:
	leaq	L_.str.4(%rip), %rdi
	callq	_pr_info
	jmp	LBB0_28
LBB0_18:
	movq	%r15, %rdi
	callq	_mt9v_init_sensor
	cmpq	$0, (%r15)
	js	LBB0_28
## %bb.19:
	leaq	L_.str.6(%rip), %rdi
	callq	_pr_info
	jmp	LBB0_28
LBB0_22:
	movq	%r15, %rdi
	callq	_mt9m112_init_sensor
	cmpq	$0, (%r15)
	js	LBB0_28
## %bb.23:
	leaq	L_.str.8(%rip), %rdi
	callq	_pr_info
	jmp	LBB0_28
LBB0_20:
	movq	%r15, %rdi
	callq	_mt9m111_init_sensor
	cmpq	$0, (%r15)
	js	LBB0_28
## %bb.21:
	leaq	L_.str.7(%rip), %rdi
	callq	_pr_info
	jmp	LBB0_28
LBB0_24:
	movq	%r15, %rdi
	callq	_mt9m001_init_sensor
	jmp	LBB0_28
LBB0_25:
	movq	%r15, %rdi
	callq	_hv7131r_init_sensor
	cmpq	$0, (%r15)
	js	LBB0_28
## %bb.26:
	leaq	L_.str.9(%rip), %rdi
	callq	_pr_info
	jmp	LBB0_28
LBB0_30:
	callq	___stack_chk_fail
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_22, LBB0_22-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
.set L0_0_set_24, LBB0_24-LJTI0_0
.set L0_0_set_25, LBB0_25-LJTI0_0
LJTI0_0:
	.long	L0_0_set_12
	.long	L0_0_set_10
	.long	L0_0_set_8
	.long	L0_0_set_16
	.long	L0_0_set_14
	.long	L0_0_set_18
	.long	L0_0_set_22
	.long	L0_0_set_20
	.long	L0_0_set_24
	.long	L0_0_set_25
	.end_data_region
                                        ## -- End function
	.comm	_bridge_init,8,3                ## @bridge_init
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Device initialization failed\n"

	.comm	_LED_REVERSE,4,2                ## @LED_REVERSE
L_.str.1:                               ## @.str.1
	.asciz	"OV9650 sensor detected\n"

L_.str.2:                               ## @.str.2
	.asciz	"OV9655 sensor detected\n"

L_.str.3:                               ## @.str.3
	.asciz	"SOI968 sensor detected\n"

L_.str.4:                               ## @.str.4
	.asciz	"OV7660 sensor detected\n"

L_.str.5:                               ## @.str.5
	.asciz	"OV7670 sensor detected\n"

L_.str.6:                               ## @.str.6
	.asciz	"MT9VPRB sensor detected\n"

L_.str.7:                               ## @.str.7
	.asciz	"MT9M111 sensor detected\n"

L_.str.8:                               ## @.str.8
	.asciz	"MT9M112 sensor detected\n"

L_.str.9:                               ## @.str.9
	.asciz	"HV7131R sensor detected\n"

L_.str.10:                              ## @.str.10
	.asciz	"Unsupported sensor\n"

	.comm	_ENODEV,8,3                     ## @ENODEV
	.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, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	mov	w8, #128
	ldr	w9, [x0]
	stp	w8, w9, [sp, #4]
	stur	xzr, [sp, #28]
	stur	xzr, [sp, #12]
	stur	xzr, [sp, #20]
	mov	w8, #3
	str	w8, [sp, #36]
Lloh3:
	adrp	x20, _bridge_init@GOTPAGE
Lloh4:
	ldr	x20, [x20, _bridge_init@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x21, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	x8, [x8, x21, lsl #3]
	ldr	w9, [x8, #4]
	str	w9, [sp]
	ldr	w1, [x8]
	mov	x2, sp
	mov	x0, x19
	mov	w3, #1
	bl	_reg_w
	ldr	x8, [x19]
	tbnz	x8, #63, LBB0_9
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x21, x21, #1
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	cmp	x21, w0, sxtw
	b.lt	LBB0_2
LBB0_4:
	ldr	w8, [x19, #4]
Lloh5:
	adrp	x9, _LED_REVERSE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _LED_REVERSE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, eq
	lsl	w2, w8, #5
	mov	x0, x19
	mov	w1, #4102
	bl	_reg_w1
	add	x2, sp, #4
	mov	x0, x19
	mov	w1, #4288
	mov	w3, #9
	bl	_reg_w
	ldr	x8, [x19]
	tbnz	x8, #63, LBB0_9
; %bb.5:
	ldr	w8, [x19, #8]
	sub	w8, w8, #128
	cmp	w8, #9
	b.hi	LBB0_12
; %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	_soi968_init_sensor
	ldr	x8, [x19]
	tbnz	x8, #63, LBB0_10
; %bb.8:
Lloh10:
	adrp	x0, l_.str.3@PAGE
Lloh11:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_info
	b	LBB0_10
LBB0_9:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
LBB0_10:
	ldr	w0, [x19]
	ldr	x8, [sp, #40]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_30
; %bb.11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_12:
Lloh17:
	adrp	x0, l_.str.10@PAGE
Lloh18:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_pr_err
Lloh19:
	adrp	x8, _ENODEV@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	neg	x8, x8
	str	x8, [x19]
	b	LBB0_10
LBB0_13:
	mov	x0, x19
	bl	_ov9655_init_sensor
	ldr	x8, [x19]
	tbnz	x8, #63, LBB0_10
; %bb.14:
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_info
	b	LBB0_10
LBB0_15:
	mov	x0, x19
	bl	_ov9650_init_sensor
	ldr	x8, [x19]
	tbnz	x8, #63, LBB0_10
; %bb.16:
Lloh24:
	adrp	x0, l_.str.1@PAGE
Lloh25:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_info
	b	LBB0_10
LBB0_17:
	mov	x0, x19
	bl	_ov7670_init_sensor
	ldr	x8, [x19]
	tbnz	x8, #63, LBB0_10
; %bb.18:
Lloh26:
	adrp	x0, l_.str.5@PAGE
Lloh27:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_pr_info
	b	LBB0_10
LBB0_19:
	mov	x0, x19
	bl	_ov7660_init_sensor
	ldr	x8, [x19]
	tbnz	x8, #63, LBB0_10
; %bb.20:
Lloh28:
	adrp	x0, l_.str.4@PAGE
Lloh29:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pr_info
	b	LBB0_10
LBB0_21:
	mov	x0, x19
	bl	_mt9v_init_sensor
	ldr	x8, [x19]
	tbnz	x8, #63, LBB0_10
; %bb.22:
Lloh30:
	adrp	x0, l_.str.6@PAGE
Lloh31:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_pr_info
	b	LBB0_10
LBB0_23:
	mov	x0, x19
	bl	_mt9m112_init_sensor
	ldr	x8, [x19]
	tbnz	x8, #63, LBB0_10
; %bb.24:
Lloh32:
	adrp	x0, l_.str.8@PAGE
Lloh33:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_pr_info
	b	LBB0_10
LBB0_25:
	mov	x0, x19
	bl	_mt9m111_init_sensor
	ldr	x8, [x19]
	tbnz	x8, #63, LBB0_10
; %bb.26:
Lloh34:
	adrp	x0, l_.str.7@PAGE
Lloh35:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_pr_info
	b	LBB0_10
LBB0_27:
	mov	x0, x19
	bl	_mt9m001_init_sensor
	b	LBB0_10
LBB0_28:
	mov	x0, x19
	bl	_hv7131r_init_sensor
	ldr	x8, [x19]
	tbnz	x8, #63, LBB0_10
; %bb.29:
Lloh36:
	adrp	x0, l_.str.9@PAGE
Lloh37:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_pr_info
	b	LBB0_10
LBB0_30:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_13-LBB0_7)>>2
	.byte	(LBB0_15-LBB0_7)>>2
	.byte	(LBB0_17-LBB0_7)>>2
	.byte	(LBB0_19-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_23-LBB0_7)>>2
	.byte	(LBB0_25-LBB0_7)>>2
	.byte	(LBB0_27-LBB0_7)>>2
	.byte	(LBB0_28-LBB0_7)>>2
                                        ; -- End function
	.comm	_bridge_init,8,3                ; @bridge_init
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Device initialization failed\n"

	.comm	_LED_REVERSE,4,2                ; @LED_REVERSE
l_.str.1:                               ; @.str.1
	.asciz	"OV9650 sensor detected\n"

l_.str.2:                               ; @.str.2
	.asciz	"OV9655 sensor detected\n"

l_.str.3:                               ; @.str.3
	.asciz	"SOI968 sensor detected\n"

l_.str.4:                               ; @.str.4
	.asciz	"OV7660 sensor detected\n"

l_.str.5:                               ; @.str.5
	.asciz	"OV7670 sensor detected\n"

l_.str.6:                               ; @.str.6
	.asciz	"MT9VPRB sensor detected\n"

l_.str.7:                               ; @.str.7
	.asciz	"MT9M111 sensor detected\n"

l_.str.8:                               ; @.str.8
	.asciz	"MT9M112 sensor detected\n"

l_.str.9:                               ; @.str.9
	.asciz	"HV7131R sensor detected\n"

l_.str.10:                              ; @.str.10
	.asciz	"Unsupported sensor\n"

	.comm	_ENODEV,8,3                     ; @ENODEV
	.no_dead_strip	_sd_init
.subsections_via_symbols
