	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function GetOutArea
_GetOutArea:                            ## @GetOutArea
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_VIDEOMODE_horizontal_area@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$131, %eax
	je	LBB0_5
## %bb.1:
	cmpl	$132, %eax
	je	LBB0_4
## %bb.2:
	cmpl	$133, %eax
	jne	LBB0_3
## %bb.6:
	movq	_VIDEOMODE_MAX_HORIZONTAL_AREA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_VIDEOMODE_custom_horizontal_area@GOTPCREL(%rip), %rax
	movl	%edi, (%rax)
	jmp	LBB0_7
LBB0_4:
	movq	_VIDEOMODE_custom_horizontal_area@GOTPCREL(%rip), %rax
	movl	$320, (%rax)                    ## imm = 0x140
	movl	$320, %edi                      ## imm = 0x140
	jmp	LBB0_7
LBB0_5:
	movq	_VIDEOMODE_custom_horizontal_area@GOTPCREL(%rip), %rax
	movl	$336, (%rax)                    ## imm = 0x150
	movl	$336, %edi                      ## imm = 0x150
	jmp	LBB0_7
LBB0_3:
	movq	_VIDEOMODE_custom_horizontal_area@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
LBB0_7:
	movq	_display_modes@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	leaq	(,%r15,8), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	imull	(%rax,%rcx), %edi
	movl	%edi, (%rbx)
	movl	4(%rax,%rcx), %eax
	cmpl	%eax, %edi
	cmovael	%eax, %edi
	movl	%edi, (%rbx)
	movq	(%r12), %rax
	callq	*8(%rax,%rcx)
	movl	%eax, (%rbx)
	movq	_VIDEOMODE_vertical_area@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$128, %eax
	je	LBB0_12
## %bb.8:
	cmpl	$129, %eax
	je	LBB0_11
## %bb.9:
	cmpl	$130, %eax
	jne	LBB0_10
## %bb.15:
	movq	_VIDEOMODE_MAX_VERTICAL_AREA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_VIDEOMODE_custom_vertical_area@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_16
LBB0_11:
	movq	_VIDEOMODE_custom_vertical_area@GOTPCREL(%rip), %rax
	movl	$200, (%rax)
	movl	$200, %eax
	jmp	LBB0_16
LBB0_12:
	movq	_Atari800_tv_mode@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_Atari800_TV_NTSC@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_14
## %bb.13:
	movq	_VIDEOMODE_custom_vertical_area@GOTPCREL(%rip), %rax
	movl	$224, (%rax)
	movl	$224, %eax
	jmp	LBB0_16
LBB0_10:
	movq	_VIDEOMODE_custom_vertical_area@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_16
LBB0_14:
	movq	_VIDEOMODE_custom_vertical_area@GOTPCREL(%rip), %rax
	movl	$240, (%rax)
	movl	$240, %eax
LBB0_16:
	movl	%eax, (%r14)
	movq	(%r12), %rcx
	leaq	(%r15,%r15,2), %rdx
	movl	16(%rcx,%rdx,8), %ecx
	cmpl	%ecx, %eax
	cmovbl	%eax, %ecx
	movl	%ecx, (%r14)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VIDEOMODE_horizontal_area,4,2  ## @VIDEOMODE_horizontal_area
	.comm	_VIDEOMODE_custom_horizontal_area,4,2 ## @VIDEOMODE_custom_horizontal_area
	.comm	_VIDEOMODE_MAX_HORIZONTAL_AREA,4,2 ## @VIDEOMODE_MAX_HORIZONTAL_AREA
	.comm	_display_modes,8,3              ## @display_modes
	.comm	_VIDEOMODE_vertical_area,4,2    ## @VIDEOMODE_vertical_area
	.comm	_VIDEOMODE_custom_vertical_area,4,2 ## @VIDEOMODE_custom_vertical_area
	.comm	_Atari800_tv_mode,4,2           ## @Atari800_tv_mode
	.comm	_Atari800_TV_NTSC,4,2           ## @Atari800_TV_NTSC
	.comm	_VIDEOMODE_MAX_VERTICAL_AREA,4,2 ## @VIDEOMODE_MAX_VERTICAL_AREA
	.no_dead_strip	_GetOutArea
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function GetOutArea
_GetOutArea:                            ; @GetOutArea
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _VIDEOMODE_horizontal_area@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VIDEOMODE_horizontal_area@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #131
	b.eq	LBB0_5
; %bb.1:
	cmp	w8, #132
	b.eq	LBB0_4
; %bb.2:
	cmp	w8, #133
	b.ne	LBB0_7
; %bb.3:
Lloh3:
	adrp	x8, _VIDEOMODE_MAX_HORIZONTAL_AREA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VIDEOMODE_MAX_HORIZONTAL_AREA@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _VIDEOMODE_custom_horizontal_area@GOTPAGE
