xunge/DecIR huggingface dataset:
void do_pushq_pos(void) {
  unsigned long long int block[3];
  __asm__ __volatile__("movq  %0, %%rdx\n\t"
                       "pushq $0x55555555\n\t"
                       "movq  %%rsp, 0(%%rdx)\n\t"
                       "pushq $0x67675656\n\t"
                       "movq  %%rsp, 8(%%rdx)\n\t"
                       "popq  %%rax\n\t"
                       "movq  %%rax,16(%%rdx)\n\t"
                       "movq  0(%%rdx),%%rsp\n\t"
                       "addq  $8, %%rsp"
                       :
                       : "r"(&block)
                       : "rax", "rdx", "cc", "memory");
  printf("  pushq_pos: delta %lld, top64 0x%016llx\n", block[0] - block[1],
         block[2]);
}


x86 assembly (clang, -O0):
<do_pushq_pos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x20(%rbp),%rcx
mov    %rcx,%rdx
push   $0x55555555
mov    %rsp,(%rdx)
push   $0x67675656
mov    %rsp,0x8(%rdx)
pop    %rax
mov    %rax,0x10(%rdx)
mov    (%rdx),%rsp
add    $0x8,%rsp
mov    -0x20(%rbp),%rsi
sub    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_pushq_pos>:
sub    $0x18,%rsp
mov    %rsp,%rcx
mov    %rcx,%rdx
push   $0x55555555
mov    %rsp,(%rdx)
push   $0x67675656
mov    %rsp,0x8(%rdx)
pop    %rax
mov    %rax,0x10(%rdx)
mov    (%rdx),%rsp
add    $0x8,%rsp
mov    (%rsp),%rsi
mov    0x10(%rsp),%rdx
sub    0x8(%rsp),%rsi
lea    0xeb4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [42 x i8] c" pushq_pos: delta %lld, top64 0x%016llx\0A\00"
define void @do_pushq_pos() {
%1 = alloca [3 x i64]
%2 = getelementptr inbounds [3 x i64], [3 x i64]* %1, i64 0, i64 0
%3 = load i64, i64* %2
%4 = getelementptr inbounds [3 x i64], [3 x i64]* %1, i64 0, i64 1
%5 = load i64, i64* %4
%6 = sub i64 %3, %5
%7 = getelementptr inbounds [3 x i64], [3 x i64]* %1, i64 0, i64 2
%8 = load i64, i64* %7
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c" pushq_pos: delta %lld, top64 0x%016llx\0A\00"
define void @do_pushq_pos() {
%1 = alloca [3 x i64]
%2 = bitcast [3 x i64]* %1 to i8*
%3 = getelementptr inbounds [3 x i64], [3 x i64]* %1, i64 0, i64 0
%4 = load i64, i64* %3
%5 = getelementptr inbounds [3 x i64], [3 x i64]* %1, i64 0, i64 1
%6 = load i64, i64* %5
%7 = sub i64 %4, %6
%8 = getelementptr inbounds [3 x i64], [3 x i64]* %1, i64 0, i64 2
%9 = load i64, i64* %8
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i64 %7, i64 %9)
ret void
}
void RandomFunc(unsigned char input[1], unsigned char output[1]) {
  unsigned char state[1];
  unsigned char local1;
  {
    state[0UL] = (input[0UL] + 51238316UL) + (unsigned char)234;
    local1 = 0UL;
    while (local1 < 1UL) {
      state[0UL] = state[local1] * state[0UL];
      local1 += 2UL;
    }
    output[0UL] = state[0UL] + 515147141UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
add    $0x30dd5ac,%rax
add    $0xea,%rax
mov    %al,-0x11(%rbp)
movb   $0x0,-0x12(%rbp)
movzbl -0x12(%rbp),%eax
cmp    $0x1,%rax
jae    1157 <RandomFunc+0x57>
movzbl -0x12(%rbp),%eax
movzbl -0x11(%rbp,%rax,1),%eax
movzbl -0x11(%rbp),%ecx
imul   %ecx,%eax
mov    %al,-0x11(%rbp)
movzbl -0x12(%rbp),%eax
add    $0x2,%rax
mov    %al,-0x12(%rbp)
jmp    1126 <RandomFunc+0x26>
movzbl -0x11(%rbp),%eax
add    $0x1eb48585,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    (%rdi),%al
add    $0x96,%al
mul    %al
add    $0x85,%al
mov    %al,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [1 x i8]
%6 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = load i8, i8* %8
%10 = zext i8 %9 to i64
%11 = add i64 %10, 51238316
%12 = add i64 %11, 234
%13 = trunc i64 %12 to i8
%14 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
store i8 %13, i8* %14
store i8 0, i8* %6
br label %15
15: ; preds = %19, %2
%16 = load i8, i8* %6
%17 = zext i8 %16 to i64
%18 = icmp ult i64 %17, 1
br i1 %18, label %19, label %35
19: ; preds = %15
%20 = load i8, i8* %6
%21 = zext i8 %20 to i64
%22 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 %21
%23 = load i8, i8* %22
%24 = zext i8 %23 to i32
%25 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = mul nsw i32 %24, %27
%29 = trunc i32 %28 to i8
%30 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
store i8 %29, i8* %30
%31 = load i8, i8* %6
%32 = zext i8 %31 to i64
%33 = add i64 %32, 2
%34 = trunc i64 %33 to i8
store i8 %34, i8* %6
br label %15
35: ; preds = %15
%36 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%37 = load i8, i8* %36
%38 = zext i8 %37 to i64
%39 = add i64 %38, 515147141
%40 = trunc i64 %39 to i8
%41 = load i8*, i8** %4
%42 = getelementptr inbounds i8, i8* %41, i64 0
store i8 %40, i8* %42
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = add i8 %3, -106
%5 = mul i8 %4, %4
%6 = add i8 %5, -123
store i8 %6, i8* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "Use: trx [-p prodid] [-v ver] [-o ofile] [-m maxlen] [-b "
                  "offs] file [-b offs] [file [file]]\n");
  exit(EXIT_FAILURE);
}


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    0x2e98(%rip),%rax
mov    (%rax),%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    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [93 x i8] c"Use: trx [-p prodid] [-v ver] [-o ofile] [-m maxlen] [-b offs] file [-b offs] [file [file]]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [93 x i8] c"Use: trx [-p prodid] [-v ver] [-o ofile] [-m maxlen] [-b offs] file [-b offs] [file [file]]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
void gtk_rc_property_parse_requisition() {}


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

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

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

