	.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
	movl	(%rdi), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_9
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_4:
	movq	%rbx, %rdi
	callq	_spca50x_GetFirmware
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$20482, %edx                    ## imm = 0x5002
	movl	$1, %ecx
	callq	_reg_r
	movq	%rbx, %rdi
	movl	$36, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_reg_w_1
	movq	%rbx, %rdi
	movl	$36, %esi
	xorl	%edx, %edx
	movl	$1, %ecx
	callq	_reg_r
	movq	%rbx, %rdi
	callq	_spca504B_PollingDataReady
	movq	%rbx, %rdi
	movl	$52, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_reg_w_riv
	movq	%rbx, %rdi
	callq	_spca504B_WaitCmdStatus
	jmp	LBB0_13
LBB0_5:
	movq	_D_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_gspca_dbg
	movq	%rbx, %rdi
	movl	$224, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_reg_w_riv
	movq	%rbx, %rdi
	movl	$224, %esi
	xorl	%edx, %edx
	movl	$1, %ecx
	callq	_reg_w_riv
	movq	%rbx, %rdi
	callq	_spca504_wait_status
	movl	4(%rbx), %eax
	movq	_LogitechClickSmart420@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_6
## %bb.7:
	movq	_spca504A_clicksmart420_open_data@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_2:
	movq	%rbx, %rdi
	movl	$29, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_reg_w_riv
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$8966, %edx                     ## imm = 0x2306
	movl	$1, %ecx
	callq	_reg_w_riv
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$3332, %edx                     ## imm = 0xD04
	xorl	%ecx, %ecx
	callq	_reg_w_riv
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$8192, %edx                     ## imm = 0x2000
	xorl	%ecx, %ecx
	callq	_reg_w_riv
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$8961, %edx                     ## imm = 0x2301
	movl	$19, %ecx
	callq	_reg_w_riv
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$8966, %edx                     ## imm = 0x2306
	xorl	%ecx, %ecx
	callq	_reg_w_riv
LBB0_3:
	movq	%rbx, %rdi
	callq	_spca504B_PollingDataReady
	movq	%rbx, %rdi
	callq	_spca50x_GetFirmware
	jmp	LBB0_13
LBB0_9:
	movq	_D_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rdi
	callq	_gspca_dbg
	movl	4(%rbx), %eax
	movq	_AiptekMiniPenCam13@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_11
## %bb.10:
	movq	%rbx, %rdi
	callq	_spca504_read_info
	movq	%rbx, %rdi
	movl	$36, %esi
	movl	$8, %edx
	movl	$3, %ecx
	movl	$158, %r8d
	movl	$1, %r9d
	callq	_spca504A_acknowledged_command
	movq	%rbx, %rdi
	movl	$36, %esi
	movl	$8, %edx
	movl	$3, %ecx
	movl	$158, %r8d
	xorl	%r9d, %r9d
	callq	_spca504A_acknowledged_command
	movq	%rbx, %rdi
	movl	$36, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$157, %r8d
	movl	$1, %r9d
	callq	_spca504A_acknowledged_command
	movq	%rbx, %rdi
	movl	$8, %esi
	movl	$6, %edx
	xorl	%ecx, %ecx
	movl	$134, %r8d
	movl	$1, %r9d
	callq	_spca504A_acknowledged_command
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$9996, %edx                     ## imm = 0x270C
	movl	$5, %ecx
	callq	_reg_w_riv
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$8976, %edx                     ## imm = 0x2310
	movl	$5, %ecx
	callq	_reg_w_riv
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$15, %edx
	xorl	%ecx, %ecx
	movl	$255, %r8d
	xorl	%r9d, %r9d
	callq	_spca504A_acknowledged_command
LBB0_11:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$8192, %edx                     ## imm = 0x2000
	xorl	%ecx, %ecx
	callq	_reg_w_riv
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$10371, %edx                    ## imm = 0x2883
	movl	$1, %ecx
	callq	_reg_w_riv
	movq	_qtable_spca504_default@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_6:
	movq	_spca504_pccam600_open_data@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %r14d
	movl	%r14d, %edi
	callq	_ARRAY_SIZE
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_write_vector
	movq	_qtable_creative_pccam@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_setup_qtable
LBB0_13:
	movl	(%rbx), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_3
	.long	L0_0_set_5
	.long	L0_0_set_2
	.end_data_region
                                        ## -- End function
	.comm	_D_STREAM,4,2                   ## @D_STREAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Opening SPCA504 (PC-CAM 600)\n"

	.comm	_LogitechClickSmart420,4,2      ## @LogitechClickSmart420
	.comm	_spca504A_clicksmart420_open_data,4,2 ## @spca504A_clicksmart420_open_data
	.comm	_spca504_pccam600_open_data,4,2 ## @spca504_pccam600_open_data
	.comm	_qtable_creative_pccam,4,2      ## @qtable_creative_pccam
L_.str.1:                               ## @.str.1
	.asciz	"Opening SPCA504\n"

	.comm	_AiptekMiniPenCam13,4,2         ## @AiptekMiniPenCam13
	.comm	_qtable_spca504_default,4,2     ## @qtable_spca504_default
	.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
	ldr	w8, [x0]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_6
; %bb.1:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	mov	x0, x19
	bl	_spca50x_GetFirmware
	mov	x0, x19
	mov	w1, #0
	mov	w2, #20482
	mov	w3, #1
	bl	_reg_r
	mov	x0, x19
	mov	w1, #36
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	bl	_reg_w_1
	mov	x0, x19
	mov	w1, #36
	mov	w2, #0
	mov	w3, #1
	bl	_reg_r
	mov	x0, x19
	bl	_spca504B_PollingDataReady
	mov	x0, x19
	mov	w1, #52
	mov	w2, #0
	mov	w3, #0
	bl	_reg_w_riv
	mov	x0, x19
	bl	_spca504B_WaitCmdStatus
	b	LBB0_10
