	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_draw_partial_scanline          ## -- Begin function draw_partial_scanline
	.p2align	4, 0x90
_draw_partial_scanline:                 ## @draw_partial_scanline
	.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	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r13d
	movl	%edi, %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_left_border_chars@GOTPCREL(%rip), %r9
	movq	_LCHOP@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_RCHOP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shll	$2, %esi
	movl	$192, %ecx
	movq	_chars_displayed@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	_md@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rdx,%rax,4), %r12d
	movq	_NORMAL1@GOTPCREL(%rip), %rdi
	movq	_SCROLL1@GOTPCREL(%rip), %rdx
	cmpq	(%rdi), %rax
	je	LBB0_2
## %bb.1:
	cmpq	(%rdx), %rax
	je	LBB0_2
## %bb.3:
	movq	_NORMAL2@GOTPCREL(%rip), %r8
	movq	_SCROLL2@GOTPCREL(%rip), %rdi
	leal	(,%r12,4), %edx
	cmpq	(%rdi), %rax
	cmovel	%edx, %r12d
	cmpq	(%r8), %rax
	cmovel	%edx, %r12d
	jmp	LBB0_4
LBB0_2:
	addl	%r12d, %r12d
LBB0_4:
	movl	(%r9), %r8d
	leal	(,%r14,4), %edi
	subl	%esi, %ecx
	movq	_anticmode@GOTPCREL(%rip), %rdx
	cmpl	$2, (%rdx)
	jl	LBB0_7
## %bb.5:
	movq	_ANTIC_DMACTL@GOTPCREL(%rip), %rsi
	testb	$3, (%rsi)
	je	LBB0_7
## %bb.6:
	addl	%r8d, %r14d
	shll	$2, %r14d
	xorl	%edx, %edx
	jmp	LBB0_8
LBB0_7:
	movl	$1, %edx
	movl	%ecx, %r14d
LBB0_8:
	cmpl	%ebx, %ecx
	cmovll	%ecx, %ebx
	cmpl	%r13d, %ecx
	cmovll	%ecx, %r13d
	cmpl	%edi, %ebx
	cmovlel	%edi, %ebx
	cmpl	%edi, %r13d
	cmovlel	%edi, %r13d
	cmpl	%r13d, %ebx
	jge	LBB0_39
## %bb.9:
	movq	_right_border_start@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	cmpl	%r14d, %ebx
	movl	%esi, -148(%rbp)                ## 4-byte Spill
	movl	%r8d, -168(%rbp)                ## 4-byte Spill
	jge	LBB0_12
## %bb.10:
	movl	%edx, -132(%rbp)                ## 4-byte Spill
	movl	%ebx, %r15d
	andl	$-4, %r15d
	movl	%ebx, %edx
	andl	$3, %edx
	movq	_left_border_start@GOTPCREL(%rip), %rcx
	movl	%r15d, (%rcx)
	movl	%r15d, %ecx
	subl	%edi, %ecx
	leal	3(%rcx), %esi
	testl	%ecx, %ecx
	cmovnsl	%ecx, %esi
	sarl	$2, %esi
	movl	%r8d, %ecx
	subl	%esi, %ecx
	movl	%ecx, (%r9)
	movq	_x_min@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	xorl	%ecx, %ecx
	movq	%rcx, -144(%rbp)                ## 8-byte Spill
	movl	%ebx, %ecx
	subl	(%rsi,%rax,4), %ecx
	jle	LBB0_15
## %bb.11:
	leal	3(%rcx), %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	sarl	$2, %eax
	movq	%rax, -144(%rbp)                ## 8-byte Spill
	andl	$3, %ecx
	movl	%ebx, %eax
	subl	%ecx, %eax
	cmpl	%edx, %ecx
	cmoval	%eax, %r15d
	cmovbel	%edx, %ecx
	movl	%ecx, %edx
	jmp	LBB0_15
LBB0_12:
	cmpl	%esi, %ebx
	jge	LBB0_13
## %bb.14:
	movl	%edx, -132(%rbp)                ## 4-byte Spill
	movq	_x_min@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%rax,4), %eax
	movl	%ebx, %edx
	subl	%eax, %edx
	andl	$3, %edx
	movl	%ebx, %r15d
	subl	%edx, %r15d
	movl	%r15d, %ecx
	subl	%eax, %ecx
	leal	3(%rcx), %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	sarl	$2, %eax
	movq	%rax, -144(%rbp)                ## 8-byte Spill
	movq	_left_border_chars@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	jmp	LBB0_15
LBB0_13:
	movl	%ebx, %r15d
	andl	$-4, %r15d
	movl	%ebx, %edx
	andl	$3, %edx
	movl	%r15d, (%rcx)
	xorl	%eax, %eax
	movq	%rax, -144(%rbp)                ## 8-byte Spill
	movl	$1, -132(%rbp)                  ## 4-byte Folded Spill
