	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_INPUT_Scanline                 ## -- Begin function INPUT_Scanline
	.p2align	4, 0x90
_INPUT_Scanline:                        ## @INPUT_Scanline
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_scanline_counter@GOTPCREL(%rip), %rbx
	decq	(%rbx)
	jne	LBB0_8
## %bb.1:
	xorl	%eax, %eax
	callq	_mouse_step
	movq	_INPUT_mouse_mode@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_INPUT_MOUSE_TRAK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movq	_mouse_y@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	shll	$3, %ecx
	andl	$8, %ecx
	movq	_mouse_last_down@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$2, %eax
	orl	%ecx, %eax
	movq	_mouse_x@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%ecx, %ecx
	andl	$2, %ecx
	movq	_mouse_last_right@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	orl	%ecx, %eax
	jmp	LBB0_7
LBB0_3:
	movq	_INPUT_MOUSE_AMIGA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.5:
	movq	_mouse_amiga_codes@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	_mouse_st_codes@GOTPCREL(%rip), %rax
LBB0_6:
	movq	(%rax), %rax
	movq	_mouse_y@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	$3, %ecx
	movq	_mouse_x@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	$3, %edx
	leaq	(%rdx,%rcx,4), %rcx
	movl	(%rax,%rcx,4), %eax
LBB0_7:
	movq	_STICK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_INPUT_mouse_port@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%eax, (%rcx,%rdx,4)
	movl	4(%rcx), %eax
	shll	$4, %eax
	orl	(%rcx), %eax
	movq	_PIA_PORT_input@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%eax, (%rdx)
	movl	12(%rcx), %eax
	shll	$4, %eax
	orl	8(%rcx), %eax
	movl	%eax, 4(%rdx)
	movq	_max_scanline_counter@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_scanline_counter,8,3           ## @scanline_counter
	.comm	_INPUT_mouse_mode,8,3           ## @INPUT_mouse_mode
	.comm	_INPUT_MOUSE_TRAK,8,3           ## @INPUT_MOUSE_TRAK
	.comm	_mouse_y,4,2                    ## @mouse_y
	.comm	_mouse_last_down,4,2            ## @mouse_last_down
	.comm	_mouse_x,4,2                    ## @mouse_x
	.comm	_mouse_last_right,4,2           ## @mouse_last_right
	.comm	_STICK,8,3                      ## @STICK
	.comm	_INPUT_mouse_port,8,3           ## @INPUT_mouse_port
	.comm	_INPUT_MOUSE_AMIGA,8,3          ## @INPUT_MOUSE_AMIGA
	.comm	_mouse_amiga_codes,8,3          ## @mouse_amiga_codes
	.comm	_mouse_st_codes,8,3             ## @mouse_st_codes
	.comm	_PIA_PORT_input,8,3             ## @PIA_PORT_input
	.comm	_max_scanline_counter,8,3       ## @max_scanline_counter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_INPUT_Scanline                 ; -- Begin function INPUT_Scanline
	.p2align	2
_INPUT_Scanline:                        ; @INPUT_Scanline
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x19, _scanline_counter@GOTPAGE
Lloh1:
	ldr	x19, [x19, _scanline_counter@GOTPAGEOFF]
	ldr	x8, [x19]
	subs	x8, x8, #1
	str	x8, [x19]
	b.ne	LBB0_5
; %bb.1:
	bl	_mouse_step
Lloh2:
	adrp	x8, _INPUT_mouse_mode@GOTPAGE
