	.file	"extr_draw.c_DrawLayer.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	DrawLayer, @function
DrawLayer:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	r10d, edi
	mov	edi, 1
	sub	rsp, 48
	.cfi_def_cfa_offset 64
	mov	r9, QWORD PTR Pico[rip+16]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	QWORD PTR [rsp], rsi
	mov	esi, DWORD PTR 64[r9]
	mov	DWORD PTR 36[rsp], 117769733
	mov	DWORD PTR 8[rsp], ecx
	mov	eax, esi
	mov	r8d, esi
	and	eax, 3
	and	r8d, 3
	movsx	ecx, BYTE PTR 36[rsp+rax]
	mov	eax, esi
	sar	eax, 4
	sal	edi, cl
	sal	eax, 8
	sub	edi, 1
	mov	DWORD PTR 12[rsp], edi
	cmp	r8d, 1
	je	.L18
	and	eax, 768
	or	al, -1
	and	esi, 2
	mov	esi, 255
	cmove	esi, eax
.L3:
	mov	edi, r10d
	and	edi, 1
	je	.L4
	mov	r8d, DWORD PTR 16[r9]
	sal	r8d, 12
	and	r8d, 28672
.L5:
	mov	eax, DWORD PTR 52[r9]
	mov	r11d, DWORD PTR 44[r9]
	mov	DWORD PTR 16[rsp], r8d
	sal	eax, 9
	test	r11b, 2
	je	.L6
	mov	ebx, DWORD PTR DrawScanline[rip]
	lea	eax, [rax+rbx*2]
.L6:
	mov	ebx, eax
	and	ebx, -16
	test	r11b, 1
	cmove	eax, ebx
	mov	rbx, QWORD PTR Pico[rip+8]
	add	eax, edi
	and	eax, 32767
	mov	eax, DWORD PTR [rbx+rax*4]
	mov	DWORD PTR 24[rsp], eax
	mov	eax, DWORD PTR 48[r9]
	and	eax, 6
	cmp	eax, 6
	je	.L19
	and	r11d, 4
	jne	.L20
	mov	r9, QWORD PTR Pico[rip]
	movsx	rdi, edi
	mov	eax, DWORD PTR DrawScanline[rip]
	add	eax, DWORD PTR [r9+rdi*4]
	mov	rdi, rsp
	and	esi, eax
	mov	DWORD PTR 20[rsp], esi
	sar	esi, 3
	sal	esi, cl
	add	r8d, esi
	mov	esi, r10d
	mov	DWORD PTR 16[rsp], r8d
	call	DrawStrip@PLT
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L21
	add	rsp, 48
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	pop	rbx
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	sal	ecx, 24
	mov	rdi, rsp
	or	esi, ecx
	mov	DWORD PTR 20[rsp], esi
	mov	esi, r10d
	call	DrawStripVSRam@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	mov	r8d, DWORD PTR 8[r9]
	sal	r8d, 9
	and	r8d, 28672
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L18:
	and	eax, 256
	or	al, -1
	mov	esi, eax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rax, QWORD PTR Pico[rip]
	movsx	rdi, edi
	mov	edx, DWORD PTR DrawScanline[rip]
	lea	esi, 1[rsi+rsi]
	mov	eax, DWORD PTR [rax+rdi*4]
	mov	rdi, rsp
	lea	edx, [rax+rdx*2]
	and	esi, edx
	mov	DWORD PTR 20[rsp], esi
	sar	esi, 4
	sal	esi, cl
	add	r8d, esi
	mov	DWORD PTR 16[rsp], r8d
	call	DrawStripInterlace@PLT
	jmp	.L1
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	DrawLayer, .-DrawLayer
	.comm	Pico,24,16
	.comm	DrawScanline,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_draw.c_DrawLayer.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	DrawLayer, %function
DrawLayer:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	mvn	ip, #0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r4, .L21
	ldr	r5, .L21+4
	ldr	lr, [r4, #8]
	sub	sp, sp, #32
	ldr	r6, [lr, #64]
	str	r5, [sp, #24]
	and	r7, r6, #3
	add	r5, sp, #32
	add	r5, r5, r7
	ldrb	r5, [r5, #-8]	@ zero_extendqisi2
	stm	sp, {r1, r3}
	mvn	ip, ip, lsl r5
	asr	r3, r6, #4
	cmp	r7, #1
	lsl	r3, r3, #8
	ldr	r1, .L21+8
	andeq	r3, r3, #256
	ldr	r1, [r1]
	str	r1, [sp, #28]
	mov	r1,#0
	str	ip, [sp, #8]
	orreq	ip, r3, #255
	beq	.L3
	tst	r6, #2
	movne	ip, #255
	andeq	r3, r3, #768
	orreq	ip, r3, #255
.L3:
	ands	r8, r0, #1
	ldreq	r6, [lr, #8]
	ldrne	r6, [lr, #16]
	ldr	r7, [lr, #44]
	lslne	r6, r6, #12
	lsleq	r6, r6, #9
	tst	r7, #2
	ldrne	r1, .L21+12
	ldr	r3, [lr, #52]
	ldrne	r1, [r1]
	lsl	r3, r3, #9
	addne	r3, r3, r1, lsl #1
	tst	r7, #1
	biceq	r3, r3, #15
	add	r3, r8, r3
	ldr	r1, [lr, #48]
	and	r6, r6, #28672
	ldr	lr, [r4, #4]
	lsl	r3, r3, #17
	str	r6, [sp, #12]
	lsr	r3, r3, #17
	ldr	r3, [lr, r3, lsl #2]
	and	r1, r1, #6
	cmp	r1, #6
	str	r3, [sp, #20]
	beq	.L18
	tst	r7, #4
	bne	.L19
	ldr	r3, [r4]
	ldr	r1, .L21+12
	ldr	r3, [r3, r8, lsl #2]
	ldr	r1, [r1]
	add	r3, r3, r1
	and	ip, ip, r3
	asr	r3, ip, #3
	mov	r1, r0
	add	r5, r6, r3, lsl r5
	mov	r0, sp
	str	ip, [sp, #16]
	str	r5, [sp, #12]
	bl	DrawStrip
.L1:
	ldr	r3, .L21+8
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L20
	add	sp, sp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L19:
	mov	r1, r0
	orr	ip, ip, r5, lsl #24
	mov	r0, sp
	str	ip, [sp, #16]
	bl	DrawStripVSRam
	b	.L1
.L18:
	ldr	r3, [r4]
	ldr	r2, .L21+12
	ldr	r3, [r3, r8, lsl #2]
	ldr	r2, [r2]
	lsl	ip, ip, #1
	orr	ip, ip, #1
	add	r3, r3, r2, lsl #1
	and	r3, r3, ip
	asr	ip, r3, #4
	add	r5, r6, ip, lsl r5
	mov	r0, sp
	str	r3, [sp, #16]
	str	r5, [sp, #12]
	bl	DrawStripInterlace
	b	.L1
.L20:
	bl	__stack_chk_fail
.L22:
	.align	2
.L21:
	.word	Pico
	.word	117769733
	.word	.LC0
	.word	DrawScanline
	.size	DrawLayer, .-DrawLayer
	.comm	Pico,12,4
	.comm	DrawScanline,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