LBB0_15:
	movq	_scrn_ptr@GOTPCREL(%rip), %rcx
	movslq	%r15d, %rax
	shlq	$2, %rax
	movq	(%rcx), %rsi
	movq	%rax, -160(%rbp)                ## 8-byte Spill
	addq	%rax, %rsi
	shll	$2, %edx
	leaq	-64(%rbp), %rdi
	movl	%edx, -164(%rbp)                ## 4-byte Spill
	callq	_memcpy
	cmpl	%r14d, %r13d
	jle	LBB0_16
## %bb.21:
	movq	_need_load@GOTPCREL(%rip), %r15
	cmpq	$0, (%r15)
	je	LBB0_23
## %bb.22:
	xorl	%eax, %eax
	callq	_antic_load
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
LBB0_23:
	cmpl	-148(%rbp), %r13d               ## 4-byte Folded Reload
	jle	LBB0_25
## %bb.24:
	leal	3(%r13), %eax
	andl	$-4, %eax
	movq	_right_border_end@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_left_border_chars@GOTPCREL(%rip), %r15
	movq	_md@GOTPCREL(%rip), %rdx
	cmpl	$0, -132(%rbp)                  ## 4-byte Folded Reload
	jne	LBB0_17
	jmp	LBB0_27
LBB0_16:
	leal	3(%r13), %eax
	leal	6(%r13), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	leal	3(%r15), %eax
	testl	%r15d, %r15d
	cmovnsl	%r15d, %eax
	sarl	$2, %eax
	subl	%eax, %ecx
	movq	_left_border_chars@GOTPCREL(%rip), %r15
	movl	%ecx, (%r15)
	jmp	LBB0_17
LBB0_25:
	movq	_x_min@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_md@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rcx
	movl	%r13d, %r12d
	subl	(%rax,%rcx,4), %r12d
	leal	3(%r12), %eax
	addl	$6, %r12d
	testl	%eax, %eax
	cmovnsl	%eax, %r12d
	sarl	$2, %r12d
	movq	_left_border_chars@GOTPCREL(%rip), %r15
	cmpl	$0, -132(%rbp)                  ## 4-byte Folded Reload
	je	LBB0_27
LBB0_17:
	movq	_scrn_ptr@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	leaq	-128(%rbp), %rdi
	xorl	%edx, %edx
	callq	_memcpy
	movq	_anticmode@GOTPCREL(%rip), %rax
	cmpl	$2, (%rax)
	jl	LBB0_20
## %bb.18:
	movq	_ANTIC_DMACTL@GOTPCREL(%rip), %rax
	testb	$3, (%rax)
	je	LBB0_20
## %bb.19:
	cmpl	%r14d, %r13d
	jle	LBB0_20
## %bb.33:
	cmpl	-148(%rbp), %ebx                ## 4-byte Folded Reload
	movq	-160(%rbp), %r14                ## 8-byte Reload
	jl	LBB0_35
## %bb.34:
	movq	_right_border_start@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_left_border_start@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_35
LBB0_20:
	movq	_left_border_start@GOTPCREL(%rip), %rax
	movl	(%r15), %ecx
	shll	$2, %ecx
	addl	(%rax), %ecx
	movq	_right_border_end@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
	movq	-160(%rbp), %r14                ## 8-byte Reload
LBB0_35:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_draw_antic_0_ptr
	xorl	%r13d, %r13d
LBB0_38:
	shlq	$2, %rbx
	addq	(%r12), %rbx
	leaq	-128(%rbp), %rsi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_memcpy
	addq	(%r12), %r14
	leaq	-64(%rbp), %rsi
	movq	%r14, %rdi
	movl	-164(%rbp), %edx                ## 4-byte Reload
	callq	_memcpy
	movl	-168(%rbp), %eax                ## 4-byte Reload
	movl	%eax, (%r15)
	movq	_right_border_start@GOTPCREL(%rip), %rax
	movl	-148(%rbp), %ecx                ## 4-byte Reload
	movl	%ecx, (%rax)
	movq	_LCHOP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$2, %eax
	movq	_left_border_start@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_RCHOP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$2, %eax
	movl	$192, %ecx
	subl	%eax, %ecx
	movq	_right_border_end@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
LBB0_39:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_41
## %bb.40:
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	movq	(%rdx), %rax
	movq	_NORMAL1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_29
## %bb.28:
	movq	_SCROLL1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_29
## %bb.30:
	movq	_NORMAL2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	-144(%rbp), %rsi                ## 8-byte Reload
	je	LBB0_32
## %bb.31:
	movq	_SCROLL2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_32
