	.file	"extr_galaxy.c_door.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	door
	.type	door, @function
door:
.LFB0:
	.cfi_startproc
	endbr64
	sub	rsp, 8
	.cfi_def_cfa_offset 16
	mov	rax, QWORD PTR doorstate[rip]
	cmp	rax, QWORD PTR OPENING[rip]
	je	.L8
	cmp	rax, QWORD PTR CLOSING[rip]
	je	.L9
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	ecx, 6
	mov	esi, 2
	mov	edi, 2
	mov	rax, QWORD PTR doorpos[rip]
	mov	rdx, QWORD PTR film[rip]
	add	rax, 1
	mov	r8d, DWORD PTR [rdx+rax*4]
	mov	edx, 12
	mov	QWORD PTR doorpos[rip], rax
	call	set_win_tiles@PLT
	mov	rax, QWORD PTR NBDFRAMES[rip]
	cmp	QWORD PTR doorpos[rip], rax
	jne	.L1
	mov	rax, QWORD PTR OPENED[rip]
	mov	QWORD PTR doorstate[rip], rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	ecx, 6
	mov	esi, 2
	mov	edi, 2
	mov	rax, QWORD PTR doorpos[rip]
	mov	rdx, QWORD PTR film[rip]
	sub	rax, 1
	mov	r8d, DWORD PTR [rdx+rax*4]
	mov	edx, 12
	mov	QWORD PTR doorpos[rip], rax
	call	set_win_tiles@PLT
	cmp	QWORD PTR doorpos[rip], 0
	jne	.L1
	mov	rax, QWORD PTR CLOSED[rip]
	mov	QWORD PTR doorstate[rip], rax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	door, .-door
	.comm	film,8,8
	.comm	doorstate,8,8
	.comm	doorpos,8,8
	.comm	OPENING,8,8
	.comm	OPENED,8,8
	.comm	NBDFRAMES,8,8
	.comm	CLOSING,8,8
	.comm	CLOSED,8,8
	.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_galaxy.c_door.c"
	.text
	.align	2
	.global	door
	.syntax unified
	.arm
	.fpu softvfp
	.type	door, %function
door:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	ldr	r2, .L10
	ldr	r4, .L10+4
	ldr	r2, [r2]
	ldr	r3, [r4]
	sub	sp, sp, #12
	cmp	r3, r2
	beq	.L8
	ldr	r2, .L10+8
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L9
.L1:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L8:
	mov	r1, #2
	ldr	r5, .L10+12
	ldr	r3, .L10+16
	ldr	ip, [r5]
	ldr	r3, [r3]
	add	ip, ip, #1
	ldr	r3, [r3, ip, lsl #2]
	mov	r2, #12
	str	r3, [sp]
	mov	r0, r1
	mov	r3, #6
	str	ip, [r5]
	bl	set_win_tiles
	ldr	r3, .L10+20
	ldr	r2, [r5]
	ldr	r3, [r3]
	cmp	r2, r3
	ldreq	r3, .L10+24
	ldreq	r3, [r3]
	streq	r3, [r4]
	b	.L1
.L9:
	mov	r1, #2
	ldr	r5, .L10+12
	ldr	r3, .L10+16
	ldr	ip, [r5]
	ldr	r3, [r3]
	sub	ip, ip, #1
	ldr	r3, [r3, ip, lsl #2]
	mov	r0, r1
	str	r3, [sp]
	mov	r2, #12
	mov	r3, #6
	str	ip, [r5]
	bl	set_win_tiles
	ldr	r3, [r5]
	cmp	r3, #0
	ldreq	r3, .L10+28
	ldreq	r3, [r3]
	streq	r3, [r4]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L11:
	.align	2
.L10:
	.word	OPENING
	.word	doorstate
	.word	CLOSING
	.word	doorpos
	.word	film
	.word	NBDFRAMES
	.word	OPENED
	.word	CLOSED
	.size	door, .-door
	.comm	film,4,4
	.comm	doorstate,4,4
	.comm	doorpos,4,4
	.comm	OPENING,4,4
	.comm	OPENED,4,4
	.comm	NBDFRAMES,4,4
	.comm	CLOSING,4,4
	.comm	CLOSED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
