xunge/DecIR huggingface dataset:
/* Variables and functions */
int getline(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  int len;
  char inputLine[1000];
  while ((len = getline(inputLine, 1000)) > 0) {
    if (len > 80) {
      printf("%s\n", inputLine);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1040 <getline@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1171 <main+0x51>
cmpl   $0x50,-0x8(%rbp)
jle    116c <main+0x4c>
lea    -0x3f0(%rbp),%rsi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
jmp    1132 <main+0x12>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1040 <getline@plt>
test   %eax,%eax
jle    1173 <main+0x53>
lea    0xebe(%rip),%r14
mov    %rsp,%rbx
jmp    1161 <main+0x41>
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1040 <getline@plt>
test   %eax,%eax
jle    1173 <main+0x53>
cmp    $0x51,%eax
jb     1150 <main+0x30>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
jmp    1150 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [1000 x i8]
store i32 0, i32* %1
br label %4
4: ; preds = %14, %0
%5 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%6 = call i32 @getline(i8* %5, i32 1000)
store i32 %6, i32* %2
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %15
8: ; preds = %4
%9 = load i32, i32* %2
%10 = icmp sgt i32 %9, 80
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %14
14: ; preds = %11, %8
br label %4
15: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @getline(i8* %2, i32 1000)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %13
5: ; preds = %0, %10
%6 = phi i32 [ %11, %10 ], [ %3, %0 ]
%7 = icmp ugt i32 %6, 80
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %10
10: ; preds = %8, %5
%11 = call i32 @getline(i8* %2, i32 1000)
%12 = icmp sgt i32 %11, 0
br i1 %12, label %5, label %13
13: ; preds = %10, %0
ret i32 0
}
int gray(int i) { return ((i >> 1) ^ i); }


x86 assembly (clang, -O0):
<gray>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
xor    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gray>:
mov    %edi,%eax
sar    %eax
xor    %edi,%eax
ret

LLVM IR (-O0):
define i32 @gray(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 1
%5 = load i32, i32* %2
%6 = xor i32 %4, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @gray(i32 %0) {
%2 = ashr i32 %0, 1
%3 = xor i32 %2, %0
ret i32 %3
}
/* Variables and functions */
int bigendian();
int /*<<< orphan*/ printf(char *, int);
void main(void) { printf("bigendian = %d\n", bigendian()); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <bigendian@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <bigendian@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"bigendian = %d\0A\00"
define void @main() {
%1 = call i32 (...) @bigendian()
%2 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"bigendian = %d\0A\00"
define void @main() {
%1 = tail call i32 (...) @bigendian()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *, int /*<<< orphan*/);
char *strdup(char const *);
int /*<<< orphan*/ strlen(char const *);
char *xstrdup(const char *s) {
  char *r = strdup(s);
  if (r == NULL)
    fatal("Failed to strdup %zu bytes.\n", strlen(s));
  return r;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116b <xstrdup+0x3b>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%esi
lea    0xe9a(%rip),%rdi
call   1050 <fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    115a <xstrdup+0x2a>
mov    %r14,%rdi
call   1030 <strlen@plt>
lea    0xead(%rip),%rdi
mov    %eax,%esi
call   1050 <fatal@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Failed to strdup %zu bytes.\0A\00"
define i8* @xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i32 @strlen(i8* %9)
%11 = call i32 @fatal(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %8, %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@.str = [29 x i8] c"Failed to strdup %zu bytes.\0A\00"
define noalias i8* @xstrdup(i8* %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @strlen(i8* %0)
%6 = tail call i32 @fatal(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %5)
br label %7
7: ; preds = %4, %1
ret i8* %2
}
void EMBX_debug_print(char *Format, ...) {}


x86 assembly (clang, -O0):
<EMBX_debug_print>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @EMBX_debug_print(i8* %0, ...) {
%2 = alloca i8*
store i8* %0, i8** %2
ret void
}

LLVM IR (-O2):
define void @EMBX_debug_print(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Sleep(int);
int /*<<< orphan*/ sleep(int);
void wait(int seconds) {
  if (0) {
    Sleep(1000 * seconds);
  } else {
    sleep(seconds);
  }
}


x86 assembly (clang, -O0):
<wait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <sleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait>:
jmp    1030 <sleep@plt>

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

LLVM IR (-O2):
define void @wait(i32 %0) {
%2 = tail call i32 @sleep(i32 %0)
ret void
}
void func2() { int x = 0; }


x86 assembly (clang, -O0):
<func2>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @func2() {
%1 = alloca i32
store i32 0, i32* %1
ret void
}

LLVM IR (-O2):
define void @func2() {
ret void
}
/* Type definitions */
struct parameter {
  int dummy;
};

/* Variables and functions */
int com_xmatch(int, struct parameter *, int);
int com_tmatch(int p, struct parameter *param) {
  return com_xmatch(p, param, 7);
}


x86 assembly (clang, -O0):
<com_tmatch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x7,%edx
call   1030 <com_xmatch@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<com_tmatch>:
mov    $0x7,%edx
jmp    1030 <com_xmatch@plt>

LLVM IR (-O0):
%struct.parameter = type { i32 }
define i32 @com_tmatch(i32 %0, %struct.parameter* %1) {
%3 = alloca i32
%4 = alloca %struct.parameter*
store i32 %0, i32* %3
store %struct.parameter* %1, %struct.parameter** %4
%5 = load i32, i32* %3
%6 = load %struct.parameter*, %struct.parameter** %4
%7 = call i32 @com_xmatch(i32 %5, %struct.parameter* %6, i32 7)
ret i32 %7
}

LLVM IR (-O2):
%struct.parameter = type { i32 }
define i32 @com_tmatch(i32 %0, %struct.parameter* %1) {
%3 = tail call i32 @com_xmatch(i32 %0, %struct.parameter* %1, i32 7)
ret i32 %3
}
int is_numeric(char *str) {
  int it;
  it = 0;
  while (str[it] != '\0') {
    if (str[it] < '0' && str[it] > '9' && str[it] != '-')
      return (0);
    it++;
  }
  return (1);
}


x86 assembly (clang, -O0):
<is_numeric>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     117d <is_numeric+0x7d>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x30,%eax
jge    116f <is_numeric+0x6f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x39,%eax
jle    116f <is_numeric+0x6f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2d,%eax
je     116f <is_numeric+0x6f>
movl   $0x0,-0x4(%rbp)
jmp    1184 <is_numeric+0x84>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <is_numeric+0xf>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_numeric>:
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @is_numeric(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
br label %5
5: ; preds = %38, %1
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %41
13: ; preds = %5
%14 = load i8*, i8** %3
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp slt i32 %19, 48
br i1 %20, label %21, label %38
21: ; preds = %13
%22 = load i8*, i8** %3
%23 = load i32, i32* %4
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8, i8* %22, i64 %24
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = icmp sgt i32 %27, 57
br i1 %28, label %29, label %38
29: ; preds = %21
%30 = load i8*, i8** %3
%31 = load i32, i32* %4
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i8, i8* %30, i64 %32
%34 = load i8, i8* %33
%35 = sext i8 %34 to i32
%36 = icmp ne i32 %35, 45
br i1 %36, label %37, label %38
37: ; preds = %29
store i32 0, i32* %2
br label %42
38: ; preds = %29, %21, %13
%39 = load i32, i32* %4
%40 = add nsw i32 %39, 1
store i32 %40, i32* %4
br label %5
41: ; preds = %5
store i32 1, i32* %2
br label %42
42: ; preds = %41, %37
%43 = load i32, i32* %2
ret i32 %43
}

LLVM IR (-O2):
define i32 @is_numeric(i8* nocapture %0) {
ret i32 1
}
unsigned int symbol_value(char c) {
  if (c <= '9')
    return c - '0';
  if (c > 'Z')
    return c - 'a' + 10;
  return c - 'A' + 10;
}


x86 assembly (clang, -O0):
<symbol_value>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1126 <symbol_value+0x26>
movsbl -0x5(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    1152 <symbol_value+0x52>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jle    1145 <symbol_value+0x45>
movsbl -0x5(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    1152 <symbol_value+0x52>
movsbl -0x5(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<symbol_value>:
xor    %ecx,%ecx
cmp    $0x5b,%dil
setb   %cl
shl    $0x5,%ecx
add    $0xffffffa9,%ecx
cmp    $0x3a,%dil
mov    $0xffffffd0,%eax
cmovge %ecx,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @symbol_value(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sle i32 %5, 57
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = sub nsw i32 %9, 48
store i32 %10, i32* %2
br label %25
11: ; preds = %1
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp sgt i32 %13, 90
br i1 %14, label %15, label %20
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = sub nsw i32 %17, 97
%19 = add nsw i32 %18, 10
store i32 %19, i32* %2
br label %25
20: ; preds = %11
%21 = load i8, i8* %3
%22 = sext i8 %21 to i32
%23 = sub nsw i32 %22, 65
%24 = add nsw i32 %23, 10
store i32 %24, i32* %2
br label %25
25: ; preds = %20, %15, %7
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @symbol_value(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = icmp slt i8 %0, 58
%4 = icmp ugt i8 %0, 90
%5 = select i1 %4, i32 -87, i32 -55
%6 = select i1 %3, i32 -48, i32 %5
%7 = add nsw i32 %6, %2
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *av0) { printf("%s [MIDI SMF]\n", av0); }


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s [MIDI SMF]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s [MIDI SMF]\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void insertBefore(long *after, long *blockToInsert) {
  long *prev = (long *)after[1];
  prev[2] = (long)blockToInsert;
  blockToInsert[1] = (long)prev;
  after[1] = (long)blockToInsert;
  blockToInsert[2] = (long)after;
  return;
}


x86 assembly (clang, -O0):
<insertBefore>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,0x10(%rax)
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<insertBefore>:
mov    0x8(%rdi),%rax
mov    %rsi,0x10(%rax)
mov    %rax,0x8(%rsi)
mov    %rsi,0x8(%rdi)
mov    %rdi,0x10(%rsi)
ret

LLVM IR (-O0):
define void @insertBefore(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
%5 = alloca i64*
store i64* %0, i64** %3
store i64* %1, i64** %4
%6 = load i64*, i64** %3
%7 = getelementptr inbounds i64, i64* %6, i64 1
%8 = load i64, i64* %7
%9 = inttoptr i64 %8 to i64*
store i64* %9, i64** %5
%10 = load i64*, i64** %4
%11 = ptrtoint i64* %10 to i64
%12 = load i64*, i64** %5
%13 = getelementptr inbounds i64, i64* %12, i64 2
store i64 %11, i64* %13
%14 = load i64*, i64** %5
%15 = ptrtoint i64* %14 to i64
%16 = load i64*, i64** %4
%17 = getelementptr inbounds i64, i64* %16, i64 1
store i64 %15, i64* %17
%18 = load i64*, i64** %4
%19 = ptrtoint i64* %18 to i64
%20 = load i64*, i64** %3
%21 = getelementptr inbounds i64, i64* %20, i64 1
store i64 %19, i64* %21
%22 = load i64*, i64** %3
%23 = ptrtoint i64* %22 to i64
%24 = load i64*, i64** %4
%25 = getelementptr inbounds i64, i64* %24, i64 2
store i64 %23, i64* %25
ret void
}

LLVM IR (-O2):
define void @insertBefore(i64* %0, i64* %1) {
%3 = getelementptr inbounds i64, i64* %0, i64 1
%4 = load i64, i64* %3
%5 = inttoptr i64 %4 to i64*
%6 = ptrtoint i64* %1 to i64
%7 = getelementptr inbounds i64, i64* %5, i64 2
store i64 %6, i64* %7
%8 = getelementptr inbounds i64, i64* %1, i64 1
store i64 %4, i64* %8
store i64 %6, i64* %3
%9 = ptrtoint i64* %0 to i64
%10 = getelementptr inbounds i64, i64* %1, i64 2
store i64 %9, i64* %10
ret void
}
/* Variables and functions */
scalar_t__ mygetline(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ reverse(char *, char *);
int main() {
  char original_line[1000];
  char reversed_line[1000];
  while (0 != mygetline(original_line, 1000)) {
    reverse(original_line, reversed_line);
    printf("%s", reversed_line);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7e0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1050 <mygetline@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     118c <main+0x5c>
lea    -0x3f0(%rbp),%rdi
lea    -0x7e0(%rbp),%rsi
call   1030 <reverse@plt>
lea    -0x7e0(%rbp),%rsi
lea    0xe7e(%rip),%rdi
call   1040 <printf@plt>
jmp    1142 <main+0x12>
xor    %eax,%eax
add    $0x7e0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x7e0,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1050 <mygetline@plt>
test   %rax,%rax
je     1188 <main+0x58>
mov    %rsp,%r14
lea    0x3f0(%rsp),%rbx
lea    0xea0(%rip),%r15
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <reverse@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x3e8,%esi
call   1050 <mygetline@plt>
test   %rax,%rax
jne    1160 <main+0x30>
xor    %eax,%eax
add    $0x7e0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1000 x i8]
%3 = alloca [1000 x i8]
store i32 0, i32* %1
br label %4
4: ; preds = %8, %0
%5 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%6 = call i64 @mygetline(i8* %5, i32 1000)
%7 = icmp ne i64 0, %6
br i1 %7, label %8, label %14
8: ; preds = %4
%9 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%10 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%11 = call i32 @reverse(i8* %9, i8* %10)
%12 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%13 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %4
14: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = alloca [1000 x i8]
%3 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%5 = call i64 @mygetline(i8* %3, i32 1000)
%6 = icmp eq i64 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %0, %7
%8 = call i32 @reverse(i8* %3, i8* %4)
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%10 = call i64 @mygetline(i8* %3, i32 1000)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %7
12: ; preds = %7, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ f(int);
main() {
  if (f(0x80000000L) == 0)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x80000000,%edi
call   1040 <f@plt>
cmp    $0x0,%rax
jne    115a <main+0x2a>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x80000000,%edi
call   1040 <f@plt>
test   %rax,%rax
jne    1147 <main+0x17>
xor    %eax,%eax
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @f(i32 -2147483648)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @f(i32 -2147483648)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int BatTranslate(int, int, int);
int BatHit(int batu, int batl, int virt) {
  return BatTranslate(batu, batl, virt) != -1;
}


x86 assembly (clang, -O0):
<BatHit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <BatTranslate@plt>
cmp    $0xffffffff,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BatHit>:
push   %rax
call   1030 <BatTranslate@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @BatHit(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @BatTranslate(i32 %7, i32 %8, i32 %9)
%11 = icmp ne i32 %10, -1
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @BatHit(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @BatTranslate(i32 %0, i32 %1, i32 %2)
%5 = icmp ne i32 %4, -1
%6 = zext i1 %5 to i32
ret i32 %6
}
int _outc(char c, void *_op) { return *(*((char **)_op))++ = c; }


x86 assembly (clang, -O0):
<_outc>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x1(%rbp),%al
mov    -0x10(%rbp),%rdx
mov    (%rdx),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,(%rdx)
mov    %al,(%rcx)
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_outc>:
mov    %edi,%eax
mov    (%rsi),%rcx
lea    0x1(%rcx),%rdx
mov    %rdx,(%rsi)
mov    %al,(%rcx)
ret

LLVM IR (-O0):
define i32 @_outc(i8 signext %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
store i8 %0, i8* %3
store i8* %1, i8** %4
%5 = load i8, i8* %3
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i8**
%8 = load i8*, i8** %7
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %7
store i8 %5, i8* %8
%10 = sext i8 %5 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @_outc(i8 signext %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i8**
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i64 1
store i8* %5, i8** %3
store i8 %0, i8* %4
%6 = sext i8 %0 to i32
ret i32 %6
}
/* Variables and functions */
int f248(int *);
int f249(int *p) { return f248(p); }


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

x86 assembly (clang, -O2):
<f249>:
jmp    1030 <f248@plt>

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

LLVM IR (-O2):
define i32 @f249(i32* %0) {
%2 = tail call i32 @f248(i32* %0)
ret i32 %2
}
/* Variables and functions */
int strlen(char *);
void stripNL(char *string) {
  int l;
  l = strlen(string) - 1;
  if (l >= 0) {
    if (string[l] == '\n')
      string[l] = '\0';
  }
}


x86 assembly (clang, -O0):
<stripNL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     115b <stripNL+0x4b>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    1156 <stripNL+0x46>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
jmp    115b <stripNL+0x4b>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stripNL>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
test   %eax,%eax
jle    112a <stripNL+0x1a>
add    $0xffffffff,%eax
cmpb   $0xa,(%rbx,%rax,1)
jne    112a <stripNL+0x1a>
movb   $0x0,(%rbx,%rax,1)
pop    %rbx
ret

LLVM IR (-O0):
define void @stripNL(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = sub nsw i32 %5, 1
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp sge i32 %7, 0
br i1 %8, label %9, label %23
9: ; preds = %1
%10 = load i8*, i8** %2
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %10, i64 %12
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 10
br i1 %16, label %17, label %22
17: ; preds = %9
%18 = load i8*, i8** %2
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
store i8 0, i8* %21
br label %22
22: ; preds = %17, %9
br label %23
23: ; preds = %22, %1
ret void
}

LLVM IR (-O2):
define void @stripNL(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = add nsw i32 %2, -1
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 10
br i1 %9, label %10, label %11
10: ; preds = %4
store i8 0, i8* %7
br label %11
11: ; preds = %4, %10, %1
ret void
}
int getc0(void) {
  while (((*(volatile unsigned long *)(0xE000C000 + 0x14)) & 0x01) == 0)
    ;
  return (*(volatile unsigned long *)(0xE000C000 + 0x00));
}


x86 assembly (clang, -O0):
<getc0>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <getc0+0x9>
mov    $0xe000c014,%eax
mov    (%rax),%rax
and    $0x1,%rax
cmp    $0x0,%rax
jne    1124 <getc0+0x24>
jmp    1109 <getc0+0x9>
mov    $0xe000c000,%eax
mov    (%rax),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getc0>:
mov    $0xe000c000,%eax
cs nopw 0x0(%rax,%rax,1)
nop
testq  $0x1,0x14(%rax)
je     1110 <getc0+0x10>
mov    (%rax),%rax
ret

LLVM IR (-O0):
define i32 @getc0() {
br label %1
1: ; preds = %5, %0
%2 = load volatile i64, i64* inttoptr (i64 3758145556 to i64*)
%3 = and i64 %2, 1
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
%7 = load volatile i64, i64* inttoptr (i64 3758145536 to i64*)
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @getc0() {
br label %1
1: ; preds = %1, %0
%2 = load volatile i64, i64* inttoptr (i64 3758145556 to i64*)
%3 = and i64 %2, 1
%4 = icmp eq i64 %3, 0
br i1 %4, label %1, label %5
5: ; preds = %1
%6 = load volatile i64, i64* inttoptr (i64 3758145536 to i64*)
%7 = trunc i64 %6 to i32
ret i32 %7
}
/* Variables and functions */
char *mpc_event_api_name();
char *mpc_event_get_api_name(void) { return mpc_event_api_name(); }


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

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

LLVM IR (-O0):
define i8* @mpc_event_get_api_name() {
%1 = call i8* (...) @mpc_event_api_name()
ret i8* %1
}

LLVM IR (-O2):
define i8* @mpc_event_get_api_name() {
%1 = tail call i8* (...) @mpc_event_api_name()
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int, int, int, int, int);
int main() {
  printf("a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d", 1, 2, 3, 4, 5, 6, 7,
         8);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
mov    $0x5,%r9d
movl   $0x6,(%rsp)
movl   $0x7,0x8(%rsp)
movl   $0x8,0x10(%rsp)
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
sub    $0x8,%rsp
lea    0xee4(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
mov    $0x5,%r9d
push   $0x8
push   $0x7
push   $0x6
call   1030 <printf@plt>
add    $0x20,%rsp
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8)
ret i32 0
}

LLVM IR (-O2):
@.str = [47 x i8] c"a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8)
ret i32 0
}
decstbm(pn1, pn2) int pn1, pn2;
{
  if (pn1 || pn2)
    brc2(pn1, pn2, 'r');
  else
    esc("[r");
}


x86 assembly (clang, -O0):
<decstbm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1142 <decstbm+0x22>
cmpl   $0x0,-0xc(%rbp)
je     1159 <decstbm+0x39>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    $0x72,%edx
mov    $0x0,%al
call   1040 <brc2@plt>
jmp    1167 <decstbm+0x47>
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <esc@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decstbm>:
push   %rax
mov    %esi,%eax
or     %edi,%eax
je     1135 <decstbm+0x15>
mov    $0x72,%edx
xor    %eax,%eax
call   1040 <brc2@plt>
pop    %rcx
ret
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1030 <esc@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"[r\00"
define i32 @decstbm(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i32, i32* %5
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %8, %2
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @brc2 to i32 (i32, i32, i32, ...)*)(i32 %12, i32 %13, i32 114)
br label %17
15: ; preds = %8
%16 = call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %17
17: ; preds = %15, %11
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@.str = [3 x i8] c"[r\00"
define i32 @decstbm(i32 %0, i32 %1) {
%3 = or i32 %1, %0
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @brc2 to i32 (i32, i32, i32, ...)*)(i32 %0, i32 %1, i32 114)
br label %9
7: ; preds = %2
%8 = tail call i32 (i8*, ...) bitcast (i32 (...)* @esc to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
ret i32 undef
}
int fun246() { return 246; }


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

x86 assembly (clang, -O2):
<fun246>:
mov    $0xf6,%eax
ret

LLVM IR (-O0):
define i32 @fun246() {
ret i32 246
}

LLVM IR (-O2):
define i32 @fun246() {
ret i32 246
}
/* Variables and functions */
int /*<<< orphan*/ kiir(char *);
void keptorl() { kiir("\033[2J"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[2J\00"
define void @keptorl() {
%1 = call i32 @kiir(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[2J\00"
define void @keptorl() {
%1 = tail call i32 @kiir(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int GetX(int);
int GetY(int);
int /*<<< orphan*/ PlayLevelSound_SP(int, int, int, int);
void subSoundFX(int si, int element, int action) {
  int x = GetX(si);
  int y = GetY(si);
  PlayLevelSound_SP(x, y, element, action);
}


x86 assembly (clang, -O0):
<subSoundFX>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <GetX@plt>
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <GetY@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
call   1030 <PlayLevelSound_SP@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<subSoundFX>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%r15d
mov    %edi,%ebx
call   1050 <GetX@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1040 <GetY@plt>
mov    %ebp,%edi
mov    %eax,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <PlayLevelSound_SP@plt>

LLVM IR (-O0):
define void @subSoundFX(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %4
%10 = call i32 @GetX(i32 %9)
store i32 %10, i32* %7
%11 = load i32, i32* %4
%12 = call i32 @GetY(i32 %11)
store i32 %12, i32* %8
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = call i32 @PlayLevelSound_SP(i32 %13, i32 %14, i32 %15, i32 %16)
ret void
}

LLVM IR (-O2):
define void @subSoundFX(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @GetX(i32 %0)
%5 = tail call i32 @GetY(i32 %0)
%6 = tail call i32 @PlayLevelSound_SP(i32 %4, i32 %5, i32 %1, i32 %2)
ret void
}
/* Type definitions */
struct t_config_option {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ irc_config_compute_nick_colors();
void irc_config_change_look_nick_colors(void *data,
                                        struct t_config_option *option) {
  (void)data;
  (void)option;
  irc_config_compute_nick_colors();
}


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

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

LLVM IR (-O0):
%struct.t_config_option = type { i32 }
define void @irc_config_change_look_nick_colors(i8* %0, %struct.t_config_option* %1) {
%3 = alloca i8*
%4 = alloca %struct.t_config_option*
store i8* %0, i8** %3
store %struct.t_config_option* %1, %struct.t_config_option** %4
%5 = load i8*, i8** %3
%6 = load %struct.t_config_option*, %struct.t_config_option** %4
%7 = call i32 (...) @irc_config_compute_nick_colors()
ret void
}

LLVM IR (-O2):
%struct.t_config_option = type { i32 }
define void @irc_config_change_look_nick_colors(i8* nocapture readnone %0, %struct.t_config_option* nocapture readnone %1) {
%3 = tail call i32 (...) @irc_config_compute_nick_colors()
ret void
}
int andi(int register2, int number) { return (register2 & number); }


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

x86 assembly (clang, -O2):
<andi>:
mov    %edi,%eax
and    %esi,%eax
ret

LLVM IR (-O0):
define i32 @andi(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 = and i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @andi(i32 %0, i32 %1) {
%3 = and i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ LOG_INFO;
int /*<<< orphan*/ reread();
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *);
void sighup(int signo) {
  syslog(LOG_INFO, "Re-reading configuration file");
  reread();
}


x86 assembly (clang, -O0):
<sighup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1040 <syslog@plt>
mov    $0x0,%al
call   1030 <reread@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sighup>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <syslog@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <reread@plt>

LLVM IR (-O0):
@LOG_INFO = global i32 0
@.str = [30 x i8] c"Re-reading configuration file\00"
define void @sighup(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @LOG_INFO
%4 = call i32 @syslog(i32 %3, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @reread()
ret void
}

LLVM IR (-O2):
@LOG_INFO = global i32 0
@.str = [30 x i8] c"Re-reading configuration file\00"
define void @sighup(i32 %0) {
%2 = load i32, i32* @LOG_INFO
%3 = tail call i32 @syslog(i32 %2, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (...) @reread()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ strcmp(char *, char *);
int zhash_str_equals(const void *_a, const void *_b) {
  assert(_a != NULL);
  assert(_b != NULL);
  char *a = *(char **)_a;
  char *b = *(char **)_b;
  return !strcmp(a, b);
}


x86 assembly (clang, -O0):
<zhash_str_equals>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zhash_str_equals>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
xor    %edi,%edi
test   %r14,%r14
setne  %dil
call   1040 <assert@plt>
mov    (%rbx),%rdi
mov    (%r14),%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @zhash_str_equals(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = icmp ne i8* %7, null
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = load i8*, i8** %4
%12 = icmp ne i8* %11, null
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = load i8*, i8** %3
%16 = bitcast i8* %15 to i8**
%17 = load i8*, i8** %16
store i8* %17, i8** %5
%18 = load i8*, i8** %4
%19 = bitcast i8* %18 to i8**
%20 = load i8*, i8** %19
store i8* %20, i8** %6
%21 = load i8*, i8** %5
%22 = load i8*, i8** %6
%23 = call i32 @strcmp(i8* %21, i8* %22)
%24 = icmp ne i32 %23, 0
%25 = xor i1 %24, true
%26 = zext i1 %25 to i32
ret i32 %26
}

LLVM IR (-O2):
define i32 @zhash_str_equals(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = icmp ne i8* %1, null
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = bitcast i8* %0 to i8**
%10 = load i8*, i8** %9
%11 = bitcast i8* %1 to i8**
%12 = load i8*, i8** %11
%13 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(1) %12)
%14 = icmp eq i32 %13, 0
%15 = zext i1 %14 to i32
ret i32 %15
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ printf(char *, char *);
void openFile(FILE *fp, char *fileName, char *mode) {
  fp = fopen(fileName, mode);
  if (fp == NULL) {
    printf("\n [ERROR]   Unable to open file %s\n\n", fileName);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<openFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    117a <openFile+0x4a>
mov    -0x10(%rbp),%rsi
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<openFile>:
push   %rbx
mov    %rsi,%rbx
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1146 <openFile+0x16>
pop    %rbx
ret
lea    0xeb3(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"\0A [ERROR] Unable to open file %s\0A\0A\00"
define void @openFile(i32* %0, i8* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i8*
store i32* %0, i32** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %5
%8 = load i8*, i8** %6
%9 = call i32* @fopen(i8* %7, i8* %8)
store i32* %9, i32** %4
%10 = load i32*, i32** %4
%11 = icmp eq i32* %10, null
br i1 %11, label %12, label %16
12: ; preds = %3
%13 = load i8*, i8** %5
%14 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %13)
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"\0A [ERROR] Unable to open file %s\0A\0A\00"
define void @openFile(i32* nocapture readnone %0, i8* %1, i8* nocapture %2) {
%4 = tail call i32* @fopen(i8* %1, i8* %2)
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %1)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ MYSQL_RES;

/* Variables and functions */
int mysql_num_fields(int /*<<< orphan*/ *);
int num_fields(MYSQL_RES *res) { return mysql_num_fields(res); }


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

x86 assembly (clang, -O2):
<num_fields>:
jmp    1030 <mysql_num_fields@plt>

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

LLVM IR (-O2):
define i32 @num_fields(i32* %0) {
%2 = tail call i32 @mysql_num_fields(i32* %0)
ret i32 %2
}
int main() {
  int *p;
  *p++ = 0;
  *--p = 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x8(%rbp)
movl   $0x0,-0x4(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32*
%2 = load i32*, i32** %1
%3 = getelementptr inbounds i32, i32* %2, i32 1
store i32* %3, i32** %1
store i32 0, i32* %2
%4 = load i32*, i32** %1
%5 = getelementptr inbounds i32, i32* %4, i32 -1
store i32* %5, i32** %1
store i32 0, i32* %5
ret i32 0
}

LLVM IR (-O2):
void setutxent(void) { ; }


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

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

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

LLVM IR (-O2):
define void @setutxent() {
ret void
}
/* Variables and functions */
int boolsquare(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num;
  scanf("%d", &num);
  printf("%d", boolsquare(num));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1050 <boolsquare@plt>
mov    %eax,%esi
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%edi
call   1050 <boolsquare@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = call i32 @boolsquare(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @boolsquare(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ IntEnable(int);
int /*<<< orphan*/ IntRegister(int, void (*)());
void PRCMIntRegister(void (*pfnHandler)(void)) {
  IntRegister(188, pfnHandler);
  IntEnable(188);
}


x86 assembly (clang, -O0):
<PRCMIntRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0xbc,%edi
call   1040 <IntRegister@plt>
mov    $0xbc,%edi
call   1030 <IntEnable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PRCMIntRegister>:
push   %rax
mov    %rdi,%rsi
mov    $0xbc,%edi
call   1040 <IntRegister@plt>
mov    $0xbc,%edi
pop    %rax
jmp    1030 <IntEnable@plt>

LLVM IR (-O0):
define void @PRCMIntRegister(void ()* %0) {
%2 = alloca void ()*
store void ()* %0, void ()** %2
%3 = load void ()*, void ()** %2
%4 = bitcast void ()* %3 to void (...)*
%5 = call i32 @IntRegister(i32 188, void (...)* %4)
%6 = call i32 @IntEnable(i32 188)
ret void
}

LLVM IR (-O2):
define void @PRCMIntRegister(void ()* %0) {
%2 = bitcast void ()* %0 to void (...)*
%3 = tail call i32 @IntRegister(i32 188, void (...)* %2)
%4 = tail call i32 @IntEnable(i32 188)
ret void
}
/* Variables and functions */
char const *ERR_getErrorName(size_t);
const char *ZSTD_getErrorName(size_t code) { return ERR_getErrorName(code); }


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

x86 assembly (clang, -O2):
<ZSTD_getErrorName>:
jmp    1030 <ERR_getErrorName@plt>

LLVM IR (-O0):
define i8* @ZSTD_getErrorName(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @ERR_getErrorName(i64 %3)
ret i8* %4
}

LLVM IR (-O2):
define i8* @ZSTD_getErrorName(i64 %0) {
%2 = tail call i8* @ERR_getErrorName(i64 %0)
ret i8* %2
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int bits_per_pixel;
};
typedef TYPE_1__ XPixmapFormatValues;

/* Variables and functions */
void set_XPixmapFormatValues_bits_per_pixel(void *_p, int _v) {
  ((XPixmapFormatValues *)_p)->bits_per_pixel = (int)_v;
}


x86 assembly (clang, -O0):
<set_XPixmapFormatValues_bits_per_pixel>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XPixmapFormatValues_bits_per_pixel>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XPixmapFormatValues_bits_per_pixel(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 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XPixmapFormatValues_bits_per_pixel(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
int f0(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @f0() {
ret i32 0
}
void the_function() {}


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

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

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

LLVM IR (-O2):
define void @the_function() {
ret void
}