	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movabsq	$481036337193, %rax             ## imm = 0x7000000029
	movq	%rax, -32(%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_18
## %bb.1:
	movq	(%rbx), %rax
	movl	(%rax), %r15d
	movq	_D_PROBE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	movl	%r15d, %ecx
	callq	_gspca_dbg
	cmpq	$0, 16(%rbx)
	je	LBB0_2
## %bb.3:
	movl	$116, -28(%rbp)
	movl	$116, %r14d
	jmp	LBB0_4
LBB0_2:
	movl	$112, %r14d
LBB0_4:
	movl	(%rbx), %eax
	andl	$-2, %eax
	cmpl	$132, %eax
	jne	LBB0_7
## %bb.5:
	cmpl	$17, %r15d
	je	LBB0_8
LBB0_6:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_18
LBB0_7:
	cmpl	$18, %r15d
	jne	LBB0_6
LBB0_8:
	movl	4(%rbx), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_14
## %bb.9:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_13:
	movq	%rbx, %rdi
	callq	_po2030n_probe
	cmpl	$133, (%rbx)
	je	LBB0_15
	jmp	LBB0_16
LBB0_12:
	movq	%rbx, %rdi
	callq	_ov7648_probe
	cmpl	$133, (%rbx)
	je	LBB0_15
	jmp	LBB0_16
LBB0_11:
	movq	%rbx, %rdi
	callq	_ov7630_probe
LBB0_14:
	cmpl	$133, (%rbx)
	jne	LBB0_16
LBB0_15:
	movq	%rbx, %rdi
	movl	$2, %esi
	movl	%r14d, %edx
	callq	_reg_w1
	jmp	LBB0_17
LBB0_10:
	movq	%rbx, %rdi
	callq	_mi0360_probe
	cmpl	$133, (%rbx)
	je	LBB0_15
LBB0_16:
	leaq	-32(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$2, %ecx
	callq	_reg_w
LBB0_17:
	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)
LBB0_18:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
LJTI0_0:
	.long	L0_0_set_13
	.long	L0_0_set_12
	.long	L0_0_set_11
	.long	L0_0_set_10
	.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\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_sn_tb,8,3                      ## @sn_tb
	.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, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x8, #41
	movk	x8, #112, 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_18
; %bb.1:
	ldr	x8, [x19]
	ldr	w21, [x8]
Lloh0:
	adrp	x8, _D_PROBE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _D_PROBE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x3, x21
	bl	_gspca_dbg
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_3
; %bb.2:
	mov	w20, #116
	str	w20, [sp, #12]
	b	LBB0_4
LBB0_3:
	mov	w20, #112
LBB0_4:
	ldr	w8, [x19]
	and	w8, w8, #0xfffffffe
	cmp	w8, #132
	b.ne	LBB0_7
; %bb.5:
	cmp	w21, #17
	b.eq	LBB0_8
LBB0_6:
Lloh5:
	adrp	x8, _ENODEV@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_18
LBB0_7:
	cmp	w21, #18
	b.ne	LBB0_6
LBB0_8:
	ldr	w8, [x19, #4]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_14
; %bb.9:
Lloh8:
	adrp	x9, lJTI0_0@PAGE
Lloh9:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_10
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_10:
	mov	x0, x19
	bl	_po2030n_probe
	b	LBB0_14
LBB0_11:
	mov	x0, x19
	bl	_ov7648_probe
	b	LBB0_14
LBB0_12:
	mov	x0, x19
	bl	_ov7630_probe
	b	LBB0_14
LBB0_13:
	mov	x0, x19
	bl	_mi0360_probe
LBB0_14:
	ldr	w8, [x19]
	cmp	w8, #133
	b.ne	LBB0_16
; %bb.15:
	mov	x0, x19
	mov	w1, #2
	mov	x2, x20
	bl	_reg_w1
	b	LBB0_17
LBB0_16:
	add	x2, sp, #8
	mov	x0, x19
	mov	w1, #1
	mov	w3, #2
	bl	_reg_w
LBB0_17:
	mov	x0, x19
	mov	w1, #241
	mov	w2, #0
	bl	_reg_w1
Lloh10:
	adrp	x8, _sn_tb@GOTPAGE
Lloh11:
	ldr	x8, [x8, _sn_tb@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	ldrsw	x9, [x19, #4]
	ldr	x8, [x8, x9, lsl #3]
	ldr	w0, [x8, #36]
	str	w0, [x19, #8]
LBB0_18:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_10-LBB0_10)>>2
	.byte	(LBB0_11-LBB0_10)>>2
	.byte	(LBB0_12-LBB0_10)>>2
	.byte	(LBB0_13-LBB0_10)>>2
                                        ; -- End function
	.comm	_D_PROBE,4,2                    ; @D_PROBE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Sonix chip id: %02x\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_sn_tb,8,3                      ; @sn_tb
	.no_dead_strip	_sd_init
.subsections_via_symbols
