	.file	"extr_antic.c_ANTIC_UpdateArtifacting.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ANTIC_UpdateArtifacting
	.type	ANTIC_UpdateArtifacting, @function
ANTIC_UpdateArtifacting:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rdx, QWORD PTR draw_antic_table[rip]
	mov	eax, DWORD PTR ANTIC_artif_mode[rip]
	mov	rdx, QWORD PTR [rdx]
	test	eax, eax
	je	.L32
	cmp	QWORD PTR ANTIC_artif_new[rip], 0
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	jne	.L33
	mov	ecx, DWORD PTR draw_antic_2_artif[rip]
	mov	DWORD PTR 12[rdx], ecx
	mov	DWORD PTR 8[rdx], ecx
	mov	ecx, DWORD PTR draw_antic_f_artif[rip]
	mov	DWORD PTR 60[rdx], ecx
.L5:
	lea	rbp, art_colour_table.1951[rip+64]
	cmp	eax, 4
	jg	.L6
	sub	eax, 1
	sub	rbp, 64
	cdqe
	sal	rax, 5
	add	rbp, rax
.L6:
	mov	rdx, QWORD PTR ANTIC_cl[rip]
	mov	rax, QWORD PTR C_PF1[rip]
	xor	esi, esi
	mov	r10d, 2040
	mov	r11, QWORD PTR art_bkmask_normal[rip]
	mov	rbx, QWORD PTR art_bkmask_reverse[rip]
	mov	edi, 1020
	lea	rcx, [rdx+rax*4]
	mov	r13, QWORD PTR art_lummask_reverse[rip]
	mov	eax, DWORD PTR [rcx]
	and	eax, 3855
	mov	DWORD PTR art_normal_colpf1_save[rip], eax
	mov	DWORD PTR art_reverse_colpf1_save[rip], eax
	mov	rax, QWORD PTR C_PF2[rip]
	lea	rax, [rdx+rax*4]
	mov	edx, DWORD PTR [rax]
	mov	DWORD PTR art_normal_colpf2_save[rip], edx
	mov	DWORD PTR art_reverse_colpf2_save[rip], edx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR [rcx]
	and	edx, 240
	and	eax, 15
	or	edx, eax
	mov	rax, QWORD PTR art_lummask_normal[rip]
	mov	r14d, edx
	mov	QWORD PTR -8[rsp], rax
	.p2align 4,,10
	.p2align 3
.L13:
	mov	r15, QWORD PTR -8[rsp]
	mov	rdx, rsi
	mov	r8d, esi
	xor	ecx, ecx
	mov	QWORD PTR [r11+rsi*8], 0
	sal	rdx, 4
	mov	QWORD PTR [r15+rsi*8], 0
	mov	QWORD PTR [rbx+r10], 0
	mov	QWORD PTR 0[r13+r10], 0
	mov	rax, QWORD PTR art_lookup_normal[rip]
	mov	r9, QWORD PTR art_lookup_reverse[rip]
	sub	r15, rax
	add	rdx, rax
	mov	QWORD PTR -24[rsp], r15
	mov	r15, r11
	sub	r15, rax
	mov	QWORD PTR -16[rsp], r15
	mov	r12, r15
.L12:
	mov	eax, r8d
	sal	eax, cl
	test	al, 32
	jne	.L7
	and	eax, 248
	cmp	eax, 80
	je	.L15
	cmp	eax, 216
	je	.L16
	mov	eax, DWORD PTR GTIA_COLPF2[rip]
	mov	DWORD PTR [rdx], eax
	lea	eax, [rcx+rdi]
	cdqe
	mov	DWORD PTR [r9+rax*4], r14d
	mov	DWORD PTR [r12+rdx], 255
	mov	DWORD PTR 0[r13+rax*4], 15
	mov	DWORD PTR [rbx+rax*4], 240
.L9:
	add	ecx, 1
	add	rdx, 4
	cmp	ecx, 4
	jne	.L12
	add	rsi, 1
	sub	edi, 4
	sub	r10, 8
	cmp	rsi, 256
	jne	.L13
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
.L33:
	.cfi_restore_state
	mov	ecx, DWORD PTR draw_antic_2_artif_new[rip]
	mov	DWORD PTR 12[rdx], ecx
	mov	DWORD PTR 8[rdx], ecx
	mov	ecx, DWORD PTR draw_antic_f_artif_new[rip]
	mov	DWORD PTR 60[rdx], ecx
	lea	edx, -1[rax]
	lea	rcx, new_art_colour_table.1958[rip]
	movsx	rdx, edx
	sal	rdx, 4
	add	rdx, rcx
	mov	rcx, QWORD PTR [rdx]
	mov	rdx, QWORD PTR 8[rdx]
	mov	QWORD PTR art_colour1_new[rip], rcx
	mov	QWORD PTR art_colour2_new[rip], rdx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L7:
	mov	r15d, eax
	and	r15d, 16
	test	al, 64
	je	.L10
	test	r15d, r15d
	jne	.L11
	test	al, -128
	je	.L17
	test	al, 8
	je	.L11
