	.file	"extr_viddc.c_Vdp2PatternAddr.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	Vdp2PatternAddr, @function
Vdp2PatternAddr:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	eax, DWORD PTR [rdi]
	cmp	eax, 1
	je	.L2
	cmp	eax, 2
	jne	.L15
	mov	esi, DWORD PTR 4[rdi]
	mov	edi, DWORD PTR Vdp2Ram[rip]
	call	T1ReadWord@PLT
	mov	edi, DWORD PTR Vdp2Ram[rip]
	mov	ebp, eax
	mov	eax, DWORD PTR 4[rbx]
	lea	esi, 2[rax]
	call	T1ReadWord@PLT
	mov	edx, ebp
	add	DWORD PTR 4[rbx], 4
	sar	edx, 14
	and	eax, 32767
	and	edx, 3
	mov	DWORD PTR 20[rbx], edx
	mov	edx, ebp
	sar	ebp, 13
	sal	edx, 4
	and	ebp, 1
	and	edx, 2032
	mov	DWORD PTR 8[rbx], ebp
	mov	DWORD PTR 16[rbx], edx
.L4:
	mov	rdx, QWORD PTR Vdp2Regs[rip]
	mov	ecx, DWORD PTR [rdx]
	mov	edx, eax
	and	edx, 16383
	and	ch, -128
	cmove	eax, edx
	sal	eax, 5
	mov	DWORD PTR 24[rbx], eax
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	eax, DWORD PTR 24[rbx]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	mov	esi, DWORD PTR 4[rdi]
	mov	edi, DWORD PTR Vdp2Ram[rip]
	call	T1ReadWord@PLT
	mov	esi, DWORD PTR 12[rbx]
	mov	edx, DWORD PTR 36[rbx]
	add	DWORD PTR 4[rbx], 2
	mov	ecx, esi
	sar	ecx, 9
	and	ecx, 1
	mov	DWORD PTR 8[rbx], ecx
	mov	ecx, eax
	test	edx, edx
	jne	.L5
	sar	ecx, 8
	lea	edx, 0[0+rsi*8]
	and	edx, 1792
	and	ecx, 240
	or	ecx, edx
	mov	edx, DWORD PTR 32[rbx]
	mov	DWORD PTR 16[rbx], ecx
	test	edx, edx
	je	.L7
.L17:
	cmp	edx, 1
	jne	.L15
	mov	edx, DWORD PTR 28[rbx]
	mov	DWORD PTR 20[rbx], 0
	cmp	edx, 1
	je	.L11
	cmp	edx, 2
	jne	.L15
	mov	edx, esi
	sal	eax, 2
	and	esi, 3
	sal	edx, 10
	and	eax, 16380
	and	edx, 16384
	or	edx, esi
	or	eax, edx
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	sar	ecx, 4
	mov	edx, DWORD PTR 32[rbx]
	and	ecx, 1792
	mov	DWORD PTR 16[rbx], ecx
	test	edx, edx
	jne	.L17
.L7:
	mov	edx, eax
	sar	edx, 10
	and	edx, 3
	mov	DWORD PTR 20[rbx], edx
	mov	edx, DWORD PTR 28[rbx]
	cmp	edx, 1
	je	.L9
	cmp	edx, 2
	jne	.L15
	mov	ecx, esi
	and	esi, 3
	sal	eax, 2
	sal	ecx, 10
	mov	edx, esi
	and	eax, 4092
	and	ecx, 28672
	or	edx, ecx
	or	eax, edx
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L11:
	sal	esi, 10
	and	eax, 4095
	mov	edx, esi
	and	edx, 28672
	or	eax, edx
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L9:
	sal	esi, 10
	and	eax, 1023
	mov	edx, esi
	and	edx, 31744
	or	eax, edx
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	Vdp2PatternAddr, .-Vdp2PatternAddr
	.comm	Vdp2Regs,8,8
	.comm	Vdp2Ram,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_viddc.c_Vdp2PatternAddr.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	Vdp2PatternAddr, %function
