	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	cmpl	$3, %ecx
	ja	LBB0_3
## %bb.1:
	movl	%edx, %ebx
	leal	-31(%rbx), %eax
	cmpl	$-26, %eax
	jb	LBB0_3
## %bb.2:
	movq	_PSZ_MAX@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jle	LBB0_3
## %bb.5:
	movl	%r8d, %r14d
	movq	%rdi, %r15
	cmpl	$16, %ebx
	jb	LBB0_7
## %bb.6:
	movq	_PSZ_VGA@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_7
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_4:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_27:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_29
## %bb.28:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movzbl	%bl, %eax
	imull	$205, %eax, %eax
	shrl	$10, %eax
	decl	%eax
	movq	_Timon_table@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movslq	%esi, %rsi
	movq	(%rdx,%rsi,8), %rdx
	movq	(%rdx,%rax,8), %r13
	movl	%ecx, %eax
	leaq	(%rax,%rax,2), %rcx
	cmpq	$0, (%r13,%rcx,8)
	je	LBB0_17
LBB0_8:
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	leaq	(,%rcx,8), %rcx
	addq	%r13, %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
LBB0_9:
	leaq	(%rax,%rax,2), %r12
	movq	8(%r13,%r12,8), %rsi
	leaq	-61(%rbp), %rdi
	movl	$13, %edx
	callq	_memcpy
	testl	%r14d, %r14d
	je	LBB0_11
## %bb.10:
	orb	$-128, -61(%rbp)
LBB0_11:
	movl	68(%r15), %esi
	leaq	-61(%rbp), %rdx
	movq	%r15, %rdi
	movl	$13, %ecx
	callq	_send_video_command
	testl	%eax, %eax
	js	LBB0_27
## %bb.12:
	leaq	16(,%r12,8), %rax
	addq	%r13, %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	cmpl	$0, 16(%r13,%r12,8)
	jle	LBB0_15
## %bb.13:
	movq	(%r15), %rax
	movq	_V4L2_PIX_FMT_YUV420@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.14:
	movl	64(%r15), %esi
	leaq	-61(%rbp), %rdx
	movq	%r15, %rdi
	callq	_pwc_dec23_init
LBB0_15:
	movl	$13, 8(%r15)
	movq	16(%r15), %rdi
	leaq	-61(%rbp), %rsi
	movl	$13, %edx
	callq	_memcpy
	movl	%ebx, 24(%r15)
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	%ecx, 28(%r15)
	movl	%r14d, 32(%r15)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	%rax, 40(%r15)
	movq	_pwc_image_sizes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%rcx,8), %rax
	movq	%rax, 56(%r15)
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %ecx
	movl	%ecx, 48(%r15)
	testl	%ecx, %ecx
	jle	LBB0_25
## %bb.16:
	imull	%eax, %ecx
	leal	3(%rcx), %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	sarl	$2, %eax
	movl	%eax, 52(%r15)
	jmp	LBB0_26
LBB0_17:
	leaq	1(%rax), %rcx
	cmpq	$4, %rcx
	jne	LBB0_18
LBB0_24:
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_18:
	leaq	(%rcx,%rcx,2), %rdx
	cmpq	$0, (%r13,%rdx,8)
	je	LBB0_20
LBB0_19:
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	leaq	(,%rdx,8), %rax
	addq	%r13, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rcx, %rax
	jmp	LBB0_9
LBB0_25:
	movq	%rax, %rcx
	shrq	$32, %rcx
	imull	%eax, %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
	movl	%ecx, 52(%r15)
LBB0_26:
	xorl	%eax, %eax
	jmp	LBB0_27
LBB0_20:
	leaq	2(%rax), %rcx
	cmpq	$4, %rcx
	je	LBB0_24
## %bb.21:
	leaq	(%rcx,%rcx,2), %rdx
	cmpq	$0, (%r13,%rdx,8)
	jne	LBB0_19
## %bb.22:
	addq	$3, %rax
	cmpq	$4, %rax
	je	LBB0_24
## %bb.23:
	leaq	(%rax,%rax,2), %rcx
	cmpq	$0, (%r13,%rcx,8)
	jne	LBB0_8
	jmp	LBB0_24
LBB0_29:
	callq	___stack_chk_fail
	.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,8,3        ## @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:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	cmp	w3, #3
	b.hi	LBB0_5
; %bb.1:
	mov	x21, x2
	sub	w8, w2, #31
	cmn	w8, #26
	b.lo	LBB0_5
