	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_video_mode_Nala
_set_video_mode_Nala:                   ## @set_video_mode_Nala
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testl	%esi, %esi
	js	LBB0_15
## %bb.1:
	movq	_PSZ_CIF@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jl	LBB0_15
## %bb.2:
	movl	%edx, %r12d
	movq	%rdi, %rbx
	movl	$4, %eax
	cmpl	$4, %ecx
	jl	LBB0_6
## %bb.3:
	cmpl	$16, %ecx
	jb	LBB0_5
## %bb.4:
	movq	_PSZ_QCIF@GOTPCREL(%rip), %rdx
	movl	$15, %eax
	cmpl	%esi, (%rdx)
	jl	LBB0_6
LBB0_5:
	cmpl	$25, %ecx
	movl	$25, %eax
	cmovll	%ecx, %eax
LBB0_6:
	leaq	l___const.set_video_mode_Nala.frames2frames(%rip), %rcx
	movslq	(%rcx,%rax,4), %rdx
	leaq	l___const.set_video_mode_Nala.frames2table(%rip), %rax
	movslq	(%rax,%rdx,4), %rax
	movq	_Nala_table@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%esi, %r13d
	movq	(%rcx,%r13,8), %r14
	leaq	(%rax,%rax,2), %r15
	cmpq	$0, (%r14,%r15,8)
	je	LBB0_15
## %bb.7:
	testl	%r9d, %r9d
	je	LBB0_9
## %bb.8:
	movl	36(%rbx), %esi
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	16(%r14,%r15,8), %edx
	movq	%rbx, %rdi
	movl	$3, %ecx
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movl	%r12d, %r13d
	movq	%r8, %r12
	callq	_send_video_command
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%r12, %r8
	movl	%r13d, %r12d
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	testl	%eax, %eax
	js	LBB0_20
LBB0_9:
	leaq	(%r14,%r15,8), %rsi
	movq	8(%r14,%r15,8), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	movq	_V4L2_PIX_FMT_YUV420@GOTPCREL(%rip), %rcx
	cmpl	%r12d, (%rcx)
	jne	LBB0_12
## %bb.11:
	leaq	(%r14,%r15,8), %rax
	addq	$8, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movl	16(%r14,%r15,8), %esi
	movq	%rbx, %rdi
	movq	%r8, %r14
	movq	%rdx, %r15
	callq	_pwc_dec1_init
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r15, %rdx
	movq	%r14, %r8
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
LBB0_12:
	movl	%r12d, (%rbx)
	movl	%edx, 4(%rbx)
	movq	(%rsi), %rcx
	movq	%rcx, 8(%rbx)
	movq	_pwc_image_sizes@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx,%r13,8), %rcx
	movl	(%rcx), %edx
	movl	%edx, 16(%rbx)
	movl	8(%rcx), %ecx
	movl	%ecx, 20(%rbx)
	imull	%edx, %ecx
	leal	(%rcx,%rcx,2), %edx
	movl	%edx, %esi
	shrl	$31, %esi
	addl	%edx, %esi
	sarl	%esi
	movl	%esi, 24(%rbx)
	testq	%rax, %rax
	je	LBB0_16
## %bb.13:
	cmpl	$4, 28(%rbx)
	jg	LBB0_17
## %bb.14:
	movl	$528, 32(%rbx)                  ## imm = 0x210
	leal	7(%rdx), %eax
	testl	%edx, %edx
	cmovnsl	%edx, %eax
	sarl	$3, %eax
	jmp	LBB0_18
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_20
LBB0_16:
	movl	$0, 32(%rbx)
	jmp	LBB0_19
LBB0_17:
	movl	$704, 32(%rbx)                  ## imm = 0x2C0
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
LBB0_18:
	movl	%eax, 24(%rbx)
LBB0_19:
	movl	$3, (%r8)
	xorl	%eax, %eax
