	.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, %r14
	movq	(%rdi), %rax
	movq	_BRIDGE_TP6800@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	leaq	_sd_init.tp6800_preinit(%rip), %rax
	leaq	_sd_init.tp6810_preinit(%rip), %rbx
	cmoveq	%rax, %rbx
	movq	%rbx, %rdi
	callq	_ARRAY_SIZE
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_reg_w_buf
	movl	$15, %edi
	callq	_msleep
	movq	%r14, %rdi
	movl	$129, %esi
	callq	_reg_r
	movq	_D_PROBE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r14), %rax
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_gspca_dbg
	movq	_force_sensor@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	jns	LBB0_10
## %bb.1:
	movq	(%r14), %rax
	cmpq	(%r15), %rax
	jne	LBB0_6
## %bb.2:
	movl	(%rax), %eax
	andl	$7, %eax
	je	LBB0_8
## %bb.3:
	cmpl	$1, %eax
	jne	LBB0_4
## %bb.5:
	movq	_SENSOR_CX0342@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_6:
	movq	%r14, %rdi
	callq	_probe_6810
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	jns	LBB0_10
## %bb.7:
	negl	%eax
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_warn
LBB0_8:
	movq	_SENSOR_SOI763A@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
LBB0_10:
	movl	%eax, 8(%r14)
LBB0_11:
	cltq
	movq	_SENSOR_SOI763A@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	je	LBB0_12
## %bb.14:
	leaq	L_.str.3(%rip), %rdi
	callq	_pr_info
	movq	(%r14), %rax
	movq	_BRIDGE_TP6810@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.15:
	movq	%r14, %rdi
	callq	_cx0342_6810_init
	jmp	LBB0_16
LBB0_12:
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_info
	movq	(%r14), %rax
	movq	_BRIDGE_TP6810@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.13:
	movq	%r14, %rdi
	callq	_soi763a_6810_init
LBB0_16:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_set_dqt
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	8(%r14), %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @sd_init.tp6800_preinit
_sd_init.tp6800_preinit:
	.long	134                             ## 0x86
	.long	1                               ## 0x1
	.long	133                             ## 0x85
	.long	1                               ## 0x1
	.long	132                             ## 0x84
	.long	159                             ## 0x9f
	.long	131                             ## 0x83
	.long	159                             ## 0x9f
	.long	130                             ## 0x82
	.long	128                             ## 0x80
	.long	129                             ## 0x81
	.long	64                              ## 0x40

	.p2align	4                               ## @sd_init.tp6810_preinit
_sd_init.tp6810_preinit:
	.long	128                             ## 0x80
	.long	47                              ## 0x2f
	.long	132                             ## 0x84
	.long	111                             ## 0x6f
	.long	131                             ## 0x83
	.long	64                              ## 0x40
	.long	130                             ## 0x82
	.long	159                             ## 0x9f
	.long	129                             ## 0x81
	.long	193                             ## 0xc1

	.comm	_BRIDGE_TP6800,8,3              ## @BRIDGE_TP6800
	.comm	_D_PROBE,4,2                    ## @D_PROBE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gpio: %02x\n"

	.comm	_force_sensor,8,3               ## @force_sensor
	.comm	_SENSOR_SOI763A,8,3             ## @SENSOR_SOI763A
	.comm	_SENSOR_CX0342,4,2              ## @SENSOR_CX0342
L_.str.1:                               ## @.str.1
	.asciz	"Unknown sensor %d - forced to soi763a\n"

L_.str.2:                               ## @.str.2
	.asciz	"Sensor soi763a\n"

	.comm	_BRIDGE_TP6810,8,3              ## @BRIDGE_TP6810
L_.str.3:                               ## @.str.3
	.asciz	"Sensor cx0342\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	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x21, _BRIDGE_TP6800@GOTPAGE
Lloh1:
	ldr	x21, [x21, _BRIDGE_TP6800@GOTPAGEOFF]
	ldr	x9, [x21]
Lloh2:
	adrp	x10, _sd_init.tp6810_preinit@PAGE
Lloh3:
	add	x10, x10, _sd_init.tp6810_preinit@PAGEOFF
Lloh4:
	adrp	x11, _sd_init.tp6800_preinit@PAGE
Lloh5:
	add	x11, x11, _sd_init.tp6800_preinit@PAGEOFF
	cmp	x8, x9
	csel	x20, x11, x10, eq
	mov	x0, x20
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_reg_w_buf
	mov	w0, #15
	bl	_msleep
	mov	x0, x19
	mov	w1, #129
	bl	_reg_r
