	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VIDSoftVdp2SetResolution       ## -- Begin function VIDSoftVdp2SetResolution
	.p2align	4, 0x90
_VIDSoftVdp2SetResolution:              ## @VIDSoftVdp2SetResolution
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	%edi, %eax
	movl	%edi, %ecx
	andl	$7, %ecx
	leaq	l_switch.table.VIDSoftVdp2SetResolution(%rip), %rdx
	movl	(%rdx,%rcx,4), %edi
	leaq	l_switch.table.VIDSoftVdp2SetResolution.1(%rip), %rdx
	movl	(%rdx,%rcx,4), %edx
	movq	_vdp2width@GOTPCREL(%rip), %rsi
	movl	%edi, (%rsi)
	movq	_rbg0width@GOTPCREL(%rip), %rsi
	movl	%edx, (%rsi)
	movl	$204, %edx
	xorl	%esi, %esi
	btl	%ecx, %edx
	setb	%sil
	movq	_vdp2_x_hires@GOTPCREL(%rip), %rcx
	movl	%esi, (%rcx)
	movl	%eax, %ecx
	shrl	$4, %ecx
	andl	$3, %ecx
	cmpl	$3, %ecx
	je	LBB0_2
## %bb.1:
	shll	$4, %ecx
	addl	$224, %ecx
	movq	_vdp2height@GOTPCREL(%rip), %rdx
	movl	%ecx, (%rdx)
	movq	_rbg0height@GOTPCREL(%rip), %rdx
	movl	%ecx, (%rdx)
LBB0_2:
	notl	%eax
	xorl	%ecx, %ecx
	movq	_vdp2height@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	testb	$-64, %al
	jne	LBB0_4
## %bb.3:
	addl	%esi, %esi
	movl	%esi, (%rdx)
	movl	$1, %ecx
LBB0_4:
	movq	_vdp2_interlace@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
	popq	%rbp
	jmp	_TitanSetResolution             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_vdp2width,4,2                  ## @vdp2width
	.comm	_rbg0width,4,2                  ## @rbg0width
	.comm	_vdp2_x_hires,4,2               ## @vdp2_x_hires
	.comm	_vdp2height,4,2                 ## @vdp2height
	.comm	_rbg0height,4,2                 ## @rbg0height
	.comm	_vdp2_interlace,4,2             ## @vdp2_interlace
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.VIDSoftVdp2SetResolution
l_switch.table.VIDSoftVdp2SetResolution:
	.long	320                             ## 0x140
	.long	352                             ## 0x160
	.long	640                             ## 0x280
	.long	704                             ## 0x2c0
	.long	320                             ## 0x140
	.long	352                             ## 0x160
	.long	640                             ## 0x280
	.long	704                             ## 0x2c0

	.p2align	2                               ## @switch.table.VIDSoftVdp2SetResolution.1
l_switch.table.VIDSoftVdp2SetResolution.1:
	.long	320                             ## 0x140
	.long	352                             ## 0x160
	.long	320                             ## 0x140
	.long	352                             ## 0x160
	.long	320                             ## 0x140
	.long	352                             ## 0x160
	.long	320                             ## 0x140
	.long	352                             ## 0x160

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VIDSoftVdp2SetResolution       ; -- Begin function VIDSoftVdp2SetResolution
	.p2align	2
_VIDSoftVdp2SetResolution:              ; @VIDSoftVdp2SetResolution
	.cfi_startproc
; %bb.0:
	mov	x8, x0
	and	w9, w0, #0x7
	lsl	x10, x9, #2
Lloh0:
	adrp	x11, l_switch.table.VIDSoftVdp2SetResolution@PAGE
Lloh1:
	add	x11, x11, l_switch.table.VIDSoftVdp2SetResolution@PAGEOFF
	ldr	w0, [x11, x10]
Lloh2:
	adrp	x11, l_switch.table.VIDSoftVdp2SetResolution.1@PAGE
Lloh3:
	add	x11, x11, l_switch.table.VIDSoftVdp2SetResolution.1@PAGEOFF
	ldr	w10, [x11, x10]
Lloh4:
	adrp	x11, _vdp2width@GOTPAGE
Lloh5:
	ldr	x11, [x11, _vdp2width@GOTPAGEOFF]
Lloh6:
	adrp	x12, _rbg0width@GOTPAGE
Lloh7:
	ldr	x12, [x12, _rbg0width@GOTPAGEOFF]
Lloh8:
	str	w0, [x11]
Lloh9:
	str	w10, [x12]
	mov	w10, #204
	lsr	w9, w10, w9
Lloh10:
	adrp	x10, _vdp2_x_hires@GOTPAGE
Lloh11:
	ldr	x10, [x10, _vdp2_x_hires@GOTPAGEOFF]
	and	w9, w9, #0x1
Lloh12:
	str	w9, [x10]
	ubfx	w10, w8, #4, #2
Lloh13:
	adrp	x9, _vdp2height@GOTPAGE
Lloh14:
	ldr	x9, [x9, _vdp2height@GOTPAGEOFF]
	cmp	w10, #3
	b.eq	LBB0_2
; %bb.1:
	lsl	w10, w10, #4
	add	w10, w10, #224
	str	w10, [x9]
Lloh15:
	adrp	x11, _rbg0height@GOTPAGE
Lloh16:
	ldr	x11, [x11, _rbg0height@GOTPAGEOFF]
Lloh17:
	str	w10, [x11]
LBB0_2:
	mvn	w8, w8
	ldr	w1, [x9]
	tst	w8, #0xc0
	b.ne	LBB0_4
; %bb.3:
	lsl	w1, w1, #1
	str	w1, [x9]
	mov	w8, #1
	b	LBB0_5
LBB0_4:
	mov	w8, #0
LBB0_5:
Lloh18:
	adrp	x9, _vdp2_interlace@GOTPAGE
Lloh19:
	ldr	x9, [x9, _vdp2_interlace@GOTPAGEOFF]
Lloh20:
	str	w8, [x9]
	b	_TitanSetResolution
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotStr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh9
	.loh AdrpLdrGotStr	Lloh4, Lloh5, Lloh8
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotStr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotStr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_vdp2width,4,2                  ; @vdp2width
	.comm	_rbg0width,4,2                  ; @rbg0width
	.comm	_vdp2_x_hires,4,2               ; @vdp2_x_hires
	.comm	_vdp2height,4,2                 ; @vdp2height
	.comm	_rbg0height,4,2                 ; @rbg0height
	.comm	_vdp2_interlace,4,2             ; @vdp2_interlace
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.VIDSoftVdp2SetResolution
l_switch.table.VIDSoftVdp2SetResolution:
	.long	320                             ; 0x140
	.long	352                             ; 0x160
	.long	640                             ; 0x280
	.long	704                             ; 0x2c0
	.long	320                             ; 0x140
	.long	352                             ; 0x160
	.long	640                             ; 0x280
	.long	704                             ; 0x2c0

	.p2align	2                               ; @switch.table.VIDSoftVdp2SetResolution.1
l_switch.table.VIDSoftVdp2SetResolution.1:
	.long	320                             ; 0x140
	.long	352                             ; 0x160
	.long	320                             ; 0x140
	.long	352                             ; 0x160
	.long	320                             ; 0x140
	.long	352                             ; 0x160
	.long	320                             ; 0x140
	.long	352                             ; 0x160

.subsections_via_symbols