.L18:
	mov	r15d, 4
.L8:
	mov	eax, ecx
	and	eax, 1
	xor	eax, r15d
	cdqe
	mov	r15d, DWORD PTR 0[rbp+rax*4]
	lea	eax, [rcx+rdi]
	cdqe
	mov	DWORD PTR [rdx], r15d
	mov	DWORD PTR [r9+rax*4], r15d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L10:
	test	r15d, r15d
	je	.L8
	test	al, 8
	je	.L19
	test	al, -128
	jne	.L18
.L11:
	mov	DWORD PTR [rdx], r14d
	lea	eax, [rcx+rdi]
	mov	r15d, DWORD PTR GTIA_COLPF2[rip]
	cdqe
	mov	DWORD PTR [r9+rax*4], r15d
	mov	DWORD PTR [rbx+rax*4], 255
	mov	rax, QWORD PTR -24[rsp]
	mov	DWORD PTR [rax+rdx], 15
	mov	rax, QWORD PTR -16[rsp]
	mov	DWORD PTR [rax+rdx], 240
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L16:
	mov	r15d, 3
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L15:
	mov	r15d, 1
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L19:
	mov	r15d, 6
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L17:
	mov	r15d, 7
	jmp	.L8
.L32:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	mov	eax, DWORD PTR draw_antic_2[rip]
	mov	DWORD PTR 12[rdx], eax
	mov	DWORD PTR 8[rdx], eax
	mov	eax, DWORD PTR draw_antic_f[rip]
	mov	DWORD PTR 60[rdx], eax
	ret
	.cfi_endproc
.LFE0:
	.size	ANTIC_UpdateArtifacting, .-ANTIC_UpdateArtifacting
	.section	.rodata
	.align 32
	.type	art_colour_table.1951, @object
	.size	art_colour_table.1951, 128
art_colour_table.1951:
	.long	136
	.long	20
	.long	136
	.long	20
	.long	143
	.long	31
	.long	187
	.long	95
	.long	20
	.long	136
	.long	20
	.long	136
	.long	31
	.long	143
	.long	95
	.long	187
	.long	214
	.long	70
	.long	214
	.long	70
	.long	223
	.long	74
	.long	79
	.long	172
	.long	70
	.long	214
	.long	70
	.long	214
	.long	74
	.long	223
	.long	172
	.long	79
	.align 32
	.type	new_art_colour_table.1958, @object
	.size	new_art_colour_table.1958, 64
new_art_colour_table.1958:
	.quad	16448
	.quad	32896
	.quad	32896
	.quad	16448
	.quad	32896
	.quad	53456
	.quad	53456
	.quad	32896
	.comm	draw_antic_table,8,8
	.comm	draw_antic_f_artif_new,4,4
	.comm	draw_antic_f_artif,4,4
	.comm	draw_antic_f,4,4
	.comm	draw_antic_2_artif_new,4,4
	.comm	draw_antic_2_artif,4,4
	.comm	draw_antic_2,4,4
	.comm	art_reverse_colpf2_save,4,4
	.comm	art_reverse_colpf1_save,4,4
	.comm	art_normal_colpf2_save,4,4
	.comm	art_normal_colpf1_save,4,4
	.comm	art_lummask_reverse,8,8
	.comm	art_lummask_normal,8,8
	.comm	art_lookup_reverse,8,8
	.comm	art_lookup_normal,8,8
	.comm	art_colour2_new,8,8
	.comm	art_colour1_new,8,8
	.comm	art_bkmask_reverse,8,8
	.comm	art_bkmask_normal,8,8
	.comm	GTIA_COLPF2,4,4
	.comm	C_PF2,8,8
	.comm	C_PF1,8,8
	.comm	ART_RED,4,4
	.comm	ART_GREEN,4,4
	.comm	ART_DARK_BLUE,4,4
	.comm	ART_BROWN,4,4
	.comm	ART_BRIGHT_BROWN,4,4
	.comm	ART_BLUE,4,4
	.comm	ANTIC_cl,8,8
	.comm	ANTIC_artif_new,8,8
	.comm	ANTIC_artif_mode,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_antic.c_ANTIC_UpdateArtifacting.c"
	.text
	.align	2
	.global	ANTIC_UpdateArtifacting
	.syntax unified
	.arm
	.fpu softvfp
	.type	ANTIC_UpdateArtifacting, %function
