	.file	"extr_acpi_hpet.c_hpet_intr_single.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"HPET interrupt routed to the wrong CPU (timer %d CPU %d -> %d)!\n"
	.text
	.p2align 4
	.type	hpet_intr_single, @function
hpet_intr_single:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rax, QWORD PTR [rdi]
	mov	rdx, QWORD PTR TIMER_STOPPED[rip]
	cmp	rax, rdx
	je	.L20
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	r8, QWORD PTR 8[rdi]
	mov	rbx, rdi
	mov	rbp, QWORD PTR 72[rdi]
	test	r8, r8
	js	.L4
	mov	rcx, QWORD PTR curcpu[rip]
	cmp	r8, rcx
	je	.L4
	mov	esi, DWORD PTR 16[rdi]
	lea	edx, 1[rsi]
	mov	DWORD PTR 16[rdi], edx
	and	edx, 31
	je	.L21
.L5:
	cmp	QWORD PTR TIMER_PERIODIC[rip], rax
	je	.L22
.L6:
	cmp	QWORD PTR TIMER_ONESHOT[rip], rax
	jne	.L12
.L7:
	mov	edi, DWORD PTR 16[rbp]
	mov	esi, DWORD PTR HPET_MAIN_COUNTER[rip]
	call	bus_read_4@PLT
	mov	ecx, DWORD PTR 0[rbp]
	mov	edi, DWORD PTR 20[rbx]
	test	ecx, ecx
	lea	edx, 7[rcx]
	cmovns	edx, ecx
	sar	edx, 3
	movsx	rdx, edx
	lea	r12, [rax+rdx]
	mov	QWORD PTR 64[rbx], r12
	call	HPET_TIMER_COMPARATOR@PLT
	mov	edi, DWORD PTR 16[rbp]
	mov	rdx, r12
	mov	esi, eax
	call	bus_write_4@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, DWORD PTR FILTER_HANDLED[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	cmp	rax, QWORD PTR TIMER_PERIODIC[rip]
	je	.L23
.L9:
	cmp	rax, QWORD PTR TIMER_ONESHOT[rip]
	jne	.L11
	mov	QWORD PTR [rbx], rdx
.L11:
	mov	rax, QWORD PTR 32[rbx]
	lea	rax, [rax+rax*4]
	sal	rax, 4
	add	rax, QWORD PTR 8[rbp]
	cmp	QWORD PTR 56[rax], 0
	je	.L12
	mov	esi, DWORD PTR 40[rax]
	lea	rdi, 40[rax]
	call	[QWORD PTR 48[rax]]
.L12:
	pop	rbx
	.cfi_def_cfa_offset 24
	mov	eax, DWORD PTR FILTER_HANDLED[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	mov	eax, DWORD PTR FILTER_STRAY[rip]
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	.cfi_offset 6, -24
	.cfi_offset 12, -16
	mov	ecx, DWORD PTR 24[rbx]
	test	DWORD PTR HPET_TCAP_PER_INT[rip], ecx
	jne	.L9
	movsx	rax, DWORD PTR 28[rbx]
	add	QWORD PTR 64[rbx], rax
	mov	edi, DWORD PTR 16[rbp]
	mov	esi, DWORD PTR HPET_MAIN_COUNTER[rip]
	call	bus_read_4@PLT
	mov	edx, DWORD PTR 28[rbx]
	mov	r12, QWORD PTR 64[rbx]
	mov	r8, rax
	mov	eax, edx
	shr	eax, 31
	add	eax, edx
	sar	eax
	cdqe
	add	rax, r8
	mov	rdx, rax
	sub	rdx, r12
	test	rdx, rdx
	jle	.L10
	mov	QWORD PTR 64[rbx], rax
	mov	r12, rax
.L10:
	mov	edi, DWORD PTR 20[rbx]
	call	HPET_TIMER_COMPARATOR@PLT
	mov	edi, DWORD PTR 16[rbp]
	mov	rdx, r12
	mov	esi, eax
	call	bus_write_4@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L22:
	mov	edx, DWORD PTR 24[rbx]
	test	DWORD PTR HPET_TCAP_PER_INT[rip], edx
	je	.L7
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L21:
	mov	esi, DWORD PTR 20[rdi]
	mov	rdx, r8
	lea	rdi, .LC0[rip]
	call	printf@PLT
	mov	rax, QWORD PTR [rbx]
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	hpet_intr_single, .-hpet_intr_single
	.comm	curcpu,8,8
	.comm	TIMER_STOPPED,8,8
	.comm	TIMER_PERIODIC,8,8
	.comm	TIMER_ONESHOT,8,8
	.comm	HPET_TCAP_PER_INT,4,4
	.comm	HPET_MAIN_COUNTER,4,4
	.comm	FILTER_STRAY,4,4
	.comm	FILTER_HANDLED,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_acpi_hpet.c_hpet_intr_single.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"HPET interrupt routed to the wrong CPU (timer %d CP"
	.ascii	"U %d -> %d)!\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hpet_intr_single, %function
hpet_intr_single:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L25
	ldr	r1, [r0]
	push	{r4, r5, r6, lr}
	mov	r4, r0
	ldr	r0, [r3]
	cmp	r1, r0
	beq	.L21
	ldr	r2, [r4, #4]
	ldr	r5, [r4, #44]
	cmp	r2, #0
	blt	.L4
	ldr	r3, .L25+4
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L4
	ldr	r0, [r4, #8]
	add	r0, r0, #1
	tst	r0, #31
	str	r0, [r4, #8]
	beq	.L22
.L5:
	ldr	r3, .L25+8
	ldr	r3, [r3]
	cmp	r3, r1
	beq	.L23
.L6:
	ldr	r3, .L25+12
	ldr	r3, [r3]
	cmp	r3, r1
	bne	.L12
.L7:
	ldr	r3, .L25+16
	ldr	r0, [r5, #8]
	ldr	r1, [r3]
	bl	bus_read_4
	ldr	r3, [r5]
	ldr	r5, [r5, #8]
	add	r2, r3, #7
	cmp	r3, #0
	movlt	r3, r2
	add	r3, r0, r3, asr #3
	str	r3, [r4, #40]
	ldr	r0, [r4, #12]
	bl	HPET_TIMER_COMPARATOR
	ldr	r2, [r4, #40]
	mov	r1, r0
	mov	r0, r5
	bl	bus_write_4
	b	.L12
.L4:
	ldr	r3, .L25+8
	ldr	r3, [r3]
	cmp	r1, r3
	beq	.L24
.L9:
	ldr	r3, .L25+12
	ldr	r3, [r3]
	cmp	r1, r3
	streq	r0, [r4]
.L11:
	ldr	r3, [r4, #24]
	ldr	r2, [r5, #4]
	add	r3, r3, r3, lsl #1
	add	r3, r2, r3, lsl #4
	ldr	r2, [r3, #36]
	cmp	r2, #0
	beq	.L12
	mov	r0, r3
	ldr	r3, [r3, #32]
	ldr	r1, [r0, #28]!
	blx	r3
.L12:
	ldr	r3, .L25+20
	ldr	r0, [r3]
	pop	{r4, r5, r6, pc}
.L21:
	ldr	r3, .L25+24
	ldr	r0, [r3]
	pop	{r4, r5, r6, pc}
.L24:
	ldr	r3, .L25+28
	ldr	r2, [r4, #16]
	ldr	r3, [r3]
	tst	r2, r3
	bne	.L9
	ldr	r3, [r4, #40]
	ldr	r1, [r4, #20]
	ldr	r2, .L25+16
	add	r3, r3, r1
	str	r3, [r4, #40]
	ldr	r1, [r2]
	ldr	r0, [r5, #8]
	bl	bus_read_4
	ldr	r3, [r4, #20]
	ldr	r2, [r4, #40]
	add	r3, r3, r3, lsr #31
	add	r3, r0, r3, asr #1
	sub	r2, r3, r2
	cmp	r2, #0
	ldr	r0, [r4, #12]
	strgt	r3, [r4, #40]
	ldr	r6, [r5, #8]
	bl	HPET_TIMER_COMPARATOR
	ldr	r2, [r4, #40]
	mov	r1, r0
	mov	r0, r6
	bl	bus_write_4
	b	.L11
.L23:
	ldr	r3, .L25+28
	ldr	r2, [r4, #16]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L7
	b	.L6
.L22:
	ldr	r1, [r4, #12]
	ldr	r0, .L25+32
	bl	printf
	ldr	r1, [r4]
	b	.L5
.L26:
	.align	2
.L25:
	.word	TIMER_STOPPED
	.word	curcpu
	.word	TIMER_PERIODIC
	.word	TIMER_ONESHOT
	.word	HPET_MAIN_COUNTER
	.word	FILTER_HANDLED
	.word	FILTER_STRAY
	.word	HPET_TCAP_PER_INT
	.word	.LC0
	.size	hpet_intr_single, .-hpet_intr_single
	.comm	curcpu,4,4
	.comm	TIMER_STOPPED,4,4
	.comm	TIMER_PERIODIC,4,4
	.comm	TIMER_ONESHOT,4,4
	.comm	HPET_TCAP_PER_INT,4,4
	.comm	HPET_MAIN_COUNTER,4,4
	.comm	FILTER_STRAY,4,4
	.comm	FILTER_HANDLED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