Lloh7:
	ldr	x9, [x9, _VIDEOMODE_custom_horizontal_area@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh8:
	adrp	x9, _VIDEOMODE_custom_horizontal_area@GOTPAGE
Lloh9:
	ldr	x9, [x9, _VIDEOMODE_custom_horizontal_area@GOTPAGEOFF]
	mov	w8, #320
	b	LBB0_6
LBB0_5:
Lloh10:
	adrp	x9, _VIDEOMODE_custom_horizontal_area@GOTPAGE
Lloh11:
	ldr	x9, [x9, _VIDEOMODE_custom_horizontal_area@GOTPAGEOFF]
	mov	w8, #336
LBB0_6:
	str	w8, [x9]
	b	LBB0_8
LBB0_7:
Lloh12:
	adrp	x8, _VIDEOMODE_custom_horizontal_area@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VIDEOMODE_custom_horizontal_area@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
LBB0_8:
Lloh15:
	adrp	x22, _display_modes@GOTPAGE
Lloh16:
	ldr	x22, [x22, _display_modes@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x10, x20, x20, lsl #1
	lsl	x10, x10, #3
	add	x9, x9, x10
	ldr	w11, [x9]
	mul	w8, w11, w8
	str	w8, [x21]
	ldr	w9, [x9, #4]
	cmp	w8, w9
	csel	w0, w8, w9, lo
	str	w0, [x21]
	ldr	x8, [x22]
	add	x8, x8, x10
	ldr	x8, [x8, #8]
	blr	x8
	str	w0, [x21]
Lloh17:
	adrp	x8, _VIDEOMODE_vertical_area@GOTPAGE
Lloh18:
	ldr	x8, [x8, _VIDEOMODE_vertical_area@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w8, #128
	b.eq	LBB0_13
; %bb.9:
	cmp	w8, #129
	b.eq	LBB0_12
; %bb.10:
	cmp	w8, #130
	b.ne	LBB0_15
; %bb.11:
Lloh20:
	adrp	x8, _VIDEOMODE_MAX_VERTICAL_AREA@GOTPAGE
Lloh21:
	ldr	x8, [x8, _VIDEOMODE_MAX_VERTICAL_AREA@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _VIDEOMODE_custom_vertical_area@GOTPAGE
Lloh24:
	ldr	x9, [x9, _VIDEOMODE_custom_vertical_area@GOTPAGEOFF]
	b	LBB0_17
LBB0_12:
Lloh25:
	adrp	x9, _VIDEOMODE_custom_vertical_area@GOTPAGE
Lloh26:
	ldr	x9, [x9, _VIDEOMODE_custom_vertical_area@GOTPAGEOFF]
	mov	w8, #200
	b	LBB0_17
LBB0_13:
Lloh27:
	adrp	x8, _Atari800_tv_mode@GOTPAGE
Lloh28:
	ldr	x8, [x8, _Atari800_tv_mode@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
Lloh30:
	adrp	x9, _Atari800_TV_NTSC@GOTPAGE
Lloh31:
	ldr	x9, [x9, _Atari800_TV_NTSC@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_16
; %bb.14:
Lloh33:
	adrp	x9, _VIDEOMODE_custom_vertical_area@GOTPAGE
Lloh34:
	ldr	x9, [x9, _VIDEOMODE_custom_vertical_area@GOTPAGEOFF]
	mov	w8, #224
	b	LBB0_17
LBB0_15:
Lloh35:
	adrp	x8, _VIDEOMODE_custom_vertical_area@GOTPAGE
Lloh36:
	ldr	x8, [x8, _VIDEOMODE_custom_vertical_area@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	b	LBB0_18
LBB0_16:
Lloh38:
	adrp	x9, _VIDEOMODE_custom_vertical_area@GOTPAGE
Lloh39:
	ldr	x9, [x9, _VIDEOMODE_custom_vertical_area@GOTPAGEOFF]
	mov	w8, #240
LBB0_17:
	str	w8, [x9]
LBB0_18:
	str	w8, [x19]
	ldr	x9, [x22]
	mov	w10, #24
	madd	x9, x20, x10, x9
	ldr	w9, [x9, #16]
	cmp	w8, w9
	csel	w8, w8, w9, lo
	str	w8, [x19]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_VIDEOMODE_horizontal_area,4,2  ; @VIDEOMODE_horizontal_area
	.comm	_VIDEOMODE_custom_horizontal_area,4,2 ; @VIDEOMODE_custom_horizontal_area
	.comm	_VIDEOMODE_MAX_HORIZONTAL_AREA,4,2 ; @VIDEOMODE_MAX_HORIZONTAL_AREA
	.comm	_display_modes,8,3              ; @display_modes
	.comm	_VIDEOMODE_vertical_area,4,2    ; @VIDEOMODE_vertical_area
	.comm	_VIDEOMODE_custom_vertical_area,4,2 ; @VIDEOMODE_custom_vertical_area
	.comm	_Atari800_tv_mode,4,2           ; @Atari800_tv_mode
	.comm	_Atari800_TV_NTSC,4,2           ; @Atari800_TV_NTSC
	.comm	_VIDEOMODE_MAX_VERTICAL_AREA,4,2 ; @VIDEOMODE_MAX_VERTICAL_AREA
	.no_dead_strip	_GetOutArea
.subsections_via_symbols
