	.file	"extr_acpi_hpet.c_hpet_resume.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	hpet_resume, @function
hpet_resume:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	device_get_softc@PLT
	mov	rbp, rax
	mov	rdi, rax
	call	hpet_enable@PLT
	mov	eax, DWORD PTR 0[rbp]
	test	eax, eax
	jle	.L14
	xor	r13d, r13d
	mov	r14d, 1
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L19:
	mov	edx, DWORD PTR 20[rbx]
	mov	edi, DWORD PTR 28[rbx]
	test	DWORD PTR HPET_TCAP_PER_INT[rip], edx
	jne	.L18
.L5:
	mov	edx, DWORD PTR 16[rbp]
	test	edx, edx
	lea	r12d, 1023[rdx]
	cmovns	r12d, edx
	sar	r12d, 10
	add	r12d, eax
	mov	DWORD PTR 16[rbx], r12d
.L16:
	call	HPET_TIMER_COMPARATOR@PLT
	mov	edi, DWORD PTR 20[rbp]
	mov	edx, r12d
	mov	esi, eax
	call	bus_write_4@PLT
	mov	ecx, DWORD PTR 28[rbx]
	mov	edi, DWORD PTR 20[rbp]
	mov	edx, r14d
	mov	esi, DWORD PTR HPET_ISR[rip]
	sal	edx, cl
	call	bus_write_4@PLT
	mov	edi, DWORD PTR 28[rbx]
	mov	r12d, DWORD PTR 20[rbx]
	call	HPET_TIMER_CAP_CNF@PLT
	mov	edi, DWORD PTR 20[rbp]
	mov	edx, r12d
	mov	esi, eax
	call	bus_write_4@PLT
.L3:
	add	r13, 1
	cmp	DWORD PTR 0[rbp], r13d
	jle	.L14
.L2:
	mov	rbx, r13
	mov	rax, QWORD PTR TIMER_STOPPED[rip]
	sal	rbx, 5
	add	rbx, QWORD PTR 24[rbp]
	cmp	QWORD PTR 8[rbx], rax
	je	.L3
	mov	edi, DWORD PTR 20[rbp]
	mov	esi, DWORD PTR HPET_MAIN_COUNTER[rip]
	call	bus_read_4@PLT
	mov	rcx, QWORD PTR TIMER_PERIODIC[rip]
	cmp	QWORD PTR 8[rbx], rcx
	je	.L19
	mov	edi, DWORD PTR 28[rbx]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L14:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	or	edx, DWORD PTR HPET_TCNF_TYPE[rip]
	add	eax, DWORD PTR 24[rbx]
	mov	DWORD PTR 20[rbx], edx
	or	edx, DWORD PTR HPET_TCNF_VAL_SET[rip]
	mov	DWORD PTR 16[rbx], eax
	mov	r12d, edx
	call	HPET_TIMER_CAP_CNF@PLT
	mov	edi, DWORD PTR 20[rbp]
	mov	edx, r12d
	mov	esi, eax
	call	bus_write_4@PLT
	mov	edi, DWORD PTR 28[rbx]
	mov	r12d, DWORD PTR 16[rbx]
	call	HPET_TIMER_COMPARATOR@PLT
	mov	edi, DWORD PTR 20[rbp]
	mov	edx, r12d
	mov	esi, eax
	call	bus_write_4@PLT
	mov	edi, DWORD PTR 28[rbx]
	call	HPET_TIMER_COMPARATOR@PLT
	mov	edi, DWORD PTR 20[rbp]
	mov	esi, eax
	call	bus_read_4@PLT
	mov	r12d, DWORD PTR 24[rbx]
	mov	edi, DWORD PTR 28[rbx]
	jmp	.L16
	.cfi_endproc
.LFE0:
	.size	hpet_resume, .-hpet_resume
	.comm	TIMER_STOPPED,8,8
	.comm	TIMER_PERIODIC,8,8
	.comm	HPET_TCNF_VAL_SET,4,4
	.comm	HPET_TCNF_TYPE,4,4
	.comm	HPET_TCAP_PER_INT,4,4
	.comm	HPET_MAIN_COUNTER,4,4
	.comm	HPET_ISR,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_resume.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hpet_resume, %function
