	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pwc_set_video_mode             ## -- Begin function pwc_set_video_mode
	.p2align	4, 0x90
_pwc_set_video_mode:                    ## @pwc_set_video_mode
	.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
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r15d
	movl	%edx, %r14d
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movl	44(%rdi), %r8d
	leaq	L_.str(%rip), %rdi
	callq	_PWC_DEBUG_FLOW
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movl	%r14d, %edx
	callq	_pwc_decode_size
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, %r13d
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_PWC_TRACE
	movl	40(%rbx), %edi
	callq	_DEVICE_USE_CODEC1
	testq	%rax, %rax
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	%r15d, %edx
	callq	_set_video_mode_Nala
	jmp	LBB0_7
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
	callq	_PWC_DEBUG_MODULE
	movq	_ERANGE@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_10
LBB0_4:
	movl	40(%rbx), %edi
	callq	_DEVICE_USE_CODEC3
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	%r15d, %edx
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	callq	_set_video_mode_Kiara
	jmp	LBB0_7
LBB0_6:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	callq	_set_video_mode_Timon
LBB0_7:
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	movl	%r12d, 32(%rbx)
	movl	%r14d, 36(%rbx)
	movq	8(%rbx), %rax
	addq	16(%rbx), %rax
	addq	(%rbx), %rax
	movq	%rax, 24(%rbx)
	movq	%rbx, %rdi
	callq	_pwc_set_image_buffer_size
	movq	_pwc_image_sizes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%r13d, %ecx
	movl	(%rax,%rcx,8), %r8d
	movl	4(%rax,%rcx,8), %ecx
	leaq	L_.str.4(%rip), %rdi
	movl	%r12d, %esi
	movl	%r14d, %edx
	callq	_PWC_DEBUG_SIZE
	xorl	%r15d, %r15d
	jmp	LBB0_10
LBB0_8:
	movq	_size2name@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%r13d, %ecx
	movl	(%rax,%rcx,4), %esi
	leaq	L_.str.3(%rip), %rdi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movl	%r15d, %ecx
	callq	_PWC_ERROR
LBB0_10:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set_video_mode(%dx%d @ %d, pixfmt %08x).\n"

L_.str.1:                               ## @.str.1
	.asciz	"Could not find suitable size.\n"

	.comm	_ERANGE,4,2                     ## @ERANGE
L_.str.2:                               ## @.str.2
	.asciz	"decode_size = %d.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to set video mode %s@%d fps; return code = %d\n"

	.comm	_size2name,8,3                  ## @size2name
L_.str.4:                               ## @.str.4
	.asciz	"Set viewport to %dx%d, image size is %dx%d.\n"

	.comm	_pwc_image_sizes,8,3            ## @pwc_image_sizes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pwc_set_video_mode             ; -- Begin function pwc_set_video_mode
	.p2align	2
_pwc_set_video_mode:                    ; @pwc_set_video_mode
	.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
	mov	x24, x5
	mov	x25, x4
	mov	x21, x3
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
	ldr	w4, [x0, #44]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_PWC_DEBUG_FLOW
	mov	x0, x22
	mov	x1, x20
	mov	x2, x19
	bl	_pwc_decode_size
	tbnz	w0, #31, LBB0_3
; %bb.1:
	mov	x23, x0
Lloh2:
	adrp	x0, l_.str.2@PAGE
Lloh3:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x23
	bl	_PWC_TRACE
	ldr	w0, [x22, #40]
	bl	_DEVICE_USE_CODEC1
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x22
	mov	x1, x23
	mov	x2, x21
	bl	_set_video_mode_Nala
	mov	x24, x0
	tbz	w0, #31, LBB0_6
	b	LBB0_8
LBB0_3:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_PWC_DEBUG_MODULE
Lloh6:
	adrp	x8, _ERANGE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_9
LBB0_4:
	ldr	w0, [x22, #40]
	bl	_DEVICE_USE_CODEC3
	cbz	x0, LBB0_7
; %bb.5:
	mov	x0, x22
	mov	x1, x23
	mov	x2, x21
	mov	x3, x25
	mov	x4, x24
	bl	_set_video_mode_Kiara
	mov	x24, x0
	tbnz	w0, #31, LBB0_8
LBB0_6:
	stp	w20, w19, [x22, #32]
	ldp	x9, x8, [x22, #8]
	ldr	x10, [x22]
	add	x8, x9, x8
	add	x8, x8, x10
	str	x8, [x22, #24]
	mov	x0, x22
	bl	_pwc_set_image_buffer_size
Lloh9:
	adrp	x8, _pwc_image_sizes@GOTPAGE
Lloh10:
	ldr	x8, [x8, _pwc_image_sizes@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	add	x8, x8, w23, uxtw #3
	ldp	w4, w3, [x8]
Lloh12:
	adrp	x0, l_.str.4@PAGE
Lloh13:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x20
	mov	x2, x19
	bl	_PWC_DEBUG_SIZE
	mov	w24, #0
	b	LBB0_9
LBB0_7:
	mov	x0, x22
	mov	x1, x23
	mov	x2, x21
	mov	x3, x25
	mov	x4, x24
	bl	_set_video_mode_Timon
	mov	x24, x0
	tbz	w0, #31, LBB0_6
LBB0_8:
Lloh14:
	adrp	x8, _size2name@GOTPAGE
Lloh15:
	ldr	x8, [x8, _size2name@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	ldr	w1, [x8, w23, uxtw #2]
Lloh17:
	adrp	x0, l_.str.3@PAGE
Lloh18:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x2, x21
	mov	x3, x24
	bl	_PWC_ERROR
LBB0_9:
	mov	x0, x24
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set_video_mode(%dx%d @ %d, pixfmt %08x).\n"

l_.str.1:                               ; @.str.1
	.asciz	"Could not find suitable size.\n"

	.comm	_ERANGE,4,2                     ; @ERANGE
l_.str.2:                               ; @.str.2
	.asciz	"decode_size = %d.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to set video mode %s@%d fps; return code = %d\n"

	.comm	_size2name,8,3                  ; @size2name
l_.str.4:                               ; @.str.4
	.asciz	"Set viewport to %dx%d, image size is %dx%d.\n"

	.comm	_pwc_image_sizes,8,3            ; @pwc_image_sizes
.subsections_via_symbols
