	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function m68k_poll_detect
_m68k_poll_detect:                      ## @m68k_poll_detect
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r15d
	movl	%edi, %edx
	leal	-2(%rdx), %ecx
	movq	_m68k_poll@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	cmpl	%eax, %ecx
	jg	LBB0_8
## %bb.1:
	leal	2(%rdx), %ecx
	cmpl	%ecx, %eax
	jg	LBB0_8
## %bb.2:
	movl	%r15d, %ecx
	subl	4(%rbx), %ecx
	cmpl	$64, %ecx
	jg	LBB0_8
## %bb.3:
	movq	_SekNotPolling@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_8
## %bb.4:
	movq	8(%rbx), %rsi
	leaq	1(%rsi), %rax
	movq	%rax, 8(%rbx)
	movq	_POLL_THRESHOLD@GOTPCREL(%rip), %rdi
	xorl	%eax, %eax
	cmpq	(%rdi), %rsi
	jle	LBB0_9
## %bb.5:
	movq	_Pico32x@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	xorl	%eax, %eax
	testl	%r14d, %esi
	jne	LBB0_7
## %bb.6:
	movq	_EL_32X@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_elprintf
	movl	(%r12), %esi
	movl	$1, %eax
LBB0_7:
	orl	%r14d, %esi
	movl	%esi, (%r12)
	jmp	LBB0_9
LBB0_8:
	movq	$0, 8(%rbx)
	movl	%edx, (%rbx)
	movq	_SekNotPolling@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	xorl	%eax, %eax
LBB0_9:
	movl	%r15d, 4(%rbx)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_m68k_poll,16,3                 ## @m68k_poll
	.comm	_SekNotPolling,8,3              ## @SekNotPolling
	.comm	_POLL_THRESHOLD,8,3             ## @POLL_THRESHOLD
	.comm	_Pico32x,4,2                    ## @Pico32x
	.comm	_EL_32X,4,2                     ## @EL_32X
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"m68k poll addr %08x, cyc %u"

	.no_dead_strip	_m68k_poll_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function m68k_poll_detect
_m68k_poll_detect:                      ; @m68k_poll_detect
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x2
	mov	x19, x1
	mov	x2, x0
	sub	w8, w0, #2
Lloh0:
	adrp	x21, _m68k_poll@GOTPAGE
Lloh1:
	ldr	x21, [x21, _m68k_poll@GOTPAGEOFF]
	ldr	w9, [x21]
	add	w10, w0, #2
	cmp	w8, w9
	ccmp	w9, w10, #0, le
Lloh2:
	adrp	x8, _SekNotPolling@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SekNotPolling@GOTPAGEOFF]
	b.gt	LBB0_2
; %bb.1:
	ldr	w9, [x21, #4]
	sub	w3, w19, w9
	ldr	x9, [x8]
	cmp	w3, #64
	ccmp	x9, #0, #0, le
	b.eq	LBB0_4
LBB0_2:
	mov	w0, #0
	str	xzr, [x21, #8]
	str	w2, [x21]
	str	xzr, [x8]
LBB0_3:
	str	w19, [x21, #4]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	x8, [x21, #8]
	add	x9, x8, #1
	str	x9, [x21, #8]
Lloh4:
	adrp	x9, _POLL_THRESHOLD@GOTPAGE
Lloh5:
	ldr	x9, [x9, _POLL_THRESHOLD@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_7
; %bb.5:
Lloh7:
	adrp	x22, _Pico32x@GOTPAGE
Lloh8:
	ldr	x22, [x22, _Pico32x@GOTPAGEOFF]
	ldr	w8, [x22]
	tst	w8, w20
	b.eq	LBB0_8
; %bb.6:
	mov	w0, #0
	b	LBB0_9
LBB0_7:
	mov	w0, #0
	b	LBB0_3
LBB0_8:
Lloh9:
	adrp	x8, _EL_32X@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EL_32X@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elprintf
	ldr	w8, [x22]
	mov	w0, #1
LBB0_9:
	orr	w8, w8, w20
	str	w8, [x22]
	b	LBB0_3
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_m68k_poll,16,3                 ; @m68k_poll
	.comm	_SekNotPolling,8,3              ; @SekNotPolling
	.comm	_POLL_THRESHOLD,8,3             ; @POLL_THRESHOLD
	.comm	_Pico32x,4,2                    ; @Pico32x
	.comm	_EL_32X,4,2                     ; @EL_32X
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"m68k poll addr %08x, cyc %u"

	.no_dead_strip	_m68k_poll_detect
.subsections_via_symbols