LBB0_20:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @__const.set_video_mode_Nala.frames2frames
l___const.set_video_mode_Nala.frames2frames:
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	4                               ## 0x4
	.long	5                               ## 0x5
	.long	5                               ## 0x5
	.long	7                               ## 0x7
	.long	7                               ## 0x7
	.long	10                              ## 0xa
	.long	10                              ## 0xa
	.long	10                              ## 0xa
	.long	12                              ## 0xc
	.long	12                              ## 0xc
	.long	15                              ## 0xf
	.long	15                              ## 0xf
	.long	15                              ## 0xf
	.long	15                              ## 0xf
	.long	20                              ## 0x14
	.long	20                              ## 0x14
	.long	20                              ## 0x14
	.long	20                              ## 0x14
	.long	20                              ## 0x14
	.long	24                              ## 0x18
	.long	24                              ## 0x18
	.long	24                              ## 0x18
	.long	24                              ## 0x18
	.long	24                              ## 0x18
	.long	24                              ## 0x18
	.long	24                              ## 0x18
	.long	24                              ## 0x18

	.p2align	4                               ## @__const.set_video_mode_Nala.frames2table
l___const.set_video_mode_Nala.frames2table:
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	2                               ## 0x2
	.long	3                               ## 0x3
	.long	3                               ## 0x3
	.long	4                               ## 0x4
	.long	4                               ## 0x4
	.long	4                               ## 0x4
	.long	5                               ## 0x5
	.long	5                               ## 0x5
	.long	5                               ## 0x5
	.long	5                               ## 0x5
	.long	5                               ## 0x5
	.long	6                               ## 0x6
	.long	6                               ## 0x6
	.long	6                               ## 0x6
	.long	6                               ## 0x6
	.long	7                               ## 0x7
	.long	7                               ## 0x7
	.long	7                               ## 0x7
	.long	7                               ## 0x7
	.long	7                               ## 0x7
	.long	7                               ## 0x7
	.long	7                               ## 0x7

	.comm	_PSZ_CIF,4,2                    ## @PSZ_CIF
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PSZ_QCIF,4,2                   ## @PSZ_QCIF
	.comm	_Nala_table,8,3                 ## @Nala_table
	.comm	_V4L2_PIX_FMT_YUV420,4,2        ## @V4L2_PIX_FMT_YUV420
	.comm	_pwc_image_sizes,8,3            ## @pwc_image_sizes
	.no_dead_strip	_set_video_mode_Nala
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_video_mode_Nala
_set_video_mode_Nala:                   ; @set_video_mode_Nala
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	tbnz	w1, #31, LBB0_16
; %bb.1:
	mov	x22, x1
Lloh0:
	adrp	x8, _PSZ_CIF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PSZ_CIF@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.lt	LBB0_16
; %bb.2:
	mov	x19, x4
	mov	x21, x2
	mov	x20, x0
	cmp	w3, #4
	b.ge	LBB0_4
; %bb.3:
	mov	w8, #4
	b	LBB0_8
LBB0_4:
	cmp	w3, #16
	b.lo	LBB0_7
; %bb.5:
Lloh3:
	adrp	x8, _PSZ_QCIF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PSZ_QCIF@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ge	LBB0_7
; %bb.6:
	mov	w8, #15
	b	LBB0_8
LBB0_7:
	mov	w8, #25
	cmp	w3, #25
	csel	w8, w3, w8, lt
LBB0_8:
Lloh6:
	adrp	x9, l___const.set_video_mode_Nala.frames2frames@PAGE
