	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cpu_reset_real
_cpu_reset_real:                        ## @cpu_reset_real
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	xorl	%eax, %eax
	callq	_disable_intr
	movq	_IO_KBD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	$4, %edi
	movl	$254, %esi
	callq	_outb
	movl	$500000, %edi                   ## imm = 0x7A120
	callq	_DELAY
	movl	$3321, %edi                     ## imm = 0xCF9
	movl	$2, %esi
	callq	_outb
	movl	$3321, %edi                     ## imm = 0xCF9
	movl	$6, %esi
	callq	_outb
	movl	$500000, %edi                   ## imm = 0x7A120
	callq	_DELAY
	movl	$146, %edi
	callq	_inb
	cmpl	$255, %eax
	je	LBB0_4
## %bb.1:
	movl	%eax, %ebx
	testb	$1, %bl
	je	LBB0_3
## %bb.2:
	movl	%ebx, %esi
	andl	$254, %esi
	movl	$146, %edi
	callq	_outb
LBB0_3:
	orl	$1, %ebx
	movl	$146, %edi
	movl	%ebx, %esi
	callq	_outb
	movl	$500000, %edi                   ## imm = 0x7A120
	callq	_DELAY
LBB0_4:
	leaq	L_str(%rip), %rdi
	callq	_puts
	movl	$1000000, %edi                  ## imm = 0xF4240
	callq	_DELAY
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -32(%rbp)
	leaq	-32(%rbp), %rdi
	callq	_lidt
	xorl	%eax, %eax
	callq	_breakpoint
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_IO_KBD,4,2                     ## @IO_KBD
	.comm	_CPU_GEODE1100,8,3              ## @CPU_GEODE1100
	.comm	_cpu,8,3                        ## @cpu
	.comm	_elan_mmcr,8,3                  ## @elan_mmcr
	.section	__TEXT,__cstring,cstring_literals
L_str:                                  ## @str
	.asciz	"No known reset method worked, attempting CPU shutdown"

	.no_dead_strip	_cpu_reset_real
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cpu_reset_real
_cpu_reset_real:                        ; @cpu_reset_real
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	bl	_disable_intr
Lloh0:
	adrp	x8, _IO_KBD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IO_KBD@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	add	w0, w8, #4
	mov	w1, #254
	bl	_outb
	mov	w0, #41248
	movk	w0, #7, lsl #16
	bl	_DELAY
	mov	w0, #3321
	mov	w1, #2
	bl	_outb
	mov	w0, #3321
	mov	w1, #6
	bl	_outb
	mov	w0, #41248
	movk	w0, #7, lsl #16
	bl	_DELAY
	mov	w0, #146
	bl	_inb
	cmp	w0, #255
	b.eq	LBB0_4
; %bb.1:
	mov	x19, x0
	tbz	w0, #0, LBB0_3
; %bb.2:
	and	w1, w19, #0xfe
	mov	w0, #146
	bl	_outb
LBB0_3:
	orr	w1, w19, #0x1
	mov	w0, #146
	bl	_outb
	mov	w0, #41248
	movk	w0, #7, lsl #16
	bl	_DELAY
LBB0_4:
Lloh3:
	adrp	x0, l_str@PAGE
Lloh4:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	mov	w0, #16960
	movk	w0, #15, lsl #16
	bl	_DELAY
	stp	xzr, xzr, [sp]
	mov	x0, sp
	bl	_lidt
	bl	_breakpoint
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_IO_KBD,4,2                     ; @IO_KBD
	.comm	_CPU_GEODE1100,8,3              ; @CPU_GEODE1100
	.comm	_cpu,8,3                        ; @cpu
	.comm	_elan_mmcr,8,3                  ; @elan_mmcr
	.section	__TEXT,__cstring,cstring_literals
l_str:                                  ; @str
	.asciz	"No known reset method worked, attempting CPU shutdown"

	.no_dead_strip	_cpu_reset_real
.subsections_via_symbols
