	.file	"extr_cpu_machdep.c_cpu_reset_real.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"No known reset method worked, attempting CPU shutdown\n"
	.text
	.p2align 4
	.type	cpu_reset_real, @function
cpu_reset_real:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	sub	rsp, 32
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	disable_intr@PLT
	mov	eax, DWORD PTR IO_KBD[rip]
	mov	esi, 254
	lea	edi, 4[rax]
	call	outb@PLT
	mov	edi, 500000
	call	DELAY@PLT
	mov	esi, 2
	mov	edi, 3321
	call	outb@PLT
	mov	esi, 6
	mov	edi, 3321
	call	outb@PLT
	mov	edi, 500000
	call	DELAY@PLT
	mov	edi, 146
	call	inb@PLT
	cmp	eax, 255
	je	.L2
	mov	ebx, eax
	test	al, 1
	jne	.L14
.L3:
	or	ebx, 1
	mov	edi, 146
	mov	esi, ebx
	call	outb@PLT
	mov	edi, 500000
	call	DELAY@PLT
.L2:
	lea	rdi, .LC0[rip]
	call	printf@PLT
	mov	edi, 1000000
	call	DELAY@PLT
	mov	rdi, rsp
	mov	QWORD PTR [rsp], 0
	mov	QWORD PTR 8[rsp], 0
	call	lidt@PLT
	xor	eax, eax
	call	breakpoint@PLT
.L4:
	jmp	.L4
.L14:
	mov	esi, eax
	mov	edi, 146
	and	esi, 254
	call	outb@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	cpu_reset_real, .-cpu_reset_real
	.comm	elan_mmcr,8,8
	.comm	cpu,8,8
	.comm	IO_KBD,4,4
	.comm	CPU_GEODE1100,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_cpu_machdep.c_cpu_reset_real.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"No known reset method worked, attempting CPU shutdo"
	.ascii	"wn\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cpu_reset_real, %function
cpu_reset_real:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, lr}
	ldr	r3, .L15
	sub	sp, sp, #16
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	disable_intr
	ldr	r3, .L15+4
	mov	r1, #254
	ldr	r0, [r3]
	add	r0, r0, #4
	bl	outb
	ldr	r0, .L15+8
	bl	DELAY
	mov	r1, #2
	ldr	r0, .L15+12
	bl	outb
	mov	r1, #6
	ldr	r0, .L15+12
	bl	outb
	ldr	r0, .L15+8
	bl	DELAY
	mov	r0, #146
	bl	inb
	cmp	r0, #255
	beq	.L2
	tst	r0, #1
	mov	r4, r0
	bne	.L14
.L3:
	mov	r0, #146
	orr	r1, r4, #1
	bl	outb
	ldr	r0, .L15+8
	bl	DELAY
.L2:
	ldr	r0, .L15+16
	bl	printf
	ldr	r0, .L15+20
	bl	DELAY
	mov	r3, #0
	add	r0, sp, #4
	str	r3, [sp, #8]
	str	r3, [sp, #4]
	bl	lidt
	bl	breakpoint
.L4:
	b	.L4
.L14:
	and	r1, r0, #254
	mov	r0, #146
	bl	outb
	b	.L3
.L16:
	.align	2
.L15:
	.word	.LC1
	.word	IO_KBD
	.word	500000
	.word	3321
	.word	.LC0
	.word	1000000
	.size	cpu_reset_real, .-cpu_reset_real
	.comm	elan_mmcr,4,4
	.comm	cpu,4,4
	.comm	IO_KBD,4,4
	.comm	CPU_GEODE1100,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