Lloh3:
	ldr	x8, [x8, _INPUT_mouse_mode@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _INPUT_MOUSE_TRAK@GOTPAGE
Lloh6:
	ldr	x9, [x9, _INPUT_MOUSE_TRAK@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
Lloh8:
	adrp	x8, _mouse_y@GOTPAGE
Lloh9:
	ldr	x8, [x8, _mouse_y@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _mouse_last_down@GOTPAGE
Lloh12:
	ldr	x9, [x9, _mouse_last_down@GOTPAGEOFF]
	ubfiz	w8, w8, #3, #1
Lloh13:
	ldr	w9, [x9]
	orr	w8, w8, w9, lsl #2
Lloh14:
	adrp	x9, _mouse_x@GOTPAGE
Lloh15:
	ldr	x9, [x9, _mouse_x@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	ubfiz	w9, w9, #1, #1
Lloh17:
	adrp	x10, _mouse_last_right@GOTPAGE
Lloh18:
	ldr	x10, [x10, _mouse_last_right@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	orr	w8, w8, w10
	orr	w8, w8, w9
	b	LBB0_4
LBB0_3:
Lloh20:
	adrp	x9, _INPUT_MOUSE_AMIGA@GOTPAGE
Lloh21:
	ldr	x9, [x9, _INPUT_MOUSE_AMIGA@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
Lloh23:
	adrp	x10, _mouse_amiga_codes@GOTPAGE
Lloh24:
	ldr	x10, [x10, _mouse_amiga_codes@GOTPAGEOFF]
Lloh25:
	adrp	x11, _mouse_st_codes@GOTPAGE
Lloh26:
	ldr	x11, [x11, _mouse_st_codes@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, eq
	ldr	x8, [x8]
Lloh27:
	adrp	x9, _mouse_y@GOTPAGE
Lloh28:
	ldr	x9, [x9, _mouse_y@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	lsl	w9, w9, #2
	and	x9, x9, #0xc
Lloh30:
	adrp	x10, _mouse_x@GOTPAGE
Lloh31:
	ldr	x10, [x10, _mouse_x@GOTPAGEOFF]
Lloh32:
	ldr	w10, [x10]
	bfxil	x9, x10, #0, #2
	ldr	w8, [x8, x9, lsl #2]
LBB0_4:
Lloh33:
	adrp	x9, _STICK@GOTPAGE
Lloh34:
	ldr	x9, [x9, _STICK@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9]
Lloh36:
	adrp	x10, _INPUT_mouse_port@GOTPAGE
Lloh37:
	ldr	x10, [x10, _INPUT_mouse_port@GOTPAGEOFF]
Lloh38:
	ldr	x10, [x10]
	str	w8, [x9, x10, lsl #2]
	ldp	w10, w8, [x9]
	orr	w8, w10, w8, lsl #4
Lloh39:
	adrp	x10, _PIA_PORT_input@GOTPAGE
Lloh40:
	ldr	x10, [x10, _PIA_PORT_input@GOTPAGEOFF]
Lloh41:
	ldr	x10, [x10]
	str	w8, [x10]
	ldp	w9, w8, [x9, #8]
	orr	w8, w9, w8, lsl #4
	str	w8, [x10, #4]
Lloh42:
	adrp	x8, _max_scanline_counter@GOTPAGE
Lloh43:
	ldr	x8, [x8, _max_scanline_counter@GOTPAGEOFF]
Lloh44:
	ldr	x8, [x8]
	str	x8, [x19]
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_scanline_counter,8,3           ; @scanline_counter
	.comm	_INPUT_mouse_mode,8,3           ; @INPUT_mouse_mode
	.comm	_INPUT_MOUSE_TRAK,8,3           ; @INPUT_MOUSE_TRAK
	.comm	_mouse_y,4,2                    ; @mouse_y
	.comm	_mouse_last_down,4,2            ; @mouse_last_down
	.comm	_mouse_x,4,2                    ; @mouse_x
	.comm	_mouse_last_right,4,2           ; @mouse_last_right
	.comm	_STICK,8,3                      ; @STICK
	.comm	_INPUT_mouse_port,8,3           ; @INPUT_mouse_port
	.comm	_INPUT_MOUSE_AMIGA,8,3          ; @INPUT_MOUSE_AMIGA
	.comm	_mouse_amiga_codes,8,3          ; @mouse_amiga_codes
	.comm	_mouse_st_codes,8,3             ; @mouse_st_codes
	.comm	_PIA_PORT_input,8,3             ; @PIA_PORT_input
	.comm	_max_scanline_counter,8,3       ; @max_scanline_counter
.subsections_via_symbols
