	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function w9968cf_mode_init_regs
_w9968cf_mode_init_regs:                ## @w9968cf_mode_init_regs
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_w9968cf_set_crop_window
	movl	24(%r14), %edx
	movq	%r14, %rdi
	movl	$20, %esi
	callq	_reg_w
	movl	28(%r14), %edx
	movq	%r14, %rdi
	movl	$21, %esi
	callq	_reg_w
	movl	24(%r14), %edx
	movq	%r14, %rdi
	movl	$48, %esi
	callq	_reg_w
	movl	28(%r14), %edx
	movq	%r14, %rdi
	movl	$49, %esi
	callq	_reg_w
	movq	_w9968cf_vga_mode@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	8(%r14), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	_V4L2_PIX_FMT_JPEG@GOTPCREL(%rip), %r12
	movl	24(%r14), %edx
	cmpq	(%r12), %rax
	jne	LBB0_2
## %bb.1:
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	movq	%r14, %rdi
	movl	$44, %esi
	movl	%eax, %edx
	callq	_reg_w
	movl	24(%r14), %eax
	leal	3(%rax), %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	sarl	$2, %edx
	movq	%r14, %rdi
	movl	$45, %esi
	jmp	LBB0_3
LBB0_2:
	movq	%r14, %rdi
	movl	$44, %esi
LBB0_3:
	callq	_reg_w
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$48919, %edx                    ## imm = 0xBF17
	callq	_reg_w
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$48912, %edx                    ## imm = 0xBF10
	callq	_reg_w
	movl	28(%r14), %ebx
	imull	24(%r14), %ebx
	movzwl	%bx, %edx
	movq	%r14, %rdi
	movl	$61, %esi
	callq	_reg_w
	sarl	$16, %ebx
	movq	%r14, %rdi
	movl	$62, %esi
	movl	%ebx, %edx
	callq	_reg_w
	movq	(%r15), %rax
	movq	8(%r14), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	(%r12), %rcx
	cmpq	%rcx, %rax
	jne	LBB0_5
## %bb.4:
	movl	36(%r14), %edi
	movl	24(%r14), %edx
	movl	28(%r14), %esi
	movl	$34, %ecx
	callq	_jpeg_define
	movl	32(%r14), %edi
	movl	36(%r14), %ebx
	callq	_v4l2_ctrl_g_ctrl
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_jpeg_set_qual
	movq	%r14, %rdi
	callq	_w9968cf_upload_quantizationtables
	movl	32(%r14), %edi
	movl	$1, %esi
	callq	_v4l2_ctrl_grab
	movq	(%r15), %rax
	movq	8(%r14), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	(%r12), %rcx
LBB0_5:
	movq	(%r14), %rdx
	movq	_SEN_OV7620@GOTPCREL(%rip), %rsi
	xorl	%edi, %edi
	cmpq	(%rsi), %rdx
	sete	%dil
	cmpq	%rcx, %rax
	movl	$3, %eax
	movl	$128, %ecx
	cmovel	%eax, %ecx
	shll	$11, %edi
	leal	(%rdi,%rcx), %edx
	addl	$36864, %edx                    ## imm = 0x9000
	movq	%r14, %rdi
	movl	$22, %esi
	callq	_reg_w
	movq	$0, 16(%r14)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_w9968cf_vga_mode,8,3           ## @w9968cf_vga_mode
	.comm	_V4L2_PIX_FMT_JPEG,8,3          ## @V4L2_PIX_FMT_JPEG
	.comm	_SEN_OV7620,8,3                 ## @SEN_OV7620
	.no_dead_strip	_w9968cf_mode_init_regs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function w9968cf_mode_init_regs
_w9968cf_mode_init_regs:                ; @w9968cf_mode_init_regs
	.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
	bl	_w9968cf_set_crop_window
	ldr	w2, [x19, #24]
	mov	x0, x19
	mov	w1, #20
	bl	_reg_w
	ldr	w2, [x19, #28]
	mov	x0, x19
	mov	w1, #21
	bl	_reg_w
	ldr	w2, [x19, #24]
	mov	x0, x19
	mov	w1, #48
	bl	_reg_w
	ldr	w2, [x19, #28]
	mov	x0, x19
	mov	w1, #49
	bl	_reg_w
Lloh0:
	adrp	x21, _w9968cf_vga_mode@GOTPAGE
Lloh1:
	ldr	x21, [x21, _w9968cf_vga_mode@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x9, [x19, #8]
	ldr	x8, [x8, x9, lsl #3]
Lloh2:
	adrp	x22, _V4L2_PIX_FMT_JPEG@GOTPAGE
Lloh3:
	ldr	x22, [x22, _V4L2_PIX_FMT_JPEG@GOTPAGEOFF]
	ldr	x9, [x22]
	ldr	w2, [x19, #24]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	cmp	w2, #0
	cinc	w8, w2, lt
	asr	w2, w8, #1
	mov	x0, x19
	mov	w1, #44
	bl	_reg_w
	ldr	w8, [x19, #24]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w2, w8, #2
	mov	x0, x19
	mov	w1, #45
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	mov	w1, #44
LBB0_3:
	bl	_reg_w
	mov	x0, x19
	mov	w1, #0
	mov	w2, #48919
	bl	_reg_w
	mov	x0, x19
	mov	w1, #0
	mov	w2, #48912
	bl	_reg_w
	ldp	w8, w9, [x19, #24]
	mul	w20, w9, w8
	and	w2, w20, #0xffff
	mov	x0, x19
	mov	w1, #61
	bl	_reg_w
	asr	w2, w20, #16
	mov	x0, x19
	mov	w1, #62
	bl	_reg_w
	ldr	x8, [x21]
	ldr	x9, [x19, #8]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
	ldr	w0, [x19, #36]
	ldp	w2, w1, [x19, #24]
	mov	w3, #34
	bl	_jpeg_define
	ldp	w0, w20, [x19, #32]
	bl	_v4l2_ctrl_g_ctrl
	mov	x1, x0
	mov	x0, x20
	bl	_jpeg_set_qual
	mov	x0, x19
	bl	_w9968cf_upload_quantizationtables
	ldr	w0, [x19, #32]
	mov	w1, #1
	bl	_v4l2_ctrl_grab
	ldr	x8, [x21]
	ldr	x9, [x19, #8]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x9, [x22]
LBB0_5:
	ldr	x10, [x19]
Lloh4:
	adrp	x11, _SEN_OV7620@GOTPAGE
Lloh5:
	ldr	x11, [x11, _SEN_OV7620@GOTPAGEOFF]
Lloh6:
	ldr	x11, [x11]
	cmp	x8, x9
	mov	w8, #128
	mov	w9, #3
	csel	w8, w9, w8, eq
	cmp	x10, x11
	mov	w9, #36864
	mov	w10, #38912
	csel	w9, w10, w9, eq
	orr	w2, w9, w8
	mov	x0, x19
	mov	w1, #22
	bl	_reg_w
	str	xzr, [x19, #16]
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_w9968cf_vga_mode,8,3           ; @w9968cf_vga_mode
	.comm	_V4L2_PIX_FMT_JPEG,8,3          ; @V4L2_PIX_FMT_JPEG
	.comm	_SEN_OV7620,8,3                 ; @SEN_OV7620
	.no_dead_strip	_w9968cf_mode_init_regs
.subsections_via_symbols
