	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_emu_video_mode_change          ## -- Begin function emu_video_mode_change
	.p2align	4, 0x90
_emu_video_mode_change:                 ## @emu_video_mode_change
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_doing_bg_frame@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_1
## %bb.12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%edi, %r14d
	xorl	%r12d, %r12d
	xorl	%r15d, %r15d
	testl	%edx, %edx
	sete	%r12b
	setne	%r15b
	shll	$5, %r15d
	orl	$4, %r12d
	shll	$6, %r12d
	movq	_currentConfig@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	leal	-128(%r10), %eax
	cmpl	$4, %eax
	ja	LBB0_9
## %bb.2:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_7:
	movq	_g_layer_w@GOTPCREL(%rip), %rax
	movl	$800, (%rax)                    ## imm = 0x320
	movq	_g_layer_h@GOTPCREL(%rip), %rax
	movl	$480, (%rax)                    ## imm = 0x1E0
	movl	$800, %ecx                      ## imm = 0x320
	movl	$480, %r8d                      ## imm = 0x1E0
	jmp	LBB0_10
LBB0_9:
	movq	_g_layer_w@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_g_layer_h@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	jmp	LBB0_10
LBB0_8:
	movq	_g_layer_cx@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_g_layer_x@GOTPCREL(%rip), %rax
	movl	%r9d, (%rax)
	movq	_g_layer_cy@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_g_layer_y@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_g_layer_cw@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_g_layer_w@GOTPCREL(%rip), %rbx
	movl	%ecx, (%rbx)
	movq	_g_layer_ch@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r8d
	movq	_g_layer_h@GOTPCREL(%rip), %rbx
	movl	%r8d, (%rbx)
	jmp	LBB0_11
LBB0_4:
	xorl	%ecx, %ecx
	testl	%edx, %edx
	setne	%cl
	shll	$7, %ecx
	addl	$640, %ecx                      ## imm = 0x280
	jmp	LBB0_6
LBB0_5:
	leal	(%r12,%r12), %ecx
LBB0_6:
	movq	_g_layer_w@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
	movq	_g_layer_h@GOTPCREL(%rip), %rax
	movl	$480, (%rax)                    ## imm = 0x1E0
	movl	$480, %r8d                      ## imm = 0x1E0
	jmp	LBB0_10
LBB0_3:
	movq	_g_layer_w@GOTPCREL(%rip), %rax
	movl	%r12d, (%rax)
	movq	_g_layer_h@GOTPCREL(%rip), %rax
	movl	$240, (%rax)
	movl	$240, %r8d
	movl	%r12d, %ecx
LBB0_10:
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
	movl	$400, %r9d                      ## imm = 0x190
	subl	%eax, %r9d
	movq	_g_layer_x@GOTPCREL(%rip), %rax
	movl	%r9d, (%rax)
	movl	%r8d, %ebx
	shrl	$31, %ebx
	addl	%r8d, %ebx
	sarl	%ebx
	movl	$240, %eax
	subl	%ebx, %eax
	movq	_g_layer_y@GOTPCREL(%rip), %rbx
	movl	%eax, (%rbx)
LBB0_11:
	xorl	%edi, %edi
	testl	%edx, %edx
	sete	%dil
	andl	$-2, %r10d
	xorl	%edx, %edx
	cmpl	$128, %r10d
	movl	$240, %ebx
	cmovel	%esi, %ebx
	cmovnel	%edx, %r14d
	shll	$5, %edi
	addl	$232, %edi
	movq	_g_osd_fps_x@GOTPCREL(%rip), %rdx
	movl	%edi, (%rdx)
	leal	(%rbx,%r14), %edx
	addl	$-8, %edx
	movq	_g_osd_y@GOTPCREL(%rip), %rsi
	movl	%edx, (%rsi)
	movl	$1, %edi
	movl	%r9d, %esi
	movl	%eax, %edx
	callq	_pnd_setup_layer
	movq	_layer_fb@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_vout_fbdev_clear
	movl	(%r13), %edi
	subq	$8, %rsp
	movl	%r12d, %esi
	movl	%ebx, %edx
	movl	$16, %ecx
	movl	%r15d, %r8d
	movl	%r15d, %r9d
	pushq	$4
	pushq	$0
	pushq	%r14
	callq	_vout_fbdev_resize
	addq	$32, %rsp
	xorl	%eax, %eax
	callq	_plat_video_flip
	movq	_PDF_RGB555@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PicoDrawSetOutFormat           ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
