	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_video_mode_Timon
_set_video_mode_Timon:                  ## @set_video_mode_Timon
	.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
	movq	_PSZ_MAX@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jle	LBB0_2
## %bb.1:
	movl	(%r8), %eax
	cmpq	$4, %rax
	jb	LBB0_4
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_21:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	%edx, %r14d
	movq	%rdi, %r13
	movl	$1, %edi
	cmpl	$5, %ecx
	jl	LBB0_8
## %bb.5:
	cmpl	$16, %ecx
	jb	LBB0_7
## %bb.6:
	movq	_PSZ_VGA@GOTPCREL(%rip), %rdx
	movl	$3, %edi
	cmpl	%esi, (%rdx)
	je	LBB0_8
LBB0_7:
	cmpl	$30, %ecx
	movl	$30, %edx
	cmovll	%ecx, %edx
	movzbl	%dl, %ecx
	imull	$205, %ecx, %edi
	shrl	$10, %edi
LBB0_8:
	leal	-1(%rdi), %ecx
	movq	_Timon_table@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movslq	%esi, %r10
	movq	(%rdx,%r10,8), %rdx
	movq	(%rdx,%rcx,8), %r12
	cmpl	$4, %eax
	movl	$3, %ecx
	cmovgel	%eax, %ecx
	movq	%rax, %r15
	shlq	$32, %r15
	movq	%rax, %rbx
	shlq	$4, %rbx
	addq	%r12, %rbx
	negl	%ecx
	leal	1(%rax), %edx
	movabsq	$4294967296, %rax               ## imm = 0x100000000
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rbx)
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	%edx, (%r8)
	addq	%rax, %r15
	addq	$16, %rbx
	leal	(%rcx,%rdx), %esi
	incl	%esi
                                        ## kill: def $edx killed $edx killed $rdx
	incl	%edx
                                        ## kill: def $edx killed $edx def $rdx
	cmpl	$2, %esi
	jne	LBB0_9
## %bb.11:
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_12:
	sarq	$32, %r15
	testl	%r9d, %r9d
	je	LBB0_14
## %bb.13:
	movl	32(%r13), %esi
	movq	%r15, %rax
	shlq	$4, %rax
	movl	12(%r12,%rax), %edx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movl	$13, %ecx
	movq	%r10, -56(%rbp)                 ## 8-byte Spill
	callq	_send_video_command
	movq	-56(%rbp), %r10                 ## 8-byte Reload
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	testl	%eax, %eax
	js	LBB0_21
LBB0_14:
	shlq	$4, %r15
	movl	8(%r12,%r15), %eax
	testl	%eax, %eax
	jle	LBB0_17
## %bb.15:
	movq	_V4L2_PIX_FMT_YUV420@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	jne	LBB0_17
## %bb.16:
	leaq	(%r12,%r15), %rax
	addq	$8, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	12(%r12,%r15), %esi
	movq	%rdi, %r15
	movq	%r13, %rdi
	movq	%r10, %r12
	callq	_pwc_dec23_init
	movq	%r12, %r10
	movq	%r15, %rdi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
LBB0_17:
	movl	%r14d, (%r13)
	leal	(%rdi,%rdi,4), %ecx
	movl	%ecx, 4(%r13)
	movq	(%rbx), %rcx
	movq	%rcx, 8(%r13)
	movq	_pwc_image_sizes@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx,%r10,8), %rdx
	movl	(%rdx), %ecx
	movl	%ecx, 16(%r13)
	movl	8(%rdx), %edx
	movl	%edx, 20(%r13)
	movl	%eax, 24(%r13)
	testl	%eax, %eax
	jle	LBB0_19
## %bb.18:
	imull	%edx, %eax
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	jmp	LBB0_20
LBB0_19:
	imull	%edx, %ecx
	shll	$2, %ecx
	leal	(%rcx,%rcx,2), %eax
	leal	(%rcx,%rcx,2), %ecx
	addl	$7, %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
LBB0_20:
	movl	%ecx, 28(%r13)
	xorl	%eax, %eax
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_PSZ_MAX,4,2                    ## @PSZ_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PSZ_VGA,4,2                    ## @PSZ_VGA
	.comm	_Timon_table,8,3                ## @Timon_table
	.comm	_ENOENT,4,2                     ## @ENOENT
	.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_Timon
