	.file	"extr_lapic_native.c_lapic_smm_restore.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"lapic_smm_restore\n"
	.text
	.p2align 4
	.globl	lapic_smm_restore
	.type	lapic_smm_restore, @function
lapic_smm_restore:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rdi, QWORD PTR FALSE[rip]
	cmp	QWORD PTR lapic_os_enabled[rip], rdi
	je	.L1
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	call	ml_set_interrupts_enabled@PLT
	mov	esi, DWORD PTR TIMER[rip]
	mov	edi, DWORD PTR LAPIC_REDUCED_INTERRUPT_BASE[rip]
	mov	rbp, rax
	call	LAPIC_ISR_IS_SET@PLT
	test	rax, rax
	jne	.L12
	mov	rdi, rbp
	pop	rbp
	.cfi_remember_state
	.cfi_restore 6
	.cfi_def_cfa_offset 8
	jmp	ml_set_interrupts_enabled@PLT
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	xor	eax, eax
	call	_lapic_end_of_interrupt@PLT
	mov	edi, DWORD PTR TIMER_CURRENT_COUNT[rip]
	call	LAPIC_READ@PLT
	test	rax, rax
	je	.L13
.L4:
	lea	rdi, .LC0[rip]
	call	kprintf@PLT
	mov	rdi, rbp
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 8
	jmp	ml_set_interrupts_enabled@PLT
	.p2align 4,,10
	.p2align 3
.L1:
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	edi, DWORD PTR TIMER_INITIAL_COUNT[rip]
	mov	esi, 1
	call	LAPIC_WRITE@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	lapic_smm_restore, .-lapic_smm_restore
	.comm	lapic_os_enabled,8,8
	.comm	TIMER_INITIAL_COUNT,4,4
	.comm	TIMER_CURRENT_COUNT,4,4
	.comm	TIMER,4,4
	.comm	LAPIC_REDUCED_INTERRUPT_BASE,4,4
	.comm	FALSE,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_lapic_native.c_lapic_smm_restore.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"lapic_smm_restore\012\000"
	.text
	.align	2
	.global	lapic_smm_restore
	.syntax unified
	.arm
	.fpu softvfp
	.type	lapic_smm_restore, %function
lapic_smm_restore:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, .L14
	ldr	r3, .L14+4
	ldr	r0, [r2]
	ldr	r3, [r3]
	cmp	r3, r0
	bxeq	lr
	push	{r4, lr}
	bl	ml_set_interrupts_enabled
	ldr	r2, .L14+8
	ldr	r3, .L14+12
	mov	r4, r0
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	LAPIC_ISR_IS_SET
	cmp	r0, #0
	bne	.L12
	mov	r0, r4
	pop	{r4, lr}
	b	ml_set_interrupts_enabled
.L12:
	bl	_lapic_end_of_interrupt
	ldr	r3, .L14+16
	ldr	r0, [r3]
	bl	LAPIC_READ
	cmp	r0, #0
	beq	.L13
.L4:
	ldr	r0, .L14+20
	bl	kprintf
	mov	r0, r4
	pop	{r4, lr}
	b	ml_set_interrupts_enabled
.L13:
	ldr	r3, .L14+24
	mov	r1, #1
	ldr	r0, [r3]
	bl	LAPIC_WRITE
	b	.L4
.L15:
	.align	2
.L14:
	.word	FALSE
	.word	lapic_os_enabled
	.word	TIMER
	.word	LAPIC_REDUCED_INTERRUPT_BASE
	.word	TIMER_CURRENT_COUNT
	.word	.LC0
	.word	TIMER_INITIAL_COUNT
	.size	lapic_smm_restore, .-lapic_smm_restore
	.comm	lapic_os_enabled,4,4
	.comm	TIMER_INITIAL_COUNT,4,4
	.comm	TIMER_CURRENT_COUNT,4,4
	.comm	TIMER,4,4
	.comm	LAPIC_REDUCED_INTERRUPT_BASE,4,4
	.comm	FALSE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