LBB0_3:
Lloh2:
	adrp	x8, _D_STREAM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _D_STREAM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_gspca_dbg
	mov	x0, x19
	mov	w1, #224
	mov	w2, #0
	mov	w3, #0
	bl	_reg_w_riv
	mov	x0, x19
	mov	w1, #224
	mov	w2, #0
	mov	w3, #1
	bl	_reg_w_riv
	mov	x0, x19
	bl	_spca504_wait_status
	ldr	w8, [x19, #4]
Lloh7:
	adrp	x9, _LogitechClickSmart420@GOTPAGE
Lloh8:
	ldr	x9, [x9, _LogitechClickSmart420@GOTPAGEOFF]
Lloh9:
	adrp	x10, _spca504A_clicksmart420_open_data@GOTPAGE
Lloh10:
	ldr	x10, [x10, _spca504A_clicksmart420_open_data@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x11, _spca504_pccam600_open_data@GOTPAGE
Lloh13:
	ldr	x11, [x11, _spca504_pccam600_open_data@GOTPAGEOFF]
	cmp	w8, w9
	csel	x8, x10, x11, eq
	ldr	w20, [x8]
	mov	x0, x20
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_write_vector
Lloh14:
	adrp	x8, _qtable_creative_pccam@GOTPAGE
Lloh15:
	ldr	x8, [x8, _qtable_creative_pccam@GOTPAGEOFF]
	b	LBB0_9
LBB0_4:
	mov	x0, x19
	mov	w1, #29
	mov	w2, #0
	mov	w3, #0
	bl	_reg_w_riv
	mov	x0, x19
	mov	w1, #0
	mov	w2, #8966
	mov	w3, #1
	bl	_reg_w_riv
	mov	x0, x19
	mov	w1, #0
	mov	w2, #3332
	mov	w3, #0
	bl	_reg_w_riv
	mov	x0, x19
	mov	w1, #0
	mov	w2, #8192
	mov	w3, #0
	bl	_reg_w_riv
	mov	x0, x19
	mov	w1, #0
	mov	w2, #8961
	mov	w3, #19
	bl	_reg_w_riv
	mov	x0, x19
	mov	w1, #0
	mov	w2, #8966
	mov	w3, #0
	bl	_reg_w_riv
LBB0_5:
	mov	x0, x19
	bl	_spca504B_PollingDataReady
	mov	x0, x19
	bl	_spca50x_GetFirmware
	b	LBB0_10
LBB0_6:
Lloh16:
	adrp	x8, _D_STREAM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _D_STREAM@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x2, l_.str.1@PAGE
Lloh20:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_gspca_dbg
	ldr	w8, [x19, #4]
Lloh21:
	adrp	x9, _AiptekMiniPenCam13@GOTPAGE
Lloh22:
	ldr	x9, [x9, _AiptekMiniPenCam13@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_spca504_read_info
	mov	x0, x19
	mov	w1, #36
	mov	w2, #8
	mov	w3, #3
	mov	w4, #158
	mov	w5, #1
	bl	_spca504A_acknowledged_command
	mov	x0, x19
	mov	w1, #36
	mov	w2, #8
	mov	w3, #3
	mov	w4, #158
	mov	w5, #0
	bl	_spca504A_acknowledged_command
	mov	x0, x19
	mov	w1, #36
	mov	w2, #0
	mov	w3, #0
	mov	w4, #157
	mov	w5, #1
	bl	_spca504A_acknowledged_command
	mov	x0, x19
	mov	w1, #8
	mov	w2, #6
	mov	w3, #0
	mov	w4, #134
	mov	w5, #1
	bl	_spca504A_acknowledged_command
	mov	x0, x19
	mov	w1, #0
	mov	w2, #9996
	mov	w3, #5
	bl	_reg_w_riv
	mov	x0, x19
	mov	w1, #0
	mov	w2, #8976
	mov	w3, #5
	bl	_reg_w_riv
	mov	x0, x19
	mov	w1, #1
	mov	w2, #15
	mov	w3, #0
	mov	w4, #255
	mov	w5, #0
	bl	_spca504A_acknowledged_command
LBB0_8:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #8192
	mov	w3, #0
	bl	_reg_w_riv
	mov	x0, x19
	mov	w1, #0
	mov	w2, #10371
	mov	w3, #1
	bl	_reg_w_riv
Lloh24:
	adrp	x8, _qtable_spca504_default@GOTPAGE
Lloh25:
	ldr	x8, [x8, _qtable_spca504_default@GOTPAGEOFF]
LBB0_9:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_setup_qtable
LBB0_10:
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh11
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
                                        ; -- End function
	.comm	_D_STREAM,4,2                   ; @D_STREAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Opening SPCA504 (PC-CAM 600)\n"

	.comm	_LogitechClickSmart420,4,2      ; @LogitechClickSmart420
	.comm	_spca504A_clicksmart420_open_data,4,2 ; @spca504A_clicksmart420_open_data
	.comm	_spca504_pccam600_open_data,4,2 ; @spca504_pccam600_open_data
	.comm	_qtable_creative_pccam,4,2      ; @qtable_creative_pccam
l_.str.1:                               ; @.str.1
	.asciz	"Opening SPCA504\n"

	.comm	_AiptekMiniPenCam13,4,2         ; @AiptekMiniPenCam13
	.comm	_qtable_spca504_default,4,2     ; @qtable_spca504_default
	.no_dead_strip	_sd_init
.subsections_via_symbols