; %bb.2:
	mov	x22, x1
Lloh3:
	adrp	x8, _PSZ_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PSZ_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w1
	b.le	LBB0_5
; %bb.3:
	mov	x20, x4
	mov	x19, x0
	cmp	w21, #16
	b.lo	LBB0_9
; %bb.4:
Lloh6:
	adrp	x8, _PSZ_VGA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PSZ_VGA@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_9
LBB0_5:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldr	x8, [sp, #24]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_28
; %bb.8:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_9:
	and	w8, w21, #0xff
	mov	w9, #205
	mul	w8, w8, w9
	lsr	w8, w8, #10
	sub	w8, w8, #1
Lloh14:
	adrp	x9, _Timon_table@GOTPAGE
Lloh15:
	ldr	x9, [x9, _Timon_table@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	ldr	x9, [x9, w22, sxtw #3]
	ldr	x24, [x9, w8, uxtw #3]
	mov	w25, w3
	mov	w8, #24
	umaddl	x23, w3, w8, x24
	ldr	x8, [x23]
	cbz	x8, LBB0_18
LBB0_10:
	mov	w8, #24
	madd	x8, x25, x8, x24
	ldr	x1, [x8, #8]
	add	x0, sp, #11
	mov	w2, #13
	bl	_memcpy
	cbz	w20, LBB0_12
; %bb.11:
	ldrb	w8, [sp, #11]
	orr	w8, w8, #0x80
	strb	w8, [sp, #11]
LBB0_12:
	ldr	w1, [x19, #68]
	add	x2, sp, #11
	mov	x0, x19
	mov	w3, #13
	bl	_send_video_command
	tbnz	w0, #31, LBB0_7
; %bb.13:
	sxtw	x26, w22
	mov	w8, #24
	madd	x24, x25, x8, x24
	ldr	w8, [x24, #16]!
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.14:
	ldr	x8, [x19]
Lloh17:
	adrp	x9, _V4L2_PIX_FMT_YUV420@GOTPAGE
Lloh18:
	ldr	x9, [x9, _V4L2_PIX_FMT_YUV420@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.15:
	ldr	w1, [x19, #64]
	add	x2, sp, #11
	mov	x0, x19
	bl	_pwc_dec23_init
LBB0_16:
	mov	w8, #13
	str	w8, [x19, #8]
	ldr	x0, [x19, #16]
	add	x1, sp, #11
	mov	w2, #13
	bl	_memcpy
	stp	w21, w22, [x19, #24]
	str	w20, [x19, #32]
	ldr	x8, [x23]
	str	x8, [x19, #40]
Lloh20:
	adrp	x8, _pwc_image_sizes@GOTPAGE
Lloh21:
	ldr	x8, [x8, _pwc_image_sizes@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	ldr	x8, [x8, x26, lsl #3]
	str	x8, [x19, #56]
	ldr	w9, [x24]
	str	w9, [x19, #48]
	cmp	w9, #1
	b.lt	LBB0_22
; %bb.17:
	mov	w0, #0
	mul	w8, w9, w8
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #2
	b	LBB0_23
LBB0_18:
	add	x8, x25, #1
	cmp	x8, #4
	b.ne	LBB0_20
LBB0_19:
Lloh23:
	adrp	x8, _ENOENT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_6
LBB0_20:
	mov	w9, #24
	madd	x23, x8, x9, x24
	ldr	x9, [x23]
	cbz	x9, LBB0_24
LBB0_21:
	mov	x25, x8
	b	LBB0_10
LBB0_22:
	mov	w0, #0
	lsr	x9, x8, #32
	mul	w8, w9, w8
	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_23:
	str	w8, [x19, #52]
	b	LBB0_7
LBB0_24:
	add	x8, x25, #2
	cmp	x8, #4
	b.eq	LBB0_19
; %bb.25:
	mov	w9, #24
	madd	x23, x8, x9, x24
	ldr	x9, [x23]
	cbnz	x9, LBB0_21
; %bb.26:
	add	x25, x25, #3
	cmp	x25, #4
	b.eq	LBB0_19
; %bb.27:
	mov	w8, #24
	madd	x23, x25, x8, x24
	ldr	x8, [x23]
	cbnz	x8, LBB0_10
	b	LBB0_19
LBB0_28:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.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,8,3        ; @V4L2_PIX_FMT_YUV420
	.comm	_pwc_image_sizes,8,3            ; @pwc_image_sizes
	.no_dead_strip	_set_video_mode_Timon
.subsections_via_symbols
