#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*/ gpioSet(int, int);
int /*<<< orphan*/ output(int, char *);
int /*<<< orphan*/ usleep(int);
void bringUpChip() {
  output(1, "Bringing up GPIOs 53,71 and 124\n");
  gpioSet(53, 1);
  gpioSet(71, 1);
  gpioSet(124, 1);
  usleep(5000);
  output(1, "Twiddeling GPIO 114\n");
  gpioSet(114, 1);
  usleep(3000);
  gpioSet(114, 0);
  usleep(3000);
  output(1, "Bringing up GPIOs 81 and 114\n");
  gpioSet(81, 1);
  gpioSet(114, 1);
  usleep(500000);
}


x86 assembly (clang, -O0):
<bringUpChip>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xec0(%rip),%rsi
call   1030 <output@plt>
mov    $0x35,%edi
mov    $0x1,%esi
call   1040 <gpioSet@plt>
mov    $0x47,%edi
mov    $0x1,%esi
call   1040 <gpioSet@plt>
mov    $0x7c,%edi
mov    $0x1,%esi
call   1040 <gpioSet@plt>
mov    $0x1388,%edi
call   1050 <usleep@plt>
mov    $0x1,%edi
lea    0xe99(%rip),%rsi
call   1030 <output@plt>
mov    $0x72,%edi
mov    $0x1,%esi
call   1040 <gpioSet@plt>
mov    $0xbb8,%edi
call   1050 <usleep@plt>
mov    $0x72,%edi
xor    %esi,%esi
call   1040 <gpioSet@plt>
mov    $0xbb8,%edi
call   1050 <usleep@plt>
mov    $0x1,%edi
lea    0xe6e(%rip),%rsi
call   1030 <output@plt>
mov    $0x51,%edi
mov    $0x1,%esi
call   1040 <gpioSet@plt>
mov    $0x72,%edi
mov    $0x1,%esi
call   1040 <gpioSet@plt>
mov    $0x7a120,%edi
call   1050 <usleep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bringUpChip>:
push   %rax
lea    0xec8(%rip),%rsi
mov    $0x1,%edi
call   1030 <output@plt>
mov    $0x35,%edi
mov    $0x1,%esi
call   1040 <gpioSet@plt>
mov    $0x47,%edi
mov    $0x1,%esi
call   1040 <gpioSet@plt>
mov    $0x7c,%edi
mov    $0x1,%esi
call   1040 <gpioSet@plt>
mov    $0x1388,%edi
call   1050 <usleep@plt>
lea    0xea1(%rip),%rsi
mov    $0x1,%edi
call   1030 <output@plt>
mov    $0x72,%edi
mov    $0x1,%esi
call   1040 <gpioSet@plt>
mov    $0xbb8,%edi
call   1050 <usleep@plt>
mov    $0x72,%edi
xor    %esi,%esi
call   1040 <gpioSet@plt>
mov    $0xbb8,%edi
call   1050 <usleep@plt>
lea    0xe76(%rip),%rsi
mov    $0x1,%edi
call   1030 <output@plt>
mov    $0x51,%edi
mov    $0x1,%esi
call   1040 <gpioSet@plt>
mov    $0x72,%edi
mov    $0x1,%esi
call   1040 <gpioSet@plt>
mov    $0x7a120,%edi
pop    %rax
jmp    1050 <usleep@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"Bringing up GPIOs 53,71 and 124\0A\00"
@.str.1 = [21 x i8] c"Twiddeling GPIO 114\0A\00"
@.str.2 = [30 x i8] c"Bringing up GPIOs 81 and 114\0A\00"
define void @bringUpChip() {
%1 = call i32 @output(i32 1, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @gpioSet(i32 53, i32 1)
%3 = call i32 @gpioSet(i32 71, i32 1)
%4 = call i32 @gpioSet(i32 124, i32 1)
%5 = call i32 @usleep(i32 5000)
%6 = call i32 @output(i32 1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @gpioSet(i32 114, i32 1)
%8 = call i32 @usleep(i32 3000)
%9 = call i32 @gpioSet(i32 114, i32 0)
%10 = call i32 @usleep(i32 3000)
%11 = call i32 @output(i32 1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 @gpioSet(i32 81, i32 1)
%13 = call i32 @gpioSet(i32 114, i32 1)
%14 = call i32 @usleep(i32 500000)
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"Bringing up GPIOs 53,71 and 124\0A\00"
@.str.1 = [21 x i8] c"Twiddeling GPIO 114\0A\00"
@.str.2 = [30 x i8] c"Bringing up GPIOs 81 and 114\0A\00"
define void @bringUpChip() {
%1 = tail call i32 @output(i32 1, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @gpioSet(i32 53, i32 1)
%3 = tail call i32 @gpioSet(i32 71, i32 1)
%4 = tail call i32 @gpioSet(i32 124, i32 1)
%5 = tail call i32 @usleep(i32 5000)
%6 = tail call i32 @output(i32 1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @gpioSet(i32 114, i32 1)
%8 = tail call i32 @usleep(i32 3000)
%9 = tail call i32 @gpioSet(i32 114, i32 0)
%10 = tail call i32 @usleep(i32 3000)
%11 = tail call i32 @output(i32 1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%12 = tail call i32 @gpioSet(i32 81, i32 1)
%13 = tail call i32 @gpioSet(i32 114, i32 1)
%14 = tail call i32 @usleep(i32 500000)
ret void
}