xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printVersions();
int /*<<< orphan*/ stdout;
void printUsage(void) {
  fprintf(stdout, "Usage: autohintexe [-u] [-h]\n");
  fprintf(stdout, "       autohintexe  -f <font info name> [-e] [-n] "
                  "[-q] [-s <suffix>] [-ra] [-rs] -a] [<file1> <file2> "
                  "... <filen>]\n");
  printVersions();
}


x86 assembly (clang, -O0):
<printUsage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
lea    0xed5(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x0,%al
call   1040 <printVersions@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printUsage>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <printVersions@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [30 x i8] c"Usage: autohintexe [-u] [-h]\0A\00"
@.str.1 = [116 x i8] c" autohintexe -f <font info name> [-e] [-n] [-q] [-s <suffix>] [-ra] [-rs] -a] [<file1> <file2> ... <filen>]\0A\00"
define void @printUsage() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([116 x i8], [116 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (...) @printVersions()
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [30 x i8] c"Usage: autohintexe [-u] [-h]\0A\00"
@.str.1 = [116 x i8] c" autohintexe -f <font info name> [-e] [-n] [-q] [-s <suffix>] [-ra] [-rs] -a] [<file1> <file2> ... <filen>]\0A\00"
define void @printUsage() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([116 x i8], [116 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 (...) @printVersions()
ret void
}
unsigned ucwrs2(unsigned _k) { return _k ? _k + (_k - 1) : 0; }


x86 assembly (clang, -O0):
<ucwrs2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1124 <ucwrs2+0x24>
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
jmp    112e <ucwrs2+0x2e>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    112e <ucwrs2+0x2e>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ucwrs2>:
test   %edi,%edi
lea    -0x1(%rdi,%rdi,1),%eax
cmove  %edi,%eax
ret

LLVM IR (-O0):
define i32 @ucwrs2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i32, i32* %2
%7 = load i32, i32* %2
%8 = sub i32 %7, 1
%9 = add i32 %6, %8
br label %11
10: ; preds = %1
br label %11
11: ; preds = %10, %5
%12 = phi i32 [ %9, %5 ], [ 0, %10 ]
ret i32 %12
}

LLVM IR (-O2):
define i32 @ucwrs2(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = shl i32 %0, 1
%4 = add i32 %3, -1
%5 = select i1 %2, i32 0, i32 %4
ret i32 %5
}
R0A1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{ r0 = (*((short *)11111111)); }


x86 assembly (clang, -O0):
<R0A1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    $0xa98ac7,%eax
mov    (%rax),%ax
mov    %ax,-0x6(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<R0A1>:
ret

LLVM IR (-O0):
define i32 @R0A1(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4, i16* %5) {
%7 = alloca i32
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i16*
%14 = trunc i32 %0 to i16
%15 = trunc i32 %1 to i16
store i16 %14, i16* %8
store i16 %15, i16* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i16* %4, i16** %12
store i16* %5, i16** %13
%16 = load i16, i16* inttoptr (i64 11111111 to i16*)
store i16 %16, i16* %8
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
define i32 @R0A1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture readnone %5) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ get_lexval();
int yyselect();
double_unary_op() {
  switch (yyselect()) {
  case 83: {
    get_lexval();
  } break;
  case 84: {
    get_lexval();
  } break;
  }
}


x86 assembly (clang, -O0):
<double_unary_op>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
call   1030 <yyselect@plt>
mov    %eax,%ecx
mov    %ecx,-0x8(%rbp)
sub    $0x53,%eax
je     1153 <double_unary_op+0x33>
jmp    1142 <double_unary_op+0x22>
mov    -0x8(%rbp),%eax
sub    $0x54,%eax
je     115f <double_unary_op+0x3f>
jmp    1166 <double_unary_op+0x46>
mov    $0x0,%al
call   1040 <get_lexval@plt>
jmp    1166 <double_unary_op+0x46>
mov    $0x0,%al
call   1040 <get_lexval@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<double_unary_op>:
push   %rax
xor    %eax,%eax
call   1030 <yyselect@plt>
add    $0xffffffad,%eax
cmp    $0x1,%eax
ja     1137 <double_unary_op+0x17>
xor    %eax,%eax
call   1040 <get_lexval@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @double_unary_op() {
%1 = alloca i32
%2 = call i32 (...) @yyselect()
switch i32 %2, label %7 [
i32 83, label %3
i32 84, label %5
]
3: ; preds = %0
%4 = call i32 (...) @get_lexval()
br label %7
5: ; preds = %0
%6 = call i32 (...) @get_lexval()
br label %7
7: ; preds = %0, %5, %3
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @double_unary_op() {
%1 = tail call i32 (...) @yyselect()
%2 = add i32 %1, -83
%3 = icmp ult i32 %2, 2
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 (...) @get_lexval()
br label %6
6: ; preds = %0, %4
ret i32 undef
}
void __attribute__((no)) HEX00_lrstInit(void) {}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
ret

LLVM IR (-O0):
define void @HEX00_lrstInit() {
ret void
}

LLVM IR (-O2):
define void @HEX00_lrstInit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ do_regular_work();
int /*<<< orphan*/ exit(int);
scalar_t__ get_ticket();
int /*<<< orphan*/ release_ticket();
int /*<<< orphan*/ setup();
int /*<<< orphan*/ shut_down();
int main(int argc, char *argv[]) {
  setup();
  if (get_ticket() != 0)
    exit(1);
  do_regular_work();
  release_ticket();
  shut_down();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1080 <setup@plt>
mov    $0x0,%al
call   1030 <get_ticket@plt>
cmp    $0x0,%rax
je     1198 <main+0x38>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    $0x0,%al
call   1050 <do_regular_work@plt>
mov    $0x0,%al
call   1040 <release_ticket@plt>
mov    $0x0,%al
call   1070 <shut_down@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1080 <setup@plt>
xor    %eax,%eax
call   1030 <get_ticket@plt>
test   %rax,%rax
jne    118d <main+0x2d>
xor    %eax,%eax
call   1050 <do_regular_work@plt>
xor    %eax,%eax
call   1040 <release_ticket@plt>
xor    %eax,%eax
call   1070 <shut_down@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @setup()
%7 = call i64 (...) @get_ticket()
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %2
%12 = call i32 (...) @do_regular_work()
%13 = call i32 (...) @release_ticket()
%14 = call i32 (...) @shut_down()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @setup()
%4 = tail call i64 (...) @get_ticket()
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
%9 = tail call i32 (...) @do_regular_work()
%10 = tail call i32 (...) @release_ticket()
%11 = tail call i32 (...) @shut_down()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ RegWriteA_Ofilm(int, int);
void GyOutSignal_OFILM(void) {
  RegWriteA_Ofilm(0x0283, 0x45);
  RegWriteA_Ofilm(0x0284, 0x43);
  RegWriteA_Ofilm(0x0280, 0x02);
}


x86 assembly (clang, -O0):
<GyOutSignal_OFILM>:
push   %rbp
mov    %rsp,%rbp
mov    $0x283,%edi
mov    $0x45,%esi
call   1030 <RegWriteA_Ofilm@plt>
mov    $0x284,%edi
mov    $0x43,%esi
call   1030 <RegWriteA_Ofilm@plt>
mov    $0x280,%edi
mov    $0x2,%esi
call   1030 <RegWriteA_Ofilm@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<GyOutSignal_OFILM>:
push   %rax
mov    $0x283,%edi
mov    $0x45,%esi
call   1030 <RegWriteA_Ofilm@plt>
mov    $0x284,%edi
mov    $0x43,%esi
call   1030 <RegWriteA_Ofilm@plt>
mov    $0x280,%edi
mov    $0x2,%esi
pop    %rax
jmp    1030 <RegWriteA_Ofilm@plt>

LLVM IR (-O0):
define void @GyOutSignal_OFILM() {
%1 = call i32 @RegWriteA_Ofilm(i32 643, i32 69)
%2 = call i32 @RegWriteA_Ofilm(i32 644, i32 67)
%3 = call i32 @RegWriteA_Ofilm(i32 640, i32 2)
ret void
}

LLVM IR (-O2):
define void @GyOutSignal_OFILM() {
%1 = tail call i32 @RegWriteA_Ofilm(i32 643, i32 69)
%2 = tail call i32 @RegWriteA_Ofilm(i32 644, i32 67)
%3 = tail call i32 @RegWriteA_Ofilm(i32 640, i32 2)
ret void
}
long long f(int a, int b) { return a == b; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
xor    %eax,%eax
cmp    %esi,%edi
sete   %al
ret

LLVM IR (-O0):
define i64 @f(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
%9 = sext i32 %8 to i64
ret i64 %9
}

LLVM IR (-O2):
define i64 @f(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = zext i1 %3 to i64
ret i64 %4
}
int vlistHasVarKey(int vlistID, int varID, const char *name) {
  (void)vlistID;
  (void)varID;
  (void)name;
  return 0;
}


x86 assembly (clang, -O0):
<vlistHasVarKey>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vlistHasVarKey>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @vlistHasVarKey(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
ret i32 0
}

LLVM IR (-O2):
define i32 @vlistHasVarKey(i32 %0, i32 %1, i8* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ UTICK0_DriverIRQHandler();
__attribute__((weak)) void UTICK0_IRQHandler(void) {
  UTICK0_DriverIRQHandler();
}


x86 assembly (clang, -O0):
<UTICK0_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <UTICK0_DriverIRQHandler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<UTICK0_IRQHandler>:
xor    %eax,%eax
jmp    1030 <UTICK0_DriverIRQHandler@plt>

LLVM IR (-O0):
define weak void @UTICK0_IRQHandler() {
%1 = call i32 (...) @UTICK0_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @UTICK0_IRQHandler() {
%1 = tail call i32 (...) @UTICK0_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SystemInit();
int /*<<< orphan*/ fpuInit();
int /*<<< orphan*/ vIOInit();
void platformInit(void) {
  SystemInit();
  fpuInit();
  vIOInit();
}


x86 assembly (clang, -O0):
<platformInit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <SystemInit@plt>
mov    $0x0,%al
call   1050 <fpuInit@plt>
mov    $0x0,%al
call   1030 <vIOInit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<platformInit>:
push   %rax
xor    %eax,%eax
call   1040 <SystemInit@plt>
xor    %eax,%eax
call   1050 <fpuInit@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <vIOInit@plt>

LLVM IR (-O0):
define void @platformInit() {
%1 = call i32 (...) @SystemInit()
%2 = call i32 (...) @fpuInit()
%3 = call i32 (...) @vIOInit()
ret void
}

LLVM IR (-O2):
define void @platformInit() {
%1 = tail call i32 (...) @SystemInit()
%2 = tail call i32 (...) @fpuInit()
%3 = tail call i32 (...) @vIOInit()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int32_t;
typedef int /*<<< orphan*/ u_char;

/* Variables and functions */
int /*<<< orphan*/ ns_get32(int /*<<< orphan*/ const *);
u_int32_t _getlong(const u_char *src) { return (ns_get32(src)); }


x86 assembly (clang, -O0):
<_getlong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ns_get32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_getlong>:
jmp    1030 <ns_get32@plt>

LLVM IR (-O0):
define i32 @_getlong(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @ns_get32(i32* %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @_getlong(i32* %0) {
%2 = tail call i32 @ns_get32(i32* %0)
ret i32 %2
}
int xa3() {}


x86 assembly (clang, -O0):
<xa3>:
push   %rbp
mov    %rsp,%rbp
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xa3>:
ret

LLVM IR (-O0):
define i32 @xa3() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @xa3() {
ret i32 undef
}
int getAChar() {}


x86 assembly (clang, -O0):
<getAChar>:
push   %rbp
mov    %rsp,%rbp
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getAChar>:
ret

LLVM IR (-O0):
define i32 @getAChar() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @getAChar() {
ret i32 undef
}
void update_cksum(unsigned int *csum, unsigned char *str) {
  while (*str) {
    *csum ^= *(str++);
  }
}


x86 assembly (clang, -O0):
<update_cksum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1138 <update_cksum+0x38>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movzbl (%rax),%ecx
mov    -0x8(%rbp),%rax
xor    (%rax),%ecx
mov    %ecx,(%rax)
jmp    110c <update_cksum+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_cksum>:
mov    (%rsi),%al
test   %al,%al
je     1122 <update_cksum+0x22>
mov    (%rdi),%ecx
add    $0x1,%rsi
nopl   0x0(%rax)
movzbl %al,%eax
xor    %eax,%ecx
mov    %ecx,(%rdi)
movzbl (%rsi),%eax
add    $0x1,%rsi
test   %al,%al
jne    1110 <update_cksum+0x10>
ret

LLVM IR (-O0):
define void @update_cksum(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %9, %2
%6 = load i8*, i8** %4
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %17
9: ; preds = %5
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %4
%12 = load i8, i8* %10
%13 = zext i8 %12 to i32
%14 = load i32*, i32** %3
%15 = load i32, i32* %14
%16 = xor i32 %15, %13
store i32 %16, i32* %14
br label %5
17: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @update_cksum(i32* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2
%6 = load i32, i32* %0
br label %7
7: ; preds = %5, %7
%8 = phi i32 [ %13, %7 ], [ %6, %5 ]
%9 = phi i8 [ %14, %7 ], [ %3, %5 ]
%10 = phi i8* [ %11, %7 ], [ %1, %5 ]
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = zext i8 %9 to i32
%13 = xor i32 %8, %12
store i32 %13, i32* %0
%14 = load i8, i8* %11
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %7
16: ; preds = %7, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hw_display_on(void) { printf("hw_unknown: Display on requested.\n"); }


x86 assembly (clang, -O0):
<hw_display_on>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<hw_display_on>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"hw_unknown: Display on requested.\0A\00"
define void @hw_display_on() {
%1 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [34 x i8] c"hw_unknown: Display on requested.\00"
define void @hw_display_on() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char **argv) {
  for (int i = 1; i < argc; ++i) {
    printf("%s ", argv[i]);
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1161 <main+0x51>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%edi
jl     1157 <main+0x37>
mov    %rsi,%r15
mov    %edi,%r12d
mov    $0x1,%ebx
lea    0xec1(%rip),%r14
nop
mov    (%r15,%rbx,8),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <main+0x20>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s \00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
br label %7
7: ; preds = %18, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %21
11: ; preds = %7
%12 = load i8**, i8*** %5
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8*, i8** %12, i64 %14
%16 = load i8*, i8** %15
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %16)
br label %18
18: ; preds = %11
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 1
store i32 %20, i32* %6
br label %7
21: ; preds = %7
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s \00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %8
6: ; preds = %8, %2
%7 = tail call i32 @putchar(i32 10)
ret i32 0
8: ; preds = %4, %8
%9 = phi i64 [ 1, %4 ], [ %13, %8 ]
%10 = getelementptr inbounds i8*, i8** %1, i64 %9
%11 = load i8*, i8** %10
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %8
}
/* Variables and functions */
int /*<<< orphan*/ EVIOCGPHYS(size_t);
int ioctl(int, int /*<<< orphan*/, char *);
int evf_input_get_phys(int fd, char *buf, size_t buf_len) {
  int ret;
  if ((ret = ioctl(fd, EVIOCGPHYS(buf_len), buf)) <= 0)
    return -1;
  return ret;
}


x86 assembly (clang, -O0):
<evf_input_get_phys>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <EVIOCGPHYS@plt>
mov    -0x20(%rbp),%edi
mov    %eax,%esi
mov    -0x10(%rbp),%rdx
call   1030 <ioctl@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
jg     1168 <evf_input_get_phys+0x48>
movl   $0xffffffff,-0x4(%rbp)
jmp    116e <evf_input_get_phys+0x4e>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<evf_input_get_phys>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rdx,%rdi
call   1040 <EVIOCGPHYS@plt>
mov    %ebp,%edi
mov    %eax,%esi
mov    %rbx,%rdx
call   1030 <ioctl@plt>
test   %eax,%eax
mov    $0xffffffff,%ecx
cmovle %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @evf_input_get_phys(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
%9 = load i32, i32* %5
%10 = load i64, i64* %7
%11 = call i32 @EVIOCGPHYS(i64 %10)
%12 = load i8*, i8** %6
%13 = call i32 @ioctl(i32 %9, i32 %11, i8* %12)
store i32 %13, i32* %8
%14 = icmp sle i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %3
store i32 -1, i32* %4
br label %18
16: ; preds = %3
%17 = load i32, i32* %8
store i32 %17, i32* %4
br label %18
18: ; preds = %16, %15
%19 = load i32, i32* %4
ret i32 %19
}

LLVM IR (-O2):
define i32 @evf_input_get_phys(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @EVIOCGPHYS(i64 %2)
%5 = tail call i32 @ioctl(i32 %0, i32 %4, i8* %1)
%6 = icmp slt i32 %5, 1
%7 = select i1 %6, i32 -1, i32 %5
ret i32 %7
}
/* Type definitions */
typedef scalar_t__ wchar_t;

/* Variables and functions */
size_t wcslen(const wchar_t *s) {
  const wchar_t *sret = s;
  while (*s) {
    s++;
  }
  return s - sret;
}


x86 assembly (clang, -O0):
<wcslen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     112f <wcslen+0x2f>
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
jmp    1110 <wcslen+0x10>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
sar    $0x3,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcslen>:
mov    $0xfffffffffffffff8,%rax
nopw   0x0(%rax,%rax,1)
cmpq   $0x0,0x8(%rdi,%rax,1)
lea    0x8(%rax),%rax
jne    1110 <wcslen+0x10>
sar    $0x3,%rax
ret

LLVM IR (-O0):
define i64 @wcslen(i64* %0) {
%2 = alloca i64*
%3 = alloca i64*
store i64* %0, i64** %2
%4 = load i64*, i64** %2
store i64* %4, i64** %3
br label %5
5: ; preds = %9, %1
%6 = load i64*, i64** %2
%7 = load i64, i64* %6
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load i64*, i64** %2
%11 = getelementptr inbounds i64, i64* %10, i32 1
store i64* %11, i64** %2
br label %5
12: ; preds = %5
%13 = load i64*, i64** %2
%14 = load i64*, i64** %3
%15 = ptrtoint i64* %13 to i64
%16 = ptrtoint i64* %14 to i64
%17 = sub i64 %15, %16
%18 = sdiv exact i64 %17, 8
ret i64 %18
}

LLVM IR (-O2):
define i64 @wcslen(i64* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64* [ %0, %1 ], [ %6, %2 ]
%4 = load i64, i64* %3
%5 = icmp eq i64 %4, 0
%6 = getelementptr inbounds i64, i64* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i64* %3 to i64
%9 = ptrtoint i64* %0 to i64
%10 = sub i64 %8, %9
%11 = ashr exact i64 %10, 3
ret i64 %11
}
long minimum(long a, long b) {
  if (a < b)
    return a;
  else
    return b;
}


x86 assembly (clang, -O0):
<minimum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1127 <minimum+0x27>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    112f <minimum+0x2f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<minimum>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovl  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @minimum(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%6 = load i64, i64* %4
%7 = load i64, i64* %5
%8 = icmp slt i64 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i64, i64* %4
store i64 %10, i64* %3
br label %13
11: ; preds = %2
%12 = load i64, i64* %5
store i64 %12, i64* %3
br label %13
13: ; preds = %11, %9
%14 = load i64, i64* %3
ret i64 %14
}

LLVM IR (-O2):
define i64 @minimum(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_xmemdup() {
  printf("NOT IMPLEMENTED:"
         "pa_xmemdup"
         "\n");
}


x86 assembly (clang, -O0):
<pa_xmemdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pa_xmemdup>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"NOT IMPLEMENTED:pa_xmemdup\0A\00"
define i32 @pa_xmemdup() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [27 x i8] c"NOT IMPLEMENTED:pa_xmemdup\00"
define i32 @pa_xmemdup() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ isspace(char);
char *back_spaces(char *start, char *chp) {
  while (1) {
    if (chp <= start || !isspace(chp[-1]))
      return chp;
    chp--;
  }
}


x86 assembly (clang, -O0):
<back_spaces>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
jbe    1144 <back_spaces+0x34>
mov    -0x10(%rbp),%rax
movsbl -0x1(%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
jne    114e <back_spaces+0x3e>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    1120 <back_spaces+0x10>

x86 assembly (clang, -O2):
<back_spaces>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
nopl   0x0(%rax,%rax,1)
mov    %r15,%rbx
cmp    %r14,%r15
jbe    1139 <back_spaces+0x29>
lea    -0x1(%rbx),%r15
movsbl -0x1(%rbx),%edi
call   1030 <isspace@plt>
test   %eax,%eax
jne    1120 <back_spaces+0x10>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @back_spaces(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %2, %17
%6 = load i8*, i8** %4
%7 = load i8*, i8** %3
%8 = icmp ule i8* %6, %7
br i1 %8, label %15, label %9
9: ; preds = %5
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i64 -1
%12 = load i8, i8* %11
%13 = call i32 @isspace(i8 signext %12)
%14 = icmp ne i32 %13, 0
br i1 %14, label %17, label %15
15: ; preds = %9, %5
%16 = load i8*, i8** %4
ret i8* %16
17: ; preds = %9
%18 = load i8*, i8** %4
%19 = getelementptr inbounds i8, i8* %18, i32 -1
store i8* %19, i8** %4
br label %5
}

LLVM IR (-O2):
define i8* @back_spaces(i8* readnone %0, i8* %1) {
br label %3
3: ; preds = %6, %2
%4 = phi i8* [ %1, %2 ], [ %7, %6 ]
%5 = icmp ugt i8* %4, %0
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = getelementptr inbounds i8, i8* %4, i64 -1
%8 = load i8, i8* %7
%9 = tail call i32 @isspace(i8 signext %8)
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %3
11: ; preds = %6, %3
ret i8* %4
}
/* Variables and functions */
double log(double);
double safe_log(double x) {
  if (x == 0) {
    return 0;
  } else {
    return log(x);
  }
}


x86 assembly (clang, -O0):
<safe_log>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1142 <safe_log+0x32>
jp     1142 <safe_log+0x32>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1151 <safe_log+0x41>
movsd  -0x10(%rbp),%xmm0
call   1030 <log@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_log>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1121 <safe_log+0x11>
jp     1121 <safe_log+0x11>
xorpd  %xmm0,%xmm0
ret
jmp    1030 <log@plt>

LLVM IR (-O0):
define double @safe_log(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp oeq double %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store double 0.000000e+00, double* %2
br label %10
7: ; preds = %1
%8 = load double, double* %3
%9 = call double @log(double %8)
store double %9, double* %2
br label %10
10: ; preds = %7, %6
%11 = load double, double* %2
ret double %11
}

LLVM IR (-O2):
define double @safe_log(double %0) {
%2 = fcmp oeq double %0, 0.000000e+00
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call double @log(double %0)
br label %5
5: ; preds = %1, %3
%6 = phi double [ %4, %3 ], [ 0.000000e+00, %1 ]
ret double %6
}
void posix_class_neg2NP_DIGIT() {}


x86 assembly (clang, -O0):
<posix_class_neg2NP_DIGIT>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<posix_class_neg2NP_DIGIT>:
ret

LLVM IR (-O0):
define void @posix_class_neg2NP_DIGIT() {
ret void
}

LLVM IR (-O2):
define void @posix_class_neg2NP_DIGIT() {
ret void
}
int ASTIL_FindPreviousSlash(const char *filename, int pos) {
  while (pos > 0) {
    pos--;
    if (filename[pos] == '/' || filename[pos] == '\\')
      return pos;
  }
  return -1;
}


x86 assembly (clang, -O0):
<ASTIL_FindPreviousSlash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    1158 <ASTIL_FindPreviousSlash+0x58>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
je     1148 <ASTIL_FindPreviousSlash+0x48>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x5c,%eax
jne    1153 <ASTIL_FindPreviousSlash+0x53>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115f <ASTIL_FindPreviousSlash+0x5f>
jmp    110b <ASTIL_FindPreviousSlash+0xb>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ASTIL_FindPreviousSlash>:
mov    %esi,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
test   %eax,%eax
jle    1129 <ASTIL_FindPreviousSlash+0x29>
add    $0xffffffffffffffff,%rax
mov    %eax,%ecx
movzbl (%rdi,%rcx,1),%ecx
cmp    $0x5c,%cl
je     1128 <ASTIL_FindPreviousSlash+0x28>
cmp    $0x2f,%cl
jne    1110 <ASTIL_FindPreviousSlash+0x10>
ret
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @ASTIL_FindPreviousSlash(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
br label %6
6: ; preds = %29, %2
%7 = load i32, i32* %5
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %30
9: ; preds = %6
%10 = load i32, i32* %5
%11 = add nsw i32 %10, -1
store i32 %11, i32* %5
%12 = load i8*, i8** %4
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 47
br i1 %18, label %27, label %19
19: ; preds = %9
%20 = load i8*, i8** %4
%21 = load i32, i32* %5
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %20, i64 %22
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 92
br i1 %26, label %27, label %29
27: ; preds = %19, %9
%28 = load i32, i32* %5
store i32 %28, i32* %3
br label %31
29: ; preds = %19
br label %6
30: ; preds = %6
store i32 -1, i32* %3
br label %31
31: ; preds = %30, %27
%32 = load i32, i32* %3
ret i32 %32
}

LLVM IR (-O2):
define i32 @ASTIL_FindPreviousSlash(i8* nocapture %0, i32 %1) {
%3 = zext i32 %1 to i64
br label %4
4: ; preds = %8, %2
%5 = phi i64 [ %9, %8 ], [ %3, %2 ]
%6 = trunc i64 %5 to i32
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %15
8: ; preds = %4
%9 = add nsw i64 %5, -1
%10 = and i64 %9, 4294967295
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
switch i8 %12, label %4 [
i8 47, label %13
i8 92, label %13
]
13: ; preds = %8, %8
%14 = trunc i64 %9 to i32
br label %15
15: ; preds = %4, %13
%16 = phi i32 [ %14, %13 ], [ -1, %4 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ serial_out(unsigned int);
void print_hex1(unsigned d) { serial_out(d + (d < 10 ? '0' : 'A' - 10)); }


x86 assembly (clang, -O0):
<print_hex1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%edx
mov    $0x37,%eax
mov    $0x30,%ecx
cmp    $0xa,%edx
cmovb  %ecx,%eax
add    %eax,%edi
call   1030 <serial_out@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_hex1>:
lea    0x37(%rdi),%ecx
lea    0x30(%rdi),%eax
cmp    $0xa,%edi
cmovae %ecx,%eax
mov    %eax,%edi
jmp    1030 <serial_out@plt>

LLVM IR (-O0):
define void @print_hex1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = icmp ult i32 %4, 10
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 48, i32 55
%8 = add i32 %3, %7
%9 = call i32 @serial_out(i32 %8)
ret void
}

LLVM IR (-O2):
define void @print_hex1(i32 %0) {
%2 = icmp ult i32 %0, 10
%3 = select i1 %2, i32 48, i32 55
%4 = add i32 %3, %0
%5 = tail call i32 @serial_out(i32 %4)
ret void
}
void xmpc_traverse_finalize() {}


x86 assembly (clang, -O0):
<xmpc_traverse_finalize>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmpc_traverse_finalize>:
ret

LLVM IR (-O0):
define void @xmpc_traverse_finalize() {
ret void
}

LLVM IR (-O2):
define void @xmpc_traverse_finalize() {
ret void
}
/* Variables and functions */
int strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
void strncpy_exactly_matching_buffer2(char *y) {
  if (strlen(y) >= 4)
    return;
  char x[4];
  strncpy(x, y, 4);
  if (strlen(x) > 3)
    (void)*(int *)0;
}


x86 assembly (clang, -O0):
<strncpy_exactly_matching_buffer2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x4,%eax
jl     1143 <strncpy_exactly_matching_buffer2+0x23>
jmp    1167 <strncpy_exactly_matching_buffer2+0x47>
lea    -0xc(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1030 <strncpy@plt>
lea    -0xc(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x3,%eax
jle    1167 <strncpy_exactly_matching_buffer2+0x47>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncpy_exactly_matching_buffer2>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <strlen@plt>
cmp    $0x3,%eax
jg     114e <strncpy_exactly_matching_buffer2+0x2e>
lea    0x4(%rsp),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x4,%edx
call   1030 <strncpy@plt>
mov    %r14,%rdi
call   1040 <strlen@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @strncpy_exactly_matching_buffer2(i8* %0) {
%2 = alloca i8*
%3 = alloca [4 x i8]
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = icmp sge i32 %5, 4
br i1 %6, label %7, label %8
7: ; preds = %1
br label %17
8: ; preds = %1
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%10 = load i8*, i8** %2
%11 = call i32 @strncpy(i8* %9, i8* %10, i32 4)
%12 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%13 = call i32 @strlen(i8* %12)
%14 = icmp sgt i32 %13, 3
br i1 %14, label %15, label %17
15: ; preds = %8
%16 = load i32, i32* null
br label %17
17: ; preds = %7, %15, %8
ret void
}

LLVM IR (-O2):
define void @strncpy_exactly_matching_buffer2(i8* %0) {
%2 = alloca [4 x i8]
%3 = tail call i32 @strlen(i8* %0)
%4 = icmp sgt i32 %3, 3
br i1 %4, label %9, label %5
5: ; preds = %1
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%7 = call i32 @strncpy(i8* %6, i8* %0, i32 4)
%8 = call i32 @strlen(i8* %6)
br label %9
9: ; preds = %1, %5
ret void
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMR76_set(void) { return U_WMRCORENONE_set("U_WMR76"); }


x86 assembly (clang, -O0):
<U_WMR76_set>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <U_WMRCORENONE_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<U_WMR76_set>:
lea    0xee9(%rip),%rdi
jmp    1030 <U_WMRCORENONE_set@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR76\00"
define i8* @U_WMR76_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR76\00"
define i8* @U_WMR76_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
double sla_epj_(double *);
double slaEpj(double date) {
  double DATE;
  double result;
  DATE = date;
  result = sla_epj_(&DATE);
  return result;
}


x86 assembly (clang, -O0):
<slaEpj>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <sla_epj_@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slaEpj>:
push   %rax
movsd  %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <sla_epj_@plt>
pop    %rax
ret

LLVM IR (-O0):
define double @slaEpj(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
store double %5, double* %3
%6 = call double @sla_epj_(double* %3)
store double %6, double* %4
%7 = load double, double* %4
ret double %7
}

LLVM IR (-O2):
define double @slaEpj(double %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
store double %0, double* %2
%4 = call double @sla_epj_(double* %2)
ret double %4
}
int console_close_all(void) { return 0; }


x86 assembly (clang, -O0):
<console_close_all>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<console_close_all>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @console_close_all() {
ret i32 0
}

LLVM IR (-O2):
define i32 @console_close_all() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ remove(char *);
void cleanup() {
  remove("routeinfo.txt");
  remove("iplist.txt");
  remove("output.txt");
  remove("final.txt");
}


x86 assembly (clang, -O0):
<cleanup>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <remove@plt>
lea    0xee7(%rip),%rdi
call   1030 <remove@plt>
lea    0xee6(%rip),%rdi
call   1030 <remove@plt>
lea    0xee5(%rip),%rdi
call   1030 <remove@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cleanup>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <remove@plt>
lea    0xeea(%rip),%rdi
call   1030 <remove@plt>
lea    0xee9(%rip),%rdi
call   1030 <remove@plt>
lea    0xee8(%rip),%rdi
pop    %rax
jmp    1030 <remove@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"routeinfo.txt\00"
@.str.1 = [11 x i8] c"iplist.txt\00"
@.str.2 = [11 x i8] c"output.txt\00"
@.str.3 = [10 x i8] c"final.txt\00"
define void @cleanup() {
%1 = call i32 @remove(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @remove(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @remove(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @remove(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"routeinfo.txt\00"
@.str.1 = [11 x i8] c"iplist.txt\00"
@.str.2 = [11 x i8] c"output.txt\00"
@.str.3 = [10 x i8] c"final.txt\00"
define void @cleanup() {
%1 = tail call i32 @remove(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @remove(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @remove(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @remove(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
ret void
}
int lxc_caps_last_cap(void) { return 0; }


x86 assembly (clang, -O0):
<lxc_caps_last_cap>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lxc_caps_last_cap>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @lxc_caps_last_cap() {
ret i32 0
}

LLVM IR (-O2):
define i32 @lxc_caps_last_cap() {
ret i32 0
}
unsigned NI_USUAL_PFI_SELECT(unsigned pfi_channel) {
  if (pfi_channel < 10)
    return 0x1 + pfi_channel;
  else
    return 0xb + pfi_channel;
}


x86 assembly (clang, -O0):
<NI_USUAL_PFI_SELECT>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jae    111f <NI_USUAL_PFI_SELECT+0x1f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1128 <NI_USUAL_PFI_SELECT+0x28>
mov    -0x8(%rbp),%eax
add    $0xb,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<NI_USUAL_PFI_SELECT>:
lea    0xb(%rdi),%ecx
lea    0x1(%rdi),%eax
cmp    $0xa,%edi
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define i32 @NI_USUAL_PFI_SELECT(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ult i32 %4, 10
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = add i32 1, %7
store i32 %8, i32* %2
br label %12
9: ; preds = %1
%10 = load i32, i32* %3
%11 = add i32 11, %10
store i32 %11, i32* %2
br label %12
12: ; preds = %9, %6
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @NI_USUAL_PFI_SELECT(i32 %0) {
%2 = icmp ult i32 %0, 10
%3 = select i1 %2, i32 1, i32 11
%4 = add i32 %3, %0
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ err();
int /*<<< orphan*/ printf(char *);
int system(char *);
int can_use_network(void) {
  pid_t pid;
  int status;
  status = system("ping www.minix3.org > /dev/null 2>&1");
  if (status == 127) {
    printf("cannot execute ping\n");
    err();
  }
  return status == 0;
}


x86 assembly (clang, -O0):
<can_use_network>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <system@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x7f,-0x8(%rbp)
jne    1164 <can_use_network+0x34>
lea    0xecd(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <err@plt>
cmpl   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<can_use_network>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1040 <system@plt>
mov    %eax,%ebx
cmp    $0x7f,%eax
jne    1157 <can_use_network+0x27>
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <err@plt>
xor    %eax,%eax
test   %ebx,%ebx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"ping www.minix3.org > /dev/null 2>&1\00"
@.str.1 = [21 x i8] c"cannot execute ping\0A\00"
define i32 @can_use_network() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @system(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 127
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (...) @err()
br label %9
9: ; preds = %6, %0
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 0
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
@.str = [37 x i8] c"ping www.minix3.org > /dev/null 2>&1\00"
@str = [20 x i8] c"cannot execute ping\00"
define i32 @can_use_network() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 127
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 (...) @err()
br label %6
6: ; preds = %3, %0
%7 = icmp eq i32 %1, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
unsigned int setbits(unsigned int, int, int, unsigned int);
int main() {
  unsigned i, j, k;
  int p, n;
  i = 211;
  j = 51;
  p = 4;
  n = 3;
  k = setbits(i, p, n, j);
  printf("%u\n", k);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xd3,-0x8(%rbp)
movl   $0x33,-0xc(%rbp)
movl   $0x4,-0x14(%rbp)
movl   $0x3,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0xc(%rbp),%ecx
call   1040 <setbits@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xd3,%edi
mov    $0x4,%esi
mov    $0x3,%edx
mov    $0x33,%ecx
call   1040 <setbits@plt>
lea    0xebf(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 211, i32* %2
store i32 51, i32* %3
store i32 4, i32* %5
store i32 3, i32* %6
%7 = load i32, i32* %2
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = load i32, i32* %3
%11 = call i32 @setbits(i32 %7, i32 %8, i32 %9, i32 %10)
store i32 %11, i32* %4
%12 = load i32, i32* %4
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = tail call i32 @setbits(i32 211, i32 4, i32 3, i32 51)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
__attribute__((always_)) int is_multi(uint32_t op) {
  return !((op & 0x0F0000F0) ^ 0x00000050);
}


x86 assembly (clang, -O0):
<is_multi>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf0000f0,%eax
xor    $0x50,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_multi>:
and    $0xf0000f0,%edi
xor    %eax,%eax
cmp    $0x50,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @is_multi(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 251658480
%5 = xor i32 %4, 80
%6 = icmp ne i32 %5, 0
%7 = xor i1 %6, true
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @is_multi(i32 %0) {
%2 = and i32 %0, 251658480
%3 = icmp eq i32 %2, 80
%4 = zext i1 %3 to i32
ret i32 %4
}
void VecZero3fv(float v[3]) {
  v[0] = 0.0f;
  v[1] = 0.0f;
  v[2] = 0.0f;
}


x86 assembly (clang, -O0):
<VecZero3fv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<VecZero3fv>:
movq   $0x0,(%rdi)
movl   $0x0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @VecZero3fv(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = getelementptr inbounds float, float* %3, i64 0
store float 0.000000e+00, float* %4
%5 = load float*, float** %2
%6 = getelementptr inbounds float, float* %5, i64 1
store float 0.000000e+00, float* %6
%7 = load float*, float** %2
%8 = getelementptr inbounds float, float* %7, i64 2
store float 0.000000e+00, float* %8
ret void
}

LLVM IR (-O2):
define void @VecZero3fv(float* nocapture writeonly %0) {
store float 0.000000e+00, float* %0
%2 = getelementptr inbounds float, float* %0, i64 1
store float 0.000000e+00, float* %2
%3 = getelementptr inbounds float, float* %0, i64 2
store float 0.000000e+00, float* %3
ret void
}