Vdp2PatternAddr:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0]
	push	{r4, r5, r6, lr}
	cmp	r3, #1
	mov	r4, r0
	beq	.L2
	cmp	r3, #2
	bne	.L15
	ldr	r6, .L17
	ldr	r1, [r0, #4]
	ldr	r0, [r6]
	bl	T1ReadWord
	ldr	r1, [r4, #4]
	mov	r5, r0
	add	r1, r1, #2
	ldr	r0, [r6]
	bl	T1ReadWord
	ldr	r3, [r4, #4]
	asr	r1, r5, #14
	lsl	r2, r5, #4
	asr	r5, r5, #13
	and	r5, r5, #1
	add	r3, r3, #4
	stmib	r4, {r3, r5}
	lsl	r0, r0, #17
	and	r1, r1, #3
	and	r2, r2, #2032
	lsr	r0, r0, #17
	str	r1, [r4, #20]
	str	r2, [r4, #16]
.L4:
	ldr	r3, .L17+4
	ldr	r3, [r3]
	ldr	r3, [r3]
	tst	r3, #32768
	lsleq	r0, r0, #18
	lsreq	r0, r0, #18
	lsl	r0, r0, #5
	str	r0, [r4, #24]
	pop	{r4, r5, r6, pc}
.L2:
	ldr	r3, .L17
	ldr	r1, [r0, #4]
	ldr	r0, [r3]
	bl	T1ReadWord
	ldr	ip, [r4, #12]
	ldr	r1, [r4, #36]
	ldr	r2, [r4, #4]
	asr	r3, ip, #9
	cmp	r1, #0
	add	r2, r2, #2
	and	r3, r3, #1
	stmib	r4, {r2, r3}
	asreq	r1, r0, #8
	lsleq	r2, ip, #3
	ldr	r3, [r4, #32]
	andeq	r2, r2, #1792
	asrne	r2, r0, #4
	andeq	r1, r1, #240
	orreq	r2, r1, r2
	andne	r2, r2, #1792
	cmp	r3, #0
	str	r2, [r4, #16]
	beq	.L7
	cmp	r3, #1
	beq	.L8
.L15:
	ldr	r0, [r4, #24]
	b	.L4
.L8:
	mov	r2, #0
	ldr	r3, [r4, #28]
	str	r2, [r4, #20]
	cmp	r3, #1
	beq	.L11
	cmp	r3, #2
	bne	.L15
	lsl	r3, ip, #10
	ldr	r2, .L17+8
	and	r3, r3, #16384
	and	ip, ip, #3
	orr	r3, r3, ip
	and	r0, r2, r0, lsl #2
	orr	r0, r3, r0
	b	.L4
.L7:
	ldr	r2, [r4, #28]
	asr	r3, r0, #10
	and	r3, r3, #3
	cmp	r2, #1
	str	r3, [r4, #20]
	beq	.L9
	cmp	r2, #2
	bne	.L15
	ldr	r1, .L17+12
	lsl	r2, ip, #10
	and	r2, r2, #28672
	and	r3, ip, #3
	orr	r3, r2, r3
	and	r0, r1, r0, lsl #2
	orr	r0, r3, r0
	b	.L4
.L11:
	lsl	r2, r0, #20
	lsl	r3, ip, #10
	and	r0, r3, #28672
	lsr	r2, r2, #20
	orr	r0, r0, r2
	b	.L4
.L9:
	lsl	r2, r0, #22
	lsl	r3, ip, #10
	and	r0, r3, #31744
	lsr	r2, r2, #22
	orr	r0, r0, r2
	b	.L4
.L18:
	.align	2
.L17:
	.word	Vdp2Ram
	.word	Vdp2Regs
	.word	16380
	.word	4092
	.size	Vdp2PatternAddr, .-Vdp2PatternAddr
	.comm	Vdp2Regs,4,4
	.comm	Vdp2Ram,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