hpet_resume:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	bl	device_get_softc
	mov	r5, r0
	bl	hpet_enable
	ldr	r1, [r5]
	cmp	r1, #0
	ble	.L13
	mov	r6, #0
	ldr	r8, .L18
	mov	r7, r6
	ldr	r9, .L18+4
	ldr	fp, .L18+8
	b	.L2
.L17:
	ldr	r2, [r4, #12]
	ldr	r1, [fp]
	ldr	r10, [r5, #12]
	tst	r2, r1
	ldr	r0, [r4, #20]
	bne	.L16
.L5:
	ldr	r2, [r5, #8]
	add	r1, r2, #1020
	add	r1, r1, #3
	cmp	r2, #0
	movlt	r2, r1
	add	r2, r3, r2, asr #10
	str	r2, [r4, #8]
	bl	HPET_TIMER_COMPARATOR
	ldr	r2, [r4, #8]
	mov	r1, r0
	mov	r0, r10
	bl	bus_write_4
.L6:
	mov	r2, #1
	ldr	r3, [r4, #20]
	ldr	r1, .L18+12
	lsl	r2, r2, r3
	ldr	r1, [r1]
	ldr	r0, [r5, #12]
	bl	bus_write_4
	ldr	r0, [r4, #20]
	ldr	r10, [r5, #12]
	bl	HPET_TIMER_CAP_CNF
	ldr	r2, [r4, #12]
	mov	r1, r0
	mov	r0, r10
	bl	bus_write_4
	ldr	r1, [r5]
.L3:
	add	r7, r7, #1
	cmp	r1, r7
	add	r6, r6, #24
	ble	.L13
.L2:
	ldr	r4, [r5, #16]
	ldr	r3, [r8]
	add	r4, r4, r6
	ldr	r2, [r4, #4]
	cmp	r2, r3
	beq	.L3
	ldr	r3, .L18+16
	ldr	r0, [r5, #12]
	ldr	r1, [r3]
	bl	bus_read_4
	ldr	r1, [r4, #4]
	ldr	r2, [r9]
	mov	r3, r0
	cmp	r1, r2
	beq	.L17
	ldr	r10, [r5, #12]
	ldr	r0, [r4, #20]
	b	.L5
.L13:
	mov	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	ldr	r1, .L18+20
	ldr	ip, [r1]
	ldr	r1, [r4, #16]
	orr	r2, ip, r2
	add	r3, r1, r3
	str	r2, [r4, #12]
	str	r3, [r4, #8]
	bl	HPET_TIMER_CAP_CNF
	ldr	r3, .L18+24
	ldr	r2, [r4, #12]
	ldr	r3, [r3]
	mov	r1, r0
	orr	r2, r2, r3
	mov	r0, r10
	bl	bus_write_4
	ldr	r0, [r4, #20]
	ldr	r10, [r5, #12]
	bl	HPET_TIMER_COMPARATOR
	ldr	r2, [r4, #8]
	mov	r1, r0
	mov	r0, r10
	bl	bus_write_4
	ldr	r0, [r4, #20]
	ldr	r10, [r5, #12]
	bl	HPET_TIMER_COMPARATOR
	mov	r1, r0
	mov	r0, r10
	bl	bus_read_4
	ldr	r0, [r4, #20]
	ldr	r10, [r5, #12]
	bl	HPET_TIMER_COMPARATOR
	ldr	r2, [r4, #16]
	mov	r1, r0
	mov	r0, r10
	bl	bus_write_4
	b	.L6
.L19:
	.align	2
.L18:
	.word	TIMER_STOPPED
	.word	TIMER_PERIODIC
	.word	HPET_TCAP_PER_INT
	.word	HPET_ISR
	.word	HPET_MAIN_COUNTER
	.word	HPET_TCNF_TYPE
	.word	HPET_TCNF_VAL_SET
	.size	hpet_resume, .-hpet_resume
	.comm	TIMER_STOPPED,4,4
	.comm	TIMER_PERIODIC,4,4
	.comm	HPET_TCNF_VAL_SET,4,4
	.comm	HPET_TCNF_TYPE,4,4
	.comm	HPET_TCAP_PER_INT,4,4
	.comm	HPET_MAIN_COUNTER,4,4
	.comm	HPET_ISR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
