#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ cpuReset();
int /*<<< orphan*/ diskReset();
int /*<<< orphan*/ displayReset();
int /*<<< orphan*/ graphReset();
int /*<<< orphan*/ help15();
int /*<<< orphan*/ keyboardReset();
int /*<<< orphan*/ memoryReset();
int /*<<< orphan*/ mmuReset();
int /*<<< orphan*/ outputReset();
int /*<<< orphan*/ shutdownReset();
int /*<<< orphan*/ termReset();
int /*<<< orphan*/ timerReset();
void doInit(char *tokens[], int n) {
  if (n == 1) {
    timerReset();
    displayReset();
    keyboardReset();
    termReset();
    diskReset();
    outputReset();
    shutdownReset();
    graphReset();
    memoryReset();
    mmuReset();
    cpuReset();
  } else {
    help15();
  }
}


x86 assembly (clang, -O0):
<doInit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    122b <doInit+0x6b>
mov    $0x0,%al
call   1090 <timerReset@plt>
mov    $0x0,%al
call   10a0 <displayReset@plt>
mov    $0x0,%al
call   1050 <keyboardReset@plt>
mov    $0x0,%al
call   10d0 <termReset@plt>
mov    $0x0,%al
call   1070 <diskReset@plt>
mov    $0x0,%al
call   10c0 <outputReset@plt>
mov    $0x0,%al
call   10b0 <shutdownReset@plt>
mov    $0x0,%al
call   1080 <graphReset@plt>
mov    $0x0,%al
call   1040 <memoryReset@plt>
mov    $0x0,%al
call   10e0 <mmuReset@plt>
mov    $0x0,%al
call   1060 <cpuReset@plt>
jmp    1232 <doInit+0x72>
mov    $0x0,%al
call   1030 <help15@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doInit>:
cmp    $0x1,%esi
jne    1214 <doInit+0x54>
push   %rax
xor    %eax,%eax
call   1090 <timerReset@plt>
xor    %eax,%eax
call   10a0 <displayReset@plt>
xor    %eax,%eax
call   1050 <keyboardReset@plt>
xor    %eax,%eax
call   10d0 <termReset@plt>
xor    %eax,%eax
call   1070 <diskReset@plt>
xor    %eax,%eax
call   10c0 <outputReset@plt>
xor    %eax,%eax
call   10b0 <shutdownReset@plt>
xor    %eax,%eax
call   1080 <graphReset@plt>
xor    %eax,%eax
call   1040 <memoryReset@plt>
xor    %eax,%eax
call   10e0 <mmuReset@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <cpuReset@plt>
xor    %eax,%eax
jmp    1030 <help15@plt>

LLVM IR (-O0):
define void @doInit(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
store i8** %0, i8*** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %19
7: ; preds = %2
%8 = call i32 (...) @timerReset()
%9 = call i32 (...) @displayReset()
%10 = call i32 (...) @keyboardReset()
%11 = call i32 (...) @termReset()
%12 = call i32 (...) @diskReset()
%13 = call i32 (...) @outputReset()
%14 = call i32 (...) @shutdownReset()
%15 = call i32 (...) @graphReset()
%16 = call i32 (...) @memoryReset()
%17 = call i32 (...) @mmuReset()
%18 = call i32 (...) @cpuReset()
br label %21
19: ; preds = %2
%20 = call i32 (...) @help15()
br label %21
21: ; preds = %19, %7
ret void
}

LLVM IR (-O2):
define void @doInit(i8** nocapture readnone %0, i32 %1) {
%3 = icmp eq i32 %1, 1
br i1 %3, label %4, label %16
4: ; preds = %2
%5 = tail call i32 (...) @timerReset()
%6 = tail call i32 (...) @displayReset()
%7 = tail call i32 (...) @keyboardReset()
%8 = tail call i32 (...) @termReset()
%9 = tail call i32 (...) @diskReset()
%10 = tail call i32 (...) @outputReset()
%11 = tail call i32 (...) @shutdownReset()
%12 = tail call i32 (...) @graphReset()
%13 = tail call i32 (...) @memoryReset()
%14 = tail call i32 (...) @mmuReset()
%15 = tail call i32 (...) @cpuReset()
br label %18
16: ; preds = %2
%17 = tail call i32 (...) @help15()
br label %18
18: ; preds = %16, %4
ret void
}