	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sd_start
_sd_start:                              ## @sd_start
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	_Nxultra@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movq	_spca505b_open_data_ccd@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_spca505_open_data_ccd@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_write_vector
	movq	%r14, %rdi
	movl	$6, %esi
	movl	$22, %edx
	callq	_reg_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	cmpl	$257, %ebx                      ## imm = 0x101
	je	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	callq	_pr_err
LBB0_7:
	movq	%r14, %rdi
	movl	$6, %esi
	movl	$22, %edx
	movl	$10, %ecx
	callq	_reg_write
	testl	%eax, %eax
	js	LBB0_8
## %bb.10:
	movq	%r14, %rdi
	movl	$5, %esi
	movl	$194, %edx
	movl	$18, %ecx
	callq	_reg_write
	movq	%r14, %rdi
	movl	$2, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_reg_write
	movq	8(%r14), %rax
	movslq	(%r14), %rcx
	movslq	(%rax,%rcx,4), %rax
	movq	_SPCA50X_REG_COMPRESS@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	(%rax,%rax,2), %rbx
	leaq	_sd_start.mode_tb(%rip), %r13
	movl	(%r13,%rbx,4), %ecx
	movl	4(%r13,%rbx,4), %r12d
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_reg_write
	movl	(%r15), %esi
	movq	%r14, %rdi
	movl	$6, %edx
	movl	%r12d, %ecx
	callq	_reg_write
	movl	(%r15), %esi
	movl	8(%r13,%rbx,4), %ecx
	movq	%r14, %rdi
	movl	$7, %edx
	callq	_reg_write
	movq	_SPCA50X_REG_USB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SPCA50X_USB_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_SPCA50X_CUSB_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_reg_write                      ## TAILCALL
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_gspca_err
	jmp	LBB0_9
LBB0_8:
	movl	%eax, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @sd_start.mode_tb
_sd_start.mode_tb:
	.long	0                               ## 0x0
	.long	16                              ## 0x10
	.long	16                              ## 0x10
	.long	1                               ## 0x1
	.long	26                              ## 0x1a
	.long	26                              ## 0x1a
	.long	2                               ## 0x2
	.long	28                              ## 0x1c
	.long	29                              ## 0x1d
	.long	4                               ## 0x4
	.long	52                              ## 0x34
	.long	52                              ## 0x34
	.long	5                               ## 0x5
	.long	64                              ## 0x40
	.long	64                              ## 0x40

	.comm	_Nxultra,8,3                    ## @Nxultra
	.comm	_spca505b_open_data_ccd,4,2     ## @spca505b_open_data_ccd
	.comm	_spca505_open_data_ccd,4,2      ## @spca505_open_data_ccd
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"register read failed err: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"After vector read returns 0x%04x should be 0x0101\n"

	.comm	_SPCA50X_REG_COMPRESS,4,2       ## @SPCA50X_REG_COMPRESS
	.comm	_SPCA50X_REG_USB,4,2            ## @SPCA50X_REG_USB
	.comm	_SPCA50X_USB_CTRL,4,2           ## @SPCA50X_USB_CTRL
	.comm	_SPCA50X_CUSB_ENABLE,4,2        ## @SPCA50X_CUSB_ENABLE
	.no_dead_strip	_sd_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sd_start
_sd_start:                              ; @sd_start
	.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	x9, _Nxultra@GOTPAGE
Lloh1:
	ldr	x9, [x9, _Nxultra@GOTPAGEOFF]
Lloh2:
	adrp	x10, _spca505b_open_data_ccd@GOTPAGE
Lloh3:
	ldr	x10, [x10, _spca505b_open_data_ccd@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
Lloh5:
	adrp	x11, _spca505_open_data_ccd@GOTPAGE
Lloh6:
	ldr	x11, [x11, _spca505_open_data_ccd@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, eq
	ldr	w1, [x8]
	bl	_write_vector
	mov	x0, x19
	mov	w1, #6
	mov	w2, #22
	bl	_reg_read
	mov	x20, x0
	tbnz	w0, #31, LBB0_5
; %bb.1:
	cmp	w20, #257
	b.eq	LBB0_3
; %bb.2:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_pr_err
LBB0_3:
	mov	x0, x19
	mov	w1, #6
	mov	w2, #22
	mov	w3, #10
	bl	_reg_write
	tbnz	w0, #31, LBB0_6
; %bb.4:
	mov	x0, x19
	mov	w1, #5
	mov	w2, #194
	mov	w3, #18
	bl	_reg_write
	mov	x0, x19
	mov	w1, #2
	mov	w2, #0
	mov	w3, #0
	bl	_reg_write
	ldp	x9, x8, [x19]
	sbfiz	x9, x9, #2, #32
	ldrsw	x8, [x8, x9]
Lloh9:
	adrp	x20, _SPCA50X_REG_COMPRESS@GOTPAGE
Lloh10:
	ldr	x20, [x20, _SPCA50X_REG_COMPRESS@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	w9, #12
Lloh11:
	adrp	x10, _sd_start.mode_tb@PAGE
Lloh12:
	add	x10, x10, _sd_start.mode_tb@PAGEOFF
	madd	x21, x8, x9, x10
	ldr	w3, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_reg_write
	ldr	w1, [x20]
	ldr	w3, [x21, #4]
	mov	x0, x19
	mov	w2, #6
	bl	_reg_write
	ldr	w1, [x20]
	ldr	w3, [x21, #8]
	mov	x0, x19
	mov	w2, #7
	bl	_reg_write
Lloh13:
	adrp	x8, _SPCA50X_REG_USB@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SPCA50X_REG_USB@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _SPCA50X_USB_CTRL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SPCA50X_USB_CTRL@GOTPAGEOFF]
Lloh18:
	adrp	x9, _SPCA50X_CUSB_ENABLE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _SPCA50X_CUSB_ENABLE@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
Lloh21:
	ldr	w3, [x9]
	mov	x0, x19
	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
	b	_reg_write
LBB0_5:
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_gspca_err
	b	LBB0_7
LBB0_6:
	mov	x20, x0
LBB0_7:
	mov	x0, x20
	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
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh20
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @sd_start.mode_tb
_sd_start.mode_tb:
	.long	0                               ; 0x0
	.long	16                              ; 0x10
	.long	16                              ; 0x10
	.long	1                               ; 0x1
	.long	26                              ; 0x1a
	.long	26                              ; 0x1a
	.long	2                               ; 0x2
	.long	28                              ; 0x1c
	.long	29                              ; 0x1d
	.long	4                               ; 0x4
	.long	52                              ; 0x34
	.long	52                              ; 0x34
	.long	5                               ; 0x5
	.long	64                              ; 0x40
	.long	64                              ; 0x40

	.comm	_Nxultra,8,3                    ; @Nxultra
	.comm	_spca505b_open_data_ccd,4,2     ; @spca505b_open_data_ccd
	.comm	_spca505_open_data_ccd,4,2      ; @spca505_open_data_ccd
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"register read failed err: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"After vector read returns 0x%04x should be 0x0101\n"

	.comm	_SPCA50X_REG_COMPRESS,4,2       ; @SPCA50X_REG_COMPRESS
	.comm	_SPCA50X_REG_USB,4,2            ; @SPCA50X_REG_USB
	.comm	_SPCA50X_USB_CTRL,4,2           ; @SPCA50X_USB_CTRL
	.comm	_SPCA50X_CUSB_ENABLE,4,2        ; @SPCA50X_CUSB_ENABLE
	.no_dead_strip	_sd_start
.subsections_via_symbols