## %bb.36:
	subl	%esi, %r12d
	leal	(,%rsi,4), %eax
	movl	%eax, -132(%rbp)                ## 4-byte Spill
	xorl	%eax, %eax
	xorl	%r13d, %r13d
	movq	%rsi, -144(%rbp)                ## 8-byte Spill
	jmp	LBB0_37
LBB0_29:
	movq	-144(%rbp), %rdi                ## 8-byte Reload
	movl	%edi, %ecx
	andl	$-2, %ecx
	movl	%edi, %r13d
	shll	$4, %r13d
	andl	$16, %r13d
	movq	_x_min@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	leal	(,%rcx,4), %esi
	movl	(%rdx,%rax,4), %eax
	movl	%esi, -132(%rbp)                ## 4-byte Spill
	addl	%esi, %eax
	incl	%r12d
	andl	$-2, %r12d
	subl	%ecx, %r12d
	sarl	%r12d
	sarl	%edi
	movq	%rdi, -144(%rbp)                ## 8-byte Spill
	jmp	LBB0_37
LBB0_32:
	movl	%esi, %ecx
	andl	$-4, %ecx
	shll	$4, %esi
	andl	$48, %esi
	movq	_x_min@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	leal	(,%rcx,4), %edi
	movl	(%rdx,%rax,4), %eax
	movl	%edi, -132(%rbp)                ## 4-byte Spill
	addl	%edi, %eax
	addl	$3, %r12d
	andl	$-4, %r12d
	subl	%ecx, %r12d
	leal	3(%r12), %edx
	testl	%r12d, %r12d
	cmovnsl	%r12d, %edx
	sarl	$2, %edx
	movl	%esi, %r13d
	leal	3(%rcx), %esi
	testl	%ecx, %ecx
	cmovnsl	%ecx, %esi
	sarl	$2, %esi
	movl	%edx, %r12d
	movl	%esi, %ecx
	movq	%rcx, -144(%rbp)                ## 8-byte Spill
LBB0_37:
	movslq	%eax, %rbx
	leaq	(,%rbx,4), %rsi
	movq	_scrn_ptr@GOTPCREL(%rip), %r14
	addq	(%r14), %rsi
	leaq	-128(%rbp), %rdi
	movl	%r13d, %edx
	callq	_memcpy
	movq	_antic_memory@GOTPCREL(%rip), %rax
	movq	_ANTIC_margin@GOTPCREL(%rip), %rcx
	movq	_ch_offset@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	_md@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rdi
	movslq	-144(%rbp), %rsi                ## 4-byte Folded Reload
	addq	(%rax), %rsi
	addq	(%rcx), %rsi
	addq	(%rdx,%rdi,8), %rsi
	movq	_x_min@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	(%rax,%rdi,4), %rcx
	leaq	(,%rcx,4), %rax
	addq	(%r14), %rax
	movslq	-132(%rbp), %rdi                ## 4-byte Folded Reload
	leaq	(%rax,%rdi,4), %rdx
	movq	_GTIA_pm_scanline@GOTPCREL(%rip), %rax
	addq	%rdi, %rcx
	shlq	$2, %rcx
	addq	(%rax), %rcx
	movl	%r12d, %edi
	movq	%r14, %r12
	callq	_draw_antic_ptr
	movq	-160(%rbp), %r14                ## 8-byte Reload
	jmp	LBB0_38
LBB0_41:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_left_border_chars,4,2          ## @left_border_chars
	.comm	_right_border_start,4,2         ## @right_border_start
	.comm	_LCHOP,4,2                      ## @LCHOP
	.comm	_RCHOP,4,2                      ## @RCHOP
	.comm	_chars_displayed,8,3            ## @chars_displayed
	.comm	_md,8,3                         ## @md
	.comm	_NORMAL1,8,3                    ## @NORMAL1
	.comm	_SCROLL1,8,3                    ## @SCROLL1
	.comm	_NORMAL2,8,3                    ## @NORMAL2
	.comm	_SCROLL2,8,3                    ## @SCROLL2
	.comm	_anticmode,4,2                  ## @anticmode
	.comm	_ANTIC_DMACTL,4,2               ## @ANTIC_DMACTL
	.comm	_left_border_start,4,2          ## @left_border_start
	.comm	_x_min,8,3                      ## @x_min
	.comm	_scrn_ptr,8,3                   ## @scrn_ptr
	.comm	_need_load,8,3                  ## @need_load
	.comm	_FALSE,8,3                      ## @FALSE
	.comm	_right_border_end,4,2           ## @right_border_end
	.comm	_antic_memory,8,3               ## @antic_memory
	.comm	_ANTIC_margin,8,3               ## @ANTIC_margin
	.comm	_ch_offset,8,3                  ## @ch_offset
	.comm	_GTIA_pm_scanline,8,3           ## @GTIA_pm_scanline
	.comm	_scanlines_to_curses_display,4,2 ## @scanlines_to_curses_display
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_draw_partial_scanline          ; -- Begin function draw_partial_scanline
	.p2align	2
