xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int free_line(char **line, int ret) {
  if (line && *line)
    free(*line);
  *line = NULL;
  return (ret);
}


x86 assembly (clang, -O0):
<free_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1144 <free_line+0x34>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1144 <free_line+0x34>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_line>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
test   %rdi,%rdi
je     112a <free_line+0x1a>
mov    (%rbx),%rdi
test   %rdi,%rdi
je     112a <free_line+0x1a>
call   1030 <free@plt>
movq   $0x0,(%rbx)
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @free_line(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 %15
7: ; preds = %2
%8 = load i8**, i8*** %3
%9 = load i8*, i8** %8
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %15
11: ; preds = %7
%12 = load i8**, i8*** %3
%13 = load i8*, i8** %12
%14 = call i32 @free(i8* %13)
br label %15
15: ; preds = %11, %7, %2
%16 = load i8**, i8*** %3
store i8* null, i8** %16
%17 = load i32, i32* %4
ret i32 %17
}

LLVM IR (-O2):
define i32 @free_line(i8** %0, i32 returned %1) {
%3 = icmp eq i8** %0, null
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = load i8*, i8** %0
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @free(i8* %5)
br label %9
9: ; preds = %7, %4, %2
store i8* null, i8** %0
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int const, int const);
void output_color_header(const int width, const int height) {
  printf("P3 %d %d 255\n", width, height);
}


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

