#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*/ adcInit();
int /*<<< orphan*/ cmdInit();
int /*<<< orphan*/ cpuInit();
int /*<<< orphan*/ gpioInit();
int /*<<< orphan*/ gpioSetDir(int, int, int);
int /*<<< orphan*/ gpioSetValue(int, int, int);
int /*<<< orphan*/ mcp24aaInit();
int /*<<< orphan*/ pmuInit();
int /*<<< orphan*/ printf(char *, char *, char *);
int /*<<< orphan*/ systickInit(int);
int /*<<< orphan*/ uartInit(int);
int /*<<< orphan*/ wdtInit();
void systemInit() {
  wdtInit();
  cpuInit();
  systickInit(((36000000) / 1000) * (1));
  gpioInit();
  pmuInit();
  adcInit();
  uartInit((115200));
  gpioSetDir((1), (5) - 1, 1);
  gpioSetDir((1), (5), 1);
  gpioSetValue((1), (5) - 1, (1));
  gpioSetValue((1), (5), (0));
  mcp24aaInit();
  printf("%sType '?' for a list of available commands%s", "\r\n", "\r\n");
  cmdInit();
}


x86 assembly (clang, -O0):
<systemInit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   10b0 <wdtInit@plt>
mov    $0x0,%al
call   10e0 <cpuInit@plt>
mov    $0x8ca0,%edi
call   1040 <systickInit@plt>
mov    $0x0,%al
call   1080 <gpioInit@plt>
mov    $0x0,%al
call   10a0 <pmuInit@plt>
mov    $0x0,%al
call   10c0 <adcInit@plt>
mov    $0x1c200,%edi
call   1050 <uartInit@plt>
mov    $0x1,%edx
mov    $0x4,%esi
mov    %edx,%edi
call   10d0 <gpioSetDir@plt>
mov    $0x1,%edx
mov    $0x5,%esi
mov    %edx,%edi
call   10d0 <gpioSetDir@plt>
mov    $0x1,%edx
mov    $0x4,%esi
mov    %edx,%edi
call   1090 <gpioSetValue@plt>
mov    $0x1,%edi
mov    $0x5,%esi
xor    %edx,%edx
call   1090 <gpioSetValue@plt>
mov    $0x0,%al
call   1060 <mcp24aaInit@plt>
lea    0xdb3(%rip),%rdi
lea    0xdda(%rip),%rdx
mov    %rdx,%rsi
call   1070 <printf@plt>
mov    $0x0,%al
call   1030 <cmdInit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<systemInit>:
push   %rax
xor    %eax,%eax
call   10b0 <wdtInit@plt>
xor    %eax,%eax
call   10e0 <cpuInit@plt>
mov    $0x8ca0,%edi
call   1040 <systickInit@plt>
xor    %eax,%eax
call   1080 <gpioInit@plt>
xor    %eax,%eax
call   10a0 <pmuInit@plt>
xor    %eax,%eax
call   10c0 <adcInit@plt>
mov    $0x1c200,%edi
call   1050 <uartInit@plt>
mov    $0x1,%edi
mov    $0x4,%esi
mov    $0x1,%edx
call   10d0 <gpioSetDir@plt>
mov    $0x1,%edi
mov    $0x5,%esi
mov    $0x1,%edx
call   10d0 <gpioSetDir@plt>
mov    $0x1,%edi
mov    $0x4,%esi
mov    $0x1,%edx
call   1090 <gpioSetValue@plt>
mov    $0x1,%edi
mov    $0x5,%esi
xor    %edx,%edx
call   1090 <gpioSetValue@plt>
xor    %eax,%eax
call   1060 <mcp24aaInit@plt>
lea    0xdad(%rip),%rdi
lea    0xdd4(%rip),%rdx
mov    %rdx,%rsi
call   1070 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <cmdInit@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"%sType '?' for a list of available commands%s\00"
@.str.1 = [3 x i8] c"\0D\0A\00"
define void @systemInit() {
%1 = call i32 (...) @wdtInit()
%2 = call i32 (...) @cpuInit()
%3 = call i32 @systickInit(i32 36000)
%4 = call i32 (...) @gpioInit()
%5 = call i32 (...) @pmuInit()
%6 = call i32 (...) @adcInit()
%7 = call i32 @uartInit(i32 115200)
%8 = call i32 @gpioSetDir(i32 1, i32 4, i32 1)
%9 = call i32 @gpioSetDir(i32 1, i32 5, i32 1)
%10 = call i32 @gpioSetValue(i32 1, i32 4, i32 1)
%11 = call i32 @gpioSetValue(i32 1, i32 5, i32 0)
%12 = call i32 (...) @mcp24aaInit()
%13 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%14 = call i32 (...) @cmdInit()
ret void
}

LLVM IR (-O2):
@.str = [46 x i8] c"%sType '?' for a list of available commands%s\00"
@.str.1 = [3 x i8] c"\0D\0A\00"
define void @systemInit() {
%1 = tail call i32 (...) @wdtInit()
%2 = tail call i32 (...) @cpuInit()
%3 = tail call i32 @systickInit(i32 36000)
%4 = tail call i32 (...) @gpioInit()
%5 = tail call i32 (...) @pmuInit()
%6 = tail call i32 (...) @adcInit()
%7 = tail call i32 @uartInit(i32 115200)
%8 = tail call i32 @gpioSetDir(i32 1, i32 4, i32 1)
%9 = tail call i32 @gpioSetDir(i32 1, i32 5, i32 1)
%10 = tail call i32 @gpioSetValue(i32 1, i32 4, i32 1)
%11 = tail call i32 @gpioSetValue(i32 1, i32 5, i32 0)
%12 = tail call i32 (...) @mcp24aaInit()
%13 = tail call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%14 = tail call i32 (...) @cmdInit()
ret void
}