_draw_partial_scanline:                 ; @draw_partial_scanline
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x28, x27, [sp, #112]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #128]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x15, _left_border_chars@GOTPAGE
Lloh4:
	ldr	x15, [x15, _left_border_chars@GOTPAGEOFF]
	stur	x8, [x29, #-88]
Lloh5:
	adrp	x8, _LCHOP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LCHOP@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x8]
Lloh8:
	adrp	x23, _RCHOP@GOTPAGE
Lloh9:
	ldr	x23, [x23, _RCHOP@GOTPAGEOFF]
	ldr	w9, [x23]
	mov	w11, #192
Lloh10:
	adrp	x8, _chars_displayed@GOTPAGE
Lloh11:
	ldr	x8, [x8, _chars_displayed@GOTPAGEOFF]
Lloh12:
	adrp	x13, _md@GOTPAGE
Lloh13:
	ldr	x13, [x13, _md@GOTPAGEOFF]
Lloh14:
	ldr	x12, [x8]
Lloh15:
	ldr	x8, [x13]
	ldr	w12, [x12, x8, lsl #2]
Lloh16:
	adrp	x13, _NORMAL1@GOTPAGE
Lloh17:
	ldr	x13, [x13, _NORMAL1@GOTPAGEOFF]
Lloh18:
	ldr	x13, [x13]
Lloh19:
	adrp	x14, _SCROLL1@GOTPAGE
Lloh20:
	ldr	x14, [x14, _SCROLL1@GOTPAGEOFF]
Lloh21:
	ldr	x14, [x14]
	cmp	x8, x13
	ccmp	x8, x14, #4, ne
	b.ne	LBB0_2
; %bb.1:
	lsl	w22, w12, #1
	b	LBB0_3
LBB0_2:
Lloh22:
	adrp	x13, _NORMAL2@GOTPAGE
Lloh23:
	ldr	x13, [x13, _NORMAL2@GOTPAGEOFF]
Lloh24:
	adrp	x14, _SCROLL2@GOTPAGE
Lloh25:
	ldr	x14, [x14, _SCROLL2@GOTPAGEOFF]
Lloh26:
	ldr	x13, [x13]
Lloh27:
	ldr	x14, [x14]
	cmp	x8, x14
	ccmp	x8, x13, #4, ne
	lsl	w13, w12, #2
	csel	w22, w13, w12, eq
LBB0_3:
	ldr	w25, [x15]
	sub	w11, w11, w9, lsl #2
	lsl	w9, w10, #2
Lloh28:
	adrp	x21, _anticmode@GOTPAGE
Lloh29:
	ldr	x21, [x21, _anticmode@GOTPAGEOFF]
	ldr	w12, [x21]
	cmp	w12, #2
	b.lt	LBB0_6
; %bb.4:
Lloh30:
	adrp	x12, _ANTIC_DMACTL@GOTPAGE
Lloh31:
	ldr	x12, [x12, _ANTIC_DMACTL@GOTPAGEOFF]
	ldrb	w12, [x12]
	tst	w12, #0x3
	b.eq	LBB0_6
; %bb.5:
	mov	w26, #0
	add	w10, w10, w25
	lsl	w24, w10, #2
	b	LBB0_7
LBB0_6:
	mov	w26, #1
	mov	x24, x11
LBB0_7:
	cmp	w11, w0
	csel	w10, w11, w0, lt
	cmp	w11, w1
	csel	w11, w11, w1, lt
	cmp	w10, w9
	csel	w27, w10, w9, gt
	cmp	w11, w9
	csel	w20, w11, w9, gt
	cmp	w27, w20
	b.ge	LBB0_28
; %bb.8:
Lloh32:
	adrp	x10, _right_border_start@GOTPAGE
Lloh33:
	ldr	x10, [x10, _right_border_start@GOTPAGEOFF]
	ldr	w11, [x10]
Lloh34:
	adrp	x12, _left_border_start@GOTPAGE
Lloh35:
	ldr	x12, [x12, _left_border_start@GOTPAGEOFF]
	cmp	w27, w24
	str	w11, [sp, #20]                  ; 4-byte Folded Spill
	b.ge	LBB0_10
; %bb.9:
	and	w10, w27, #0xfffffffc
	and	w11, w27, #0x3
	str	w10, [x12]
	sub	w9, w10, w9
	add	w12, w9, #3
	cmp	w9, #0
	csel	w9, w12, w9, lt
	sub	w9, w25, w9, asr #2
Lloh36:
	adrp	x12, _x_min@GOTPAGE
Lloh37:
	ldr	x12, [x12, _x_min@GOTPAGEOFF]
	str	w9, [x15]
Lloh38:
	ldr	x9, [x12]
	ldr	w8, [x9, x8, lsl #2]
	sub	w9, w27, w8
	add	w12, w9, #3
	cmp	w9, #0
	csel	w12, w12, w9, lt
	asr	w12, w12, #2
	and	w9, w9, #0x3
	sub	w13, w27, w9
	cmp	w9, w11
	csel	w13, w13, w10, hi
	csel	w9, w9, w11, hi
	cmp	w27, w8
	csel	w8, wzr, w12, le
	str	w8, [sp, #16]                   ; 4-byte Folded Spill
	csel	w8, w10, w13, le
	csel	w9, w11, w9, le
	b	LBB0_13
LBB0_10:
	cmp	w27, w11
	b.ge	LBB0_12
; %bb.11:
Lloh39:
	adrp	x9, _x_min@GOTPAGE
Lloh40:
	ldr	x9, [x9, _x_min@GOTPAGEOFF]
Lloh41:
	ldr	x9, [x9]
	ldr	w10, [x9, x8, lsl #2]
	sub	w8, w27, w10
	and	w9, w8, #0x3
	sub	w8, w27, w9
	sub	w10, w8, w10
	add	w11, w10, #3
	cmp	w10, #0
	csel	w10, w11, w10, lt
	asr	w10, w10, #2
	str	w10, [sp, #16]                  ; 4-byte Folded Spill
	str	wzr, [x15]
	b	LBB0_13
LBB0_12:
	str	wzr, [sp, #16]                  ; 4-byte Folded Spill
	and	w8, w27, #0xfffffffc
	and	w9, w27, #0x3
	str	w8, [x10]
	mov	w26, #1
LBB0_13:
Lloh42:
	adrp	x10, _scrn_ptr@GOTPAGE
Lloh43:
	ldr	x10, [x10, _scrn_ptr@GOTPAGEOFF]
Lloh44:
	ldr	x10, [x10]
	sxtw	x28, w8
	add	x1, x10, w8, sxtw #2
	lsl	w19, w9, #2
	add	x0, sp, #88
	mov	x2, x19
	bl	_memcpy
	cmp	w20, w24
	b.le	LBB0_18
; %bb.14:
Lloh45:
	adrp	x23, _need_load@GOTPAGE
Lloh46:
	ldr	x23, [x23, _need_load@GOTPAGEOFF]
	ldr	x8, [x23]
	cbz	x8, LBB0_16
; %bb.15:
	bl	_antic_load
Lloh47:
	adrp	x8, _FALSE@GOTPAGE
Lloh48:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh49:
	ldr	x8, [x8]
	str	x8, [x23]
LBB0_16:
	ldr	w8, [sp, #20]                   ; 4-byte Folded Reload
	cmp	w20, w8
	b.le	LBB0_19
; %bb.17:
	add	w8, w20, #3
	and	w8, w8, #0xfffffffc
Lloh50:
	adrp	x9, _right_border_end@GOTPAGE
Lloh51:
	ldr	x9, [x9, _right_border_end@GOTPAGEOFF]
Lloh52:
	str	w8, [x9]
Lloh53:
	adrp	x23, _RCHOP@GOTPAGE
Lloh54:
	ldr	x23, [x23, _RCHOP@GOTPAGEOFF]
Lloh55:
	adrp	x10, _md@GOTPAGE
Lloh56:
	ldr	x10, [x10, _md@GOTPAGEOFF]
	cbnz	w26, LBB0_20
	b	LBB0_30
LBB0_18:
	add	w8, w20, #3
	add	w9, w20, #6
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #2
	add	w9, w28, #3
	cmp	w28, #0
	csel	w9, w9, w28, lt
	sub	w8, w8, w9, asr #2
Lloh57:
	adrp	x9, _left_border_chars@GOTPAGE
Lloh58:
	ldr	x9, [x9, _left_border_chars@GOTPAGEOFF]
Lloh59:
	str	w8, [x9]
	b	LBB0_20
LBB0_19:
Lloh60:
	adrp	x8, _x_min@GOTPAGE
Lloh61:
	ldr	x8, [x8, _x_min@GOTPAGEOFF]
Lloh62:
	ldr	x8, [x8]
Lloh63:
	adrp	x10, _md@GOTPAGE
Lloh64:
	ldr	x10, [x10, _md@GOTPAGEOFF]
	ldr	x9, [x10]
	ldr	w8, [x8, x9, lsl #2]
	sub	w8, w20, w8
	add	w9, w8, #3
	add	w8, w8, #6
	cmp	w9, #0
	csel	w8, w8, w9, lt
	asr	w22, w8, #2
Lloh65:
	adrp	x23, _RCHOP@GOTPAGE
Lloh66:
	ldr	x23, [x23, _RCHOP@GOTPAGEOFF]
	cbz	w26, LBB0_30
LBB0_20:
Lloh67:
	adrp	x8, _scrn_ptr@GOTPAGE
Lloh68:
	ldr	x8, [x8, _scrn_ptr@GOTPAGEOFF]
Lloh69:
	ldr	x1, [x8]
	add	x0, sp, #24
	mov	w2, #0
	bl	_memcpy
	ldr	w8, [x21]
	cmp	w8, #2
	b.lt	LBB0_25
; %bb.21:
Lloh70:
	adrp	x8, _ANTIC_DMACTL@GOTPAGE
Lloh71:
	ldr	x8, [x8, _ANTIC_DMACTL@GOTPAGEOFF]
	ldrb	w8, [x8]
	tst	w8, #0x3
	b.eq	LBB0_25
; %bb.22:
	cmp	w20, w24
	b.le	LBB0_25
; %bb.23:
	ldr	w8, [sp, #20]                   ; 4-byte Folded Reload
	cmp	w27, w8
Lloh72:
	adrp	x24, _left_border_start@GOTPAGE
Lloh73:
	ldr	x24, [x24, _left_border_start@GOTPAGEOFF]
Lloh74:
	adrp	x26, _right_border_end@GOTPAGE
Lloh75:
	ldr	x26, [x26, _right_border_end@GOTPAGEOFF]
	b.lt	LBB0_26
; %bb.24:
Lloh76:
	adrp	x8, _right_border_start@GOTPAGE
Lloh77:
	ldr	x8, [x8, _right_border_start@GOTPAGEOFF]
Lloh78:
	ldr	w8, [x8]
	str	w8, [x24]
	b	LBB0_26
LBB0_25:
Lloh79:
	adrp	x24, _left_border_start@GOTPAGE
Lloh80:
	ldr	x24, [x24, _left_border_start@GOTPAGEOFF]
	ldr	w8, [x24]
Lloh81:
	adrp	x9, _left_border_chars@GOTPAGE
Lloh82:
	ldr	x9, [x9, _left_border_chars@GOTPAGEOFF]
Lloh83:
	ldr	w9, [x9]
	add	w8, w8, w9, lsl #2
Lloh84:
	adrp	x26, _right_border_end@GOTPAGE
Lloh85:
	ldr	x26, [x26, _right_border_end@GOTPAGEOFF]
	str	w8, [x26]
LBB0_26:
	bl	_draw_antic_0_ptr
	mov	x22, #0
	mov	w20, #0
LBB0_27:
Lloh86:
	adrp	x21, _scrn_ptr@GOTPAGE
Lloh87:
	ldr	x21, [x21, _scrn_ptr@GOTPAGEOFF]
	ldr	x8, [x21]
	add	x0, x8, x22, lsl #2
	add	x1, sp, #24
	mov	x2, x20
	bl	_memcpy
	ldr	x8, [x21]
	add	x0, x8, x28, lsl #2
	add	x1, sp, #88
	mov	x2, x19
	bl	_memcpy
Lloh88:
	adrp	x8, _left_border_chars@GOTPAGE
Lloh89:
	ldr	x8, [x8, _left_border_chars@GOTPAGEOFF]
Lloh90:
	str	w25, [x8]
Lloh91:
	adrp	x8, _right_border_start@GOTPAGE
Lloh92:
	ldr	x8, [x8, _right_border_start@GOTPAGEOFF]
	ldr	w9, [sp, #20]                   ; 4-byte Folded Reload
Lloh93:
	str	w9, [x8]
Lloh94:
	adrp	x8, _LCHOP@GOTPAGE
Lloh95:
	ldr	x8, [x8, _LCHOP@GOTPAGEOFF]
Lloh96:
	ldr	w8, [x8]
	lsl	w8, w8, #2
	str	w8, [x24]
	ldr	w8, [x23]
	mov	w9, #192
	sub	w8, w9, w8, lsl #2
	str	w8, [x26]
LBB0_28:
	ldur	x8, [x29, #-88]
Lloh97:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh98:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh99:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_39
; %bb.29:
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #128]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
LBB0_30:
	ldr	x8, [x10]
Lloh100:
	adrp	x9, _NORMAL1@GOTPAGE
Lloh101:
	ldr	x9, [x9, _NORMAL1@GOTPAGEOFF]
Lloh102:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_35
; %bb.31:
Lloh103:
	adrp	x9, _SCROLL1@GOTPAGE
Lloh104:
	ldr	x9, [x9, _SCROLL1@GOTPAGEOFF]
Lloh105:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_35
; %bb.32:
Lloh106:
	adrp	x9, _NORMAL2@GOTPAGE
Lloh107:
	ldr	x9, [x9, _NORMAL2@GOTPAGEOFF]
Lloh108:
	ldr	x9, [x9]
	cmp	x8, x9
Lloh109:
	adrp	x24, _left_border_start@GOTPAGE
Lloh110:
	ldr	x24, [x24, _left_border_start@GOTPAGEOFF]
	ldr	w10, [sp, #16]                  ; 4-byte Folded Reload
	b.eq	LBB0_36
; %bb.33:
Lloh111:
	adrp	x9, _SCROLL2@GOTPAGE
Lloh112:
	ldr	x9, [x9, _SCROLL2@GOTPAGEOFF]
Lloh113:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_36
; %bb.34:
	mov	w8, #0
	mov	w20, #0
	sub	w9, w22, w10
	str	w9, [sp, #12]                   ; 4-byte Folded Spill
	lsl	w21, w10, #2
Lloh114:
	adrp	x26, _right_border_end@GOTPAGE
Lloh115:
	ldr	x26, [x26, _right_border_end@GOTPAGEOFF]
	str	w10, [sp, #16]                  ; 4-byte Folded Spill
	b	LBB0_38
LBB0_35:
	ldr	w10, [sp, #16]                  ; 4-byte Folded Reload
	ubfiz	w20, w10, #4, #1
Lloh116:
	adrp	x9, _x_min@GOTPAGE
Lloh117:
	ldr	x9, [x9, _x_min@GOTPAGEOFF]
Lloh118:
	ldr	x9, [x9]
	ldr	w8, [x9, x8, lsl #2]
	ands	w9, w10, #0xfffffffe
	lsl	w21, w9, #2
	add	w8, w8, w21
	add	w10, w22, #1
	and	w10, w10, #0xfffffffe
	orr	w11, w9, #0x1
	csel	w11, w11, w9, lt
	sub	w9, w10, w9
	cmp	w9, #0
	cinc	w9, w9, lt
	asr	w10, w9, #1
	asr	w9, w11, #1
	stp	w10, w9, [sp, #12]              ; 8-byte Folded Spill
Lloh119:
	adrp	x24, _left_border_start@GOTPAGE
Lloh120:
	ldr	x24, [x24, _left_border_start@GOTPAGEOFF]
	b	LBB0_37
LBB0_36:
	ubfiz	w20, w10, #4, #2
Lloh121:
	adrp	x9, _x_min@GOTPAGE
Lloh122:
	ldr	x9, [x9, _x_min@GOTPAGEOFF]
Lloh123:
	ldr	x9, [x9]
	ldr	w8, [x9, x8, lsl #2]
	ands	w9, w10, #0xfffffffc
	lsl	w21, w9, #2
	add	w8, w8, w21
	add	w10, w22, #3
	and	w10, w10, #0xfffffffc
	orr	w11, w9, #0x3
	csel	w11, w11, w9, lt
	sub	w9, w10, w9
	add	w10, w9, #3
	cmp	w9, #0
	csel	w9, w10, w9, lt
	asr	w10, w9, #2
	asr	w9, w11, #2
	stp	w10, w9, [sp, #12]              ; 8-byte Folded Spill
LBB0_37:
Lloh124:
	adrp	x26, _right_border_end@GOTPAGE
Lloh125:
	ldr	x26, [x26, _right_border_end@GOTPAGEOFF]
LBB0_38:
Lloh126:
	adrp	x27, _scrn_ptr@GOTPAGE
Lloh127:
	ldr	x27, [x27, _scrn_ptr@GOTPAGEOFF]
	ldr	x9, [x27]
	sxtw	x22, w8
	add	x1, x9, w8, sxtw #2
	add	x0, sp, #24
	mov	x2, x20
	bl	_memcpy
Lloh128:
	adrp	x8, _antic_memory@GOTPAGE
Lloh129:
	ldr	x8, [x8, _antic_memory@GOTPAGEOFF]
Lloh130:
	adrp	x9, _ANTIC_margin@GOTPAGE
Lloh131:
	ldr	x9, [x9, _ANTIC_margin@GOTPAGEOFF]
Lloh132:
	ldr	x8, [x8]
Lloh133:
	ldr	x9, [x9]
Lloh134:
	adrp	x10, _ch_offset@GOTPAGE
Lloh135:
	ldr	x10, [x10, _ch_offset@GOTPAGEOFF]
Lloh136:
	ldr	x10, [x10]
Lloh137:
	adrp	x11, _md@GOTPAGE
Lloh138:
	ldr	x11, [x11, _md@GOTPAGEOFF]
Lloh139:
	ldr	x11, [x11]
	ldr	x10, [x10, x11, lsl #3]
	ldp	w0, w12, [sp, #12]              ; 8-byte Folded Reload
	add	x8, x8, w12, sxtw
	add	x8, x8, x9
	add	x1, x8, x10
	ldr	x8, [x27]
Lloh140:
	adrp	x9, _x_min@GOTPAGE
Lloh141:
	ldr	x9, [x9, _x_min@GOTPAGEOFF]
Lloh142:
	ldr	x9, [x9]
	ldrsw	x9, [x9, x11, lsl #2]
	add	x8, x8, x9, lsl #2
	add	x2, x8, w21, sxtw #2
Lloh143:
	adrp	x8, _GTIA_pm_scanline@GOTPAGE
Lloh144:
	ldr	x8, [x8, _GTIA_pm_scanline@GOTPAGEOFF]
Lloh145:
	ldr	x8, [x8]
	add	w9, w9, w21
	add	x3, x8, w9, sxtw #2
	bl	_draw_antic_ptr
	b	LBB0_27
LBB0_39:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh14
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh26
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh55, Lloh56
	.loh AdrpLdrGot	Lloh53, Lloh54
	.loh AdrpLdrGotStr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotStr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGot	Lloh65, Lloh66
	.loh AdrpLdrGot	Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpLdrGot	Lloh70, Lloh71
	.loh AdrpLdrGot	Lloh74, Lloh75
	.loh AdrpLdrGot	Lloh72, Lloh73
	.loh AdrpLdrGotLdr	Lloh76, Lloh77, Lloh78
	.loh AdrpLdrGot	Lloh84, Lloh85
	.loh AdrpLdrGotLdr	Lloh81, Lloh82, Lloh83
	.loh AdrpLdrGot	Lloh79, Lloh80
	.loh AdrpLdrGotLdr	Lloh94, Lloh95, Lloh96
	.loh AdrpLdrGotStr	Lloh91, Lloh92, Lloh93
	.loh AdrpLdrGotStr	Lloh88, Lloh89, Lloh90
	.loh AdrpLdrGot	Lloh86, Lloh87
	.loh AdrpLdrGotLdr	Lloh97, Lloh98, Lloh99
	.loh AdrpLdrGotLdr	Lloh100, Lloh101, Lloh102
	.loh AdrpLdrGotLdr	Lloh103, Lloh104, Lloh105
	.loh AdrpLdrGot	Lloh109, Lloh110
	.loh AdrpLdrGotLdr	Lloh106, Lloh107, Lloh108
	.loh AdrpLdrGotLdr	Lloh111, Lloh112, Lloh113
	.loh AdrpLdrGot	Lloh114, Lloh115
	.loh AdrpLdrGot	Lloh119, Lloh120
	.loh AdrpLdrGotLdr	Lloh116, Lloh117, Lloh118
	.loh AdrpLdrGotLdr	Lloh121, Lloh122, Lloh123
	.loh AdrpLdrGot	Lloh124, Lloh125
	.loh AdrpLdrGotLdr	Lloh143, Lloh144, Lloh145
	.loh AdrpLdrGotLdr	Lloh140, Lloh141, Lloh142
	.loh AdrpLdrGotLdr	Lloh137, Lloh138, Lloh139
	.loh AdrpLdrGotLdr	Lloh134, Lloh135, Lloh136
	.loh AdrpLdrGotLdr	Lloh130, Lloh131, Lloh133
	.loh AdrpLdrGotLdr	Lloh128, Lloh129, Lloh132
	.loh AdrpLdrGot	Lloh126, Lloh127
	.cfi_endproc
                                        ; -- End function
	.comm	_left_border_chars,4,2          ; @left_border_chars
	.comm	_right_border_start,4,2         ; @right_border_start
	.comm	_LCHOP,4,2                      ; @LCHOP
	.comm	_RCHOP,4,2                      ; @RCHOP
	.comm	_chars_displayed,8,3            ; @chars_displayed
	.comm	_md,8,3                         ; @md
	.comm	_NORMAL1,8,3                    ; @NORMAL1
	.comm	_SCROLL1,8,3                    ; @SCROLL1
	.comm	_NORMAL2,8,3                    ; @NORMAL2
	.comm	_SCROLL2,8,3                    ; @SCROLL2
	.comm	_anticmode,4,2                  ; @anticmode
	.comm	_ANTIC_DMACTL,4,2               ; @ANTIC_DMACTL
	.comm	_left_border_start,4,2          ; @left_border_start
	.comm	_x_min,8,3                      ; @x_min
	.comm	_scrn_ptr,8,3                   ; @scrn_ptr
	.comm	_need_load,8,3                  ; @need_load
	.comm	_FALSE,8,3                      ; @FALSE
	.comm	_right_border_end,4,2           ; @right_border_end
	.comm	_antic_memory,8,3               ; @antic_memory
	.comm	_ANTIC_margin,8,3               ; @ANTIC_margin
	.comm	_ch_offset,8,3                  ; @ch_offset
	.comm	_GTIA_pm_scanline,8,3           ; @GTIA_pm_scanline
	.comm	_scanlines_to_curses_display,4,2 ; @scanlines_to_curses_display
.subsections_via_symbols
