xunge/DecIR huggingface dataset:
/* Type definitions */
struct timezone {
  int dummy;
};
struct timeval {
  int tv_sec;
  long tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, struct timezone *);
long usec() {
  struct timeval tv;
  struct timezone tz;
  gettimeofday(&tv, &tz);
  return tv.tv_sec * 1000000 + tv.tv_usec;
}


x86 assembly (clang, -O0):
<usec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <gettimeofday@plt>
imul   $0xf4240,-0x10(%rbp),%eax
cltq
add    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usec>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <gettimeofday@plt>
movslq 0x8(%rsp),%rax
imul   $0xf4240,%rax,%rax
add    0x10(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
%struct.timezone = type { i32 }
define i64 @usec() {
%1 = alloca %struct.timeval
%2 = alloca %struct.timezone
%3 = call i32 @gettimeofday(%struct.timeval* %1, %struct.timezone* %2)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000000
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%9 = load i64, i64* %8
%10 = add nsw i64 %7, %9
ret i64 %10
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
%struct.timezone = type { i32 }
define i64 @usec() {
%1 = alloca %struct.timeval
%2 = alloca %struct.timezone
%3 = bitcast %struct.timeval* %1 to i8*
%4 = bitcast %struct.timezone* %2 to i8*
%5 = call i32 @gettimeofday(%struct.timeval* %1, %struct.timezone* %2)
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%7 = load i32, i32* %6
%8 = mul nsw i32 %7, 1000000
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%11 = load i64, i64* %10
%12 = add nsw i64 %11, %9
ret i64 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t le32_to_cpu(int32_t x) { return (x); }


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

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

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

LLVM IR (-O2):
define i32 @le32_to_cpu(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int celcon_track_quaddobl_solution_path(int k, int i, int otp) {
  int b[2], fail;
  double *c;
  b[0] = i;
  b[1] = otp;
  fail = _ada_use_c2phc4c(477, &k, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<celcon_track_quaddobl_solution_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
lea    -0x14(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1dd,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<celcon_track_quaddobl_solution_path>:
sub    $0x18,%rsp
mov    %edi,0xc(%rsp)
mov    %esi,0x10(%rsp)
mov    %edx,0x14(%rsp)
lea    0xc(%rsp),%rsi
lea    0x10(%rsp),%rdx
mov    $0x1dd,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @celcon_track_quaddobl_solution_path(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [2 x i32]
%8 = alloca i32
%9 = alloca double*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%10 = load i32, i32* %5
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
store i32 %10, i32* %11
%12 = load i32, i32* %6
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
store i32 %12, i32* %13
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%15 = load double*, double** %9
%16 = call i32 @_ada_use_c2phc4c(i32 477, i32* %4, i32* %14, double* %15, i32 0)
store i32 %16, i32* %8
%17 = load i32, i32* %8
ret i32 %17
}

LLVM IR (-O2):
define i32 @celcon_track_quaddobl_solution_path(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca [2 x i32]
store i32 %0, i32* %4
%6 = bitcast [2 x i32]* %5 to i8*
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
store i32 %1, i32* %7
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
store i32 %2, i32* %8
%9 = call i32 @_ada_use_c2phc4c(i32 477, i32* %4, i32* %7, double* undef, i32 0)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ sim_gcode_ch(char const);
void sim_gcode(const char msg[]) {
  for (; *msg; msg++)
    sim_gcode_ch(*msg);
  sim_gcode_ch(0);
}


x86 assembly (clang, -O0):
<sim_gcode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1146 <sim_gcode+0x36>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <sim_gcode_ch@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <sim_gcode+0xc>
xor    %edi,%edi
call   1030 <sim_gcode_ch@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sim_gcode>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <sim_gcode+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <sim_gcode_ch@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <sim_gcode+0x10>
xor    %edi,%edi
pop    %rbx
jmp    1030 <sim_gcode_ch@plt>

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

LLVM IR (-O2):
define void @sim_gcode(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @sim_gcode_ch(i8 signext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = tail call i32 @sim_gcode_ch(i8 signext 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sqrt(int /*<<< orphan*/);
int /*<<< orphan*/ wPopNumber();
int /*<<< orphan*/ wPushNumber(int /*<<< orphan*/);
void wBasSqr() { wPushNumber(sqrt(wPopNumber())); }


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

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

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

LLVM IR (-O2):
define void @wBasSqr() {
%1 = tail call i32 (...) @wPopNumber()
%2 = tail call i32 @sqrt(i32 %1)
%3 = tail call i32 @wPushNumber(i32 %2)
ret void
}
void tui_exit(void) {}


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

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

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

LLVM IR (-O2):
define void @tui_exit() {
ret void
}
/* Variables and functions */
scalar_t__ _chdir(char *);
int /*<<< orphan*/ _write_to_socket(char *);
int do_cwd(char *dir) {
  if (_chdir(dir) < 0) {
    return -1;
  } else {
    _write_to_socket("250 Command ok.\r\n");
    return 0;
  }
}


x86 assembly (clang, -O0):
<do_cwd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <_chdir@plt>
cmp    $0x0,%rax
jge    114b <do_cwd+0x2b>
movl   $0xffffffff,-0x4(%rbp)
jmp    115e <do_cwd+0x3e>
lea    0xeae(%rip),%rdi
call   1030 <_write_to_socket@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_cwd>:
push   %rax
call   1040 <_chdir@plt>
test   %rax,%rax
js     113b <do_cwd+0x1b>
lea    0xece(%rip),%rdi
call   1030 <_write_to_socket@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"250 Command ok.\0D\0A\00"
define i32 @do_cwd(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @_chdir(i8* %4)
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 -1, i32* %2
br label %10
8: ; preds = %1
%9 = call i32 @_write_to_socket(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %10
10: ; preds = %8, %7
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@.str = [18 x i8] c"250 Command ok.\0D\0A\00"
define i32 @do_cwd(i8* %0) {
%2 = tail call i64 @_chdir(i8* %0)
%3 = icmp slt i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @_write_to_socket(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 0, %4 ], [ -1, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ trap_R_RegisterShaderNoMip(char *);
void InGame_Cache(void) {
  trap_R_RegisterShaderNoMip("menu/"
                             "art_blueish"
                             "/addbotframe");
}


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

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

LLVM IR (-O0):
@.str = [29 x i8] c"menu/art_blueish/addbotframe\00"
define void @InGame_Cache() {
%1 = call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"menu/art_blueish/addbotframe\00"
define void @InGame_Cache() {
%1 = tail call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ what;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, int /*<<< orphan*/ *, int);
void put32(char *where, uint32_t what) { memcpy(where, &what, sizeof(what)); }


x86 assembly (clang, -O0):
<put32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put32>:
push   %rax
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @put32(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 = call i32 @memcpy(i8* %5, i32* %4, i32 4)
ret void
}

LLVM IR (-O2):
define void @put32(i8* %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = call i32 @memcpy(i8* %0, i32* %3, i32 4)
ret void
}
int fun766() { return 766; }


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

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

LLVM IR (-O0):
define i32 @fun766() {
ret i32 766
}

LLVM IR (-O2):
define i32 @fun766() {
ret i32 766
}
void t9() { return; }


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

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

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

LLVM IR (-O2):
define void @t9() {
ret void
}
/* Variables and functions */
scalar_t__ getNext(int *, int *);
int /*<<< orphan*/ printf(char *, int, int, int);
int main() {
  int a, b;
  while (getNext(&a, &b))
    printf("%d %d / %d\n", a / b, a % b, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <getNext@plt>
cmp    $0x0,%rax
je     116a <main+0x4a>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,%esi
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    -0xc(%rbp),%ecx
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1040 <getNext@plt>
test   %rax,%rax
je     1175 <main+0x55>
lea    0xebc(%rip),%r14
lea    0xc(%rsp),%r15
lea    0x8(%rsp),%rbx
xchg   %ax,%ax
mov    0xc(%rsp),%eax
mov    0x8(%rsp),%ecx
cltd
idiv   %ecx
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <getNext@plt>
test   %rax,%rax
jne    1150 <main+0x30>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"%d %d / %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i64 @getNext(i32* %1, i32* %2)
%6 = icmp eq i64 %5, 0
br i1 %6, label %15, label %7
7: ; preds = %0, %7
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = sdiv i32 %8, %9
%11 = srem i32 %8, %9
%12 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %11, i32 %9)
%13 = call i64 @getNext(i32* %1, i32* %2)
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %7
15: ; preds = %7, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void output_clear() { printf("\x1B[2J"); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[2J\00"
define void @output_clear() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ disp_str(char *);
int /*<<< orphan*/ itoa(char *, int);
void disp_int(int input) {
  char output[16];
  itoa(output, input);
  disp_str(output);
}


x86 assembly (clang, -O0):
<disp_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1040 <itoa@plt>
lea    -0x20(%rbp),%rdi
call   1030 <disp_str@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disp_int>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%esi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <itoa@plt>
mov    %rbx,%rdi
call   1030 <disp_str@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @disp_int(i32 %0) {
%2 = alloca i32
%3 = alloca [16 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @itoa(i8* %4, i32 %5)
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%8 = call i32 @disp_str(i8* %7)
ret void
}

LLVM IR (-O2):
define void @disp_int(i32 %0) {
%2 = alloca [16 x i8]
%3 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%4 = call i32 @itoa(i8* %3, i32 %0)
%5 = call i32 @disp_str(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
int yyerror(const char *str) {
  printf("Syntax error: %s\n", str);
  exit(1);
  return 1;
}


x86 assembly (clang, -O0):
<yyerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<yyerror>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"Syntax error: %s\0A\00"
define i32 @yyerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [18 x i8] c"Syntax error: %s\0A\00"
define i32 @yyerror(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage() {
  printf("usage: percolation num [-auto]\n"
         " this will create a [num * num] matrix.\n"
         " clicking mouse button will start and step one step.\n"
         " when specify -auto option, it will go head without clicking mouse\n"
         " pressing keyboard will exit.\n");
}


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

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

LLVM IR (-O0):
@.str = [222 x i8] c"usage: percolation num [-auto]\0A this will create a [num * num] matrix.\0A clicking mouse button will start and step one step.\0A when specify -auto option, it will go head without clicking mouse\0A pressing keyboard will exit.\0A\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([222 x i8], [222 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [221 x i8] c"usage: percolation num [-auto]\0A this will create a [num * num] matrix.\0A clicking mouse button will start and step one step.\0A when specify -auto option, it will go head without clicking mouse\0A pressing keyboard will exit.\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([221 x i8], [221 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ strlen(char *);
int /*<<< orphan*/ unmangle_to_buffer(char *, char *, scalar_t__);
void unmangle_string(char *s) { unmangle_to_buffer(s, s, strlen(s) + 1); }


x86 assembly (clang, -O0):
<unmangle_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1040 <unmangle_to_buffer@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unmangle_string>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %rbx,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <unmangle_to_buffer@plt>

LLVM IR (-O0):
define void @unmangle_string(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strlen(i8* %5)
%7 = add nsw i64 %6, 1
%8 = call i32 @unmangle_to_buffer(i8* %3, i8* %4, i64 %7)
ret void
}

LLVM IR (-O2):
define void @unmangle_string(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i32 @unmangle_to_buffer(i8* %0, i8* %0, i64 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ etp_set_max_poll_time(double);
void eio_set_max_poll_time(double nseconds) { etp_set_max_poll_time(nseconds); }


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

x86 assembly (clang, -O2):
<eio_set_max_poll_time>:
jmp    1030 <etp_set_max_poll_time@plt>

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

LLVM IR (-O2):
define void @eio_set_max_poll_time(double %0) {
%2 = tail call i32 @etp_set_max_poll_time(double %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  scalar_t__ tm_isdst;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ time(int /*<<< orphan*/);
int sapi_is_dst_active() {
  time_t now;
  struct tm *t;
  now = time(0);
  t = localtime(&now);
  return t->tm_isdst > 0 ? 1 : 0;
}


x86 assembly (clang, -O0):
<sapi_is_dst_active>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovg  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sapi_is_dst_active>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
xor    %ecx,%ecx
cmpq   $0x0,(%rax)
setg   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.tm = type { i64 }
define i32 @sapi_is_dst_active() {
%1 = alloca i32
%2 = alloca %struct.tm*
%3 = call i32 @time(i32 0)
store i32 %3, i32* %1
%4 = call %struct.tm* @localtime(i32* %1)
store %struct.tm* %4, %struct.tm** %2
%5 = load %struct.tm*, %struct.tm** %2
%6 = getelementptr inbounds %struct.tm, %struct.tm* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = icmp sgt i64 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 1, i32 0
ret i32 %10
}

LLVM IR (-O2):
%struct.tm = type { i64 }
define i32 @sapi_is_dst_active() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @time(i32 0)
store i32 %3, i32* %1
%4 = call %struct.tm* @localtime(i32* %1)
%5 = getelementptr inbounds %struct.tm, %struct.tm* %4, i64 0, i32 0
%6 = load i64, i64* %5
%7 = icmp sgt i64 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ gc();
int /*<<< orphan*/ save_image(int /*<<< orphan*/);
int /*<<< orphan*/ unbox_char_string();
void primitive_save_image_impl(void) {
  gc();
  save_image(unbox_char_string());
}


x86 assembly (clang, -O0):
<primitive_save_image_impl>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <gc@plt>
mov    $0x0,%al
call   1050 <unbox_char_string@plt>
mov    %eax,%edi
call   1040 <save_image@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<primitive_save_image_impl>:
push   %rax
xor    %eax,%eax
call   1030 <gc@plt>
xor    %eax,%eax
call   1050 <unbox_char_string@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <save_image@plt>

LLVM IR (-O0):
define void @primitive_save_image_impl() {
%1 = call i32 (...) @gc()
%2 = call i32 (...) @unbox_char_string()
%3 = call i32 @save_image(i32 %2)
ret void
}

LLVM IR (-O2):
define void @primitive_save_image_impl() {
%1 = tail call i32 (...) @gc()
%2 = tail call i32 (...) @unbox_char_string()
%3 = tail call i32 @save_image(i32 %2)
ret void
}
signed char signedchar_ignoring_unsignedlonglongint(signed char x,
                                                    unsigned long long int y) {
  return x;
}


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

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

LLVM IR (-O0):
define signext i8 @signedchar_ignoring_unsignedlonglongint(i8 signext %0, i64 %1) {
%3 = alloca i8
%4 = alloca i64
store i8 %0, i8* %3
store i64 %1, i64* %4
%5 = load i8, i8* %3
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @signedchar_ignoring_unsignedlonglongint(i8 returned signext %0, i64 %1) {
ret i8 %0
}
/* Variables and functions */
int /*<<< orphan*/ write_bytes(char *, unsigned char *, unsigned int,
                               unsigned int *, unsigned char *, int);
int /*<<< orphan*/ write_int(unsigned char *, unsigned int);
void output_stack_allocate(unsigned int bytes_to_allocate, unsigned char *buf,
                           unsigned int buf_size, unsigned int *bytes_written) {
  unsigned char bytes[5];
  bytes[0] = 0x85;
  write_int(&bytes[1], bytes_to_allocate);
  write_bytes("stack allocate", buf, buf_size, bytes_written, bytes, 5);
}


x86 assembly (clang, -O0):
<output_stack_allocate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
movb   $0x85,-0x25(%rbp)
lea    -0x25(%rbp),%rdi
add    $0x1,%rdi
mov    -0x4(%rbp),%esi
call   1030 <write_int@plt>
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
lea    -0x25(%rbp),%r8
lea    0xea0(%rip),%rdi
mov    $0x5,%r9d
call   1040 <write_bytes@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_stack_allocate>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rcx,%r14
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %edi,%esi
movb   $0x85,0xb(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <write_int@plt>
lea    0xeb8(%rip),%rdi
lea    0xb(%rsp),%r8
mov    %rbx,%rsi
mov    %ebp,%edx
mov    %r14,%rcx
mov    $0x5,%r9d
call   1040 <write_bytes@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"stack allocate\00"
define void @output_stack_allocate(i32 %0, i8* %1, i32 %2, i32* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32*
%9 = alloca [5 x i8]
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32* %3, i32** %8
%10 = getelementptr inbounds [5 x i8], [5 x i8]* %9, i64 0, i64 0
store i8 -123, i8* %10
%11 = getelementptr inbounds [5 x i8], [5 x i8]* %9, i64 0, i64 1
%12 = load i32, i32* %5
%13 = call i32 @write_int(i8* %11, i32 %12)
%14 = load i8*, i8** %6
%15 = load i32, i32* %7
%16 = load i32*, i32** %8
%17 = getelementptr inbounds [5 x i8], [5 x i8]* %9, i64 0, i64 0
%18 = call i32 @write_bytes(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %14, i32 %15, i32* %16, i8* %17, i32 5)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"stack allocate\00"
define void @output_stack_allocate(i32 %0, i8* %1, i32 %2, i32* %3) {
%5 = alloca [5 x i8]
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
store i8 -123, i8* %6
%7 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 1
%8 = call i32 @write_int(i8* %7, i32 %0)
%9 = call i32 @write_bytes(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2, i32* %3, i8* %6, i32 5)
ret void
}
int tgvlz_log2u(int val) {
  int i, v;
  v = val;
  i = 0;
  while (v) {
    i++;
    v = v >> 1;
  }
  return (i);
}


x86 assembly (clang, -O0):
<tgvlz_log2u>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1135 <tgvlz_log2u+0x35>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1114 <tgvlz_log2u+0x14>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tgvlz_log2u>:
xor    %eax,%eax
test   %edi,%edi
je     111c <tgvlz_log2u+0x1c>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
add    $0x1,%eax
sar    %ecx
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <tgvlz_log2u+0x10>
ret

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

LLVM IR (-O2):
define i32 @tgvlz_log2u(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ %0, %1 ]
%5 = phi i32 [ %6, %3 ], [ 0, %1 ]
%6 = add nuw nsw i32 %5, 1
%7 = ashr i32 %4, 1
%8 = icmp ult i32 %4, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %10
}
/* Variables and functions */
void *malloc(int);
int /*<<< orphan*/ msg(char *, char *, int, char *);
void *memalloc_(int size) {
  void *p = malloc(size);
  if (p)
    return p;
  else
    msg("ERROR",
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/stupidsing/suite/refs/heads/master/src/main/"
        "c/mem.c",
        11, ("out of memory"));
}


x86 assembly (clang, -O0):
<memalloc_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     114f <memalloc_+0x2f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    116e <memalloc_+0x4e>
lea    0xeaa(%rip),%rdi
lea    0xea9(%rip),%rsi
mov    $0xb,%edx
lea    0xf2b(%rip),%rcx
call   1040 <msg@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memalloc_>:
push   %rbx
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114d <memalloc_+0x2d>
lea    0xecb(%rip),%rdi
lea    0xeca(%rip),%rsi
lea    0xf51(%rip),%rcx
mov    $0xb,%edx
call   1040 <msg@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"ERROR\00"
@.str.1 = [142 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/stupidsing/suite/refs/heads/master/src/main/c/mem.c\00"
@.str.2 = [14 x i8] c"out of memory\00"
define i8* @memalloc_(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = call i8* @malloc(i32 %5)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i8*, i8** %4
store i8* %10, i8** %2
br label %13
11: ; preds = %1
%12 = call i32 @msg(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.1, i64 0, i64 0), i32 11, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %13
13: ; preds = %9, %11
%14 = load i8*, i8** %2
ret i8* %14
}

LLVM IR (-O2):
@.str = [6 x i8] c"ERROR\00"
@.str.1 = [142 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/stupidsing/suite/refs/heads/master/src/main/c/mem.c\00"
@.str.2 = [14 x i8] c"out of memory\00"
define noalias i8* @memalloc_(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @msg(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.1, i64 0, i64 0), i32 11, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %6
6: ; preds = %1, %4
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: bin2h [-cz] <input_file> <output_file>\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [47 x i8] c"usage: bin2h [-cz] <input_file> <output_file>\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [47 x i8] c"usage: bin2h [-cz] <input_file> <output_file>\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
int max17058_get_soc(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @max17058_get_soc() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int x = 10;
  int y = x++ + x++;
  printf("%dxxxx\n", y);
  printf("   YYYYYYY%d\n    ", y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x8(%rbp)
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xeae(%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
mov    $0x15,%esi
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
mov    $0x15,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"%dxxxx\0A\00"
@.str.1 = [18 x i8] c" YYYYYYY%d\0A \00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 21)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 21)
ret i32 0
}
void fortranprint_(int *id) {}


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

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

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

LLVM IR (-O2):
define void @fortranprint_(i32* nocapture %0) {
ret void
}
int linearSearch(int A[], int size, int value) {
  int index = -1;
  int i;
  for (i = 0; i < size; i++) {
    if (A[i] == value) {
      index = i;
      break;
    }
  }
  return index;
}


x86 assembly (clang, -O0):
<linearSearch>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115a <linearSearch+0x5a>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x10(%rbp),%eax
jne    1147 <linearSearch+0x47>
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    115a <linearSearch+0x5a>
jmp    114c <linearSearch+0x4c>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    111c <linearSearch+0x1c>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<linearSearch>:
mov    $0xffffffff,%eax
test   %esi,%esi
jle    111e <linearSearch+0x1e>
mov    %esi,%esi
xor    %ecx,%ecx
nopl   (%rax)
cmp    %edx,(%rdi,%rcx,4)
je     111f <linearSearch+0x1f>
add    $0x1,%rcx
cmp    %rcx,%rsi
jne    1110 <linearSearch+0x10>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @linearSearch(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %12
%8 = phi i64 [ 0, %5 ], [ %13, %12 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = icmp eq i32 %10, %2
br i1 %11, label %15, label %12
12: ; preds = %7
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %17, label %7
15: ; preds = %7
%16 = trunc i64 %8 to i32
br label %17
17: ; preds = %12, %15, %3
%18 = phi i32 [ -1, %3 ], [ %16, %15 ], [ -1, %12 ]
ret i32 %18
}
/* Type definitions */
typedef int uint32_t;

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


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

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

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

LLVM IR (-O2):
define i32 @is_sync_primitive(i32 %0) {
%2 = and i32 %0, 251658480
%3 = icmp eq i32 %2, 16777360
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
double DSlater_1S_2S(double, double, double);
double DSlater_2S_1S(double rij, double xii, double xij) {
  return DSlater_1S_2S(rij, xij, xii);
}


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

x86 assembly (clang, -O2):
<DSlater_2S_1S>:
movaps %xmm1,%xmm3
movaps %xmm2,%xmm1
movaps %xmm3,%xmm2
jmp    1030 <DSlater_1S_2S@plt>

LLVM IR (-O0):
define double @DSlater_2S_1S(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %6
%9 = load double, double* %5
%10 = call double @DSlater_1S_2S(double %7, double %8, double %9)
ret double %10
}

LLVM IR (-O2):
define double @DSlater_2S_1S(double %0, double %1, double %2) {
%4 = tail call double @DSlater_1S_2S(double %0, double %2, double %1)
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ HeapAdjust(int *, int, int);
void BuildHeap(int A[], int heap_size) {
  for (int i = (heap_size - 2) / 2; i >= 0; i--) {
    HeapAdjust(A, i, heap_size);
  }
}


x86 assembly (clang, -O0):
<BuildHeap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1157 <BuildHeap+0x47>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <HeapAdjust@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1130 <BuildHeap+0x20>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BuildHeap>:
push   %rbp
push   %r14
push   %rbx
test   %esi,%esi
jle    1141 <BuildHeap+0x31>
mov    %esi,%ebx
mov    %rdi,%r14
lea    -0x2(%rbx),%eax
shr    $0x1f,%eax
lea    (%rbx,%rax,1),%ebp
add    $0xfffffffe,%ebp
sar    %ebp
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <HeapAdjust@plt>
add    $0xffffffff,%ebp
jb     1130 <BuildHeap+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @BuildHeap(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = sub nsw i32 %6, 2
%8 = sdiv i32 %7, 2
store i32 %8, i32* %5
br label %9
9: ; preds = %17, %2
%10 = load i32, i32* %5
%11 = icmp sge i32 %10, 0
br i1 %11, label %12, label %20
12: ; preds = %9
%13 = load i32*, i32** %3
%14 = load i32, i32* %5
%15 = load i32, i32* %4
%16 = call i32 @HeapAdjust(i32* %13, i32 %14, i32 %15)
br label %17
17: ; preds = %12
%18 = load i32, i32* %5
%19 = add nsw i32 %18, -1
store i32 %19, i32* %5
br label %9
20: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @BuildHeap(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = add nsw i32 %1, -2
%6 = sdiv i32 %5, 2
br label %8
7: ; preds = %8, %2
ret void
8: ; preds = %4, %8
%9 = phi i32 [ %11, %8 ], [ %6, %4 ]
%10 = tail call i32 @HeapAdjust(i32* %0, i32 %9, i32 %1)
%11 = add nsw i32 %9, -1
%12 = icmp eq i32 %9, 0
br i1 %12, label %7, label %8
}
int isdigit(c)
char c;
{
  if ((c >= '0') && (c <= '9'))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1130 <isdigit+0x30>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1130 <isdigit+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1137 <isdigit+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdigit>:
shl    $0x18,%edi
add    $0xd0ffffff,%edi
xor    %eax,%eax
cmp    $0xaffffff,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isdigit(i32 %0) {
%2 = alloca i32
%3 = alloca i8
%4 = trunc i32 %0 to i8
store i8 %4, i8* %3
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = icmp sge i32 %6, 48
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp sle i32 %10, 57
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 1, i32* %2
br label %14
13: ; preds = %8, %1
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @isdigit(i32 %0) {
%2 = shl i32 %0, 24
%3 = add i32 %2, -788529153
%4 = icmp ult i32 %3, 184549375
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ mousePopUpMotionFunc(int, int);
void passivePopUpMotionFunc(int mousePositionX, int mousePositionY) {
  mousePopUpMotionFunc(mousePositionX, mousePositionY);
}


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

x86 assembly (clang, -O2):
<passivePopUpMotionFunc>:
jmp    1030 <mousePopUpMotionFunc@plt>

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

LLVM IR (-O2):
define void @passivePopUpMotionFunc(i32 %0, i32 %1) {
%3 = tail call i32 @mousePopUpMotionFunc(i32 %0, i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ eeprom_read_byte(int /*<<< orphan*/ *);
uint8_t eeconfig_read_debug(void) { return eeprom_read_byte((uint8_t *)2); }


x86 assembly (clang, -O0):
<eeconfig_read_debug>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <eeprom_read_byte@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<eeconfig_read_debug>:
mov    $0x2,%edi
jmp    1030 <eeprom_read_byte@plt>

LLVM IR (-O0):
define i32 @eeconfig_read_debug() {
%1 = call i32 @eeprom_read_byte(i32* inttoptr (i64 2 to i32*))
ret i32 %1
}

LLVM IR (-O2):
define i32 @eeconfig_read_debug() {
%1 = tail call i32 @eeprom_read_byte(i32* inttoptr (i64 2 to i32*))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printInt(int);
int /*<<< orphan*/ putchar(char);
void printVtCmd(char cmd, int arg0, int arg1) {
  putchar(0x1B);
  putchar('[');
  if (arg0 >= 0)
    printInt(arg0);
  if (arg1 >= 0) {
    putchar(';');
    printInt(arg1);
  }
  putchar(cmd);
}


x86 assembly (clang, -O0):
<printVtCmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0x1b,%edi
call   1030 <putchar@plt>
mov    $0x5b,%edi
call   1030 <putchar@plt>
cmpl   $0x0,-0x8(%rbp)
jl     115a <printVtCmd+0x3a>
mov    -0x8(%rbp),%edi
call   1040 <printInt@plt>
cmpl   $0x0,-0xc(%rbp)
jl     1176 <printVtCmd+0x56>
mov    $0x3b,%edi
call   1030 <putchar@plt>
mov    -0xc(%rbp),%edi
call   1040 <printInt@plt>
movsbl -0x1(%rbp),%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printVtCmd>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %esi,%ebx
mov    %edi,%r14d
mov    $0x1b,%edi
call   1030 <putchar@plt>
mov    $0x5b,%edi
call   1030 <putchar@plt>
test   %ebx,%ebx
js     114a <printVtCmd+0x2a>
mov    %ebx,%edi
call   1040 <printInt@plt>
test   %ebp,%ebp
js     115f <printVtCmd+0x3f>
mov    $0x3b,%edi
call   1030 <putchar@plt>
mov    %ebp,%edi
call   1040 <printInt@plt>
movsbl %r14b,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @printVtCmd(i8 signext %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 = call i32 @putchar(i8 signext 27)
%8 = call i32 @putchar(i8 signext 91)
%9 = load i32, i32* %5
%10 = icmp sge i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %3
%12 = load i32, i32* %5
%13 = call i32 @printInt(i32 %12)
br label %14
14: ; preds = %11, %3
%15 = load i32, i32* %6
%16 = icmp sge i32 %15, 0
br i1 %16, label %17, label %21
17: ; preds = %14
%18 = call i32 @putchar(i8 signext 59)
%19 = load i32, i32* %6
%20 = call i32 @printInt(i32 %19)
br label %21
21: ; preds = %17, %14
%22 = load i8, i8* %4
%23 = call i32 @putchar(i8 signext %22)
ret void
}

LLVM IR (-O2):
define void @printVtCmd(i8 signext %0, i32 %1, i32 %2) {
%4 = tail call i32 @putchar(i8 signext 27)
%5 = tail call i32 @putchar(i8 signext 91)
%6 = icmp sgt i32 %1, -1
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = tail call i32 @printInt(i32 %1)
br label %9
9: ; preds = %7, %3
%10 = icmp sgt i32 %2, -1
br i1 %10, label %11, label %14
11: ; preds = %9
%12 = tail call i32 @putchar(i8 signext 59)
%13 = tail call i32 @printInt(i32 %2)
br label %14
14: ; preds = %11, %9
%15 = tail call i32 @putchar(i8 signext %0)
ret void
}