Lloh7:
	add	x9, x9, l___const.set_video_mode_Nala.frames2frames@PAGEOFF
	ldrsw	x23, [x9, x8, lsl #2]
Lloh8:
	adrp	x8, l___const.set_video_mode_Nala.frames2table@PAGE
Lloh9:
	add	x8, x8, l___const.set_video_mode_Nala.frames2table@PAGEOFF
	ldrsw	x25, [x8, x23, lsl #2]
Lloh10:
	adrp	x8, _Nala_table@GOTPAGE
Lloh11:
	ldr	x8, [x8, _Nala_table@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	ldr	x26, [x8, w22, uxtw #3]
	mov	w8, #24
	madd	x24, x25, x8, x26
	ldr	x8, [x24]
	cbz	x8, LBB0_16
; %bb.9:
	cbz	w5, LBB0_11
; %bb.10:
	ldr	w1, [x20, #36]
	mov	w8, #24
	madd	x8, x25, x8, x26
	ldr	w2, [x8, #16]
	mov	x0, x20
	mov	w3, #3
	bl	_send_video_command
	tbnz	w0, #31, LBB0_21
LBB0_11:
	mov	w8, #24
	madd	x27, x25, x8, x26
	ldr	x8, [x27, #8]!
	mov	w22, w22
Lloh13:
	adrp	x9, _V4L2_PIX_FMT_YUV420@GOTPAGE
Lloh14:
	ldr	x9, [x9, _V4L2_PIX_FMT_YUV420@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	cmp	x8, #0
	ccmp	w9, w21, #0, ne
	b.ne	LBB0_13
; %bb.12:
	mov	w8, #24
	madd	x8, x25, x8, x26
	ldr	w1, [x8, #16]
	mov	x0, x20
	bl	_pwc_dec1_init
	ldr	x8, [x27]
LBB0_13:
	stp	w21, w23, [x20]
	ldr	x9, [x24]
	str	x9, [x20, #8]
Lloh16:
	adrp	x9, _pwc_image_sizes@GOTPAGE
Lloh17:
	ldr	x9, [x9, _pwc_image_sizes@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	ldr	x9, [x9, x22, lsl #3]
	ldr	w10, [x9]
	ldr	w9, [x9, #8]
	stp	w10, w9, [x20, #16]
	mul	w9, w9, w10
	add	w10, w9, w9, lsl #1
	cmp	w10, #0
	cinc	w11, w10, lt
	asr	w11, w11, #1
	str	w11, [x20, #24]
	cbz	x8, LBB0_17
; %bb.14:
	ldr	w8, [x20, #28]
	cmp	w8, #4
	b.gt	LBB0_18
; %bb.15:
	mov	w8, #528
	str	w8, [x20, #32]
	add	w8, w10, #7
	cmp	w10, #0
	csel	w8, w8, w10, lt
	asr	w8, w8, #3
	b	LBB0_19
LBB0_16:
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_21
LBB0_17:
	str	wzr, [x20, #32]
	b	LBB0_20
LBB0_18:
	mov	w8, #704
	str	w8, [x20, #32]
	cmp	w9, #0
	cinc	w8, w9, lt
	asr	w8, w8, #1
LBB0_19:
	str	w8, [x20, #24]
LBB0_20:
	mov	w0, #0
	mov	w8, #3
	str	w8, [x19]
LBB0_21:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @__const.set_video_mode_Nala.frames2frames
l___const.set_video_mode_Nala.frames2frames:
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	4                               ; 0x4
	.long	5                               ; 0x5
	.long	5                               ; 0x5
	.long	7                               ; 0x7
	.long	7                               ; 0x7
	.long	10                              ; 0xa
	.long	10                              ; 0xa
	.long	10                              ; 0xa
	.long	12                              ; 0xc
	.long	12                              ; 0xc
	.long	15                              ; 0xf
	.long	15                              ; 0xf
	.long	15                              ; 0xf
	.long	15                              ; 0xf
	.long	20                              ; 0x14
	.long	20                              ; 0x14
	.long	20                              ; 0x14
	.long	20                              ; 0x14
	.long	20                              ; 0x14
	.long	24                              ; 0x18
	.long	24                              ; 0x18
	.long	24                              ; 0x18
	.long	24                              ; 0x18
	.long	24                              ; 0x18
	.long	24                              ; 0x18
	.long	24                              ; 0x18
	.long	24                              ; 0x18

	.p2align	2                               ; @__const.set_video_mode_Nala.frames2table
l___const.set_video_mode_Nala.frames2table:
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	1                               ; 0x1
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	2                               ; 0x2
	.long	3                               ; 0x3
	.long	3                               ; 0x3
	.long	4                               ; 0x4
	.long	4                               ; 0x4
	.long	4                               ; 0x4
	.long	5                               ; 0x5
	.long	5                               ; 0x5
	.long	5                               ; 0x5
	.long	5                               ; 0x5
	.long	5                               ; 0x5
	.long	6                               ; 0x6
	.long	6                               ; 0x6
	.long	6                               ; 0x6
	.long	6                               ; 0x6
	.long	7                               ; 0x7
	.long	7                               ; 0x7
	.long	7                               ; 0x7
	.long	7                               ; 0x7
	.long	7                               ; 0x7
	.long	7                               ; 0x7
	.long	7                               ; 0x7

	.comm	_PSZ_CIF,4,2                    ; @PSZ_CIF
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PSZ_QCIF,4,2                   ; @PSZ_QCIF
	.comm	_Nala_table,8,3                 ; @Nala_table
	.comm	_V4L2_PIX_FMT_YUV420,4,2        ; @V4L2_PIX_FMT_YUV420
	.comm	_pwc_image_sizes,8,3            ; @pwc_image_sizes
	.no_dead_strip	_set_video_mode_Nala
.subsections_via_symbols
