xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
int GetModuleName(char *name, int code_page) {
  if ((name != NULL) && (code_page == 0))
    strcpy(name, "Hugo.sim");
  return 0;
}


x86 assembly (clang, -O0):
<GetModuleName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1144 <GetModuleName+0x34>
cmpl   $0x0,-0xc(%rbp)
jne    1144 <GetModuleName+0x34>
mov    -0x8(%rbp),%rdi
lea    0xec1(%rip),%rsi
call   1030 <strcpy@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetModuleName>:
test   %rdi,%rdi
je     112a <GetModuleName+0x1a>
test   %esi,%esi
jne    112a <GetModuleName+0x1a>
push   %rax
lea    0xedf(%rip),%rsi
call   1030 <strcpy@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [9 x i8] c"Hugo.sim\00"
define i32 @GetModuleName(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 = icmp ne i8* %5, null
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load i8*, i8** %3
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %10, %7, %2
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"Hugo.sim\00"
define i32 @GetModuleName(i8* %0, i32 %1) {
%3 = icmp ne i8* %0, null
%4 = icmp eq i32 %1, 0
%5 = and i1 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %2
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
void ofl_table_print(FILE *stream, uint8_t table) {
  switch (table) {
  case (0xff): {
    fprintf(stream, "all");
    return;
  }
  default: {
    fprintf(stream, "%u", table);
    return;
  }
  }
}


x86 assembly (clang, -O0):
<ofl_table_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0xff,%eax
jne    1149 <ofl_table_print+0x39>
jmp    1132 <ofl_table_print+0x22>
mov    -0x8(%rbp),%rdi
lea    0xec3(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    115e <ofl_table_print+0x4e>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xead(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ofl_table_print>:
mov    %rdi,%rcx
cmp    $0xff,%esi
jne    1141 <ofl_table_print+0x21>
lea    0xece(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
jmp    1040 <fwrite@plt>
mov    %esi,%edx
lea    0xeba(%rip),%rsi
mov    %rcx,%rdi
xor    %eax,%eax
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"all\00"
@.str.1 = [3 x i8] c"%u\00"
define void @ofl_table_print(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
switch i32 %5, label %9 [
i32 255, label %6
]
6: ; preds = %2
%7 = load i32*, i32** %3
%8 = call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %13
9: ; preds = %2
%10 = load i32*, i32** %3
%11 = load i32, i32* %4
%12 = call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %11)
br label %13
13: ; preds = %9, %6
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"all\00"
@.str.1 = [3 x i8] c"%u\00"
define void @ofl_table_print(i32* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 255
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 3, i64 1, i32* %0)
br label %8
6: ; preds = %2
%7 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %1)
br label %8
8: ; preds = %6, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f();
int main(void) {
  int a;
  int b;
  int x;
  int y;
  {
    {
      a = 42;
      b = 23;
      x = a & b;
      y = 42;
      y = y & b;
      f();
    }
    if (x != y) {
    ERROR:
      goto ERROR;
    } else {
    }
    return (0);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2a,-0x8(%rbp)
movl   $0x17,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
movl   $0x2a,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <f@plt>
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
je     1163 <main+0x53>
jmp    115e <main+0x4e>
jmp    115e <main+0x4e>
jmp    1168 <main+0x58>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 42, i32* %2
store i32 23, i32* %3
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = and i32 %6, %7
store i32 %8, i32* %4
store i32 42, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %3
%11 = and i32 %9, %10
store i32 %11, i32* %5
%12 = call i32 (...) @f()
%13 = load i32, i32* %4
%14 = load i32, i32* %5
%15 = icmp ne i32 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %0
br label %17
17: ; preds = %17, %16
br label %17
18: ; preds = %0
br label %19
19: ; preds = %18
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
ret i32 0
}
/* Type definitions */
struct Universidad {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ eliminarCurso(struct Universidad *, int);
int main() {
  struct Universidad *pucv;
  int sigla = 0;
  eliminarCurso(pucv, sigla);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %esi,%esi
call   1030 <eliminarCurso@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.Universidad = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.Universidad*
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
%4 = load %struct.Universidad*, %struct.Universidad** %2
%5 = load i32, i32* %3
%6 = call i32 @eliminarCurso(%struct.Universidad* %4, i32 %5)
ret i32 0
}

LLVM IR (-O2):
%struct.Universidad = type { i32 }
define i32 @main() {
%1 = tail call i32 @eliminarCurso(%struct.Universidad* undef, i32 0)
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_5__ TYPE_2__;
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
typedef int /*<<< orphan*/ XtValueMask;
typedef int /*<<< orphan*/ XSetWindowAttributes;
typedef TYPE_2__ *Widget;
struct TYPE_4__ {
  int /*<<< orphan*/ screen;
  int /*<<< orphan*/ window;
};
struct TYPE_5__ {
  TYPE_1__ core;
};

/* Variables and functions */
int /*<<< orphan*/ RootWindowOfScreen(int /*<<< orphan*/);
void Realize(Widget w, XtValueMask *value_mask,
             XSetWindowAttributes *attributes) {
  w->core.window = RootWindowOfScreen(w->core.screen);
}


x86 assembly (clang, -O0):
<Realize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <RootWindowOfScreen@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Realize>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1030 <RootWindowOfScreen@plt>
mov    %eax,0x4(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
%struct.TYPE_5__ = type { %struct.TYPE_4__ }
%struct.TYPE_4__ = type { i32, i32 }
define void @Realize(%struct.TYPE_5__* %0, i32* %1, i32* %2) {
%4 = alloca %struct.TYPE_5__*
%5 = alloca i32*
%6 = alloca i32*
store %struct.TYPE_5__* %0, %struct.TYPE_5__** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load %struct.TYPE_5__*, %struct.TYPE_5__** %4
%8 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %8, i32 0, i32 0
%10 = load i32, i32* %9
%11 = call i32 @RootWindowOfScreen(i32 %10)
%12 = load %struct.TYPE_5__*, %struct.TYPE_5__** %4
%13 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %12, i32 0, i32 0
%14 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %13, i32 0, i32 1
store i32 %11, i32* %14
ret void
}

LLVM IR (-O2):
%struct.TYPE_5__ = type { %struct.TYPE_4__ }
%struct.TYPE_4__ = type { i32, i32 }
define void @Realize(%struct.TYPE_5__* nocapture %0, i32* nocapture readnone %1, i32* nocapture readnone %2) {
%4 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %0, i64 0, i32 0, i32 0
%5 = load i32, i32* %4
%6 = tail call i32 @RootWindowOfScreen(i32 %5)
%7 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %0, i64 0, i32 0, i32 1
store i32 %6, i32* %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  int i;
  for (i = 1; i <= 50; i++) {
    if ((i % 2))
      printf("%d\n", i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0x32,-0x14(%rbp)
jg     116d <main+0x5d>
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     115a <main+0x4a>
mov    -0x14(%rbp),%esi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
jmp    115f <main+0x4f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xee0(%rip),%r14
jmp    1138 <main+0x28>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%ebx
cmp    $0x33,%ebx
je     1149 <main+0x39>
test   $0x1,%bl
je     1130 <main+0x20>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
jmp    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %9
%4 = phi i32 [ 1, %2 ], [ %10, %9 ]
%5 = and i32 %4, 1
%6 = icmp eq i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %3
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
br label %9
9: ; preds = %3, %7
%10 = add nuw nsw i32 %4, 1
%11 = icmp eq i32 %10, 51
br i1 %11, label %12, label %3
12: ; preds = %9
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Delayus(int);
void delayMicroseconds(int us) { Delayus(us); }


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

x86 assembly (clang, -O2):
<delayMicroseconds>:
jmp    1030 <Delayus@plt>

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

LLVM IR (-O2):
define void @delayMicroseconds(i32 %0) {
%2 = tail call i32 @Delayus(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cgi_error(char *, char const *, char *);
int /*<<< orphan*/ cgio_error_message(char *);
void cg_io_error(const char *funcname) {
  char errmsg[80 + 1];
  cgio_error_message(errmsg);
  cgi_error("%s:%s", funcname, errmsg);
}


x86 assembly (clang, -O0):
<cg_io_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x60(%rbp),%rdi
call   1040 <cgio_error_message@plt>
mov    -0x8(%rbp),%rsi
lea    -0x60(%rbp),%rdx
lea    0xebc(%rip),%rdi
call   1030 <cgi_error@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cg_io_error>:
push   %r14
push   %rbx
sub    $0x58,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <cgio_error_message@plt>
lea    0xec4(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <cgi_error@plt>
add    $0x58,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s:%s\00"
define void @cg_io_error(i8* %0) {
%2 = alloca i8*
%3 = alloca [81 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [81 x i8], [81 x i8]* %3, i64 0, i64 0
%5 = call i32 @cgio_error_message(i8* %4)
%6 = load i8*, i8** %2
%7 = getelementptr inbounds [81 x i8], [81 x i8]* %3, i64 0, i64 0
%8 = call i32 @cgi_error(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s:%s\00"
define void @cg_io_error(i8* %0) {
%2 = alloca [81 x i8]
%3 = getelementptr inbounds [81 x i8], [81 x i8]* %2, i64 0, i64 0
%4 = call i32 @cgio_error_message(i8* %3)
%5 = call i32 @cgi_error(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %3)
ret void
}
/* Variables and functions */
int fprintf(int /*<<< orphan*/, char *, char *, int);
int /*<<< orphan*/ stdout;
int __test() { return fprintf(stdout, "yolo %s %d\n", "hello", 0x3333); }


x86 assembly (clang, -O0):
<__test>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
lea    0xee1(%rip),%rdx
mov    $0x3333,%ecx
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__test>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
lea    0xee5(%rip),%rdx
mov    $0x3333,%ecx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [12 x i8] c"yolo %s %d\0A\00"
@.str.1 = [6 x i8] c"hello\00"
define i32 @__test() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 13107)
ret i32 %2
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [12 x i8] c"yolo %s %d\0A\00"
@.str.1 = [6 x i8] c"hello\00"
define i32 @__test() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 13107)
ret i32 %2
}
void serializeShortUnsignedInt(void **buffer, short unsigned int value) {
  *(short unsigned int *)*buffer = value;
  *buffer += sizeof(short unsigned int);
}


x86 assembly (clang, -O0):
<serializeShortUnsignedInt>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %cx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x2,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<serializeShortUnsignedInt>:
mov    (%rdi),%rax
mov    %si,(%rax)
add    $0x2,%rax
mov    %rax,(%rdi)
ret

LLVM IR (-O0):
define void @serializeShortUnsignedInt(i8** %0, i16 zeroext %1) {
%3 = alloca i8**
%4 = alloca i16
store i8** %0, i8*** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
%8 = bitcast i8* %7 to i16*
store i16 %5, i16* %8
%9 = load i8**, i8*** %3
%10 = load i8*, i8** %9
%11 = getelementptr i8, i8* %10, i64 2
store i8* %11, i8** %9
ret void
}

LLVM IR (-O2):
define void @serializeShortUnsignedInt(i8** nocapture %0, i16 zeroext %1) {
%3 = bitcast i8** %0 to i16**
%4 = load i16*, i16** %3
store i16 %1, i16* %4
%5 = getelementptr i16, i16* %4, i64 1
store i16* %5, i16** %3
ret void
}
int read_dummy() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @read_dummy() {
ret i32 0
}
int should_run_polling_action(int period_ms, int *last_updated_time) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @should_run_polling_action(i32 %0, i32* nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ scores;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int removeDuplicates(int *, int);
int main(int argc, const char *argv[]) {
  int scores[] = {65, 72, 75, 79, 82, 82, 84, 84, 84, 86, 90, 94, 95};
  int nScores = sizeof(scores) / sizeof(scores[0]);
  int len = removeDuplicates(scores, nScores);
  printf("Len is %d.\n", len);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xeaf(%rip),%rsi
mov    $0x34,%edx
call   1050 <memcpy@plt>
movl   $0xd,-0x54(%rbp)
lea    -0x50(%rbp),%rdi
mov    -0x54(%rbp),%esi
call   1040 <removeDuplicates@plt>
mov    %eax,-0x58(%rbp)
mov    -0x58(%rbp),%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
mov    0xf06(%rip),%eax
mov    %eax,0x30(%rsp)
movaps 0xeeb(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xecf(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb3(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xd,%esi
call   1040 <removeDuplicates@plt>
lea    0xecf(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.main.scores = [13 x i32] [i32 65, i32 72, i32 75, i32 79, i32 82, i32 82, i32 84, i32 84, i32 84, i32 86, i32 90, i32 94, i32 95]
@.str = [12 x i8] c"Len is %d.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [13 x i32]
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = bitcast [13 x i32]* %6 to i8*
store i32 13, i32* %7
%10 = getelementptr inbounds [13 x i32], [13 x i32]* %6, i64 0, i64 0
%11 = load i32, i32* %7
%12 = call i32 @removeDuplicates(i32* %10, i32 %11)
store i32 %12, i32* %8
%13 = load i32, i32* %8
%14 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %13)
ret i32 0
}

LLVM IR (-O2):
@__const.main.scores = [13 x i32] [i32 65, i32 72, i32 75, i32 79, i32 82, i32 82, i32 84, i32 84, i32 84, i32 86, i32 90, i32 94, i32 95]
@.str = [12 x i8] c"Len is %d.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [13 x i32]
%4 = bitcast [13 x i32]* %3 to i8*
%5 = getelementptr inbounds [13 x i32], [13 x i32]* %3, i64 0, i64 0
%6 = call i32 @removeDuplicates(i32* %5, i32 13)
%7 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fact(int);
int /*<<< orphan*/ maybeYield();
int /*<<< orphan*/ printf(char *, unsigned long, int /*<<< orphan*/);
void test(void *data) {
  unsigned long threadNum = (unsigned long)data;
  int i;
  for (i = 0; i < 10000; i++) {
    printf("Thread #%ld: %g\n", threadNum, fact(i));
    maybeYield();
  }
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x2710,-0x14(%rbp)
jge    118f <test+0x5f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <fact@plt>
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
lea    0xe8b(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <maybeYield@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114b <test+0x1b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
lea    0xec2(%rip),%r14
xor    %ebp,%ebp
mov    %ebp,%edi
call   1050 <fact@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <maybeYield@plt>
add    $0x1,%ebp
cmp    $0x2710,%ebp
jne    1140 <test+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [17 x i8] c"Thread #%ld: %g\0A\00"
define void @test(i8* %0) {
%2 = ptrtoint i8* %0 to i64
br label %3
3: ; preds = %1, %3
%4 = phi i32 [ 0, %1 ], [ %8, %3 ]
%5 = tail call i32 @fact(i32 %4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i64 %2, i32 %5)
%7 = tail call i32 (...) @maybeYield()
%8 = add nuw nsw i32 %4, 1
%9 = icmp eq i32 %8, 10000
br i1 %9, label %10, label %3
10: ; preds = %3
ret void
}
/* Variables and functions */
void *dlsym(void *, char const *);
void *xGetProcAddress(void *__restrict handle, const char *__restrict name) {
  return dlsym(handle, name);
}


x86 assembly (clang, -O0):
<xGetProcAddress>:
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 <dlsym@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xGetProcAddress>:
jmp    1030 <dlsym@plt>

LLVM IR (-O0):
define i8* @xGetProcAddress(i8* noalias %0, i8* noalias %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 i8* @dlsym(i8* %5, i8* %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @xGetProcAddress(i8* noalias %0, i8* noalias %1) {
%3 = tail call i8* @dlsym(i8* %0, i8* %1)
ret i8* %3
}
double ts2mjd(tsec)
double tsec;
{ return (33282.0 + (tsec / 86400.0)); }


x86 assembly (clang, -O0):
<ts2mjd>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xef2(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xede(%rip),%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ts2mjd>:
divsd  0xef8(%rip),%xmm0
addsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @ts2mjd(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 8.640000e+04
%5 = fadd double 3.328200e+04, %4
ret double %5
}

LLVM IR (-O2):
define double @ts2mjd(double %0) {
%2 = fdiv double %0, 8.640000e+04
%3 = fadd double %2, 3.328200e+04
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void signal_handler(int signal) { printf("SIGALRM received\n"); }


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"SIGALRM received\0A\00"
define void @signal_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [17 x i8] c"SIGALRM received\00"
define void @signal_handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ad_freeall();
int /*<<< orphan*/ in_freeall();
int /*<<< orphan*/ ot_freeall();
int /*<<< orphan*/ var_freeall();
void free_() {
  ad_freeall();
  in_freeall();
  ot_freeall();
  var_freeall();
}


x86 assembly (clang, -O0):
<free_>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <ad_freeall@plt>
mov    $0x0,%al
call   1050 <in_freeall@plt>
mov    $0x0,%al
call   1030 <ot_freeall@plt>
mov    $0x0,%al
call   1040 <var_freeall@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_>:
push   %rax
xor    %eax,%eax
call   1060 <ad_freeall@plt>
xor    %eax,%eax
call   1050 <in_freeall@plt>
xor    %eax,%eax
call   1030 <ot_freeall@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <var_freeall@plt>

LLVM IR (-O0):
define void @free_() {
%1 = call i32 (...) @ad_freeall()
%2 = call i32 (...) @in_freeall()
%3 = call i32 (...) @ot_freeall()
%4 = call i32 (...) @var_freeall()
ret void
}

LLVM IR (-O2):
define void @free_() {
%1 = tail call i32 (...) @ad_freeall()
%2 = tail call i32 (...) @in_freeall()
%3 = tail call i32 (...) @ot_freeall()
%4 = tail call i32 (...) @var_freeall()
ret void
}
/* Variables and functions */
int __infer_nondet_int();
int fcntl(int fildes, int cmd, ...) {
  int ret = __infer_nondet_int();
  return ret;
}


x86 assembly (clang, -O0):
<fcntl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @fcntl(i32 %0, i32 %1, ...) {
%3 = tail call i32 (...) @__infer_nondet_int()
ret i32 %3
}
/* Type definitions */
typedef scalar_t__ time_t;
struct timespec {
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
void timespec_add_sec(struct timespec *ts, time_t sec) { ts->tv_sec += sec; }


x86 assembly (clang, -O0):
<timespec_add_sec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rax
movslq (%rax),%rcx
add    %rdx,%rcx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<timespec_add_sec>:
add    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
define void @timespec_add_sec(%struct.timespec* %0, i64 %1) {
%3 = alloca %struct.timespec*
%4 = alloca i64
store %struct.timespec* %0, %struct.timespec** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load %struct.timespec*, %struct.timespec** %3
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %6, i32 0, i32 0
%8 = load i32, i32* %7
%9 = sext i32 %8 to i64
%10 = add nsw i64 %9, %5
%11 = trunc i64 %10 to i32
store i32 %11, i32* %7
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
define void @timespec_add_sec(%struct.timespec* nocapture %0, i64 %1) {
%3 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
%4 = load i32, i32* %3
%5 = trunc i64 %1 to i32
%6 = add i32 %4, %5
store i32 %6, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
void *malloc(size_t);
void *xmalloc(size_t n) {
  void *p;
  p = malloc(n);
  if (p == NULL)
    fatal("Out of memory");
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <xmalloc+0x30>
lea    0xeb5(%rip),%rdi
call   1040 <fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <xmalloc+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Out of memory\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @fatal(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [14 x i8] c"Out of memory\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @fatal(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
void gtk_image_get_pixmap() {}


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

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

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

LLVM IR (-O2):
define void @gtk_image_get_pixmap() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void my_putchar2(char c) { write(2, &c, 1); }


x86 assembly (clang, -O0):
<my_putchar2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x2,%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_putchar2>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x2,%edi
mov    $0x1,%edx
call   1030 <write@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @my_putchar2(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @write(i32 2, i8* %2, i32 1)
ret void
}

LLVM IR (-O2):
define void @my_putchar2(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @write(i32 2, i8* %2, i32 1)
ret void
}
float Sleef_log1pf_u10(float x) { return __builtin_log1pf(x); }


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

x86 assembly (clang, -O2):
<Sleef_log1pf_u10>:
jmp    1030 <log1pf@plt>

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

LLVM IR (-O2):
define float @Sleef_log1pf_u10(float %0) {
%2 = tail call float @log1pf(float %0)
ret float %2
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ FE_READ_SIGNAL_STRENGTH;
scalar_t__ ioctl(int, int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
int FEReadSignalStrength(int fd, int32_t *strength) {
  int ans;
  if ((ans = ioctl(fd, FE_READ_SIGNAL_STRENGTH, strength) < 0)) {
    perror("FE READ SIGNAL STRENGTH: ");
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<FEReadSignalStrength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2ea7(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rdx
call   1030 <ioctl@plt>
cmp    $0x0,%rax
setl   %al
mov    %al,%cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    %ecx,-0x14(%rbp)
test   $0x1,%al
jne    1163 <FEReadSignalStrength+0x43>
jmp    117b <FEReadSignalStrength+0x5b>
lea    0xe96(%rip),%rdi
call   1040 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1182 <FEReadSignalStrength+0x62>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FEReadSignalStrength>:
push   %rax
mov    %rsi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
js     113e <FEReadSignalStrength+0x1e>
pop    %rcx
ret
lea    0xebb(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@FE_READ_SIGNAL_STRENGTH = global i32 0
@.str = [26 x i8] c"FE READ SIGNAL STRENGTH: \00"
define i32 @FEReadSignalStrength(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
store i32 %0, i32* %4
store i32* %1, i32** %5
%7 = load i32, i32* %4
%8 = load i32, i32* @FE_READ_SIGNAL_STRENGTH
%9 = load i32*, i32** %5
%10 = call i64 @ioctl(i32 %7, i32 %8, i32* %9)
%11 = icmp slt i64 %10, 0
%12 = zext i1 %11 to i32
store i32 %12, i32* %6
br i1 %11, label %13, label %15
13: ; preds = %2
%14 = call i32 @perror(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %16
15: ; preds = %2
store i32 0, i32* %3
br label %16
16: ; preds = %15, %13
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@FE_READ_SIGNAL_STRENGTH = global i32 0
@.str = [26 x i8] c"FE READ SIGNAL STRENGTH: \00"
define i32 @FEReadSignalStrength(i32 %0, i32* %1) {
%3 = load i32, i32* @FE_READ_SIGNAL_STRENGTH
%4 = tail call i64 @ioctl(i32 %0, i32 %3, i32* %1)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @perror(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ -1, %6 ], [ 0, %2 ]
ret i32 %9
}
void g_cclosure_marshal_VOID__DOUBLE() {}


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

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

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

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

/* Variables and functions */
uint64_t minu(uint64_t a, uint64_t b) {
  if (a < b)
    return a;
  return b;
}


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

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

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

LLVM IR (-O2):
define i64 @minu(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ wFilePosition(int /*<<< orphan*/);
int /*<<< orphan*/ wPopNumber();
int /*<<< orphan*/ wPushNumber(int /*<<< orphan*/);
void wBasLoc() { wPushNumber(wFilePosition(wPopNumber())); }


x86 assembly (clang, -O0):
<wBasLoc>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <wPopNumber@plt>
mov    %eax,%edi
call   1050 <wFilePosition@plt>
mov    %eax,%edi
call   1030 <wPushNumber@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wBasLoc>:
push   %rax
xor    %eax,%eax
call   1040 <wPopNumber@plt>
mov    %eax,%edi
call   1050 <wFilePosition@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <wPushNumber@plt>

LLVM IR (-O0):
define void @wBasLoc() {
%1 = call i32 (...) @wPopNumber()
%2 = call i32 @wFilePosition(i32 %1)
%3 = call i32 @wPushNumber(i32 %2)
ret void
}

LLVM IR (-O2):
define void @wBasLoc() {
%1 = tail call i32 (...) @wPopNumber()
%2 = tail call i32 @wFilePosition(i32 %1)
%3 = tail call i32 @wPushNumber(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bind_textdomain_codeset(char *, char *);
int /*<<< orphan*/ bindtextdomain(char *, char *);
void avahi_init_i18n(void) {
  static int done = 0;
  if (!done) {
    bindtextdomain("avahi", "/home/orlarey/Develop/faust/embedded/faustremote/"
                            "RemoteServer/linux_server");
    bind_textdomain_codeset("avahi", "UTF-8");
    done = 1;
  }
}


x86 assembly (clang, -O0):
<avahi_init_i18n>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f09(%rip)
jne    1161 <avahi_init_i18n+0x41>
lea    0xec8(%rip),%rdi
lea    0xec7(%rip),%rsi
call   1030 <bindtextdomain@plt>
lea    0xeb5(%rip),%rdi
lea    0xeff(%rip),%rsi
call   1040 <bind_textdomain_codeset@plt>
movl   $0x1,0x2ed3(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<avahi_init_i18n>:
push   %rbx
cmpb   $0x0,0x2f0c(%rip)
jne    1156 <avahi_init_i18n+0x36>
lea    0xecf(%rip),%rbx
lea    0xece(%rip),%rsi
mov    %rbx,%rdi
call   1030 <bindtextdomain@plt>
lea    0xf0a(%rip),%rsi
mov    %rbx,%rdi
call   1040 <bind_textdomain_codeset@plt>
movb   $0x1,0x2ede(%rip)
pop    %rbx
ret

LLVM IR (-O0):
@avahi_init_i18n.done = internal global i32 0
@.str = [6 x i8] c"avahi\00"
@.str.1 = [75 x i8] c"/home/orlarey/Develop/faust/embedded/faustremote/RemoteServer/linux_server\00"
@.str.2 = [6 x i8] c"UTF-8\00"
define void @avahi_init_i18n() {
%1 = load i32, i32* @avahi_init_i18n.done
%2 = icmp ne i32 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = call i32 @bindtextdomain(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @bind_textdomain_codeset(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* @avahi_init_i18n.done
br label %6
6: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@avahi_init_i18n.done = internal unnamed_addr global i1 false
@.str = [6 x i8] c"avahi\00"
@.str.1 = [75 x i8] c"/home/orlarey/Develop/faust/embedded/faustremote/RemoteServer/linux_server\00"
@.str.2 = [6 x i8] c"UTF-8\00"
define void @avahi_init_i18n() {
%1 = load i1, i1* @avahi_init_i18n.done
br i1 %1, label %5, label %2
2: ; preds = %0
%3 = tail call i32 @bindtextdomain(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @bind_textdomain_codeset(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
store i1 true, i1* @avahi_init_i18n.done
br label %5
5: ; preds = %2, %0
ret void
}
/* Variables and functions */
int toupper(int);
int toUpperCase(int c) { return (toupper(c)); }


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

x86 assembly (clang, -O2):
<toUpperCase>:
jmp    1030 <toupper@plt>

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

LLVM IR (-O2):
define i32 @toUpperCase(i32 %0) {
%2 = tail call i32 @toupper(i32 %0)
ret i32 %2
}
int returnMinimum(int x, int y) {
  if (x < y)
    return x;
  return y;
}


x86 assembly (clang, -O0):
<returnMinimum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1121 <returnMinimum+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <returnMinimum+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<returnMinimum>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

LLVM IR (-O0):
define i32 @returnMinimum(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 = load i32, i32* %5
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %4
store i32 %10, i32* %3
br label %13
11: ; preds = %2
%12 = load i32, i32* %5
store i32 %12, i32* %3
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @returnMinimum(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int test3(int k) {
  printf("%s:%i:%s\n",
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/davidmalcolm/gcc-python-plugin/refs/heads/"
         "master/tests/examples/find-global-state/input.c",
         48, __FUNCTION__);
}


x86 assembly (clang, -O0):
<test3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
lea    0xede(%rip),%rdi
lea    0xee1(%rip),%rsi
mov    $0x30,%edx
lea    0xf89(%rip),%rcx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test3>:
lea    0xee9(%rip),%rdi
lea    0xeec(%rip),%rsi
lea    0xf99(%rip),%rcx
mov    $0x30,%edx
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"%s:%i:%s\0A\00"
@.str.1 = [180 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/davidmalcolm/gcc-python-plugin/refs/heads/master/tests/examples/find-global-state/input.c\00"
@__FUNCTION__.test3 = [6 x i8] c"test3\00"
define i32 @test3(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([180 x i8], [180 x i8]* @.str.1, i64 0, i64 0), i32 48, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.test3, i64 0, i64 0))
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
@.str = [10 x i8] c"%s:%i:%s\0A\00"
@.str.1 = [180 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/davidmalcolm/gcc-python-plugin/refs/heads/master/tests/examples/find-global-state/input.c\00"
@__FUNCTION__.test3 = [6 x i8] c"test3\00"
define i32 @test3(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([180 x i8], [180 x i8]* @.str.1, i64 0, i64 0), i32 48, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.test3, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int f490(int *);
int f491(int *p) { return f490(p); }


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

x86 assembly (clang, -O2):
<f491>:
jmp    1030 <f490@plt>

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

LLVM IR (-O2):
define i32 @f491(i32* %0) {
%2 = tail call i32 @f490(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0xbf() {
  Assert_real((islower(191) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              960, ("islower should be 0 for 0xbf"));
}


x86 assembly (clang, -O0):
<t_islower_0xbf>:
push   %rbp
mov    %rsp,%rbp
mov    $0xbf,%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x3c0,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_islower_0xbf>:
push   %rax
mov    $0xbf,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3c0,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xbf\00"
define void @t_islower_0xbf() {
%1 = call i64 @islower(i32 191)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 960, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xbf\00"
define void @t_islower_0xbf() {
%1 = tail call i64 @islower(i32 191)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 960, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ critical(char *);
int /*<<< orphan*/ free(void *);
void *realloc(void *, size_t);
void *mp_realloc(void *ptr, size_t size) {
  void *p;
  p = realloc(ptr, size);
  if (!p) {
    free(ptr);
    critical("Out of memory!");
  }
  return p;
}


x86 assembly (clang, -O0):
<mp_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1171 <mp_realloc+0x41>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
lea    0xe94(%rip),%rdi
call   1040 <critical@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp_realloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1050 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1158 <mp_realloc+0x28>
mov    %r14,%rdi
call   1030 <free@plt>
lea    0xead(%rip),%rdi
call   1040 <critical@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Out of memory!\00"
define i8* @mp_realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %15, label %11
11: ; preds = %2
%12 = load i8*, i8** %3
%13 = call i32 @free(i8* %12)
%14 = call i32 @critical(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %11, %2
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
@.str = [15 x i8] c"Out of memory!\00"
define noalias i8* @mp_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @free(i8* %0)
%7 = tail call i32 @critical(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %5, %2
ret i8* %3
}