LJTI0_0:
	.long	L0_0_set_7
	.long	L0_0_set_8
	.long	L0_0_set_4
	.long	L0_0_set_5
	.long	L0_0_set_3
	.end_data_region
                                        ## -- End function
	.comm	_doing_bg_frame,8,3             ## @doing_bg_frame
	.comm	_currentConfig,4,2              ## @currentConfig
	.comm	_g_layer_w,4,2                  ## @g_layer_w
	.comm	_g_layer_h,4,2                  ## @g_layer_h
	.comm	_g_layer_cx,4,2                 ## @g_layer_cx
	.comm	_g_layer_x,4,2                  ## @g_layer_x
	.comm	_g_layer_cy,4,2                 ## @g_layer_cy
	.comm	_g_layer_y,4,2                  ## @g_layer_y
	.comm	_g_layer_cw,4,2                 ## @g_layer_cw
	.comm	_g_layer_ch,4,2                 ## @g_layer_ch
	.comm	_g_osd_fps_x,4,2                ## @g_osd_fps_x
	.comm	_g_osd_y,4,2                    ## @g_osd_y
	.comm	_layer_fb,4,2                   ## @layer_fb
	.comm	_PDF_RGB555,4,2                 ## @PDF_RGB555
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_emu_video_mode_change          ; -- Begin function emu_video_mode_change
	.p2align	2
_emu_video_mode_change:                 ; @emu_video_mode_change
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
Lloh0:
	adrp	x8, _doing_bg_frame@GOTPAGE
