xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ __exception_info();
void test172() {
  (void)__exception_info();
  (void)__exception_info();
}


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

x86 assembly (clang, -O2):
<test172>:
push   %rax
xor    %eax,%eax
call   1030 <__exception_info@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <__exception_info@plt>

LLVM IR (-O0):
define void @test172() {
%1 = call i32 (...) @__exception_info()
%2 = call i32 (...) @__exception_info()
ret void
}

LLVM IR (-O2):
define void @test172() {
%1 = tail call i32 (...) @__exception_info()
%2 = tail call i32 (...) @__exception_info()
ret void
}
/* Variables and functions */
int f(int, int, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main() {
  int i, j, k;
  scanf("%d %d %d", &i, &j, &k);
  return f(i, j, k);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x14(%rsp),%edi
mov    0x10(%rsp),%esi
mov    0xc(%rsp),%edx
call   1030 <f@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%d %d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = call i32 @f(i32 %8, i32 %9, i32 %10)
ret i32 %11
}
/* Variables and functions */
char *block_malloc(int /*<<< orphan*/);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ strlen(char *);
char *block_strdup(char *from) {
  char *d;
  if (!from)
    return 0;
  d = block_malloc(strlen(from + 1));
  if (d)
    strcpy(d, from);
  return d;
}


x86 assembly (clang, -O0):
<block_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <block_strdup+0x24>
movq   $0x0,-0x8(%rbp)
jmp    118c <block_strdup+0x5c>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1040 <strlen@plt>
mov    %eax,%edi
call   1050 <block_malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1184 <block_strdup+0x54>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<block_strdup>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     1161 <block_strdup+0x31>
mov    %rdi,%r14
add    $0x1,%rdi
call   1040 <strlen@plt>
mov    %eax,%edi
call   1050 <block_malloc@plt>
test   %rax,%rax
je     1161 <block_strdup+0x31>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
jmp    1163 <block_strdup+0x33>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @block_strdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = tail call i32 @strlen(i8* %4)
%6 = tail call i8* @block_malloc(i32 %5)
%7 = icmp eq i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %3
%9 = tail call i32 @strcpy(i8* %6, i8* %0)
br label %10
10: ; preds = %3, %8, %1
%11 = phi i8* [ null, %1 ], [ %6, %8 ], [ null, %3 ]
ret i8* %11
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ UINT32_MAX;
int rat_mod_generic_set_val_max32(const char *argv, uint8_t *data,
                                  uint16_t len) {
  do {
  } while (0);
  if (!argv || !data || len < sizeof(uint32_t))
    return -1;
  *((uint32_t *)data) = UINT32_MAX;
  return 0;
}


x86 assembly (clang, -O0):
<rat_mod_generic_set_val_max32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
jmp    1114 <rat_mod_generic_set_val_max32+0x14>
cmpq   $0x0,-0x10(%rbp)
je     1138 <rat_mod_generic_set_val_max32+0x38>
cmpq   $0x0,-0x18(%rbp)
je     1138 <rat_mod_generic_set_val_max32+0x38>
movslq -0x1c(%rbp),%rax
cmp    $0x4,%rax
jae    1144 <rat_mod_generic_set_val_max32+0x44>
movl   $0xffffffff,-0x4(%rbp)
jmp    115a <rat_mod_generic_set_val_max32+0x5a>
mov    0x2ead(%rip),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rat_mod_generic_set_val_max32>:
mov    $0xffffffff,%eax
test   %rdi,%rdi
je     1121 <rat_mod_generic_set_val_max32+0x21>
test   %rsi,%rsi
je     1121 <rat_mod_generic_set_val_max32+0x21>
cmp    $0x4,%edx
jb     1121 <rat_mod_generic_set_val_max32+0x21>
mov    0x2edd(%rip),%rax
mov    (%rax),%eax
mov    %eax,(%rsi)
xor    %eax,%eax
ret

LLVM IR (-O0):
@UINT32_MAX = global i32 0
define i32 @rat_mod_generic_set_val_max32(i8* %0, i32* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i32
store i8* %0, i8** %5
store i32* %1, i32** %6
store i32 %2, i32* %7
br label %8
8: ; preds = %3
br label %9
9: ; preds = %8
%10 = load i8*, i8** %5
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %19
12: ; preds = %9
%13 = load i32*, i32** %6
%14 = icmp ne i32* %13, null
br i1 %14, label %15, label %19
15: ; preds = %12
%16 = load i32, i32* %7
%17 = sext i32 %16 to i64
%18 = icmp ult i64 %17, 4
br i1 %18, label %19, label %20
19: ; preds = %15, %12, %9
store i32 -1, i32* %4
br label %23
20: ; preds = %15
%21 = load i32, i32* @UINT32_MAX
%22 = load i32*, i32** %6
store i32 %21, i32* %22
store i32 0, i32* %4
br label %23
23: ; preds = %20, %19
%24 = load i32, i32* %4
ret i32 %24
}

LLVM IR (-O2):
@UINT32_MAX = global i32 0
define i32 @rat_mod_generic_set_val_max32(i8* readnone %0, i32* writeonly %1, i32 %2) {
%4 = icmp eq i8* %0, null
%5 = icmp eq i32* %1, null
%6 = or i1 %4, %5
%7 = icmp ult i32 %2, 4
%8 = or i1 %6, %7
br i1 %8, label %11, label %9
9: ; preds = %3
%10 = load i32, i32* @UINT32_MAX
store i32 %10, i32* %1
br label %11
11: ; preds = %3, %9
%12 = phi i32 [ 0, %9 ], [ -1, %3 ]
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int g_unichar_to_utf8(int /*<<< orphan*/, char *);
int stringprep_unichar_to_utf8(uint32_t c, char *outbuf) {
  return g_unichar_to_utf8(c, outbuf);
}


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

x86 assembly (clang, -O2):
<stringprep_unichar_to_utf8>:
jmp    1030 <g_unichar_to_utf8@plt>

LLVM IR (-O0):
define i32 @stringprep_unichar_to_utf8(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = call i32 @g_unichar_to_utf8(i32 %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @stringprep_unichar_to_utf8(i32 %0, i8* %1) {
%3 = tail call i32 @g_unichar_to_utf8(i32 %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Primeiro programa em C\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Primeiro programa em C\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [23 x i8] c"Primeiro programa em C\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ newText();
int menu_new(int action, char *menu_name) {
  if (action == 0) {
    newText();
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<menu_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    113c <menu_new+0x2c>
mov    $0x0,%al
call   1030 <newText@plt>
movl   $0x1,-0x4(%rbp)
jmp    1143 <menu_new+0x33>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<menu_new>:
xor    %eax,%eax
test   %edi,%edi
je     1117 <menu_new+0x7>
ret
push   %rax
xor    %eax,%eax
call   1030 <newText@plt>
mov    $0x1,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @menu_new(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 (...) @newText()
store i32 1, i32* %3
br label %11
10: ; preds = %2
store i32 0, i32* %3
br label %11
11: ; preds = %10, %8
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @menu_new(i32 %0, i8* nocapture readnone %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @newText()
br label %6
6: ; preds = %2, %4
%7 = phi i32 [ 1, %4 ], [ 0, %2 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ uridb_db_close();
void destroy(void) { uridb_db_close(); }


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

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

LLVM IR (-O0):
define void @destroy() {
%1 = call i32 (...) @uridb_db_close()
ret void
}

LLVM IR (-O2):
define void @destroy() {
%1 = tail call i32 (...) @uridb_db_close()
ret void
}
void event_DUMP(void) {}


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

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

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

LLVM IR (-O2):
define void @event_DUMP() {
ret void
}
void rte_prefetch2(const volatile void *p) {
  asm volatile("prefetcht2 %[p]" : : [p] "m"(*(const volatile char *)p));
}


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

x86 assembly (clang, -O2):
<rte_prefetch2>:
prefetcht2 (%rdi)
ret

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

LLVM IR (-O2):
define void @rte_prefetch2(i8* %0) {
tail call void asm sideeffect "prefetcht2 $0", "*m,~{dirflag},~{fpsr},~{flags}"(i8* elementtype(i8) %0)
ret void
}
int dcmp(const void *i, const void *j) {
  double x = *(double *)i;
  double y = *(double *)j;
  if (x < y)
    return -1;
  if (x > y)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<dcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1146 <dcmp+0x46>
movl   $0xffffffff,-0x4(%rbp)
jmp    1169 <dcmp+0x69>
movsd  -0x20(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1162 <dcmp+0x62>
movl   $0x1,-0x4(%rbp)
jmp    1169 <dcmp+0x69>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcmp>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
seta   %cl
ucomisd %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @dcmp(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double
%7 = alloca double
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to double*
%10 = load double, double* %9
store double %10, double* %6
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to double*
%13 = load double, double* %12
store double %13, double* %7
%14 = load double, double* %6
%15 = load double, double* %7
%16 = fcmp olt double %14, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 -1, i32* %3
br label %24
18: ; preds = %2
%19 = load double, double* %6
%20 = load double, double* %7
%21 = fcmp ogt double %19, %20
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 1, i32* %3
br label %24
23: ; preds = %18
store i32 0, i32* %3
br label %24
24: ; preds = %23, %22, %17
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @dcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp olt double %4, %6
%8 = fcmp ogt double %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
scalar_t__ LZ4_64bits();
int /*<<< orphan*/ LZ4_read32(void const *);
int /*<<< orphan*/ LZ4_read64(void const *);
size_t LZ4_read_ARCH(const void *p) {
  if (LZ4_64bits())
    return (size_t)LZ4_read64(p);
  else
    return (size_t)LZ4_read32(p);
}


x86 assembly (clang, -O0):
<LZ4_read_ARCH>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <LZ4_64bits@plt>
cmp    $0x0,%rax
je     1161 <LZ4_read_ARCH+0x31>
mov    -0x10(%rbp),%rdi
call   1050 <LZ4_read64@plt>
cltq
mov    %rax,-0x8(%rbp)
jmp    1170 <LZ4_read_ARCH+0x40>
mov    -0x10(%rbp),%rdi
call   1030 <LZ4_read32@plt>
cltq
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LZ4_read_ARCH>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <LZ4_64bits@plt>
mov    %rbx,%rdi
test   %rax,%rax
je     114a <LZ4_read_ARCH+0x1a>
call   1050 <LZ4_read64@plt>
jmp    114f <LZ4_read_ARCH+0x1f>
call   1030 <LZ4_read32@plt>
cltq
pop    %rbx
ret

LLVM IR (-O0):
define i64 @LZ4_read_ARCH(i8* %0) {
%2 = alloca i64
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i64 (...) @LZ4_64bits()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8*, i8** %3
%8 = call i32 @LZ4_read64(i8* %7)
%9 = sext i32 %8 to i64
store i64 %9, i64* %2
br label %14
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = call i32 @LZ4_read32(i8* %11)
%13 = sext i32 %12 to i64
store i64 %13, i64* %2
br label %14
14: ; preds = %10, %6
%15 = load i64, i64* %2
ret i64 %15
}

LLVM IR (-O2):
define i64 @LZ4_read_ARCH(i8* %0) {
%2 = tail call i64 (...) @LZ4_64bits()
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @LZ4_read64(i8* %0)
br label %8
6: ; preds = %1
%7 = tail call i32 @LZ4_read32(i8* %0)
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ %5, %4 ], [ %7, %6 ]
%10 = sext i32 %9 to i64
ret i64 %10
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int store_solutions(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(51, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<store_solutions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x33,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<store_solutions>:
mov    $0x33,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @store_solutions() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 51, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @store_solutions() {
%1 = tail call i32 @_ada_use_c2phc(i32 51, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ type;
};
struct TYPE_4__ {
  TYPE_1__ xmap;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xmap_type(void *_p) { return (int)((XEvent *)_p)->xmap.type; }


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

x86 assembly (clang, -O2):
<get_XEvent_xmap_type>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i32 @get_XEvent_xmap_type(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_XEvent_xmap_type(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
void balance_init(void) {}


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

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

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

LLVM IR (-O2):
define void @balance_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void print_spaces(int space_count) {
  while (space_count-- > 0)
    putchar(' ');
}


x86 assembly (clang, -O0):
<print_spaces>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
jle    113e <print_spaces+0x2e>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    111b <print_spaces+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_spaces>:
push   %rbx
test   %edi,%edi
jle    1132 <print_spaces+0x22>
mov    %edi,%ebx
add    $0x1,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1120 <print_spaces+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @print_spaces(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* %2
%5 = add nsw i32 %4, -1
store i32 %5, i32* %2
%6 = icmp sgt i32 %4, 0
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = call i32 @putchar(i8 signext 32)
br label %3
9: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @print_spaces(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ %0, %1 ]
%5 = add nsw i32 %4, -1
%6 = tail call i32 @putchar(i8 signext 32)
%7 = icmp ugt i32 %4, 1
br i1 %7, label %3, label %8
8: ; preds = %3, %1
ret void
}
int draw_block4x4_uncompressed(const unsigned char *bitstring,
                               unsigned int *image_buffer, int flags) {
  image_buffer[0] = *(unsigned int *)&bitstring[0];
  return 1;
}


x86 assembly (clang, -O0):
<draw_block4x4_uncompressed>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @draw_block4x4_uncompressed(i8* %0, i32* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = load i32*, i32** %5
%12 = getelementptr inbounds i32, i32* %11, i64 0
store i32 %10, i32* %12
ret i32 1
}

LLVM IR (-O2):
define i32 @draw_block4x4_uncompressed(i8* nocapture %0, i32* nocapture writeonly %1, i32 %2) {
%4 = bitcast i8* %0 to i32*
%5 = load i32, i32* %4
store i32 %5, i32* %1
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, unsigned int);
void radio_link_failure(void *arg, unsigned time_in_ms) {
  printf("%s[ms=%04d]: radio link failure (=ECONNRESET)\n", (char *)arg,
         time_in_ms % 10000);
}


x86 assembly (clang, -O0):
<radio_link_failure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%eax
mov    $0x2710,%ecx
xor    %edx,%edx
div    %ecx
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<radio_link_failure>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    %edx,%eax
mov    $0xd1b71759,%ecx
imul   %rax,%rcx
shr    $0x2d,%rcx
imul   $0x2710,%ecx,%eax
sub    %eax,%edx
lea    0xecd(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [47 x i8] c"%s[ms=%04d]: radio link failure (=ECONNRESET)\0A\00"
define void @radio_link_failure(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = urem i32 %6, 10000
%8 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [47 x i8] c"%s[ms=%04d]: radio link failure (=ECONNRESET)\0A\00"
define void @radio_link_failure(i8* %0, i32 %1) {
%3 = urem i32 %1, 10000
%4 = tail call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %3)
ret void
}
int encode_block() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @encode_block() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ glNormal3dv(double *);
int /*<<< orphan*/ glVertex3dv(double *);
void sendVertex(double *nx, double *x) {
  glNormal3dv(nx);
  glVertex3dv(x);
}


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

x86 assembly (clang, -O2):
<sendVertex>:
push   %rbx
mov    %rsi,%rbx
call   1030 <glNormal3dv@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <glVertex3dv@plt>

LLVM IR (-O0):
define void @sendVertex(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = call i32 @glNormal3dv(double* %5)
%7 = load double*, double** %4
%8 = call i32 @glVertex3dv(double* %7)
ret void
}

LLVM IR (-O2):
define void @sendVertex(double* %0, double* %1) {
%3 = tail call i32 @glNormal3dv(double* %0)
%4 = tail call i32 @glVertex3dv(double* %1)
ret void
}
/* Variables and functions */
char *party_test();
int /*<<< orphan*/ printf(char *, char *);
int main() {
  printf("Return value of 3rd-party function: %s\n", party_test());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <party_test@plt>
mov    %rax,%rsi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [40 x i8] c"Return value of 3rd-party function: %s\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i8* (...) @party_test()
%3 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [40 x i8] c"Return value of 3rd-party function: %s\0A\00"
define i32 @main() {
%1 = tail call i8* (...) @party_test()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 0
}
/* Type definitions */
struct rb3_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/
rb3_unlink_and_rebalance_and_maybe_augment(struct rb3_head *,
                                           int /*<<< orphan*/ *);
void rb3_unlink_and_rebalance(struct rb3_head *head) {
  rb3_unlink_and_rebalance_and_maybe_augment(head, NULL);
}


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

x86 assembly (clang, -O2):
<rb3_unlink_and_rebalance>:
xor    %esi,%esi
jmp    1030 <rb3_unlink_and_rebalance_and_maybe_augment@plt>

LLVM IR (-O0):
%struct.rb3_head = type { i32 }
define void @rb3_unlink_and_rebalance(%struct.rb3_head* %0) {
%2 = alloca %struct.rb3_head*
store %struct.rb3_head* %0, %struct.rb3_head** %2
%3 = load %struct.rb3_head*, %struct.rb3_head** %2
%4 = call i32 @rb3_unlink_and_rebalance_and_maybe_augment(%struct.rb3_head* %3, i32* null)
ret void
}

LLVM IR (-O2):
%struct.rb3_head = type { i32 }
define void @rb3_unlink_and_rebalance(%struct.rb3_head* %0) {
%2 = tail call i32 @rb3_unlink_and_rebalance_and_maybe_augment(%struct.rb3_head* %0, i32* null)
ret void
}
void BIO_set_callback(void) {}


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

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

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

LLVM IR (-O2):
define void @BIO_set_callback() {
ret void
}
void uDMA_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<uDMA_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <uDMA_Handler+0x9>
jmp    1109 <uDMA_Handler+0x9>

x86 assembly (clang, -O2):
<uDMA_Handler>:
jmp    1100 <uDMA_Handler>

LLVM IR (-O0):
define void @uDMA_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @uDMA_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t readint32(char *buf) { return *(uint32_t *)buf; }


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

x86 assembly (clang, -O2):
<readint32>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @readint32(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @readint32(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int strcmp(char *, char *);
int wcscoll(const wchar_t *s1, const wchar_t *s2) {
  return strcmp((char *)s1, (char *)s2);
}


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

x86 assembly (clang, -O2):
<wcscoll>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @wcscoll(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 = bitcast i32* %5 to i8*
%7 = load i32*, i32** %4
%8 = bitcast i32* %7 to i8*
%9 = call i32 @strcmp(i8* %6, i8* %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @wcscoll(i32* nocapture %0, i32* nocapture %1) {
%3 = bitcast i32* %0 to i8*
%4 = bitcast i32* %1 to i8*
%5 = tail call i32 @strcmp(i8* dereferenceable(1) %3, i8* dereferenceable(1) %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ R_OK;
int access(char const *, int /*<<< orphan*/);
int strfile_readable(const char *str) { return access(str, R_OK); }


x86 assembly (clang, -O0):
<strfile_readable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strfile_readable>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <access@plt>

LLVM IR (-O0):
@R_OK = global i32 0
define i32 @strfile_readable(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @R_OK
%5 = call i32 @access(i8* %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@R_OK = global i32 0
define i32 @strfile_readable(i8* nocapture %0) {
%2 = load i32, i32* @R_OK
%3 = tail call i32 @access(i8* %0, i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ comprintf(char *, char const *, char const *);
void gen_writelong(const char *address, const char *source) {
  comprintf("\twritelong(%s,%s,scratchie);\n", address, source);
}


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

x86 assembly (clang, -O2):
<gen_writelong>:
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
jmp    1030 <comprintf@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"\09writelong(%s,%s,scratchie);\0A\00"
define void @gen_writelong(i8* %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 = call i32 @comprintf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"\09writelong(%s,%s,scratchie);\0A\00"
define void @gen_writelong(i8* %0, i8* %1) {
%3 = tail call i32 @comprintf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int areaOfRectangle(int, int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int aor;
  aor = areaOfRectangle(10, 80);
  printf("Area of Recctangle: %d", aor);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xa,%edi
mov    $0x50,%esi
call   1040 <areaOfRectangle@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
mov    $0x50,%esi
call   1040 <areaOfRectangle@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Area of Recctangle: %d\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = call i32 @areaOfRectangle(i32 10, i32 80)
store i32 %6, i32* %5
%7 = load i32, i32* %5
%8 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"Area of Recctangle: %d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @areaOfRectangle(i32 10, i32 80)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
void const *GppcFinfoV1();
const void *pg_finfo_argisnullfunc(void) { return GppcFinfoV1(); }


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

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

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

LLVM IR (-O2):
define i8* @pg_finfo_argisnullfunc() {
%1 = tail call i8* (...) @GppcFinfoV1()
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
void exit_input_error(int line_num) {
  fprintf(stderr, "Wrong input format at line %d\n", line_num);
  exit(1);
}


x86 assembly (clang, -O0):
<exit_input_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xec2(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exit_input_error>:
push   %rax
mov    %edi,%edx
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
lea    0xecd(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"Wrong input format at line %d\0A\00"
define void @exit_input_error(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = load i32, i32* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"Wrong input format at line %d\0A\00"
define void @exit_input_error(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, int);
void daapGetText(const char **d, int len, char *dst) {
  const char *p = *d;
  memcpy(dst, p, len);
  dst[len] = '\0';
  *d = p + len;
}


x86 assembly (clang, -O0):
<daapGetText>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%rcx
movslq -0xc(%rbp),%rax
add    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<daapGetText>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r15
mov    %esi,%ebp
mov    %rdi,%r14
mov    (%rdi),%rbx
mov    %rdx,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1030 <memcpy@plt>
movslq %ebp,%rax
movb   $0x0,(%r15,%rax,1)
add    %rax,%rbx
mov    %rbx,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @daapGetText(i8** %0, i32 %1, i8* %2) {
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
store i8** %0, i8*** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%8 = load i8**, i8*** %4
%9 = load i8*, i8** %8
store i8* %9, i8** %7
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i32, i32* %5
%13 = call i32 @memcpy(i8* %10, i8* %11, i32 %12)
%14 = load i8*, i8** %6
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
store i8 0, i8* %17
%18 = load i8*, i8** %7
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
%22 = load i8**, i8*** %4
store i8* %21, i8** %22
ret void
}

LLVM IR (-O2):
define void @daapGetText(i8** nocapture %0, i32 %1, i8* %2) {
%4 = load i8*, i8** %0
%5 = tail call i32 @memcpy(i8* %2, i8* %4, i32 %1)
%6 = sext i32 %1 to i64
%7 = getelementptr inbounds i8, i8* %2, i64 %6
store i8 0, i8* %7
%8 = getelementptr inbounds i8, i8* %4, i64 %6
store i8* %8, i8** %0
ret void
}
/* Type definitions */
struct timezone {
  int dummy;
};
struct timeval {
  int dummy;
};
struct _reent {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ bt_sys_settimeofday(struct timeval *, struct timezone *);
int _settimeofday_r(struct _reent *r, struct timeval *p, struct timezone *z) {
  bt_sys_settimeofday(p, z);
  return 0;
}


x86 assembly (clang, -O0):
<_settimeofday_r>:
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   1030 <bt_sys_settimeofday@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_settimeofday_r>:
push   %rax
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1030 <bt_sys_settimeofday@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct._reent = type { i32 }
%struct.timeval = type { i32 }
%struct.timezone = type { i32 }
define i32 @_settimeofday_r(%struct._reent* %0, %struct.timeval* %1, %struct.timezone* %2) {
%4 = alloca %struct._reent*
%5 = alloca %struct.timeval*
%6 = alloca %struct.timezone*
store %struct._reent* %0, %struct._reent** %4
store %struct.timeval* %1, %struct.timeval** %5
store %struct.timezone* %2, %struct.timezone** %6
%7 = load %struct.timeval*, %struct.timeval** %5
%8 = load %struct.timezone*, %struct.timezone** %6
%9 = call i32 @bt_sys_settimeofday(%struct.timeval* %7, %struct.timezone* %8)
ret i32 0
}

LLVM IR (-O2):
%struct._reent = type { i32 }
%struct.timeval = type { i32 }
%struct.timezone = type { i32 }
define i32 @_settimeofday_r(%struct._reent* nocapture readnone %0, %struct.timeval* %1, %struct.timezone* %2) {
%4 = tail call i32 @bt_sys_settimeofday(%struct.timeval* %1, %struct.timezone* %2)
ret i32 0
}
void Cleese_Finalize() {}


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

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

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

LLVM IR (-O2):
define void @Cleese_Finalize() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ prompt_run();
void _login_cb(int success, char *msg) {
  if (!success) {
    printf("Request failed, reason %s\n", msg);
    prompt_run();
  } else {
    printf("Request Successfull, waiting for leave msg\n");
  }
}


x86 assembly (clang, -O0):
<_login_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1157 <_login_cb+0x37>
mov    -0x10(%rbp),%rsi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <prompt_run@plt>
jmp    1165 <_login_cb+0x45>
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_login_cb>:
test   %edi,%edi
je     1140 <_login_cb+0x10>
lea    0xee0(%rip),%rdi
jmp    1030 <puts@plt>
push   %rax
lea    0xeb8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <prompt_run@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"Request failed, reason %s\0A\00"
@.str.1 = [44 x i8] c"Request Successfull, waiting for leave msg\0A\00"
define void @_login_cb(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = call i32 (...) @prompt_run()
br label %13
11: ; preds = %2
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %11, %7
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"Request failed, reason %s\0A\00"
@str = [43 x i8] c"Request Successfull, waiting for leave msg\00"
define void @_login_cb(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %1)
%6 = tail call i32 (...) @prompt_run()
br label %9
7: ; preds = %2
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
br label %9
9: ; preds = %7, %4
ret void
}
int main() {
  const int n = 0;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SOCK_STREAM;
int do_open_client_socket(char *, int, int /*<<< orphan*/);
int open_client_socket(char *host, int port) {
  return do_open_client_socket(host, port, SOCK_STREAM);
}


x86 assembly (clang, -O0):
<open_client_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    0x2eb3(%rip),%rax
mov    (%rax),%edx
call   1030 <do_open_client_socket@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_client_socket>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edx
jmp    1030 <do_open_client_socket@plt>

LLVM IR (-O0):
@SOCK_STREAM = global i32 0
define i32 @open_client_socket(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = load i32, i32* @SOCK_STREAM
%8 = call i32 @do_open_client_socket(i8* %5, i32 %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@SOCK_STREAM = global i32 0
define i32 @open_client_socket(i8* %0, i32 %1) {
%3 = load i32, i32* @SOCK_STREAM
%4 = tail call i32 @do_open_client_socket(i8* %0, i32 %1, i32 %3)
ret i32 %4
}
/* Type definitions */
struct tm {
  int dummy;
};

/* Variables and functions */
char *asctime_r(struct tm const *, char *, int);
char *Parrot_asctime_r(const struct tm *tm, char *buffer) {
  return asctime_r(tm, buffer, 26);
}


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

x86 assembly (clang, -O2):
<Parrot_asctime_r>:
mov    $0x1a,%edx
jmp    1030 <asctime_r@plt>

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

LLVM IR (-O2):
%struct.tm = type { i32 }
define i8* @Parrot_asctime_r(%struct.tm* %0, i8* %1) {
%3 = tail call i8* @asctime_r(%struct.tm* %0, i8* %1, i32 26)
ret i8* %3
}
void input_y_to_x() {}


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

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

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

LLVM IR (-O2):
define void @input_y_to_x() {
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void config_cmd_ctrl_x(void) {
  *(uint32_t *)(0x44E1201C) = (uint32_t)(0x00000080);
  *(uint32_t *)(0x44E12028) = (uint32_t)(0x00000001);
  *(uint32_t *)(0x44E1202C) = (uint32_t)(0x00000000);
  *(uint32_t *)(0x44E12050) = (uint32_t)(0x00000080);
  *(uint32_t *)(0x44E1205C) = (uint32_t)(0x00000001);
  *(uint32_t *)(0x44E12060) = (uint32_t)(0x00000000);
  *(uint32_t *)(0x44E12084) = (uint32_t)(0x00000080);
  *(uint32_t *)(0x44E12090) = (uint32_t)(0x00000001);
  *(uint32_t *)(0x44E12094) = (uint32_t)(0x00000000);
}


x86 assembly (clang, -O0):
<config_cmd_ctrl_x>:
push   %rbp
mov    %rsp,%rbp
mov    $0x44e1201c,%eax
movq   $0x80,(%rax)
mov    $0x44e12028,%eax
movq   $0x1,(%rax)
mov    $0x44e1202c,%eax
movq   $0x0,(%rax)
mov    $0x44e12050,%eax
movq   $0x80,(%rax)
mov    $0x44e1205c,%eax
movq   $0x1,(%rax)
mov    $0x44e12060,%eax
movq   $0x0,(%rax)
mov    $0x44e12084,%eax
movq   $0x80,(%rax)
mov    $0x44e12090,%eax
movq   $0x1,(%rax)
mov    $0x44e12094,%eax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_cmd_ctrl_x>:
movq   $0x80,0x44e1201c
movq   $0x1,0x44e12028
movq   $0x0,0x44e1202c
movq   $0x80,0x44e12050
movq   $0x1,0x44e1205c
movq   $0x0,0x44e12060
movq   $0x80,0x44e12084
movq   $0x1,0x44e12090
movq   $0x0,0x44e12094
ret

LLVM IR (-O0):
define void @config_cmd_ctrl_x() {
store i64 128, i64* inttoptr (i64 1155604508 to i64*)
store i64 1, i64* inttoptr (i64 1155604520 to i64*)
store i64 0, i64* inttoptr (i64 1155604524 to i64*)
store i64 128, i64* inttoptr (i64 1155604560 to i64*)
store i64 1, i64* inttoptr (i64 1155604572 to i64*)
store i64 0, i64* inttoptr (i64 1155604576 to i64*)
store i64 128, i64* inttoptr (i64 1155604612 to i64*)
store i64 1, i64* inttoptr (i64 1155604624 to i64*)
store i64 0, i64* inttoptr (i64 1155604628 to i64*)
ret void
}

LLVM IR (-O2):
define void @config_cmd_ctrl_x() {
store i64 128, i64* inttoptr (i64 1155604508 to i64*)
store i64 1, i64* inttoptr (i64 1155604520 to i64*)
store i64 0, i64* inttoptr (i64 1155604524 to i64*)
store i64 128, i64* inttoptr (i64 1155604560 to i64*)
store i64 1, i64* inttoptr (i64 1155604572 to i64*)
store i64 0, i64* inttoptr (i64 1155604576 to i64*)
store i64 128, i64* inttoptr (i64 1155604612 to i64*)
store i64 1, i64* inttoptr (i64 1155604624 to i64*)
store i64 0, i64* inttoptr (i64 1155604628 to i64*)
ret void
}
int rand(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @rand() {
ret i32 0
}