	.file	"extr_input.c_INPUT_Scanline.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	INPUT_Scanline
	.type	INPUT_Scanline, @function
INPUT_Scanline:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rax, QWORD PTR scanline_counter[rip]
	sub	rax, 1
	mov	QWORD PTR scanline_counter[rip], rax
	je	.L12
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	sub	rsp, 8
	.cfi_def_cfa_offset 16
	call	mouse_step@PLT
	mov	rax, QWORD PTR INPUT_mouse_mode[rip]
	cmp	rax, QWORD PTR INPUT_MOUSE_TRAK[rip]
	je	.L13
	cmp	rax, QWORD PTR INPUT_MOUSE_AMIGA[rip]
	mov	rsi, QWORD PTR mouse_st_codes[rip]
	je	.L14
.L6:
	mov	ecx, DWORD PTR mouse_y[rip]
	mov	eax, DWORD PTR mouse_x[rip]
	mov	rdx, QWORD PTR STICK[rip]
	and	ecx, 3
	and	eax, 3
	lea	eax, [rax+rcx*4]
	cdqe
	mov	ecx, DWORD PTR [rsi+rax*4]
	mov	rax, QWORD PTR INPUT_mouse_port[rip]
	mov	DWORD PTR [rdx+rax*4], ecx
.L4:
	mov	eax, DWORD PTR 4[rdx]
	mov	rcx, QWORD PTR PIA_PORT_input[rip]
	sal	eax, 4
	or	eax, DWORD PTR [rdx]
	mov	DWORD PTR [rcx], eax
	mov	eax, DWORD PTR 12[rdx]
	sal	eax, 4
	or	eax, DWORD PTR 8[rdx]
	mov	DWORD PTR 4[rcx], eax
	mov	rax, QWORD PTR max_scanline_counter[rip]
	mov	QWORD PTR scanline_counter[rip], rax
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	rsi, QWORD PTR mouse_amiga_codes[rip]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L13:
	mov	edi, DWORD PTR mouse_y[rip]
	mov	eax, DWORD PTR mouse_last_down[rip]
	mov	rdx, QWORD PTR STICK[rip]
	lea	ecx, 0[0+rdi*8]
	mov	edi, DWORD PTR mouse_x[rip]
	sal	eax, 2
	or	eax, DWORD PTR mouse_last_right[rip]
	and	ecx, 8
	or	eax, ecx
	lea	ecx, [rdi+rdi]
	and	ecx, 2
	or	eax, ecx
	mov	rcx, QWORD PTR INPUT_mouse_port[rip]
	mov	DWORD PTR [rdx+rcx*4], eax
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	INPUT_Scanline, .-INPUT_Scanline
	.comm	scanline_counter,8,8
	.comm	mouse_y,4,4
	.comm	mouse_x,4,4
	.comm	mouse_st_codes,8,8
	.comm	mouse_last_right,4,4
	.comm	mouse_last_down,4,4
	.comm	mouse_amiga_codes,8,8
	.comm	max_scanline_counter,8,8
	.comm	STICK,8,8
	.comm	PIA_PORT_input,8,8
	.comm	INPUT_mouse_port,8,8
	.comm	INPUT_mouse_mode,8,8
	.comm	INPUT_MOUSE_TRAK,8,8
	.comm	INPUT_MOUSE_AMIGA,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_input.c_INPUT_Scanline.c"
	.text
	.align	2
	.global	INPUT_Scanline
	.syntax unified
	.arm
	.fpu softvfp
	.type	INPUT_Scanline, %function
INPUT_Scanline:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, lr}
	ldr	r4, .L10
	ldr	r3, [r4]
	sub	r3, r3, #1
	cmp	r3, #0
	str	r3, [r4]
	popne	{r4, pc}
	bl	mouse_step
	ldr	r3, .L10+4
	ldr	r2, .L10+8
	ldr	r3, [r3]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L9
	ldr	r2, .L10+12
	ldr	ip, .L10+16
	ldr	r2, [r2]
	ldr	r0, .L10+20
	cmp	r3, r2
	ldreq	r3, .L10+24
	ldrne	r3, .L10+28
	ldr	r2, .L10+32
	ldr	r1, [r3]
	ldr	r3, .L10+36
	ldr	r2, [r2]
	ldr	r3, [r3]
	and	r2, r2, #3
	and	r3, r3, #3
	add	r3, r3, r2, lsl #2
	ldr	r1, [r1, r3, lsl #2]
	ldr	r2, [r0]
	ldr	r3, [ip]
	str	r1, [r3, r2, lsl #2]
.L4:
	ldr	r1, .L10+40
	ldr	r0, [r3, #4]
	ldr	r2, [r3]
	ldr	r1, [r1]
	orr	r2, r2, r0, lsl #4
	str	r2, [r1]
	ldr	r2, .L10+44
	ldr	r0, [r3, #12]
	ldr	r3, [r3, #8]
	ldr	r2, [r2]
	orr	r3, r3, r0, lsl #4
	str	r3, [r1, #4]
	str	r2, [r4]
	pop	{r4, pc}
.L9:
	ldr	r3, .L10+32
	ldr	r0, .L10+48
	ldr	r2, .L10+52
	ldr	r1, .L10+36
	ldr	r0, [r0]
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r1, [r1]
	orr	r2, r2, r0, lsl #2
	ldr	ip, .L10+16
	ldr	r0, .L10+20
	lsl	r3, r3, #3
	and	r3, r3, #8
	lsl	r1, r1, #1
	orr	r2, r2, r3
	ldr	r0, [r0]
	ldr	r3, [ip]
	and	r1, r1, #2
	orr	r2, r2, r1
	str	r2, [r3, r0, lsl #2]
	b	.L4
.L11:
	.align	2
.L10:
	.word	scanline_counter
	.word	INPUT_mouse_mode
	.word	INPUT_MOUSE_TRAK
	.word	INPUT_MOUSE_AMIGA
	.word	STICK
	.word	INPUT_mouse_port
	.word	mouse_amiga_codes
	.word	mouse_st_codes
	.word	mouse_y
	.word	mouse_x
	.word	PIA_PORT_input
	.word	max_scanline_counter
	.word	mouse_last_down
	.word	mouse_last_right
	.size	INPUT_Scanline, .-INPUT_Scanline
	.comm	scanline_counter,4,4
	.comm	mouse_y,4,4
	.comm	mouse_x,4,4
	.comm	mouse_st_codes,4,4
	.comm	mouse_last_right,4,4
	.comm	mouse_last_down,4,4
	.comm	mouse_amiga_codes,4,4
	.comm	max_scanline_counter,4,4
	.comm	STICK,4,4
	.comm	PIA_PORT_input,4,4
	.comm	INPUT_mouse_port,4,4
	.comm	INPUT_mouse_mode,4,4
	.comm	INPUT_MOUSE_TRAK,4,4
	.comm	INPUT_MOUSE_AMIGA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