Lloh6:
	adrp	x8, _D_PROBE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _D_PROBE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	x8, [x19]
	ldr	w3, [x8]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_gspca_dbg
Lloh11:
	adrp	x8, _force_sensor@GOTPAGE
Lloh12:
	ldr	x8, [x8, _force_sensor@GOTPAGEOFF]
Lloh13:
	ldr	x0, [x8]
Lloh14:
	adrp	x20, _SENSOR_SOI763A@GOTPAGE
Lloh15:
	ldr	x20, [x20, _SENSOR_SOI763A@GOTPAGEOFF]
	tbnz	x0, #63, LBB0_5
LBB0_1:
	str	w0, [x19, #8]
LBB0_2:
	ldr	x8, [x20]
	cmp	x8, w0, sxtw
	b.eq	LBB0_9
; %bb.3:
Lloh16:
	adrp	x0, l_.str.3@PAGE
Lloh17:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_info
	ldr	x8, [x19]
Lloh18:
	adrp	x9, _BRIDGE_TP6810@GOTPAGE
Lloh19:
	ldr	x9, [x9, _BRIDGE_TP6810@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.4:
	mov	x0, x19
	bl	_cx0342_6810_init
	b	LBB0_11
LBB0_5:
	ldr	x8, [x19]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.6:
	ldr	w8, [x8]
	ands	w8, w8, #0x7
	b.eq	LBB0_14
; %bb.7:
	cmp	w8, #1
	b.ne	LBB0_15
; %bb.8:
Lloh21:
	adrp	x8, _SENSOR_CX0342@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SENSOR_CX0342@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	b	LBB0_1
LBB0_9:
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_info
	ldr	x8, [x19]
Lloh26:
	adrp	x9, _BRIDGE_TP6810@GOTPAGE
Lloh27:
	ldr	x9, [x9, _BRIDGE_TP6810@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_soi763a_6810_init
LBB0_11:
	mov	x0, x19
	mov	w1, #0
	bl	_set_dqt
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_12:
	mov	x0, x19
	bl	_probe_6810
                                        ; kill: def $w0 killed $w0 def $x0
	tbz	w0, #31, LBB0_1
; %bb.13:
	neg	w1, w0
Lloh29:
	adrp	x0, l_.str.1@PAGE
Lloh30:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_warn
LBB0_14:
	ldr	w0, [x20]
	b	LBB0_1
LBB0_15:
	ldr	w0, [x19, #8]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @sd_init.tp6800_preinit
_sd_init.tp6800_preinit:
	.long	134                             ; 0x86
	.long	1                               ; 0x1
	.long	133                             ; 0x85
	.long	1                               ; 0x1
	.long	132                             ; 0x84
	.long	159                             ; 0x9f
	.long	131                             ; 0x83
	.long	159                             ; 0x9f
	.long	130                             ; 0x82
	.long	128                             ; 0x80
	.long	129                             ; 0x81
	.long	64                              ; 0x40

	.p2align	2                               ; @sd_init.tp6810_preinit
_sd_init.tp6810_preinit:
	.long	128                             ; 0x80
	.long	47                              ; 0x2f
	.long	132                             ; 0x84
	.long	111                             ; 0x6f
	.long	131                             ; 0x83
	.long	64                              ; 0x40
	.long	130                             ; 0x82
	.long	159                             ; 0x9f
	.long	129                             ; 0x81
	.long	193                             ; 0xc1

	.comm	_BRIDGE_TP6800,8,3              ; @BRIDGE_TP6800
	.comm	_D_PROBE,4,2                    ; @D_PROBE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gpio: %02x\n"

	.comm	_force_sensor,8,3               ; @force_sensor
	.comm	_SENSOR_SOI763A,8,3             ; @SENSOR_SOI763A
	.comm	_SENSOR_CX0342,4,2              ; @SENSOR_CX0342
l_.str.1:                               ; @.str.1
	.asciz	"Unknown sensor %d - forced to soi763a\n"

l_.str.2:                               ; @.str.2
	.asciz	"Sensor soi763a\n"

	.comm	_BRIDGE_TP6810,8,3              ; @BRIDGE_TP6810
l_.str.3:                               ; @.str.3
	.asciz	"Sensor cx0342\n"

	.no_dead_strip	_sd_init
.subsections_via_symbols