Lloh1:
	ldr	x8, [x8, _doing_bg_frame@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	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
	add	sp, sp, #80
	ret
LBB0_2:
	mov	w8, #256
	mov	w9, #320
	cmp	w2, #0
	csel	w20, w9, w8, eq
	cset	w8, ne
	lsl	w19, w8, #5
Lloh3:
	adrp	x8, _currentConfig@GOTPAGE
Lloh4:
	ldr	x8, [x8, _currentConfig@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x8]
	sub	w8, w10, #128
	cmp	w8, #4
	b.hi	LBB0_5
; %bb.3:
Lloh6:
	adrp	x9, lJTI0_0@PAGE
Lloh7:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x11, LBB0_4
	ldrb	w12, [x9, x8]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_4:
Lloh8:
	adrp	x8, _g_layer_w@GOTPAGE
Lloh9:
	ldr	x8, [x8, _g_layer_w@GOTPAGEOFF]
	mov	w3, #800
	b	LBB0_9
LBB0_5:
Lloh10:
	adrp	x8, _g_layer_w@GOTPAGE
Lloh11:
	ldr	x8, [x8, _g_layer_w@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x8]
Lloh13:
	adrp	x8, _g_layer_h@GOTPAGE
Lloh14:
	ldr	x8, [x8, _g_layer_h@GOTPAGEOFF]
Lloh15:
	ldr	w4, [x8]
	b	LBB0_12
LBB0_6:
Lloh16:
	adrp	x8, _g_layer_cx@GOTPAGE
Lloh17:
	ldr	x8, [x8, _g_layer_cx@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _g_layer_x@GOTPAGE
Lloh20:
	ldr	x9, [x9, _g_layer_x@GOTPAGEOFF]
Lloh21:
	str	w8, [x9]
Lloh22:
	adrp	x9, _g_layer_cy@GOTPAGE
Lloh23:
	ldr	x9, [x9, _g_layer_cy@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
Lloh25:
	adrp	x11, _g_layer_y@GOTPAGE
Lloh26:
	ldr	x11, [x11, _g_layer_y@GOTPAGEOFF]
Lloh27:
	str	w9, [x11]
Lloh28:
	adrp	x11, _g_layer_cw@GOTPAGE
Lloh29:
	ldr	x11, [x11, _g_layer_cw@GOTPAGEOFF]
Lloh30:
	ldr	w3, [x11]
Lloh31:
	adrp	x11, _g_layer_w@GOTPAGE
Lloh32:
	ldr	x11, [x11, _g_layer_w@GOTPAGEOFF]
Lloh33:
	str	w3, [x11]
Lloh34:
	adrp	x11, _g_layer_ch@GOTPAGE
Lloh35:
	ldr	x11, [x11, _g_layer_ch@GOTPAGEOFF]
Lloh36:
	ldr	w4, [x11]
Lloh37:
	adrp	x11, _g_layer_h@GOTPAGE
Lloh38:
	ldr	x11, [x11, _g_layer_h@GOTPAGEOFF]
Lloh39:
	str	w4, [x11]
	b	LBB0_13
LBB0_7:
	mov	w8, #768
	mov	w9, #640
Lloh40:
	adrp	x11, _g_layer_w@GOTPAGE
Lloh41:
	ldr	x11, [x11, _g_layer_w@GOTPAGEOFF]
	cmp	w2, #0
	csel	w3, w9, w8, eq
Lloh42:
	str	w3, [x11]
	b	LBB0_10
LBB0_8:
Lloh43:
	adrp	x8, _g_layer_w@GOTPAGE
Lloh44:
	ldr	x8, [x8, _g_layer_w@GOTPAGEOFF]
	lsl	w3, w20, #1
LBB0_9:
	str	w3, [x8]
LBB0_10:
Lloh45:
	adrp	x8, _g_layer_h@GOTPAGE
Lloh46:
	ldr	x8, [x8, _g_layer_h@GOTPAGEOFF]
	mov	w4, #480
Lloh47:
	str	w4, [x8]
	b	LBB0_12
LBB0_11:
Lloh48:
	adrp	x8, _g_layer_w@GOTPAGE
Lloh49:
	ldr	x8, [x8, _g_layer_w@GOTPAGEOFF]
Lloh50:
	str	w20, [x8]
Lloh51:
	adrp	x8, _g_layer_h@GOTPAGE
Lloh52:
	ldr	x8, [x8, _g_layer_h@GOTPAGEOFF]
	mov	w4, #240
Lloh53:
	str	w4, [x8]
	mov	x3, x20
LBB0_12:
	cmp	w3, #0
	cinc	w8, w3, lt
	mov	w9, #400
	sub	w8, w9, w8, asr #1
Lloh54:
	adrp	x9, _g_layer_x@GOTPAGE
Lloh55:
	ldr	x9, [x9, _g_layer_x@GOTPAGEOFF]
Lloh56:
	str	w8, [x9]
	cmp	w4, #0
	cinc	w9, w4, lt
	mov	w11, #240
	sub	w9, w11, w9, asr #1
Lloh57:
	adrp	x11, _g_layer_y@GOTPAGE
Lloh58:
	ldr	x11, [x11, _g_layer_y@GOTPAGEOFF]
Lloh59:
	str	w9, [x11]
LBB0_13:
	and	w10, w10, #0xfffffffe
	mov	w11, #240
	cmp	w10, #128
	csel	w21, w1, w11, eq
	csel	w22, w0, wzr, eq
	mov	w10, #232
	mov	w11, #264
	cmp	w2, #0
	csel	w10, w11, w10, eq
Lloh60:
	adrp	x11, _g_osd_fps_x@GOTPAGE
Lloh61:
	ldr	x11, [x11, _g_osd_fps_x@GOTPAGEOFF]
Lloh62:
	str	w10, [x11]
	add	w10, w21, w22
	sub	w10, w10, #8
Lloh63:
	adrp	x11, _g_osd_y@GOTPAGE
Lloh64:
	ldr	x11, [x11, _g_osd_y@GOTPAGEOFF]
Lloh65:
	str	w10, [x11]
	mov	w0, #1
	mov	x1, x8
	mov	x2, x9
	bl	_pnd_setup_layer
Lloh66:
	adrp	x23, _layer_fb@GOTPAGE
Lloh67:
	ldr	x23, [x23, _layer_fb@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_vout_fbdev_clear
	ldr	w0, [x23]
	mov	w8, #4
	str	w8, [sp]
	mov	x1, x20
	mov	x2, x21
	mov	w3, #16
	mov	x4, x19
	mov	x5, x19
	mov	x6, x22
	mov	w7, #0
	bl	_vout_fbdev_resize
	bl	_plat_video_flip
Lloh68:
	adrp	x8, _PDF_RGB555@GOTPAGE
Lloh69:
	ldr	x8, [x8, _PDF_RGB555@GOTPAGEOFF]
Lloh70:
	ldr	w0, [x8]
	mov	w1, #0
	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
	add	sp, sp, #80
	b	_PicoDrawSetOutFormat
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotStr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotStr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotStr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotStr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotStr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGotStr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotStr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotStr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotStr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotStr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpLdrGot	Lloh66, Lloh67
	.loh AdrpLdrGotStr	Lloh63, Lloh64, Lloh65
	.loh AdrpLdrGotStr	Lloh60, Lloh61, Lloh62
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_6-LBB0_4)>>2
	.byte	(LBB0_7-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_11-LBB0_4)>>2
                                        ; -- End function
	.comm	_doing_bg_frame,8,3             ; @doing_bg_frame
	.comm	_currentConfig,4,2              ; @currentConfig
	.comm	_g_layer_w,4,2                  ; @g_layer_w
	.comm	_g_layer_h,4,2                  ; @g_layer_h
	.comm	_g_layer_cx,4,2                 ; @g_layer_cx
	.comm	_g_layer_x,4,2                  ; @g_layer_x
	.comm	_g_layer_cy,4,2                 ; @g_layer_cy
	.comm	_g_layer_y,4,2                  ; @g_layer_y
	.comm	_g_layer_cw,4,2                 ; @g_layer_cw
	.comm	_g_layer_ch,4,2                 ; @g_layer_ch
	.comm	_g_osd_fps_x,4,2                ; @g_osd_fps_x
	.comm	_g_osd_y,4,2                    ; @g_osd_y
	.comm	_layer_fb,4,2                   ; @layer_fb
	.comm	_PDF_RGB555,4,2                 ; @PDF_RGB555
.subsections_via_symbols
