	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function draw_an_gtia9
_draw_an_gtia9:                         ## @draw_an_gtia9
	.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	_GTIA_pm_scanline@GOTPCREL(%rip), %rax
	subq	(%rax), %rdi
	shrq	$2, %rdi
	andl	$-2, %edi
	movq	_right_border_start@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edi
	jge	LBB0_13
## %bb.1:
	movslq	%edi, %r13
	leaq	(,%r13,4), %rbx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	callq	_COLOUR
	movl	%eax, %esi
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%r15,%rbx), %rdi
	addq	$4, %rdi
	callq	_WRITE_VIDEO
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	addq	$2, %r13
	movq	_right_border_start@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$8, %rbx
	cmpq	%rax, %r13
	jge	LBB0_13
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_scrn_ptr@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	leaq	(%r15,%rbx), %r12
	movq	_an_scanline@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx), %ecx
	shll	$2, %ecx
	movslq	4(%rax,%rbx), %rax
	movslq	%ecx, %r14
	addq	%rax, %r14
	movq	_ANTIC_lookup_gtia9@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r14,4), %esi
	movq	%r12, %rdi
	callq	_WRITE_VIDEO_LONG
	movq	_GTIA_pm_scanline@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	(%rax,%rbx), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_pm_lookup_ptr@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%rax,4), %edi
	movq	_L_PF3@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edi
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %esi
	shll	$8, %esi
	orl	%r14d, %esi
	movq	_ANTIC_cl@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_C_PF3@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	orl	(%rax,%rcx,4), %esi
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	callq	_COLOUR
	movl	%eax, %esi
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	callq	_WRITE_VIDEO
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_GTIA_pm_scanline@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	4(%rax,%rbx), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_pm_lookup_ptr@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%rax,4), %edi
	movq	_L_PF3@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edi
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %esi
	shll	$8, %esi
	orl	%r14d, %esi
	movq	_ANTIC_cl@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_C_PF3@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	orl	(%rax,%rcx,4), %esi
	jmp	LBB0_11
LBB0_13:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_do_border                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GTIA_pm_scanline,8,3           ## @GTIA_pm_scanline
	.comm	_right_border_start,4,2         ## @right_border_start
	.comm	_scrn_ptr,8,3                   ## @scrn_ptr
	.comm	_an_scanline,8,3                ## @an_scanline
	.comm	_ANTIC_lookup_gtia9,8,3         ## @ANTIC_lookup_gtia9
	.comm	_pm_lookup_ptr,8,3              ## @pm_lookup_ptr
	.comm	_L_PF3,4,2                      ## @L_PF3
	.comm	_ANTIC_cl,8,3                   ## @ANTIC_cl
	.comm	_C_PF3,8,3                      ## @C_PF3
	.comm	_GTIA_COLPF3,4,2                ## @GTIA_COLPF3
	.comm	_colour_translation_table,8,3   ## @colour_translation_table
	.no_dead_strip	_draw_an_gtia9
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function draw_an_gtia9
_draw_an_gtia9:                         ; @draw_an_gtia9
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, _GTIA_pm_scanline@GOTPAGE
Lloh1:
	ldr	x20, [x20, _GTIA_pm_scanline@GOTPAGEOFF]
	ldr	x8, [x20]
	sub	x8, x0, x8
	lsr	x8, x8, #2
	and	w8, w8, #0xfffffffe
Lloh2:
	adrp	x21, _right_border_start@GOTPAGE
Lloh3:
	ldr	x21, [x21, _right_border_start@GOTPAGEOFF]
	ldr	w9, [x21]
	cmp	w8, w9
	b.ge	LBB0_13
; %bb.1:
	sxtw	x22, w8
Lloh4:
	adrp	x25, _ANTIC_lookup_gtia9@GOTPAGE
Lloh5:
	ldr	x25, [x25, _ANTIC_lookup_gtia9@GOTPAGEOFF]
