	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spca500_reinit
_spca500_reinit:                        ## @spca500_reinit
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	xorl	%esi, %esi
	movl	$3329, %edx                     ## imm = 0xD01
	movl	$1, %ecx
	callq	_reg_w
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$3331, %edx                     ## imm = 0xD03
	xorl	%ecx, %ecx
	callq	_reg_w
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$3330, %edx                     ## imm = 0xD02
	movl	$1, %ecx
	callq	_reg_w
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$34058, %edx                    ## imm = 0x850A
	movl	$1, %ecx
	callq	_reg_w
	movq	_qtable_pocketdv@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$34816, %edx                    ## imm = 0x8800
	movl	$34880, %ecx                    ## imm = 0x8840
	callq	_spca50x_setup_qtable
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_gspca_err
LBB0_2:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$34944, %edx                    ## imm = 0x8880
	movl	$2, %ecx
	callq	_reg_w
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$32778, %edx                    ## imm = 0x800A
	xorl	%ecx, %ecx
	callq	_reg_w
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$33295, %edx                    ## imm = 0x820F
	movl	$1, %ecx
	callq	_reg_w
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$34570, %edx                    ## imm = 0x870A
	movl	$4, %ecx
	callq	_reg_w
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$32771, %edx                    ## imm = 0x8003
	xorl	%ecx, %ecx
	callq	_reg_w
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$32768, %edx                    ## imm = 0x8000
	movl	$4, %ecx
	callq	_reg_w
	movl	$2000, %edi                     ## imm = 0x7D0
	callq	_msleep
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$32768, %edx                    ## imm = 0x8000
	movl	$68, %ecx
	callq	_reg_r_wait
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rbx, %rdi
	movl	$33131, %esi                    ## imm = 0x816B
	movl	$1, %edx
	callq	_reg_r
	movq	(%rbx), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$33131, %edx                    ## imm = 0x816B
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_reg_w                          ## TAILCALL
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_qtable_pocketdv,4,2            ## @qtable_pocketdv
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"spca50x_setup_qtable failed on init\n"

	.no_dead_strip	_spca500_reinit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spca500_reinit
_spca500_reinit:                        ; @spca500_reinit
	.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
	mov	w1, #0
	mov	w2, #3329
	mov	w3, #1
	bl	_reg_w
	mov	x0, x19
	mov	w1, #0
	mov	w2, #3331
	mov	w3, #0
	bl	_reg_w
	mov	x0, x19
	mov	w1, #0
	mov	w2, #3330
	mov	w3, #1
	bl	_reg_w
	mov	x0, x19
	mov	w1, #0
	mov	w2, #34058
	mov	w3, #1
	bl	_reg_w
Lloh0:
	adrp	x8, _qtable_pocketdv@GOTPAGE
Lloh1:
	ldr	x8, [x8, _qtable_pocketdv@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #34816
	mov	w3, #34880
	bl	_spca50x_setup_qtable
	tbz	w0, #31, LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_gspca_err
LBB0_2:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #34944
	mov	w3, #2
	bl	_reg_w
	mov	x0, x19
	mov	w1, #0
	mov	w2, #32778
	mov	w3, #0
	bl	_reg_w
	mov	x0, x19
	mov	w1, #0
	mov	w2, #33295
	mov	w3, #1
	bl	_reg_w
	mov	x0, x19
	mov	w1, #0
	mov	w2, #34570
	mov	w3, #4
	bl	_reg_w
	mov	x0, x19
	mov	w1, #0
	mov	w2, #32771
	mov	w3, #0
	bl	_reg_w
	mov	x0, x19
	mov	w1, #0
	mov	w2, #32768
	mov	w3, #4
	bl	_reg_w
	mov	w0, #2000
	bl	_msleep
	mov	x0, x19
	mov	w1, #0
	mov	w2, #32768
	mov	w3, #68
	bl	_reg_r_wait
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x19
	mov	w1, #33131
	mov	w2, #1
	bl	_reg_r
	ldr	x8, [x19]
	ldr	w3, [x8]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #33131
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_reg_w
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_qtable_pocketdv,4,2            ; @qtable_pocketdv
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"spca50x_setup_qtable failed on init\n"

	.no_dead_strip	_spca500_reinit
.subsections_via_symbols
