	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function VIDDCVdp2SetResolution
_VIDDCVdp2SetResolution:                ## @VIDDCVdp2SetResolution
	.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, %ecx
	movl	%edi, %edx
	andl	$3, %edx
	movl	$320, %esi                      ## imm = 0x140
	xorl	%r8d, %r8d
	leaq	LJTI0_0(%rip), %rdi
	movslq	(%rdi,%rdx,4), %rdx
	addq	%rdi, %rdx
	xorl	%edi, %edi
	jmpq	*%rdx
LBB0_1:
	movl	$352, %esi                      ## imm = 0x160
	xorl	%edi, %edi
	jmp	LBB0_5
LBB0_2:
	movl	$640, %esi                      ## imm = 0x280
	jmp	LBB0_4
LBB0_3:
	movl	$704, %esi                      ## imm = 0x2C0
LBB0_4:
	movb	$1, %dil
LBB0_5:
	movl	%ecx, %eax
	shrl	$4, %eax
	andl	$3, %eax
	movl	%eax, %edx
	shll	$4, %edx
	addl	$224, %edx
	cmpl	$3, %eax
	cmovel	%r8d, %edx
	shrb	$7, %cl
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edx
	movq	_vdp2width@GOTPCREL(%rip), %rax
	movl	%esi, (%rax)
	movq	_vdp2height@GOTPCREL(%rip), %rax
	movl	%edx, (%rax)
	testb	%dil, %dil
	jne	LBB0_8
## %bb.6:
	cmpl	$257, %edx                      ## imm = 0x101
	jae	LBB0_8
## %bb.7:
	popq	%rbp
	retq
LBB0_8:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	leaq	L_str(%rip), %rdi
	callq	_puts
	movl	$-1, %edi
	callq	_exit
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_1, LBB0_1-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
LJTI0_0:
	.long	L0_0_set_5
	.long	L0_0_set_1
	.long	L0_0_set_2
	.long	L0_0_set_3
	.end_data_region
                                        ## -- End function
	.comm	_vdp2width,4,2                  ## @vdp2width
	.comm	_vdp2height,4,2                 ## @vdp2height
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported resolution set %d x %d\n"

L_str:                                  ## @str
	.asciz	"Bailing out!"

	.no_dead_strip	_VIDDCVdp2SetResolution
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function VIDDCVdp2SetResolution
_VIDDCVdp2SetResolution:                ; @VIDDCVdp2SetResolution
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	and	w10, w0, #0x3
	mov	w8, #320
	mov	w9, #0
Lloh0:
	adrp	x11, lJTI0_0@PAGE
Lloh1:
	add	x11, x11, lJTI0_0@PAGEOFF
	adr	x12, LBB0_1
	ldrb	w13, [x11, x10]
	add	x12, x12, x13, lsl #2
	br	x12
LBB0_1:
	mov	w9, #0
	mov	w8, #352
	b	LBB0_5
LBB0_2:
	mov	w8, #640
	b	LBB0_4
LBB0_3:
	mov	w8, #704
LBB0_4:
	mov	w9, #1
LBB0_5:
	ubfx	w10, w0, #4, #2
	lsl	w11, w10, #4
	add	w11, w11, #224
	cmp	w10, #3
	csel	w10, wzr, w11, eq
	ubfx	w11, w0, #7, #1
	lsl	w10, w10, w11
Lloh2:
	adrp	x11, _vdp2width@GOTPAGE
Lloh3:
	ldr	x11, [x11, _vdp2width@GOTPAGEOFF]
Lloh4:
	str	w8, [x11]
Lloh5:
	adrp	x11, _vdp2height@GOTPAGE
Lloh6:
	ldr	x11, [x11, _vdp2height@GOTPAGEOFF]
Lloh7:
	str	w10, [x11]
	tbnz	w9, #0, LBB0_8
; %bb.6:
	cmp	w10, #257
	b.hs	LBB0_8
; %bb.7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
LBB0_8:
	stp	x8, x10, [sp]
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
Lloh10:
	adrp	x0, l_str@PAGE
Lloh11:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	mov	w0, #-1
	bl	_exit
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_5-LBB0_1)>>2
	.byte	(LBB0_1-LBB0_1)>>2
	.byte	(LBB0_2-LBB0_1)>>2
	.byte	(LBB0_3-LBB0_1)>>2
                                        ; -- End function
	.comm	_vdp2width,4,2                  ; @vdp2width
	.comm	_vdp2height,4,2                 ; @vdp2height
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported resolution set %d x %d\n"

l_str:                                  ; @str
	.asciz	"Bailing out!"

	.no_dead_strip	_VIDDCVdp2SetResolution
.subsections_via_symbols