.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_Timon
_set_video_mode_Timon:                  ; @set_video_mode_Timon
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
                                        ; kill: def $w1 killed $w1 def $x1
Lloh0:
	adrp	x8, _PSZ_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PSZ_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.le	LBB0_2
; %bb.1:
	ldr	w8, [x4]
	cmp	w8, #4
	b.lo	LBB0_5
LBB0_2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x20, x2
	mov	x19, x0
	cmp	w3, #5
	b.ge	LBB0_7
; %bb.6:
	mov	w21, #1
	b	LBB0_11
LBB0_7:
	cmp	w3, #16
	b.lo	LBB0_10
; %bb.8:
Lloh5:
	adrp	x9, _PSZ_VGA@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PSZ_VGA@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w9, w1
	b.ne	LBB0_10
; %bb.9:
	mov	w21, #3
	b	LBB0_11
LBB0_10:
	mov	w9, #30
	cmp	w3, #30
	csel	w9, w3, w9, lt
	and	w9, w9, #0xff
	mov	w10, #205
	mul	w9, w9, w10
	lsr	w21, w9, #10
LBB0_11:
	sub	w9, w21, #1
Lloh8:
	adrp	x10, _Timon_table@GOTPAGE
Lloh9:
	ldr	x10, [x10, _Timon_table@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	sxtw	x22, w1
	ldr	x10, [x10, w1, sxtw #3]
	ldr	x24, [x10, w9, uxtw #3]
	mov	w9, #3
	cmp	w8, #3
	csel	w10, w8, w9, gt
	lsl	x9, x8, #32
	add	x23, x24, x8, lsl #4
	sub	w8, w8, #1
	mov	x11, #4294967296
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x23]
	cbnz	x12, LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	add	w12, w8, #2
	str	w12, [x4]
	add	x9, x9, x11
	add	x23, x23, #16
	add	w8, w8, #1
	cmp	w10, w8
	b.ne	LBB0_12
; %bb.14:
Lloh11:
	adrp	x8, _ENOENT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_3
LBB0_15:
	asr	x25, x9, #32
	cbz	w5, LBB0_17
; %bb.16:
	ldr	w1, [x19, #32]
	add	x8, x24, x25, lsl #4
	ldr	w2, [x8, #12]
	mov	x0, x19
	mov	w3, #13
	bl	_send_video_command
	tbnz	w0, #31, LBB0_4
LBB0_17:
	add	x9, x24, x25, lsl #4
	mov	x24, x9
	ldr	w8, [x24, #8]!
Lloh13:
	adrp	x10, _V4L2_PIX_FMT_YUV420@GOTPAGE
Lloh14:
	ldr	x10, [x10, _V4L2_PIX_FMT_YUV420@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	cmp	w8, #1
	ccmp	w10, w20, #0, ge
	b.ne	LBB0_19
; %bb.18:
	ldr	w1, [x9, #12]
	mov	x0, x19
	bl	_pwc_dec23_init
	ldr	w8, [x24]
LBB0_19:
	add	w9, w21, w21, lsl #2
	stp	w20, w9, [x19]
	ldr	x9, [x23]
	str	x9, [x19, #8]
Lloh16:
	adrp	x9, _pwc_image_sizes@GOTPAGE
Lloh17:
	ldr	x9, [x9, _pwc_image_sizes@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	ldr	x10, [x9, x22, lsl #3]
	ldr	w9, [x10]
	ldr	w10, [x10, #8]
	stp	w9, w10, [x19, #16]
	str	w8, [x19, #24]
	cmp	w8, #1
	b.lt	LBB0_21
; %bb.20:
	mov	w0, #0
	mul	w8, w8, w10
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #2
	b	LBB0_22
LBB0_21:
	mov	w0, #0
	mul	w8, w9, w10
	add	w8, w8, w8, lsl #1
	lsl	w8, w8, #2
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #3
LBB0_22:
	str	w8, [x19, #28]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_PSZ_MAX,4,2                    ; @PSZ_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PSZ_VGA,4,2                    ; @PSZ_VGA
	.comm	_Timon_table,8,3                ; @Timon_table
	.comm	_ENOENT,4,2                     ; @ENOENT
	.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_Timon
.subsections_via_symbols
