	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spca504B_SetSizeType
_spca504B_SetSizeType:                  ## @spca504B_SetSizeType
	.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
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	movl	(%rcx,%rax,4), %r14d
	cmpl	$130, %eax
	je	LBB0_6
## %bb.1:
	cmpl	$129, %eax
	je	LBB0_8
## %bb.2:
	movq	%rbx, %rdi
	cmpl	$128, %eax
	jne	LBB0_4
## %bb.3:
	movl	$49, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_reg_w_riv
	movq	%rbx, %rdi
	callq	_spca504B_WaitCmdStatus
	movq	%rbx, %rdi
	callq	_spca504B_PollingDataReady
	movq	%rbx, %rdi
	callq	_spca50x_GetFirmware
	movq	%rbx, %rdi
	movl	$36, %esi
	xorl	%edx, %edx
	movl	$8, %ecx
	movl	$2, %r8d
	callq	_reg_w_1
	movq	%rbx, %rdi
	movl	$36, %esi
	movl	$8, %edx
	movl	$1, %ecx
	callq	_reg_r
	movq	%rbx, %rdi
	movl	$37, %esi
	xorl	%edx, %edx
	movl	$4, %ecx
	movl	%r14d, %r8d
	callq	_reg_w_1
	movq	%rbx, %rdi
	movl	$37, %esi
	movl	$4, %edx
	movl	$1, %ecx
	callq	_reg_r
	movq	%rbx, %rdi
	callq	_spca504B_PollingDataReady
	movq	%rbx, %rdi
	movl	$49, %esi
	movl	$4, %edx
	xorl	%ecx, %ecx
	callq	_reg_w_riv
	movq	%rbx, %rdi
	callq	_spca504B_WaitCmdStatus
	jmp	LBB0_5
LBB0_8:
	andl	$15, %r14d
	orl	$1280, %r14d                    ## imm = 0x500
	movq	%rbx, %rdi
	movl	$160, %esi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	callq	_reg_w_riv
	movq	%rbx, %rdi
	movl	$32, %esi
	movl	$1, %edx
	movl	%r14d, %ecx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_reg_w_riv                      ## TAILCALL
LBB0_6:
	shrq	$32, %rax
	addl	$3, %r14d
	movq	_AiptekMiniPenCam13@GOTPCREL(%rip), %rcx
	cmpl	%eax, (%rcx)
	jne	LBB0_7
## %bb.9:
	movl	%r14d, %r8d
	andl	$15, %r8d
	orl	$128, %r8d
	movq	%rbx, %rdi
	movl	$8, %esi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	movl	$1, %r9d
	callq	_spca504A_acknowledged_command
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$3, %edx
	xorl	%ecx, %ecx
	movl	$159, %r8d
	xorl	%r9d, %r9d
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_spca504A_acknowledged_command  ## TAILCALL
LBB0_4:
	movl	$37, %esi
	xorl	%edx, %edx
	movl	$4, %ecx
	movl	%r14d, %r8d
	callq	_reg_w_1
	movq	%rbx, %rdi
	movl	$37, %esi
	movl	$4, %edx
	movl	$1, %ecx
	callq	_reg_r
	movq	%rbx, %rdi
	movl	$39, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$6, %r8d
	callq	_reg_w_1
	movq	%rbx, %rdi
	movl	$39, %esi
	xorl	%edx, %edx
	movl	$1, %ecx
	callq	_reg_r
LBB0_5:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_spca504B_PollingDataReady      ## TAILCALL
LBB0_7:
	movq	%rbx, %rdi
	movl	$8, %esi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_spca504_acknowledged_command   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AiptekMiniPenCam13,4,2         ## @AiptekMiniPenCam13
	.no_dead_strip	_spca504B_SetSizeType
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spca504B_SetSizeType
_spca504B_SetSizeType:                  ; @spca504B_SetSizeType
	.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
	ldp	x8, x9, [x0]
	ldr	w20, [x9, x8, lsl #2]
	cmp	w8, #130
	b.eq	LBB0_5
; %bb.1:
	cmp	w8, #129
	b.eq	LBB0_4
; %bb.2:
	mov	x0, x19
	cmp	w8, #128
	b.ne	LBB0_7
; %bb.3:
	mov	w1, #49
	mov	w2, #0
	mov	w3, #0
	bl	_reg_w_riv
	mov	x0, x19
	bl	_spca504B_WaitCmdStatus
	mov	x0, x19
	bl	_spca504B_PollingDataReady
	mov	x0, x19
	bl	_spca50x_GetFirmware
	mov	x0, x19
	mov	w1, #36
	mov	w2, #0
	mov	w3, #8
	mov	w4, #2
	bl	_reg_w_1
	mov	x0, x19
	mov	w1, #36
	mov	w2, #8
	mov	w3, #1
	bl	_reg_r
	mov	x0, x19
	mov	w1, #37
	mov	w2, #0
	mov	w3, #4
	mov	x4, x20
	bl	_reg_w_1
	mov	x0, x19
	mov	w1, #37
	mov	w2, #4
	mov	w3, #1
	bl	_reg_r
	mov	x0, x19
	bl	_spca504B_PollingDataReady
	mov	x0, x19
	mov	w1, #49
	mov	w2, #4
	mov	w3, #0
	bl	_reg_w_riv
	mov	x0, x19
	bl	_spca504B_WaitCmdStatus
	b	LBB0_8
LBB0_4:
	mov	w21, #1280
	bfxil	w21, w20, #0, #4
	mov	x0, x19
	mov	w1, #160
	mov	x2, x21
	mov	w3, #0
	bl	_reg_w_riv
	mov	x0, x19
	mov	w1, #32
	mov	w2, #1
	mov	x3, x21
	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_w_riv
LBB0_5:
	lsr	x8, x8, #32
	add	w2, w20, #3
Lloh0:
	adrp	x9, _AiptekMiniPenCam13@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AiptekMiniPenCam13@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w9, w8
	b.ne	LBB0_9
; %bb.6:
	mov	w4, #128
	bfxil	w4, w2, #0, #4
	mov	x0, x19
	mov	w1, #8
	mov	w3, #0
	mov	w5, #1
	bl	_spca504A_acknowledged_command
	mov	x0, x19
	mov	w1, #1
	mov	w2, #3
	mov	w3, #0
	mov	w4, #159
	mov	w5, #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
	b	_spca504A_acknowledged_command
LBB0_7:
	mov	w1, #37
	mov	w2, #0
	mov	w3, #4
	mov	x4, x20
	bl	_reg_w_1
	mov	x0, x19
	mov	w1, #37
	mov	w2, #4
	mov	w3, #1
	bl	_reg_r
	mov	x0, x19
	mov	w1, #39
	mov	w2, #0
	mov	w3, #0
	mov	w4, #6
	bl	_reg_w_1
	mov	x0, x19
	mov	w1, #39
	mov	w2, #0
	mov	w3, #1
	bl	_reg_r
LBB0_8:
	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	_spca504B_PollingDataReady
LBB0_9:
	mov	x0, x19
	mov	w1, #8
	mov	w3, #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
	b	_spca504_acknowledged_command
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AiptekMiniPenCam13,4,2         ; @AiptekMiniPenCam13
	.no_dead_strip	_spca504B_SetSizeType
.subsections_via_symbols