ANTIC_UpdateArtifacting:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L34
	ldr	r2, .L34+4
	ldr	r3, [r3]
	ldr	r2, [r2]
	cmp	r3, #0
	ldr	r2, [r2]
	beq	.L32
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r1, .L34+8
	sub	sp, sp, #20
	ldr	r1, [r1]
	cmp	r1, #0
	bne	.L33
	ldr	r1, .L34+12
	ldr	r0, .L34+16
	ldr	r1, [r1]
	ldr	r0, [r0]
	str	r1, [r2, #12]
	str	r1, [r2, #8]
	str	r0, [r2, #60]
.L5:
	mov	r6, #1020
	mov	r4, #4080
	mov	ip, #0
	cmp	r3, #4
	ldrle	r9, .L34+20
	suble	r3, r3, #1
	addle	r9, r9, r3, lsl #5
	ldr	r3, .L34+24
	ldr	r2, .L34+28
	ldr	r3, [r3]
	ldr	r5, [r2]
	mov	r7, r3
	str	r3, [sp, #4]
	ldr	r3, .L34+32
	ldr	r1, .L34+36
	ldr	r3, [r3]
	ldr	r2, .L34+40
	ldr	r0, [r3, r5, lsl #2]
	ldr	lr, .L34+44
	ldr	r8, .L34+48
	and	r1, r1, r0
	ldr	r2, [r2]
	str	r1, [lr]
	str	r1, [r8]
	ldr	r1, [r3, r2, lsl #2]
	ldr	lr, .L34+52
	ldr	r0, .L34+56
	str	r1, [lr]
	str	r1, [r0]
	ldr	r1, [r3, r2, lsl #2]
	ldr	lr, [r3, r5, lsl #2]
	ldr	r0, .L34+60
	ldr	r2, .L34+64
	ldr	r3, .L34+68
	ldr	r0, [r0]
	ldr	r2, [r2]
	and	r1, r1, #240
	and	lr, lr, #15
	ldr	r10, [r3]
	ldrgt	r9, .L34+72
	orr	r3, r1, lr
	ldr	fp, .L34+76
	str	r0, [sp, #8]
	str	r2, [sp, #12]
	str	r3, [sp]
.L13:
	mov	r2, #0
	ldr	r1, [sp, #4]
	ldr	lr, [sp, #8]
	ldr	r8, [sp, #12]
	str	r2, [r1, ip, lsl #2]
	mov	r3, r2
	str	r2, [lr, ip, lsl #2]
	str	r2, [r8, r6]
	str	r2, [r10, r6]
	ldr	r2, .L34+80
	add	r8, r8, r4
	ldr	r5, [r2]
	ldr	r2, .L34+84
	add	r1, r5, ip, lsl #4
	ldr	r0, [r2]
	sub	r5, lr, r5
	add	r0, r4, r0
.L12:
	lsl	r2, ip, r3
	tst	r2, #32
	bne	.L7
	and	r2, r2, #248
	cmp	r2, #80
	beq	.L15
	cmp	r2, #216
	beq	.L16
	ldr	lr, [fp]
	add	r2, r10, r4
	str	lr, [r1]
	ldr	lr, [sp]
	str	lr, [r0]
	mov	lr, #255
	str	lr, [r7, r3, lsl #2]
	mov	lr, #15
	str	lr, [r2, r3, lsl #2]
	mov	r2, #240
	str	r2, [r8, r3, lsl #2]
.L9:
	add	r3, r3, #1
	cmp	r3, #4
	add	r1, r1, #4
	add	r0, r0, #4
	bne	.L12
	add	ip, ip, #1
	cmp	ip, #256
	sub	r4, r4, #16
	sub	r6, r6, #4
	add	r7, r7, #16
	bne	.L13
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L33:
	ldr	r1, .L34+20
	sub	r0, r3, #1
	add	r1, r1, r0, lsl #3
	ldr	r4, [r1, #128]
	ldr	ip, .L34+88
	ldr	r5, .L34+92
	ldr	r0, .L34+96
	ldr	lr, [r1, #132]
	str	r4, [ip]
	ldr	r1, [r5]
	ldr	r0, [r0]
	ldr	ip, .L34+100
	str	r1, [r2, #12]
	str	lr, [ip]
	str	r1, [r2, #8]
	str	r0, [r2, #60]
	b	.L5
.L7:
	tst	r2, #64
	and	lr, r2, #16
	beq	.L10
	cmp	lr, #0
	bne	.L11
	tst	r2, #128
	beq	.L17
	tst	r2, #8
	beq	.L11
.L18:
	mov	lr, #4
.L8:
	and	r2, r3, #1
	eor	r2, r2, lr
	ldr	r2, [r9, r2, lsl #2]
	str	r2, [r1]
	str	r2, [r0]
	b	.L9
.L10:
	cmp	lr, #0
	beq	.L8
	tst	r2, #8
	beq	.L19
	tst	r2, #128
	bne	.L18
.L11:
	ldr	r2, [sp]
	str	r2, [r1]
	ldr	r2, [fp]
	str	r2, [r0]
	mov	r2, #255
	str	r2, [r8, r3, lsl #2]
	mov	r2, #15
	str	r2, [r5, r1]
	mov	r2, #240
	str	r2, [r7, r3, lsl #2]
	b	.L9
.L16:
	mov	lr, #3
	b	.L8
.L15:
	mov	lr, #1
	b	.L8
.L19:
	mov	lr, #6
	b	.L8
.L17:
	mov	lr, #7
	b	.L8
.L32:
	ldr	r3, .L34+104
	ldr	r1, .L34+108
	ldr	r3, [r3]
	ldr	r1, [r1]
	str	r3, [r2, #12]
	str	r3, [r2, #8]
	str	r1, [r2, #60]
	bx	lr
.L35:
	.align	2
.L34:
	.word	ANTIC_artif_mode
	.word	draw_antic_table
	.word	ANTIC_artif_new
	.word	draw_antic_2_artif
	.word	draw_antic_f_artif
	.word	.LANCHOR0
	.word	art_bkmask_normal
	.word	C_PF1
	.word	ANTIC_cl
	.word	3855
	.word	C_PF2
	.word	art_reverse_colpf1_save
	.word	art_normal_colpf1_save
	.word	art_normal_colpf2_save
	.word	art_reverse_colpf2_save
	.word	art_lummask_normal
	.word	art_bkmask_reverse
	.word	art_lummask_reverse
	.word	.LANCHOR0+64
	.word	GTIA_COLPF2
	.word	art_lookup_normal
	.word	art_lookup_reverse
	.word	art_colour1_new
	.word	draw_antic_2_artif_new
	.word	draw_antic_f_artif_new
	.word	art_colour2_new
	.word	draw_antic_2
	.word	draw_antic_f
	.size	ANTIC_UpdateArtifacting, .-ANTIC_UpdateArtifacting
	.comm	draw_antic_table,4,4
	.comm	draw_antic_f_artif_new,4,4
	.comm	draw_antic_f_artif,4,4
	.comm	draw_antic_f,4,4
	.comm	draw_antic_2_artif_new,4,4
	.comm	draw_antic_2_artif,4,4
	.comm	draw_antic_2,4,4
	.comm	art_reverse_colpf2_save,4,4
	.comm	art_reverse_colpf1_save,4,4
	.comm	art_normal_colpf2_save,4,4
	.comm	art_normal_colpf1_save,4,4
	.comm	art_lummask_reverse,4,4
	.comm	art_lummask_normal,4,4
	.comm	art_lookup_reverse,4,4
	.comm	art_lookup_normal,4,4
	.comm	art_colour2_new,4,4
	.comm	art_colour1_new,4,4
	.comm	art_bkmask_reverse,4,4
	.comm	art_bkmask_normal,4,4
	.comm	GTIA_COLPF2,4,4
	.comm	C_PF2,4,4
	.comm	C_PF1,4,4
	.comm	ART_RED,4,4
	.comm	ART_GREEN,4,4
	.comm	ART_DARK_BLUE,4,4
	.comm	ART_BROWN,4,4
	.comm	ART_BRIGHT_BROWN,4,4
	.comm	ART_BLUE,4,4
	.comm	ANTIC_cl,4,4
	.comm	ANTIC_artif_new,4,4
	.comm	ANTIC_artif_mode,4,4
	.section	.rodata
	.align	2
	.set	.LANCHOR0,. + 0
	.type	art_colour_table.4235, %object
	.size	art_colour_table.4235, 128
art_colour_table.4235:
	.word	136
	.word	20
	.word	136
	.word	20
	.word	143
	.word	31
	.word	187
	.word	95
	.word	20
	.word	136
	.word	20
	.word	136
	.word	31
	.word	143
	.word	95
	.word	187
	.word	214
	.word	70
	.word	214
	.word	70
	.word	223
	.word	74
	.word	79
	.word	172
	.word	70
	.word	214
	.word	70
	.word	214
	.word	74
	.word	223
	.word	172
	.word	79
	.type	new_art_colour_table.4242, %object
	.size	new_art_colour_table.4242, 32
new_art_colour_table.4242:
	.word	16448
	.word	32896
	.word	32896
	.word	16448
	.word	32896
	.word	53456
	.word	53456
	.word	32896
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