LLVM IR (-O2):
define void @gtk_rc_property_parse_requisition() {
ret void
}
void install_intel_vga_int15_handler(int active_lfp, int pfit, int display,
                                     int panel_type) {}


x86 assembly (clang, -O0):
<install_intel_vga_int15_handler>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @install_intel_vga_int15_handler(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret void
}

LLVM IR (-O2):
define void @install_intel_vga_int15_handler(i32 %0, i32 %1, i32 %2, i32 %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int getpid();
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, int);
void checkW(int result) {
  if (result < 0) {
    perror("Write Error");
    printf("error dans pid %d \n", getpid());
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<checkW>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1184 <checkW+0x44>
lea    0xea4(%rip),%rdi
call   1050 <perror@plt>
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e63(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkW>:
test   %edi,%edi
js     1145 <checkW+0x5>
ret
push   %rax
lea    0xeb3(%rip),%rdi
call   1050 <perror@plt>
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xeac(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Write Error\00"
@.str.1 = [20 x i8] c"error dans pid %d \0A\00"
@EXIT_FAILURE = global i32 0
define void @checkW(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (...) @getpid()
%8 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = load i32, i32* @EXIT_FAILURE
%10 = call i32 @exit(i32 %9)
unreachable
11: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Write Error\00"
@.str.1 = [20 x i8] c"error dans pid %d \0A\00"
@EXIT_FAILURE = global i32 0
define void @checkW(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %3, label %9
3: ; preds = %1
%4 = tail call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (...) @getpid()
%6 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ Interpolate_3(int /*<<< orphan*/, int, int /*<<< orphan*/,
                                 int, int /*<<< orphan*/, int, int);
uint32_t Interp2(uint32_t c1, uint32_t c2, uint32_t c3) {
  return Interpolate_3(c1, 2, c2, 1, c3, 1, 2);
}


x86 assembly (clang, -O0):
<Interp2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%r8d
mov    $0x2,%esi
mov    $0x1,%r9d
mov    %r9d,%ecx
movl   $0x2,(%rsp)
call   1030 <Interpolate_3@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Interp2>:
push   %rax
mov    %edx,%r8d
mov    %esi,%edx
movl   $0x2,(%rsp)
mov    $0x2,%esi
mov    $0x1,%ecx
mov    $0x1,%r9d
call   1030 <Interpolate_3@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @Interp2(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @Interpolate_3(i32 %0, i32 2, i32 %1, i32 1, i32 %2, i32 1, i32 2)
ret i32 %4
}
void caller_2_1_1_2_2_2_2() {}


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

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

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

LLVM IR (-O2):
define void @caller_2_1_1_2_2_2_2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ read(int /*<<< orphan*/, char *, int);
void read_byte(char *buf) { read(0, buf, 1); }


x86 assembly (clang, -O0):
<read_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1030 <read@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_byte>:
mov    %rdi,%rsi
xor    %edi,%edi
mov    $0x1,%edx
jmp    1030 <read@plt>

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

LLVM IR (-O2):
define void @read_byte(i8* nocapture %0) {
%2 = tail call i32 @read(i32 0, i8* %0, i32 1)
ret void
}
/* Variables and functions */
unsigned int executeHandleMessage(void *, char *, int);
unsigned int assertFact(void *handle, char *message) {
  return executeHandleMessage(handle, message, 1);
}


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

x86 assembly (clang, -O2):
<assertFact>:
mov    $0x1,%edx
jmp    1030 <executeHandleMessage@plt>

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

LLVM IR (-O2):
define i32 @assertFact(i8* %0, i8* %1) {
%3 = tail call i32 @executeHandleMessage(i8* %0, i8* %1, i32 1)
ret i32 %3
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int sweep_get_number_of_parameters(int *n) {
  int fail, *b;
  double *c;
  fail = _ada_use_c2phc(614, n, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<sweep_get_number_of_parameters>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x266,%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):
<sweep_get_number_of_parameters>:
mov    %rdi,%rsi
mov    $0x266,%edi
jmp    1030 <_ada_use_c2phc@plt>

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

LLVM IR (-O2):
define i32 @sweep_get_number_of_parameters(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc(i32 614, i32* %0, i32* undef, double* undef)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_wifidirect_cfg_discovery_period_usage(void) {
  printf("Usage : wifidirect_cfg_discovery_period [<MinDiscPeriod> "
         "<MaxDiscPeriod>]\n");
  printf(
      "For 'Set' both MinDiscPeriod and MaxDiscPeriod should be specified.\n");
  printf("If no parameter is given, 'get' is performed.\n");
  return;
}


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

x86 assembly (clang, -O2):
<print_wifidirect_cfg_discovery_period_usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf26(%rip),%rdi
call   1030 <puts@plt>
lea    0xf5e(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [75 x i8] c"Usage : wifidirect_cfg_discovery_period [<MinDiscPeriod> <MaxDiscPeriod>]\0A\00"
@.str.1 = [69 x i8] c"For 'Set' both MinDiscPeriod and MaxDiscPeriod should be specified.\0A\00"
@.str.2 = [47 x i8] c"If no parameter is given, 'get' is performed.\0A\00"
define void @print_wifidirect_cfg_discovery_period_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [74 x i8] c"Usage : wifidirect_cfg_discovery_period [<MinDiscPeriod> <MaxDiscPeriod>]\00"
@str.3 = [68 x i8] c"For 'Set' both MinDiscPeriod and MaxDiscPeriod should be specified.\00"
@str.4 = [46 x i8] c"If no parameter is given, 'get' is performed.\00"
define void @print_wifidirect_cfg_discovery_period_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double);
double q_sqrt(double);
double sqrt(double);
int main() {
  double num = 345;
  printf("%f    %f", 1.0 / sqrt(num), q_sqrt(num));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xe9f(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <q_sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
call   1040 <q_sqrt@plt>
movaps %xmm0,%xmm1
lea    0xed8(%rip),%rdi
movsd  0xec8(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%f %f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
store double 3.450000e+02, double* %2
%3 = load double, double* %2
%4 = call double @sqrt(double %3)
%5 = fdiv double 1.000000e+00, %4
%6 = load double, double* %2
%7 = call double @q_sqrt(double %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double %5, double %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%f %f\00"
define i32 @main() {
%1 = tail call double @q_sqrt(double 3.450000e+02)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double 0x3FAB90ADE46B6C2A, double %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ led_set(int);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ syntax_error();
void cmd_led(char *args) {
  if (strcmp("on", args) == 0) {
    led_set(1);
  } else if (strcmp("off", args) == 0) {
    led_set(0);
  } else {
    syntax_error();
  }
}


x86 assembly (clang, -O0):
<cmd_led>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1165 <cmd_led+0x35>
mov    $0x1,%edi
call   1050 <led_set@plt>
jmp    1197 <cmd_led+0x67>
mov    -0x8(%rbp),%rsi
lea    0xe93(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    118b <cmd_led+0x5b>
xor    %edi,%edi
call   1050 <led_set@plt>
jmp    1192 <cmd_led+0x62>
mov    $0x0,%al
call   1040 <syntax_error@plt>
jmp    1197 <cmd_led+0x67>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_led>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1164 <cmd_led+0x34>
lea    0xeb4(%rip),%rdi
mov    %rbx,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     116f <cmd_led+0x3f>
xor    %eax,%eax
pop    %rbx
jmp    1040 <syntax_error@plt>
mov    $0x1,%edi
pop    %rbx
jmp    1050 <led_set@plt>
xor    %edi,%edi
pop    %rbx
jmp    1050 <led_set@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"on\00"
@.str.1 = [4 x i8] c"off\00"
define void @cmd_led(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @led_set(i32 1)
br label %17
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = call i32 @led_set(i32 0)
br label %16
14: ; preds = %8
%15 = call i32 (...) @syntax_error()
br label %16
16: ; preds = %14, %12
br label %17
17: ; preds = %16, %6
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"on\00"
@.str.1 = [4 x i8] c"off\00"
define void @cmd_led(i8* %0) {
%2 = tail call i64 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @led_set(i32 1)
br label %13
6: ; preds = %1
%7 = tail call i64 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = tail call i32 @led_set(i32 0)
br label %13
11: ; preds = %6
%12 = tail call i32 (...) @syntax_error()
br label %13
13: ; preds = %9, %11, %4
ret void
}
int main(int argc, char *argv[]) {
  (void)argc;
  (void)argv;
  return 0;
}


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

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

LLVM IR (-O0):
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 = load i8**, i8*** %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
int ToYear(int Year) {
  if (Year < 0)
    Year = -Year;
  if (Year < 69)
    Year += 2000;
  else if (Year < 100)
    Year += 1900;
  return Year;
}


x86 assembly (clang, -O0):
<ToYear>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1119 <ToYear+0x19>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x45,-0x4(%rbp)
jge    1133 <ToYear+0x33>
mov    -0x4(%rbp),%eax
add    $0x7d0,%eax
mov    %eax,-0x4(%rbp)
jmp    114d <ToYear+0x4d>
cmpl   $0x64,-0x4(%rbp)
jge    1148 <ToYear+0x48>
mov    -0x4(%rbp),%eax
add    $0x76c,%eax
mov    %eax,-0x4(%rbp)
jmp    114d <ToYear+0x4d>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ToYear>:
mov    %edi,%ecx
neg    %ecx
cmovs  %edi,%ecx
lea    0x76c(%rcx),%eax
cmp    $0x64,%ecx
cmovae %ecx,%eax
lea    0x7d0(%rcx),%edx
cmp    $0x45,%ecx
cmovb  %edx,%eax
ret

LLVM IR (-O0):
define i32 @ToYear(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = sub nsw i32 0, %6
store i32 %7, i32* %2
br label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp slt i32 %9, 69
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 2000
store i32 %13, i32* %2
br label %21
14: ; preds = %8
%15 = load i32, i32* %2
%16 = icmp slt i32 %15, 100
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 1900
store i32 %19, i32* %2
br label %20
20: ; preds = %17, %14
br label %21
21: ; preds = %20, %11
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @ToYear(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%3 = icmp ult i32 %2, 69
%4 = add nuw nsw i32 %2, 2000
%5 = icmp ult i32 %2, 100
%6 = add nuw nsw i32 %2, 1900
%7 = select i1 %5, i32 %6, i32 %2
%8 = select i1 %3, i32 %4, i32 %7
ret i32 %8
}
/* Variables and functions */
void *mem_sbrk(int);
void *mm_malloc(size_t size) {
  int newsize =
      (((size + ((((sizeof(size_t)) + (8 - 1)) & ~0x7))) + (8 - 1)) & ~0x7);
  void *p = mem_sbrk(newsize);
  if (p == (void *)-1)
    return NULL;
  else {
    *(size_t *)p = size;
    return (void *)((char *)p + ((((sizeof(size_t)) + (8 - 1)) & ~0x7)));
  }
}


x86 assembly (clang, -O0):
<mm_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
add    $0x7,%rax
and    $0xfffffffffffffff8,%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <mem_sbrk@plt>
mov    %rax,-0x20(%rbp)
mov    $0xffffffffffffffff,%rax
cmp    %rax,-0x20(%rbp)
jne    1159 <mm_malloc+0x49>
movq   $0x0,-0x8(%rbp)
jmp    1170 <mm_malloc+0x60>
mov    -0x10(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mm_malloc>:
push   %rbx
mov    %rdi,%rbx
add    $0xf,%edi
and    $0xfffffff8,%edi
call   1030 <mem_sbrk@plt>
cmp    $0xffffffffffffffff,%rax
je     112e <mm_malloc+0x1e>
mov    %rbx,(%rax)
add    $0x8,%rax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @mm_malloc(i64 %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i32
%5 = alloca i8*
store i64 %0, i64* %3
%6 = load i64, i64* %3
%7 = add i64 %6, 8
%8 = add i64 %7, 7
%9 = and i64 %8, -8
%10 = trunc i64 %9 to i32
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = call i8* @mem_sbrk(i32 %11)
store i8* %12, i8** %5
%13 = load i8*, i8** %5
%14 = icmp eq i8* %13, inttoptr (i64 -1 to i8*)
br i1 %14, label %15, label %16
15: ; preds = %1
store i8* null, i8** %2
br label %22
16: ; preds = %1
%17 = load i64, i64* %3
%18 = load i8*, i8** %5
%19 = bitcast i8* %18 to i64*
store i64 %17, i64* %19
%20 = load i8*, i8** %5
%21 = getelementptr inbounds i8, i8* %20, i64 8
store i8* %21, i8** %2
br label %22
22: ; preds = %16, %15
%23 = load i8*, i8** %2
ret i8* %23
}

LLVM IR (-O2):
define i8* @mm_malloc(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = add i32 %2, 15
%4 = and i32 %3, -8
%5 = tail call i8* @mem_sbrk(i32 %4)
%6 = icmp eq i8* %5, inttoptr (i64 -1 to i8*)
br i1 %6, label %10, label %7
7: ; preds = %1
%8 = bitcast i8* %5 to i64*
store i64 %0, i64* %8
%9 = getelementptr inbounds i8, i8* %5, i64 8
br label %10
10: ; preds = %1, %7
%11 = phi i8* [ %9, %7 ], [ null, %1 ]
ret i8* %11
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void hoof_hook_free(void *ptr) { free(ptr); }


x86 assembly (clang, -O0):
<hoof_hook_free>:
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):
<hoof_hook_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @hoof_hook_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int EOF;
int getchar();
int helper(int i, int lim) {
  extern int c;
  if (i < lim - 1)
    if ((c = getchar()) != EOF)
      if (c != '\n')
        return c;
  return 0;
}


x86 assembly (clang, -O0):
<helper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1179 <helper+0x69>
mov    $0x0,%al
call   1030 <getchar@plt>
mov    0x2eab(%rip),%rcx
mov    %eax,(%rcx)
mov    0x2e9a(%rip),%rcx
cmp    (%rcx),%eax
je     1174 <helper+0x64>
mov    0x2e93(%rip),%rax
cmpl   $0xa,(%rax)
je     116f <helper+0x5f>
mov    0x2e83(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1180 <helper+0x70>
jmp    1174 <helper+0x64>
jmp    1179 <helper+0x69>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<helper>:
push   %rax
add    $0xffffffff,%esi
cmp    %edi,%esi
jle    113a <helper+0x2a>
xor    %eax,%eax
call   1030 <getchar@plt>
mov    0x2ec2(%rip),%rcx
mov    %eax,(%rcx)
cmp    $0xa,%eax
je     113a <helper+0x2a>
mov    0x2eac(%rip),%rcx
cmp    (%rcx),%eax
je     113a <helper+0x2a>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@c = external global i32
@EOF = global i32 0
define i32 @helper(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = sub nsw i32 %7, 1
%9 = icmp slt i32 %6, %8
br i1 %9, label %10, label %21
10: ; preds = %2
%11 = call i32 (...) @getchar()
store i32 %11, i32* @c
%12 = load i32, i32* @EOF
%13 = icmp ne i32 %11, %12
br i1 %13, label %14, label %20
14: ; preds = %10
%15 = load i32, i32* @c
%16 = icmp ne i32 %15, 10
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = load i32, i32* @c
store i32 %18, i32* %3
br label %22
19: ; preds = %14
br label %20
20: ; preds = %19, %10
br label %21
21: ; preds = %20, %2
store i32 0, i32* %3
br label %22
22: ; preds = %21, %17
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
@c = external global i32
@EOF = global i32 0
define i32 @helper(i32 %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = icmp sgt i32 %3, %0
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = tail call i32 (...) @getchar()
store i32 %6, i32* @c
%7 = load i32, i32* @EOF
%8 = icmp ne i32 %6, %7
%9 = icmp ne i32 %6, 10
%10 = and i1 %9, %8
br i1 %10, label %12, label %11
11: ; preds = %5, %2
br label %12
12: ; preds = %5, %11
%13 = phi i32 [ 0, %11 ], [ %6, %5 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ SendInterrupt(int, int, int, int);
void ScuSendSoundRequest(void) { SendInterrupt(0x46, 0x9, 0x0040, 0x00000040); }


x86 assembly (clang, -O0):
<ScuSendSoundRequest>:
push   %rbp
mov    %rsp,%rbp
mov    $0x46,%edi
mov    $0x9,%esi
mov    $0x40,%ecx
mov    %ecx,%edx
call   1030 <SendInterrupt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ScuSendSoundRequest>:
mov    $0x46,%edi
mov    $0x9,%esi
mov    $0x40,%edx
mov    $0x40,%ecx
jmp    1030 <SendInterrupt@plt>

LLVM IR (-O0):
define void @ScuSendSoundRequest() {
%1 = call i32 @SendInterrupt(i32 70, i32 9, i32 64, i32 64)
ret void
}

LLVM IR (-O2):
define void @ScuSendSoundRequest() {
%1 = tail call i32 @SendInterrupt(i32 70, i32 9, i32 64, i32 64)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ GETVAL;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int semctl(int, int, int /*<<< orphan*/, int /*<<< orphan*/);
int sem_inspect(int semidgroup, int donut_type) {
  int sem_value;
  if ((sem_value = semctl(semidgroup, donut_type, GETVAL, 0)) == -1) {
    perror("semctl: GETVAL");
    exit(EXIT_FAILURE);
  }
  return sem_value;
}


x86 assembly (clang, -O0):
<sem_inspect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    0x2e8d(%rip),%rax
mov    (%rax),%edx
xor    %ecx,%ecx
call   1040 <semctl@plt>
mov    %eax,-0xc(%rbp)
cmp    $0xffffffff,%eax
jne    117a <sem_inspect+0x4a>
lea    0xe99(%rip),%rdi
call   1030 <perror@plt>
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sem_inspect>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%edx
xor    %ecx,%ecx
call   1040 <semctl@plt>
cmp    $0xffffffff,%eax
je     1148 <sem_inspect+0x18>
pop    %rcx
ret
lea    0xeb1(%rip),%rdi
call   1030 <perror@plt>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@GETVAL = global i32 0
@.str = [15 x i8] c"semctl: GETVAL\00"
@EXIT_FAILURE = global i32 0
define i32 @sem_inspect(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* %3
%7 = load i32, i32* %4
%8 = load i32, i32* @GETVAL
%9 = call i32 @semctl(i32 %6, i32 %7, i32 %8, i32 0)
store i32 %9, i32* %5
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%13 = load i32, i32* @EXIT_FAILURE
%14 = call i32 @exit(i32 %13)
unreachable
15: ; preds = %2
%16 = load i32, i32* %5
ret i32 %16
}

LLVM IR (-O2):
@GETVAL = global i32 0
@.str = [15 x i8] c"semctl: GETVAL\00"
@EXIT_FAILURE = global i32 0
define i32 @sem_inspect(i32 %0, i32 %1) {
%3 = load i32, i32* @GETVAL
%4 = tail call i32 @semctl(i32 %0, i32 %1, i32 %3, i32 0)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = tail call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
10: ; preds = %2
ret i32 %4
}
int min(int x, int y) { return x < y ? x : y; }


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

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

LLVM IR (-O0):
define i32 @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 @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 highestOneBit(int);
int safePosition(int n) { return 2 * (n - highestOneBit(n)) + 1; }


x86 assembly (clang, -O0):
<safePosition>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <highestOneBit@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
sub    %ecx,%eax
shl    $0x1,%eax
add    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safePosition>:
push   %rbx
mov    %edi,%ebx
call   1030 <highestOneBit@plt>
sub    %eax,%ebx
lea    (%rbx,%rbx,1),%eax
add    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @safePosition(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @highestOneBit(i32 %4)
%6 = sub nsw i32 %3, %5
%7 = mul nsw i32 2, %6
%8 = add nsw i32 %7, 1
ret i32 %8
}

LLVM IR (-O2):
define i32 @safePosition(i32 %0) {
%2 = tail call i32 @highestOneBit(i32 %0)
%3 = sub nsw i32 %0, %2
%4 = shl nsw i32 %3, 1
%5 = or i32 %4, 1
ret i32 %5
}
/* Variables and functions */
char *strcpy(char *, char *);
int strlen(char *);
char *xmalloc(int);
char *xstrdup(char *s) {
  int l = strlen(s);
  char *p = xmalloc(l + 1);
  return strcpy(p, s);
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   1050 <xmalloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
call   1050 <xmalloc@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 1
%9 = call i8* @xmalloc(i32 %8)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = load i8*, i8** %2
%12 = call i8* @strcpy(i8* %10, i8* %11)
ret i8* %12
}

LLVM IR (-O2):
define i8* @xstrdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i8* @xmalloc(i32 %3)
%5 = tail call i8* @strcpy(i8* dereferenceable(1) %4, i8* dereferenceable(1) %0)
ret i8* %4
}
void gdk_window_unstick() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_unstick() {
ret void
}
/* Variables and functions */
int strcasecmp(char const *, char const *);
int iks_strcasecmp(const char *a, const char *b) {
  if (!a || !b)
    return -1;
  return strcasecmp(a, b);
}


x86 assembly (clang, -O0):
<iks_strcasecmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1136 <iks_strcasecmp+0x26>
cmpq   $0x0,-0x18(%rbp)
jne    1142 <iks_strcasecmp+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    1152 <iks_strcasecmp+0x42>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcasecmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iks_strcasecmp>:
test   %rdi,%rdi
je     111f <iks_strcasecmp+0xf>
test   %rsi,%rsi
je     111f <iks_strcasecmp+0xf>
jmp    1030 <strcasecmp@plt>
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @iks_strcasecmp(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @strcasecmp(i8* %0, i8* %1)
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ -1, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalnum(int);
void t_isalnum_0x58() {
  Assert_real((isalnum(88)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              445, ("isalnum should be 1 for X"));
}


x86 assembly (clang, -O0):
<t_isalnum_0x58>:
push   %rbp
mov    %rsp,%rbp
mov    $0x58,%edi
call   1030 <isalnum@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x1bd,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalnum_0x58>:
push   %rax
mov    $0x58,%edi
call   1030 <isalnum@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x1bd,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for X\00"
define void @t_isalnum_0x58() {
%1 = call i32 @isalnum(i32 88)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 445, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for X\00"
define void @t_isalnum_0x58() {
%1 = tail call i32 @isalnum(i32 88)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 445, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void laptop_sync_completion(void) {}


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

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

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

LLVM IR (-O2):
define void @laptop_sync_completion() {
ret void
}
int test_imm_98int64_lowword_reg(long long val) {
  return ((val) & (0x98 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_98int64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0x98,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_98int64_lowword_reg>:
test   $0x98,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_98int64_lowword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 152
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -20, i32 -40
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_imm_98int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 152
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t bits(uint32_t value, uint8_t start, uint8_t end) {
  return ((((value) << (31 - start)) >> (31 - (start - end))));
}


x86 assembly (clang, -O0):
<bits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x1f,%ecx
sub    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x8(%rbp),%edx
sub    -0xc(%rbp),%edx
mov    $0x1f,%ecx
sub    %edx,%ecx
sar    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bits>:
mov    %edi,%eax
mov    $0x1f,%ecx
sub    %esi,%ecx
shl    %cl,%eax
add    %edx,%ecx
sar    %cl,%eax
ret

LLVM IR (-O0):
define i32 @bits(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = sub nsw i32 31, %8
%10 = shl i32 %7, %9
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = sub nsw i32 %11, %12
%14 = sub nsw i32 31, %13
%15 = ashr i32 %10, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @bits(i32 %0, i32 %1, i32 %2) {
%4 = sub i32 31, %1
%5 = shl i32 %0, %4
%6 = add i32 %4, %2
%7 = ashr i32 %5, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ ft_param_to_tab(int, char **);
int main(int ac, char **av) {
  ft_param_to_tab(ac, av);
  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)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <ft_param_to_tab@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
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 = load i8**, i8*** %5
%8 = call i32 @ft_param_to_tab(i32 %6, i8** %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @ft_param_to_tab(i32 %0, i8** %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int g(void) {
  puts("G");
  return 1;
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [2 x i8] c"G\00"
define i32 @g() {
%1 = call i32 @puts(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [2 x i8] c"G\00"
define i32 @g() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ prg_exit(int /*<<< orphan*/);
void sigterm_handler() { prg_exit(0); }


x86 assembly (clang, -O0):
<sigterm_handler>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <prg_exit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigterm_handler>:
xor    %edi,%edi
jmp    1030 <prg_exit@plt>

LLVM IR (-O0):
define void @sigterm_handler() {
%1 = call i32 @prg_exit(i32 0)
ret void
}

LLVM IR (-O2):
define void @sigterm_handler() {
%1 = tail call i32 @prg_exit(i32 0)
ret void
}
unsigned lq2x_generic_output_fmts(unsigned input_fmts) { return input_fmts; }


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

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

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

LLVM IR (-O2):
define i32 @lq2x_generic_output_fmts(i32 returned %0) {
ret i32 %0
}
char *endStr(char *s) {
  while (*s) {
    s++;
  }
  return s;
}


x86 assembly (clang, -O0):
<endStr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1126 <endStr+0x26>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <endStr+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<endStr>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rax)
lea    0x1(%rax),%rax
jne    1110 <endStr+0x10>
ret

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

LLVM IR (-O2):
define i8* @endStr(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ b(int);
int /*<<< orphan*/ printf(char *, int);
void l(int x) {
  printf("l(%d)\n", x);
  if (x >= 2)
    b(x + 2);
}


x86 assembly (clang, -O0):
<l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x2,-0x4(%rbp)
jl     114f <l+0x2f>
mov    -0x4(%rbp),%edi
add    $0x2,%edi
call   1030 <b@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<l>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
cmp    $0x2,%ebx
jl     1141 <l+0x21>
add    $0x2,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <b@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"l(%d)\0A\00"
define void @l(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %2
%6 = icmp sge i32 %5, 2
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 2
%10 = call i32 @b(i32 %9)
br label %11
11: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"l(%d)\0A\00"
define void @l(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = add nuw nsw i32 %0, 2
%6 = tail call i32 @b(i32 %5)
br label %7
7: ; preds = %4, %1
ret void
}