x86 assembly (clang, -O2):
<output_color_header>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"P3 %d %d 255\0A\00"
define void @output_color_header(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 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"P3 %d %d 255\0A\00"
define void @output_color_header(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_usage() {
  fprintf(stderr, "usage: brainfuck [-eih] file...\n");
  fprintf(stderr, "\t-e  run code directly\n");
  fprintf(stderr, "\t-h  show a help message\n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xee8(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
lea    0xeeb(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xef2(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xefc(%rip),%rsi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"usage: brainfuck [-eih] file...\0A\00"
@.str.1 = [24 x i8] c"\09-e run code directly\0A\00"
@.str.2 = [26 x i8] c"\09-h show a help message\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"usage: brainfuck [-eih] file...\0A\00"
@.str.1 = [24 x i8] c"\09-e run code directly\0A\00"
@.str.2 = [26 x i8] c"\09-h show a help message\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int write(int, char *, int);
int main() {
  if ((write(1, "Here is some data\n", 18)) != 18)
    write(2, "A write error has occurred on file descriptor 1\n", 46);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
lea    0xec5(%rip),%rsi
mov    $0x12,%edx
call   1030 <write@plt>
cmp    $0x12,%eax
je     1164 <main+0x44>
mov    $0x2,%edi
lea    0xeb9(%rip),%rsi
mov    $0x2e,%edx
call   1030 <write@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0x1,%edi
mov    $0x12,%edx
call   1030 <write@plt>
cmp    $0x12,%eax
je     1152 <main+0x32>
lea    0xed0(%rip),%rsi
mov    $0x2,%edi
mov    $0x2e,%edx
call   1030 <write@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"Here is some data\0A\00"
@.str.1 = [49 x i8] c"A write error has occurred on file descriptor 1\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @write(i32 1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 18)
%3 = icmp ne i32 %2, 18
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @write(i32 2, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0), i32 46)
br label %6
6: ; preds = %4, %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [19 x i8] c"Here is some data\0A\00"
@.str.1 = [49 x i8] c"A write error has occurred on file descriptor 1\0A\00"
define i32 @main() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 18)
%2 = icmp eq i32 %1, 18
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0), i32 46)
br label %5
5: ; preds = %3, %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
void mod_csound_is_GPL_compatible() {}


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

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

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

LLVM IR (-O2):
define void @mod_csound_is_GPL_compatible() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ invalid_phase(char *);
void phase_1(char *input) { invalid_phase("1c"); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"1c\00"
define void @phase_1(i8* nocapture readnone %0) {
%2 = tail call i32 @invalid_phase(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(char *, char **);
int /*<<< orphan*/ puts(char *);
int main(int argc, char *argv[]) {
  if (argc == 1) {
    puts("printf: not enough arguments");
    return 1;
  } else
    print(argv[1], &argv[2]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1158 <main+0x38>
lea    0xeb9(%rip),%rdi
call   1030 <puts@plt>
movl   $0x1,-0x4(%rbp)
jmp    1174 <main+0x54>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rsi
add    $0x10,%rsi
call   1040 <print@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jne    1139 <main+0x19>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret
mov    0x8(%rsi),%rdi
add    $0x10,%rsi
call   1040 <print@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"printf: not enough arguments\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @puts(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %18
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 2
%16 = call i32 @print(i8* %13, i8** %15)
br label %17
17: ; preds = %10
store i32 0, i32* %3
br label %18
18: ; preds = %17, %8
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@.str = [29 x i8] c"printf: not enough arguments\00"
define i32 @main(i32 %0, i8** %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %11
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = getelementptr inbounds i8*, i8** %1, i64 2
%10 = tail call i32 @print(i8* %8, i8** %9)
br label %11
11: ; preds = %6, %4
%12 = phi i32 [ 1, %4 ], [ 0, %6 ]
ret i32 %12
}
/* Type definitions */
struct exptimer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct exptimer *);
void free_et(struct exptimer *et) {
  free(et);
  return;
}


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

x86 assembly (clang, -O2):
<free_et>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.exptimer = type { i32 }
define void @free_et(%struct.exptimer* nocapture %0) {
%2 = tail call i32 @free(%struct.exptimer* %0)
ret void
}
/* Variables and functions */
double log(scalar_t__);
scalar_t__ sqrt(double);
double acosh(double r1) { return (log(r1 + sqrt(r1 * r1 - 1.0))); }


x86 assembly (clang, -O0):
<acosh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeb3(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  -0x10(%rbp),%xmm0
cvtsi2sd %rax,%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rdi
call   1030 <log@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acosh>:
push   %rax
movsd  %xmm0,(%rsp)
mulsd  %xmm0,%xmm0
addsd  0xece(%rip),%xmm0
call   1040 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  (%rsp),%xmm0
cvttsd2si %xmm0,%rdi
pop    %rax
jmp    1030 <log@plt>

LLVM IR (-O0):
define double @acosh(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = call double @llvm.fmuladd.f64(double %4, double %5, double -1.000000e+00)
%7 = call i64 @sqrt(double %6)
%8 = sitofp i64 %7 to double
%9 = fadd double %3, %8
%10 = fptosi double %9 to i64
%11 = call double @log(i64 %10)
ret double %11
}

LLVM IR (-O2):
define double @acosh(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double %0, double -1.000000e+00)
%3 = tail call i64 @sqrt(double %2)
%4 = sitofp i64 %3 to double
%5 = fadd double %4, %0
%6 = fptosi double %5 to i64
%7 = tail call double @log(i64 %6)
ret double %7
}
int test_int_1(int a) { return -100; }


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

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

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

LLVM IR (-O2):
define i32 @test_int_1(i32 %0) {
ret i32 -100
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int swap_slices(void) {
  double *c;
  int fail, *a, *b;
  fail = _ada_use_c2phc(46, a, b, c);
  return fail;
}


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

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

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

LLVM IR (-O2):
define i32 @swap_slices() {
%1 = tail call i32 @_ada_use_c2phc(i32 46, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ LCD_Boot_Init();
int /*<<< orphan*/ LCD_Clear();
void LCD_Init(void) {
  LCD_Boot_Init();
  LCD_Clear();
}


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

x86 assembly (clang, -O2):
<LCD_Init>:
push   %rax
xor    %eax,%eax
call   1030 <LCD_Boot_Init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <LCD_Clear@plt>

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

LLVM IR (-O2):
define void @LCD_Init() {
%1 = tail call i32 (...) @LCD_Boot_Init()
%2 = tail call i32 (...) @LCD_Clear()
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int initialize_monodromy(int n, int d, int k) {
  int fail;
  double *c;
  int dk[2];
  dk[0] = d;
  dk[1] = k;
  fail = _ada_use_c2phc(50, &n, dk, c);
  return fail;
}


x86 assembly (clang, -O0):
<initialize_monodromy>:
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,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
lea    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x32,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @initialize_monodromy(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca double*
%9 = alloca [2 x i32]
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]* %9, i64 0, i64 0
store i32 %10, i32* %11
%12 = load i32, i32* %6
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 1
store i32 %12, i32* %13
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 0
%15 = load double*, double** %8
%16 = call i32 @_ada_use_c2phc(i32 50, i32* %4, i32* %14, double* %15)
store i32 %16, i32* %7
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
define i32 @initialize_monodromy(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_c2phc(i32 50, i32* %4, i32* %7, double* undef)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *prog) {
  fprintf(stderr,
          "Usage: %s [-v] -h <heads> -s <sectors> -o <outputfile> [-a 0..4] "
          "[-l <align kB>] [[-t <type>] -p <size>...] \n",
          prog);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [110 x i8] c"Usage: %s [-v] -h <heads> -s <sectors> -o <outputfile> [-a 0..4] [-l <align kB>] [[-t <type>] -p <size>...] \0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([110 x i8], [110 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [110 x i8] c"Usage: %s [-v] -h <heads> -s <sectors> -o <outputfile> [-a 0..4] [-l <align kB>] [[-t <type>] -p <size>...] \0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([110 x i8], [110 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
scalar_t__ irafncmp(char *, char *, int);
scalar_t__ strncmp(char *, char *, int);
int head_version(char *irafheader) {
  if (irafncmp(irafheader, "imhdr", 5) != 0) {
    if (strncmp(irafheader, "imhv2", 5) != 0)
      return (0);
    else
      return (2);
  } else
    return (1);
}


x86 assembly (clang, -O0):
<head_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
mov    $0x5,%edx
call   1040 <irafncmp@plt>
cmp    $0x0,%rax
je     1182 <head_version+0x62>
mov    -0x10(%rbp),%rdi
lea    0xeb0(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     1176 <head_version+0x56>
movl   $0x0,-0x4(%rbp)
jmp    1189 <head_version+0x69>
movl   $0x2,-0x4(%rbp)
jmp    1189 <head_version+0x69>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<head_version>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rsi
mov    $0x5,%edx
call   1040 <irafncmp@plt>
test   %rax,%rax
je     115d <head_version+0x3d>
lea    0xec5(%rip),%rsi
mov    %rbx,%rdi
mov    $0x5,%edx
call   1030 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
add    %eax,%eax
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"imhdr\00"
@.str.1 = [6 x i8] c"imhv2\00"
define i32 @head_version(i8* %0) {
%2 = tail call i64 @irafncmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 5)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 5)
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i32 2, i32 0
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 1, %1 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ ioptval;

/* Variables and functions */
int /*<<< orphan*/ IPPROTO_IP;
int /*<<< orphan*/ IP_TTL;
int setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/, void *, int);
int sock_set_ttl(int sock, int ttl) {
  int ioptval;
  if (setsockopt(sock, IPPROTO_IP, IP_TTL, (void *)&ioptval, sizeof(ioptval)) ==
      -1)
    return -1;
  return ioptval;
}


x86 assembly (clang, -O0):
<sock_set_ttl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
mov    0x2e9f(%rip),%rax
mov    (%rax),%edx
lea    -0x10(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
cmp    $0xffffffff,%eax
jne    1157 <sock_set_ttl+0x47>
movl   $0xffffffff,-0x4(%rbp)
jmp    115d <sock_set_ttl+0x4d>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sock_set_ttl>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%esi
mov    0x2eaf(%rip),%rax
mov    (%rax),%edx
lea    0x4(%rsp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
cmp    $0xffffffff,%eax
je     113c <sock_set_ttl+0x2c>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@IPPROTO_IP = global i32 0
@IP_TTL = global i32 0
define i32 @sock_set_ttl(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* @IPPROTO_IP
%9 = load i32, i32* @IP_TTL
%10 = bitcast i32* %6 to i8*
%11 = call i32 @setsockopt(i32 %7, i32 %8, i32 %9, i8* %10, i32 4)
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 -1, i32* %3
br label %16
14: ; preds = %2
%15 = load i32, i32* %6
store i32 %15, i32* %3
br label %16
16: ; preds = %14, %13
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@IPPROTO_IP = global i32 0
@IP_TTL = global i32 0
define i32 @sock_set_ttl(i32 %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = load i32, i32* @IPPROTO_IP
%6 = load i32, i32* @IP_TTL
%7 = call i32 @setsockopt(i32 %0, i32 %5, i32 %6, i8* %4, i32 4)
%8 = icmp eq i32 %7, -1
%9 = load i32, i32* %3
%10 = select i1 %8, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M107_f(char *s) {
  debug("M107_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M107_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M107_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M107_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M107_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M107_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M107_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int fread(char *, int, int, int /*<<< orphan*/ *);
int IO_Read_Str(char *str, int size, FILE *fp) {
  assert(str && (size > 0) && fp);
  return (fread(str, 1, size, fp) == size);
}


x86 assembly (clang, -O0):
<IO_Read_Str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x19(%rbp)
je     115d <IO_Read_Str+0x3d>
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0x19(%rbp)
jle    115d <IO_Read_Str+0x3d>
cmpq   $0x0,-0x18(%rbp)
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
call   1030 <fread@plt>
cmp    -0xc(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IO_Read_Str>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
test   %rdi,%rdi
setne  %al
test   %esi,%esi
setg   %cl
and    %al,%cl
test   %rdx,%rdx
setne  %al
and    %cl,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %ebp,%edx
mov    %r14,%rcx
call   1030 <fread@plt>
xor    %ecx,%ecx
cmp    %ebp,%eax
sete   %cl
mov    %ecx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @IO_Read_Str(i8* %0, i32 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %15
9: ; preds = %3
%10 = load i32, i32* %5
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load i32*, i32** %6
%14 = icmp ne i32* %13, null
br label %15
15: ; preds = %12, %9, %3
%16 = phi i1 [ false, %9 ], [ false, %3 ], [ %14, %12 ]
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = load i8*, i8** %4
%20 = load i32, i32* %5
%21 = load i32*, i32** %6
%22 = call i32 @fread(i8* %19, i32 1, i32 %20, i32* %21)
%23 = load i32, i32* %5
%24 = icmp eq i32 %22, %23
%25 = zext i1 %24 to i32
ret i32 %25
}

LLVM IR (-O2):
define i32 @IO_Read_Str(i8* %0, i32 %1, i32* %2) {
%4 = icmp ne i8* %0, null
%5 = icmp sgt i32 %1, 0
%6 = and i1 %4, %5
%7 = icmp ne i32* %2, null
%8 = and i1 %6, %7
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
%11 = tail call i32 @fread(i8* %0, i32 1, i32 %1, i32* %2)
%12 = icmp eq i32 %11, %1
%13 = zext i1 %12 to i32
ret i32 %13
}
int stbir__min(int a, int b) { return a < b ? a : b; }


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

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

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

LLVM IR (-O2):
define i32 @stbir__min(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int system(char *);
void clear() {
  int a = system("clear");
  return;
}


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
define void @clear() {
%1 = alloca i32
%2 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i32 %2, i32* %1
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
define void @clear() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void n_printf(char *str) {
  printf(str);
  printf("\n");
}


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

x86 assembly (clang, -O2):
<n_printf>:
push   %rax
call   1040 <printf@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @n_printf(i8* nocapture %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) %0)
%3 = tail call i32 @putchar(i32 10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ fd_set;

/* Variables and functions */
int /*<<< orphan*/ FD_ZERO(int /*<<< orphan*/ *);
void _clear_sets(fd_set *rset, fd_set *wset, fd_set *eset) {
  if (rset != NULL)
    FD_ZERO(rset);
  if (wset != NULL)
    FD_ZERO(wset);
  if (eset != NULL)
    FD_ZERO(eset);
}


x86 assembly (clang, -O0):
<_clear_sets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1138 <_clear_sets+0x28>
mov    -0x8(%rbp),%rdi
call   1030 <FD_ZERO@plt>
cmpq   $0x0,-0x10(%rbp)
je     114c <_clear_sets+0x3c>
mov    -0x10(%rbp),%rdi
call   1030 <FD_ZERO@plt>
cmpq   $0x0,-0x18(%rbp)
je     1160 <_clear_sets+0x50>
mov    -0x18(%rbp),%rdi
call   1030 <FD_ZERO@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_clear_sets>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
test   %rdi,%rdi
je     1124 <_clear_sets+0x14>
call   1030 <FD_ZERO@plt>
test   %rbx,%rbx
je     1131 <_clear_sets+0x21>
mov    %rbx,%rdi
call   1030 <FD_ZERO@plt>
test   %r14,%r14
je     1145 <_clear_sets+0x35>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <FD_ZERO@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @_clear_sets(i32* %0, i32* %1, i32* %2) {
%4 = icmp eq i32* %0, null
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @FD_ZERO(i32* %0)
br label %7
7: ; preds = %5, %3
%8 = icmp eq i32* %1, null
br i1 %8, label %11, label %9
9: ; preds = %7
%10 = tail call i32 @FD_ZERO(i32* %1)
br label %11
11: ; preds = %9, %7
%12 = icmp eq i32* %2, null
br i1 %12, label %15, label %13
13: ; preds = %11
%14 = tail call i32 @FD_ZERO(i32* %2)
br label %15
15: ; preds = %13, %11
ret void
}
void XtCvtIntToShort() {}


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

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

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

LLVM IR (-O2):
define void @XtCvtIntToShort() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ use_s1();
int main(void) {
  use_s1();
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @use_s1()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test(int);
int main() {
  test(0);
  test(1);
  test(20);
  test(300);
  test(4000);
  test(5555);
  test(6789);
  test(9999);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1030 <test@plt>
mov    $0x1,%edi
call   1030 <test@plt>
mov    $0x14,%edi
call   1030 <test@plt>
mov    $0x12c,%edi
call   1030 <test@plt>
mov    $0xfa0,%edi
call   1030 <test@plt>
mov    $0x15b3,%edi
call   1030 <test@plt>
mov    $0x1a85,%edi
call   1030 <test@plt>
mov    $0x270f,%edi
call   1030 <test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <test@plt>
mov    $0x1,%edi
call   1030 <test@plt>
mov    $0x14,%edi
call   1030 <test@plt>
mov    $0x12c,%edi
call   1030 <test@plt>
mov    $0xfa0,%edi
call   1030 <test@plt>
mov    $0x15b3,%edi
call   1030 <test@plt>
mov    $0x1a85,%edi
call   1030 <test@plt>
mov    $0x270f,%edi
call   1030 <test@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @test(i32 0)
%3 = call i32 @test(i32 1)
%4 = call i32 @test(i32 20)
%5 = call i32 @test(i32 300)
%6 = call i32 @test(i32 4000)
%7 = call i32 @test(i32 5555)
%8 = call i32 @test(i32 6789)
%9 = call i32 @test(i32 9999)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test(i32 0)
%2 = tail call i32 @test(i32 1)
%3 = tail call i32 @test(i32 20)
%4 = tail call i32 @test(i32 300)
%5 = tail call i32 @test(i32 4000)
%6 = tail call i32 @test(i32 5555)
%7 = tail call i32 @test(i32 6789)
%8 = tail call i32 @test(i32 9999)
ret i32 0
}
void fun(void) { return; }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @X509_REQ_add_extensions_nid() {
ret void
}
const char *raster_version(void) {
  return ("raster : V1.5 Peter Boesecke 2011-12-14");
}


x86 assembly (clang, -O0):
<raster_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<raster_version>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [40 x i8] c"raster : V1.5 Peter Boesecke 2011-12-14\00"
define i8* @raster_version() {
ret i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [40 x i8] c"raster : V1.5 Peter Boesecke 2011-12-14\00"
define i8* @raster_version() {
ret i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ f();
int /*<<< orphan*/ g();
int main(void) {
  f();
  g();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <f@plt>
mov    $0x0,%al
call   1040 <g@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @f()
%2 = call i32 (...) @g()
ret i32 0
}

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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
cmpl   $0x0,-0x8(%rbp)
setne  %cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
xor    -0xc(%rbp),%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%ecx
cmpl   $0x0,-0xc(%rbp)
setne  %dl
xor    $0xff,%dl
and    $0x1,%dl
movzbl %dl,%edx
xor    %edx,%ecx
add    %ecx,%eax
cmpl   $0x0,-0x8(%rbp)
setne  %cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
cmpl   $0x0,-0xc(%rbp)
setne  %dl
xor    $0xff,%dl
and    $0x1,%dl
movzbl %dl,%edx
xor    %edx,%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe70(%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    $0x2,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 0, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = xor i32 %5, %6
%8 = load i32, i32* %2
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
%11 = zext i1 %10 to i32
%12 = load i32, i32* %3
%13 = xor i32 %11, %12
%14 = add nsw i32 %7, %13
%15 = load i32, i32* %2
%16 = load i32, i32* %3
%17 = icmp ne i32 %16, 0
%18 = xor i1 %17, true
%19 = zext i1 %18 to i32
%20 = xor i32 %15, %19
%21 = add nsw i32 %14, %20
%22 = load i32, i32* %2
%23 = icmp ne i32 %22, 0
%24 = xor i1 %23, true
%25 = zext i1 %24 to i32
%26 = load i32, i32* %3
%27 = icmp ne i32 %26, 0
%28 = xor i1 %27, true
%29 = zext i1 %28 to i32
%30 = xor i32 %25, %29
%31 = add nsw i32 %21, %30
store i32 %31, i32* %4
%32 = load i32, i32* %4
%33 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %32)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 0
}
/* Variables and functions */
unsigned char inb(int);
int /*<<< orphan*/ outb(unsigned short, int);
unsigned char read_gra_b(unsigned short addr) {
  outb(addr, 0x3CE);
  return inb(0x3CF);
}


x86 assembly (clang, -O0):
<read_gra_b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    $0x3ce,%esi
movzwl -0x2(%rbp),%edi
call   1030 <outb@plt>
mov    $0x3cf,%edi
call   1040 <inb@plt>
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_gra_b>:
push   %rax
mov    $0x3ce,%esi
call   1030 <outb@plt>
mov    $0x3cf,%edi
pop    %rax
jmp    1040 <inb@plt>

LLVM IR (-O0):
define zeroext i8 @read_gra_b(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = call i32 @outb(i16 zeroext %3, i32 974)
%5 = call zeroext i8 @inb(i32 975)
ret i8 %5
}

LLVM IR (-O2):
define zeroext i8 @read_gra_b(i16 zeroext %0) {
%2 = tail call i32 @outb(i16 zeroext %0, i32 974)
%3 = tail call zeroext i8 @inb(i32 975)
ret i8 %3
}
/* Variables and functions */
int /*<<< orphan*/ HplMcs51GeneralIOC__P13__set();
void ReverseGPIOP__1__In__set(void) { HplMcs51GeneralIOC__P13__set(); }


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

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

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

LLVM IR (-O2):
define void @ReverseGPIOP__1__In__set() {
%1 = tail call i32 (...) @HplMcs51GeneralIOC__P13__set()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(int);
void benchmark(void) { foo(400); }


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

x86 assembly (clang, -O2):
<benchmark>:
mov    $0x190,%edi
jmp    1030 <foo@plt>

LLVM IR (-O0):
define void @benchmark() {
%1 = call i32 @foo(i32 400)
ret void
}

LLVM IR (-O2):
define void @benchmark() {
%1 = tail call i32 @foo(i32 400)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ grace(int);
int fn4(int i) {
  switch (i) {
  case 1:
    if (i == 5) {
      grace(1);
      goto done;
    } else
      goto done;
  case 2:;
  }
done:;
}


x86 assembly (clang, -O0):
<fn4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x1,%eax
je     1140 <fn4+0x30>
jmp    112f <fn4+0x1f>
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
je     115e <fn4+0x4e>
jmp    1163 <fn4+0x53>
cmpl   $0x5,-0x8(%rbp)
jne    1159 <fn4+0x49>
mov    $0x1,%edi
call   1030 <grace@plt>
jmp    1168 <fn4+0x58>
jmp    1168 <fn4+0x58>
jmp    1163 <fn4+0x53>
jmp    1168 <fn4+0x58>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fn4(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %12 [
i32 1, label %5
i32 2, label %11
]
5: ; preds = %1
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 5
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 @grace(i32 1)
br label %13
10: ; preds = %5
br label %13
11: ; preds = %1
br label %12
12: ; preds = %11, %1
br label %13
13: ; preds = %12, %10, %8
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @fn4(i32 %0) {
ret i32 undef
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
scalar_t__ fork();
int /*<<< orphan*/ workHard(int, int);
pid_t startWorker(void) {
  pid_t pid = fork();
  while (pid == 0) {
    workHard(50, 800);
  }
  return pid;
}


x86 assembly (clang, -O0):
<startWorker>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <fork@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1152 <startWorker+0x32>
mov    $0x32,%edi
mov    $0x320,%esi
call   1030 <workHard@plt>
jmp    1133 <startWorker+0x13>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<startWorker>:
push   %rax
xor    %eax,%eax
call   1040 <fork@plt>
test   %rax,%rax
je     112f <startWorker+0xf>
pop    %rcx
ret
mov    $0x32,%edi
mov    $0x320,%esi
call   1030 <workHard@plt>
xchg   %ax,%ax
mov    $0x32,%edi
mov    $0x320,%esi
call   1030 <workHard@plt>
jmp    1140 <startWorker+0x20>

LLVM IR (-O0):
define i64 @startWorker() {
%1 = alloca i64
%2 = call i64 (...) @fork()
store i64 %2, i64* %1
br label %3
3: ; preds = %6, %0
%4 = load i64, i64* %1
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = call i32 @workHard(i32 50, i32 800)
br label %3
8: ; preds = %3
%9 = load i64, i64* %1
ret i64 %9
}

LLVM IR (-O2):
define i64 @startWorker() {
%1 = tail call i64 (...) @fork()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i32 @workHard(i32 50, i32 800)
br label %5
5: ; preds = %5, %3
%6 = tail call i32 @workHard(i32 50, i32 800)
br label %5
7: ; preds = %0
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *prgm) {
  fprintf(stderr, "parametre manquant:\n usage:\n\t%s\n", prgm);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"parametre manquant:\0A usage:\0A\09%s\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"parametre manquant:\0A usage:\0A\09%s\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}