Lloh6:
	adrp	x26, _pm_lookup_ptr@GOTPAGE
Lloh7:
	ldr	x26, [x26, _pm_lookup_ptr@GOTPAGEOFF]
Lloh8:
	adrp	x27, _L_PF3@GOTPAGE
Lloh9:
	ldr	x27, [x27, _L_PF3@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	bl	_COLOUR
	mov	x1, x0
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x0, x19, #4
	bl	_WRITE_VIDEO
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x22, x22, #2
	ldrsw	x8, [x21]
	cmp	x22, x8
	b.ge	LBB0_13
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
Lloh10:
	adrp	x8, _scrn_ptr@GOTPAGE
Lloh11:
	ldr	x8, [x8, _scrn_ptr@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	lsl	x24, x22, #2
	add	x19, x8, x24
Lloh13:
	adrp	x8, _an_scanline@GOTPAGE
Lloh14:
	ldr	x8, [x8, _an_scanline@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	ldr	w9, [x8, x24]
	orr	x23, x22, #0x1
	ldr	w8, [x8, x23, lsl #2]
	add	w28, w8, w9, lsl #2
	ldr	x8, [x25]
	ldr	w1, [x8, w28, sxtw #2]
	mov	x0, x19
	bl	_WRITE_VIDEO_LONG
	ldr	x8, [x20]
	ldrsw	x8, [x8, x24]
	cbz	w8, LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x26]
	ldr	w0, [x9, x8, lsl #2]
	ldr	w8, [x27]
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	orr	w8, w28, w28, lsl #8
Lloh16:
	adrp	x9, _ANTIC_cl@GOTPAGE
Lloh17:
	ldr	x9, [x9, _ANTIC_cl@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
Lloh19:
	adrp	x10, _C_PF3@GOTPAGE
Lloh20:
	ldr	x10, [x10, _C_PF3@GOTPAGEOFF]
Lloh21:
	ldr	x10, [x10]
	ldr	w9, [x9, x10, lsl #2]
	orr	w1, w8, w9
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	bl	_COLOUR
	mov	x1, x0
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	bl	_WRITE_VIDEO
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x20]
	ldrsw	x8, [x8, x23, lsl #2]
	cbz	w8, LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x26]
	ldr	w0, [x9, x8, lsl #2]
	ldr	w8, [x27]
	cmp	w0, w8
	b.ne	LBB0_2
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	orr	w8, w28, w28, lsl #8
Lloh22:
	adrp	x9, _ANTIC_cl@GOTPAGE
Lloh23:
	ldr	x9, [x9, _ANTIC_cl@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
Lloh25:
	adrp	x10, _C_PF3@GOTPAGE
Lloh26:
	ldr	x10, [x10, _C_PF3@GOTPAGEOFF]
Lloh27:
	ldr	x10, [x10]
	ldr	w9, [x9, x10, lsl #2]
	orr	w1, w8, w9
	b	LBB0_3
LBB0_13:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_do_border
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_GTIA_pm_scanline,8,3           ; @GTIA_pm_scanline
	.comm	_right_border_start,4,2         ; @right_border_start
	.comm	_scrn_ptr,8,3                   ; @scrn_ptr
	.comm	_an_scanline,8,3                ; @an_scanline
	.comm	_ANTIC_lookup_gtia9,8,3         ; @ANTIC_lookup_gtia9
	.comm	_pm_lookup_ptr,8,3              ; @pm_lookup_ptr
	.comm	_L_PF3,4,2                      ; @L_PF3
	.comm	_ANTIC_cl,8,3                   ; @ANTIC_cl
	.comm	_C_PF3,8,3                      ; @C_PF3
	.comm	_GTIA_COLPF3,4,2                ; @GTIA_COLPF3
	.comm	_colour_translation_table,8,3   ; @colour_translation_table
	.no_dead_strip	_draw_an_gtia9
.subsections_via_symbols
