xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ islower(int);
char toupper(int);
void upcase(char *argument) {
  register int c;
  while ((c = *argument) != 0) {
    if (islower(c)) {
      *argument = toupper(c);
    }
    argument++;
  }
}


x86 assembly (clang, -O0):
<upcase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     1172 <upcase+0x52>
mov    -0xc(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     1161 <upcase+0x41>
mov    -0xc(%rbp),%edi
call   1040 <toupper@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112c <upcase+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<upcase>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     1166 <upcase+0x46>
mov    %rdi,%rbx
add    $0x1,%rbx
jmp    114b <upcase+0x2b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     1166 <upcase+0x46>
movsbl %al,%ebp
mov    %ebp,%edi
call   1030 <islower@plt>
test   %rax,%rax
je     1140 <upcase+0x20>
mov    %ebp,%edi
call   1040 <toupper@plt>
mov    %al,-0x1(%rbx)
jmp    1140 <upcase+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @upcase(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
br label %4
4: ; preds = %17, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
store i32 %7, i32* %3
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %20
9: ; preds = %4
%10 = load i32, i32* %3
%11 = call i64 @islower(i32 %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %9
%14 = load i32, i32* %3
%15 = call signext i8 @toupper(i32 %14)
%16 = load i8*, i8** %2
store i8 %15, i8* %16
br label %17
17: ; preds = %13, %9
%18 = load i8*, i8** %2
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %2
br label %4
20: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @upcase(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %12
%5 = phi i8 [ %14, %12 ], [ %2, %1 ]
%6 = phi i8* [ %13, %12 ], [ %0, %1 ]
%7 = sext i8 %5 to i32
%8 = tail call i64 @islower(i32 %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %4
%11 = tail call signext i8 @toupper(i32 %7)
store i8 %11, i8* %6
br label %12
12: ; preds = %10, %4
%13 = getelementptr inbounds i8, i8* %6, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %4
16: ; preds = %12, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int dll_ferror(int /*<<< orphan*/ *);
int __wrap_ferror(FILE *stream) { return dll_ferror(stream); }


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

x86 assembly (clang, -O2):
<__wrap_ferror>:
jmp    1030 <dll_ferror@plt>

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

LLVM IR (-O2):
define i32 @__wrap_ferror(i32* %0) {
%2 = tail call i32 @dll_ferror(i32* %0)
ret i32 %2
}
double mul(double a, double b) { return a * b; }


x86 assembly (clang, -O0):
<mul>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mul>:
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @mul(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fmul double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @mul(double %0, double %1) {
%3 = fmul double %0, %1
ret double %3
}
void ptrace_sandbox_permit_shutdown(struct pt_sandbox *p_sandbox) {
  (void)p_sandbox;
}


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

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

LLVM IR (-O0):
%struct.pt_sandbox = type opaque
define void @ptrace_sandbox_permit_shutdown(%struct.pt_sandbox* %0) {
%2 = alloca %struct.pt_sandbox*
store %struct.pt_sandbox* %0, %struct.pt_sandbox** %2
%3 = load %struct.pt_sandbox*, %struct.pt_sandbox** %2
ret void
}

LLVM IR (-O2):
%struct.pt_sandbox = type opaque
define void @ptrace_sandbox_permit_shutdown(%struct.pt_sandbox* nocapture %0) {
ret void
}
void EVP_CIPHER_get_asn1_iv(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_CIPHER_get_asn1_iv() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ kputs(char *);
void command_help(void) {
  kputs("Command List\n"
        " \"help\"\n"
        " \"load\"\n"
        " \"loadrom\"\n"
        " \"run [addr]\"\n"
        " \"hexdump <addr> <size>\"\n"
        " \"regdump\"\n"
        "\n"
        "AUTO-RUN Function\n"
        " P22=High --> run extkernel in rom\n"
        "\n");
}


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

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

LLVM IR (-O0):
@.str = [146 x i8] c"Command List\0A \22help\22\0A \22load\22\0A \22loadrom\22\0A \22run [addr]\22\0A \22hexdump <addr> <size>\22\0A \22regdump\22\0A\0AAUTO-RUN Function\0A P22=High --> run extkernel in rom\0A\0A\00"
define void @command_help() {
%1 = call i32 @kputs(i8* getelementptr inbounds ([146 x i8], [146 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [146 x i8] c"Command List\0A \22help\22\0A \22load\22\0A \22loadrom\22\0A \22run [addr]\22\0A \22hexdump <addr> <size>\22\0A \22regdump\22\0A\0AAUTO-RUN Function\0A P22=High --> run extkernel in rom\0A\0A\00"
define void @command_help() {
%1 = tail call i32 @kputs(i8* getelementptr inbounds ([146 x i8], [146 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct table_entry {
  int dummy;
};
struct table_col {
  int dummy;
};

/* Variables and functions */
int l_unit_raw_div(struct table_col *, struct table_entry *, int, char *);
int l_unit_s(struct table_col *col, struct table_entry *e) {
  return l_unit_raw_div(col, e, 1000000, "%.2lf");
}


x86 assembly (clang, -O0):
<l_unit_s>:
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    $0xf4240,%edx
lea    0xecc(%rip),%rcx
call   1030 <l_unit_raw_div@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<l_unit_s>:
lea    0xee9(%rip),%rcx
mov    $0xf4240,%edx
jmp    1030 <l_unit_raw_div@plt>

LLVM IR (-O0):
%struct.table_col = type { i32 }
%struct.table_entry = type { i32 }
@.str = [6 x i8] c"%.2lf\00"
define i32 @l_unit_s(%struct.table_col* %0, %struct.table_entry* %1) {
%3 = alloca %struct.table_col*
%4 = alloca %struct.table_entry*
store %struct.table_col* %0, %struct.table_col** %3
store %struct.table_entry* %1, %struct.table_entry** %4
%5 = load %struct.table_col*, %struct.table_col** %3
%6 = load %struct.table_entry*, %struct.table_entry** %4
%7 = call i32 @l_unit_raw_div(%struct.table_col* %5, %struct.table_entry* %6, i32 1000000, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 %7
}

LLVM IR (-O2):
%struct.table_col = type { i32 }
%struct.table_entry = type { i32 }
@.str = [6 x i8] c"%.2lf\00"
define i32 @l_unit_s(%struct.table_col* %0, %struct.table_entry* %1) {
%3 = tail call i32 @l_unit_raw_div(%struct.table_col* %0, %struct.table_entry* %1, i32 1000000, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 %3
}
void function_void(void) { return; }


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

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

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

LLVM IR (-O2):
define void @function_void() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("* * * * * * * *\n * * * * * * * *\n* * * * * * * *\n");
  printf(" * * * * * * * *\n* * * * * * * *\n * * * * * * * *\n");
  printf("* * * * * * * *\n * * * * * * * *\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [49 x i8] c"* * * * * * * *\0A * * * * * * * *\0A* * * * * * * *\00"
@str.3 = [50 x i8] c" * * * * * * * *\0A* * * * * * * *\0A * * * * * * * *\00"
@str.4 = [33 x i8] c"* * * * * * * *\0A * * * * * * * *\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.4, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int off_t;

/* Variables and functions */
int /*<<< orphan*/ _exit(int);
off_t _lseek(int fd, off_t offset, int whence) {
  _exit(-1);
  return -1;
}


x86 assembly (clang, -O0):
<_lseek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<_lseek>:
push   %rax
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define i32 @_lseek(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 = call i32 @_exit(i32 -1)
unreachable
}

LLVM IR (-O2):
define i32 @_lseek(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @_exit(i32 -1)
unreachable
}
int main(int x) {
  int c, y;
  if (c)
    x = 2;
  y = x + 1;
  return y;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     111f <main+0x1f>
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0x1(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
long time0();
long oztime(void) {
  static unsigned long t0;
  t0 = time0();
  if (t0 != time0())
    return time0();
  else
    return t0;
}


x86 assembly (clang, -O0):
<oztime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <time0@plt>
mov    %rax,0x2f0a(%rip)
mov    0x2f03(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <time0@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     1158 <oztime+0x48>
mov    $0x0,%al
call   1030 <time0@plt>
mov    %rax,-0x8(%rbp)
jmp    1163 <oztime+0x53>
mov    0x2ed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<oztime>:
push   %rbx
xor    %eax,%eax
call   1030 <time0@plt>
mov    %rax,%rbx
mov    %rax,0x2f0e(%rip)
xor    %eax,%eax
call   1030 <time0@plt>
cmp    %rax,%rbx
jne    1137 <oztime+0x27>
mov    0x2efb(%rip),%rax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
jmp    1030 <time0@plt>

LLVM IR (-O0):
@oztime.t0 = internal global i64 0
define i64 @oztime() {
%1 = alloca i64
%2 = call i64 (...) @time0()
store i64 %2, i64* @oztime.t0
%3 = load i64, i64* @oztime.t0
%4 = call i64 (...) @time0()
%5 = icmp ne i64 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i64 (...) @time0()
store i64 %7, i64* %1
br label %10
8: ; preds = %0
%9 = load i64, i64* @oztime.t0
store i64 %9, i64* %1
br label %10
10: ; preds = %8, %6
%11 = load i64, i64* %1
ret i64 %11
}

LLVM IR (-O2):
@oztime.t0 = internal unnamed_addr global i64 0
define i64 @oztime() {
%1 = tail call i64 (...) @time0()
store i64 %1, i64* @oztime.t0
%2 = tail call i64 (...) @time0()
%3 = icmp eq i64 %1, %2
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i64 (...) @time0()
br label %8
6: ; preds = %0
%7 = load i64, i64* @oztime.t0
br label %8
8: ; preds = %6, %4
%9 = phi i64 [ %5, %4 ], [ %7, %6 ]
ret i64 %9
}
int format_argument_count(const char *fmt) {
  int n = 0;
  const char *ch = fmt;
  while (*ch) {
    if (ch[0] == '%' && ch[1] != '%') {
      n++;
    }
    ch++;
  }
  return n;
}


x86 assembly (clang, -O0):
<format_argument_count>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     115f <format_argument_count+0x5f>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x25,%eax
jne    114e <format_argument_count+0x4e>
mov    -0x18(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x25,%eax
je     114e <format_argument_count+0x4e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1117 <format_argument_count+0x17>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<format_argument_count>:
add    $0x1,%rdi
xor    %eax,%eax
jmp    111e <format_argument_count+0x1e>
nopl   0x0(%rax,%rax,1)
xor    %ecx,%ecx
cmpb   $0x25,(%rdi)
setne  %cl
add    %ecx,%eax
add    $0x1,%rdi
movzbl -0x1(%rdi),%ecx
cmp    $0x25,%cl
je     1110 <format_argument_count+0x10>
test   %cl,%cl
jne    111a <format_argument_count+0x1a>
ret

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

LLVM IR (-O2):
define i32 @format_argument_count(i8* nocapture %0) {
br label %2
2: ; preds = %12, %1
%3 = phi i32 [ 0, %1 ], [ %13, %12 ]
%4 = phi i8* [ %0, %1 ], [ %14, %12 ]
%5 = load i8, i8* %4
switch i8 %5, label %12 [
i8 0, label %15
i8 37, label %6
]
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %4, i64 1
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 37
%10 = zext i1 %9 to i32
%11 = add nsw i32 %3, %10
br label %12
12: ; preds = %6, %2
%13 = phi i32 [ %3, %2 ], [ %11, %6 ]
%14 = getelementptr inbounds i8, i8* %4, i64 1
br label %2
15: ; preds = %2
ret i32 %3
}
void swi_handler() {}


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

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

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

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

/* Variables and functions */
scalar_t__ time(int /*<<< orphan*/);
void delay(unsigned int secs) {
  time_t retTime = time(0) + secs;
  while (time(0) < retTime)
    ;
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1030 <time@plt>
mov    -0x4(%rbp),%ecx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
xor    %edi,%edi
call   1030 <time@plt>
cmp    -0x10(%rbp),%rax
jge    1142 <delay+0x32>
jmp    112c <delay+0x1c>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
call   1030 <time@plt>
mov    %ebx,%ebx
add    %rax,%rbx
nop
xor    %edi,%edi
call   1030 <time@plt>
cmp    %rbx,%rax
jl     1120 <delay+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @delay(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
%4 = call i64 @time(i32 0)
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = add nsw i64 %4, %6
store i64 %7, i64* %3
br label %8
8: ; preds = %12, %1
%9 = call i64 @time(i32 0)
%10 = load i64, i64* %3
%11 = icmp slt i64 %9, %10
br i1 %11, label %12, label %13
12: ; preds = %8
br label %8
13: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @delay(i32 %0) {
%2 = tail call i64 @time(i32 0)
%3 = zext i32 %0 to i64
%4 = add nsw i64 %2, %3
br label %5
5: ; preds = %5, %1
%6 = tail call i64 @time(i32 0)
%7 = icmp slt i64 %6, %4
br i1 %7, label %5, label %8
8: ; preds = %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, unsigned long);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *NEditMalloc(size_t size) {
  void *ptr = malloc(size);
  if (!ptr) {
    fprintf(stderr, "NEditMalloc(%lu) failed\n", (unsigned long)size);
    exit(1);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<NEditMalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1177 <NEditMalloc+0x47>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe98(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NEditMalloc>:
push   %rbx
mov    %rdi,%rbx
call   1040 <malloc@plt>
test   %rax,%rax
je     1140 <NEditMalloc+0x10>
pop    %rbx
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"NEditMalloc(%lu) failed\0A\00"
define i8* @NEditMalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %13, label %8
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = load i64, i64* %2
%11 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i64 %10)
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %1
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"NEditMalloc(%lu) failed\0A\00"
define noalias i8* @NEditMalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i64 %0)
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
long fseek(int /*<<< orphan*/ *, long, int);
long lseek(int fd, long offset, int whence) {
  return fseek((FILE *)fd, offset, whence);
}


x86 assembly (clang, -O0):
<lseek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movslq -0x4(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <fseek@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lseek>:
movslq %edi,%rdi
jmp    1030 <fseek@plt>

LLVM IR (-O0):
define i64 @lseek(i32 %0, i64 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = load i64, i64* %5
%11 = load i32, i32* %6
%12 = call i64 @fseek(i32* %9, i64 %10, i32 %11)
ret i64 %12
}

LLVM IR (-O2):
define i64 @lseek(i32 %0, i64 %1, i32 %2) {
%4 = sext i32 %0 to i64
%5 = inttoptr i64 %4 to i32*
%6 = tail call i64 @fseek(i32* %5, i64 %1, i32 %2)
ret i64 %6
}
/* Variables and functions */
scalar_t__ s_size_t_overflow(size_t, size_t);
size_t s_size_t_pct(size_t, size_t);
size_t s_size_t_inc_pct(size_t q, size_t pct, size_t val_if_saturated) {
  size_t inc = s_size_t_pct(q, pct);
  return s_size_t_overflow(q, inc) ? val_if_saturated : q + inc;
}


x86 assembly (clang, -O0):
<s_size_t_inc_pct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <s_size_t_pct@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <s_size_t_overflow@plt>
cmp    $0x0,%rax
je     1169 <s_size_t_inc_pct+0x49>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    1175 <s_size_t_inc_pct+0x55>
mov    -0x8(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_size_t_inc_pct>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rdi,%r15
call   1040 <s_size_t_pct@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    %rax,%rsi
call   1030 <s_size_t_overflow@plt>
add    %r15,%rbx
test   %rax,%rax
cmovne %r14,%rbx
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @s_size_t_inc_pct(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%8 = load i64, i64* %4
%9 = load i64, i64* %5
%10 = call i64 @s_size_t_pct(i64 %8, i64 %9)
store i64 %10, i64* %7
%11 = load i64, i64* %4
%12 = load i64, i64* %7
%13 = call i64 @s_size_t_overflow(i64 %11, i64 %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %3
%16 = load i64, i64* %6
br label %21
17: ; preds = %3
%18 = load i64, i64* %4
%19 = load i64, i64* %7
%20 = add i64 %18, %19
br label %21
21: ; preds = %17, %15
%22 = phi i64 [ %16, %15 ], [ %20, %17 ]
ret i64 %22
}

LLVM IR (-O2):
define i64 @s_size_t_inc_pct(i64 %0, i64 %1, i64 %2) {
%4 = tail call i64 @s_size_t_pct(i64 %0, i64 %1)
%5 = tail call i64 @s_size_t_overflow(i64 %0, i64 %4)
%6 = icmp eq i64 %5, 0
%7 = add i64 %4, %0
%8 = select i1 %6, i64 %7, i64 %2
ret i64 %8
}
/* Variables and functions */
int invert(int, int, int);
int /*<<< orphan*/ printf(char *, int);
main() {
  int a = invert(255, 0, 4);
  printf("%d\n", a);
  int b = invert(0, 4, 4);
  printf("%d\n", b);
  int c = invert(15, 4, 4);
  printf("%d\n", c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xff,%edi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <invert@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
mov    $0x4,%edx
mov    %edx,%esi
call   1030 <invert@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
mov    $0xf,%edi
mov    $0x4,%edx
mov    %edx,%esi
call   1030 <invert@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe77(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xff,%edi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <invert@plt>
lea    0xec7(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %edi,%edi
mov    $0x4,%esi
mov    $0x4,%edx
call   1030 <invert@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0xf,%edi
mov    $0x4,%esi
mov    $0x4,%edx
call   1030 <invert@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @invert(i32 255, i32 0, i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @invert(i32 0, i32 4, i32 4)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @invert(i32 15, i32 4, i32 4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
int test_imm_51int32_mem(int *val) {
  return ((*val) & (0x51 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_51int32_mem>:
testb  $0x51,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_51int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 81
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(int);
int main() {
  char *str;
  if (NULL == (str = (char *)malloc(sizeof(char) * 10))) {
    abort();
  } else {
    free(str);
    return 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xa,%edi
call   1050 <malloc@plt>
mov    %rax,%rcx
mov    %rcx,-0x10(%rbp)
xor    %eax,%eax
cmp    %rcx,%rax
jne    1162 <main+0x32>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
call   1050 <malloc@plt>
test   %rax,%rax
je     114c <main+0x1c>
mov    %rax,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i64 @malloc(i32 10)
%4 = inttoptr i64 %3 to i8*
store i8* %4, i8** %2
%5 = icmp eq i8* null, %4
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
%9 = load i8*, i8** %2
%10 = call i32 @free(i8* %9)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 10)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = inttoptr i64 %1 to i8*
%7 = tail call i32 @free(i8* %6)
ret i32 0
}
void aml_array_dbl_2d_free(double **arr, int s1) {
  int i;
  for (i = 0; i < s1; i++)
    if (arr[i])
      free(arr[i]);
  free(arr);
}


x86 assembly (clang, -O0):
<aml_array_dbl_2d_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1169 <aml_array_dbl_2d_free+0x59>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1156 <aml_array_dbl_2d_free+0x46>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
jmp    115b <aml_array_dbl_2d_free+0x4b>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <aml_array_dbl_2d_free+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aml_array_dbl_2d_free>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1149 <aml_array_dbl_2d_free+0x39>
mov    %esi,%r15d
xor    %ebx,%ebx
jmp    1139 <aml_array_dbl_2d_free+0x29>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rbx
cmp    %rbx,%r15
je     1149 <aml_array_dbl_2d_free+0x39>
mov    (%r14,%rbx,8),%rdi
test   %rdi,%rdi
je     1130 <aml_array_dbl_2d_free+0x20>
call   1030 <free@plt>
jmp    1130 <aml_array_dbl_2d_free+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @aml_array_dbl_2d_free(double** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %16
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %13
%7 = phi i64 [ 0, %4 ], [ %14, %13 ]
%8 = getelementptr inbounds double*, double** %0, i64 %7
%9 = load double*, double** %8
%10 = icmp eq double* %9, null
br i1 %10, label %13, label %11
11: ; preds = %6
%12 = bitcast double* %9 to i8*
tail call void @free(i8* %12)
br label %13
13: ; preds = %6, %11
%14 = add nuw nsw i64 %7, 1
%15 = icmp eq i64 %14, %5
br i1 %15, label %16, label %6
16: ; preds = %13, %2
%17 = bitcast double** %0 to i8*
tail call void @free(i8* %17)
ret void
}
__attribute__((always_)) void insw(int port, void *addr, unsigned long count) {
  asm volatile("rep; ins"
               "w"
               : "+D"(addr), "+c"(count)
               : "d"(port));
}


x86 assembly (clang, -O0):
<insw>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    -0x4(%rbp),%edx
rep insw (%dx),%es:(%rdi)
mov    %rdi,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<insw>:
mov    %rdx,%rcx
mov    %edi,%edx
mov    %rsi,%rdi
rep insw (%dx),%es:(%rdi)
ret

LLVM IR (-O0):
define void @insw(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %5
%8 = load i64, i64* %6
%9 = load i32, i32* %4
%10 = call { i8*, i64 } asm sideeffect "rep; insw", "={di},={cx},{dx},0,1,~{dirflag},~{fpsr},~{flags}"(i32 %9, i8* %7, i64 %8)
%11 = extractvalue { i8*, i64 } %10, 0
%12 = extractvalue { i8*, i64 } %10, 1
store i8* %11, i8** %5
store i64 %12, i64* %6
ret void
}

LLVM IR (-O2):
define void @insw(i32 %0, i8* %1, i64 %2) {
%4 = tail call { i8*, i64 } asm sideeffect "rep; insw", "={di},={cx},{dx},0,1,~{dirflag},~{fpsr},~{flags}"(i32 %0, i8* %1, i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ esc_prn(char *);
int help_trace(int argc, char **argv) {
  esc_prn(
      "\n{Htrace} {UHOST} [{UOPTION} ...]\n"
      "  Print the path packets take to the network {UHOST}. {UHOST} can be an "
      "ip address or\n"
      "  name.\n"
      "    Options:\n"
      "      {H-P} {Uprotocol}    Use IP {Uprotocol} in trace packets\n"
      "                       {H1} - icmp, {H17} - udp (default), {H6} - tcp\n"
      "      {H-m} {Uttl}         Maximum {Uttl}, default 8\n\n"
      "  Notes: 1. Using names requires DNS to be set.\n"
      "         2. Use Ctrl+C to stop the command.\n");
  return 1;
}


x86 assembly (clang, -O0):
<help_trace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <esc_prn@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [421 x i8] c"\0A{Htrace} {UHOST} [{UOPTION} ...]\0A Print the path packets take to the network {UHOST}. {UHOST} can be an ip address or\0A name.\0A Options:\0A {H-P} {Uprotocol} Use IP {Uprotocol} in trace packets\0A {H1} - icmp, {H17} - udp (default), {H6} - tcp\0A {H-m} {Uttl} Maximum {Uttl}, default 8\0A\0A Notes: 1. Using names requires DNS to be set.\0A 2. Use Ctrl+C to stop the command.\0A\00"
define i32 @help_trace(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @esc_prn(i8* getelementptr inbounds ([421 x i8], [421 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [421 x i8] c"\0A{Htrace} {UHOST} [{UOPTION} ...]\0A Print the path packets take to the network {UHOST}. {UHOST} can be an ip address or\0A name.\0A Options:\0A {H-P} {Uprotocol} Use IP {Uprotocol} in trace packets\0A {H1} - icmp, {H17} - udp (default), {H6} - tcp\0A {H-m} {Uttl} Maximum {Uttl}, default 8\0A\0A Notes: 1. Using names requires DNS to be set.\0A 2. Use Ctrl+C to stop the command.\0A\00"
define i32 @help_trace(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @esc_prn(i8* getelementptr inbounds ([421 x i8], [421 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
void enable_draw_import(void) {
  do {
  } while (0);
  do {
  } while (0);
  do {
  } while (0);
  do {
  } while (0);
  do {
  } while (0);
  do {
  } while (0);
  do {
  } while (0);
}


x86 assembly (clang, -O0):
<enable_draw_import>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <enable_draw_import+0x9>
jmp    110e <enable_draw_import+0xe>
jmp    1113 <enable_draw_import+0x13>
jmp    1118 <enable_draw_import+0x18>
jmp    111d <enable_draw_import+0x1d>
jmp    1122 <enable_draw_import+0x22>
jmp    1127 <enable_draw_import+0x27>
jmp    112c <enable_draw_import+0x2c>
jmp    1131 <enable_draw_import+0x31>
jmp    1136 <enable_draw_import+0x36>
jmp    113b <enable_draw_import+0x3b>
jmp    1140 <enable_draw_import+0x40>
jmp    1145 <enable_draw_import+0x45>
jmp    114a <enable_draw_import+0x4a>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @enable_draw_import() {
br label %1
1: ; preds = %0
br label %2
2: ; preds = %1
br label %3
3: ; preds = %2
br label %4
4: ; preds = %3
br label %5
5: ; preds = %4
br label %6
6: ; preds = %5
br label %7
7: ; preds = %6
br label %8
8: ; preds = %7
br label %9
9: ; preds = %8
br label %10
10: ; preds = %9
br label %11
11: ; preds = %10
br label %12
12: ; preds = %11
br label %13
13: ; preds = %12
br label %14
14: ; preds = %13
ret void
}

LLVM IR (-O2):
define void @enable_draw_import() {
ret void
}
void clar_print_onsuite(const char *suite_name, int suite_index) {
  (void)suite_index;
  (void)suite_name;
}


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

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

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

LLVM IR (-O2):
define void @clar_print_onsuite(i8* nocapture %0, i32 %1) {
ret void
}
int intcmp(void *a, void *b, void *aux) {
  int ia = *((int *)a);
  int ib = *((int *)b);
  return (ia - ib);
}


x86 assembly (clang, -O0):
<intcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
sub    -0x20(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @intcmp(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
%11 = load i32, i32* %10
store i32 %11, i32* %7
%12 = load i8*, i8** %5
%13 = bitcast i8* %12 to i32*
%14 = load i32, i32* %13
store i32 %14, i32* %8
%15 = load i32, i32* %7
%16 = load i32, i32* %8
%17 = sub nsw i32 %15, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @intcmp(i8* nocapture %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = bitcast i8* %0 to i32*
%5 = load i32, i32* %4
%6 = bitcast i8* %1 to i32*
%7 = load i32, i32* %6
%8 = sub nsw i32 %5, %7
ret i32 %8
}
/* Variables and functions */
const char *go_to_end_of_dots(const char *__attribute__((nonnull)) const dots) {
  const char *iter = dots;
  for (char ch = *iter; ch != '\0'; ch = *(++iter)) {
    if (ch != '.') {
      return iter;
    }
  }
  return NULL;
}


x86 assembly (clang, -O0):
<go_to_end_of_dots>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x19(%rbp)
movsbl -0x19(%rbp),%eax
cmp    $0x0,%eax
je     115f <go_to_end_of_dots+0x5f>
movsbl -0x19(%rbp),%eax
cmp    $0x2e,%eax
je     1140 <go_to_end_of_dots+0x40>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1167 <go_to_end_of_dots+0x67>
jmp    1145 <go_to_end_of_dots+0x45>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
mov    0x1(%rax),%al
mov    %al,-0x19(%rbp)
jmp    1119 <go_to_end_of_dots+0x19>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<go_to_end_of_dots>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
cmp    $0x2e,%cl
je     1110 <go_to_end_of_dots+0x10>
xor    %edx,%edx
test   %cl,%cl
cmove  %rdx,%rax
ret

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

LLVM IR (-O2):
define i8* @go_to_end_of_dots(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, 46
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %2, label %7
7: ; preds = %2
%8 = icmp eq i8 %4, 0
%9 = select i1 %8, i8* null, i8* %3
ret i8* %9
}
int exit(int error_code) {
  asm volatile("movl %0, %%ebx" ::"m"(error_code) : "%ebx");
  return syscall(0);
}


x86 assembly (clang, -O0):
<exit>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
push   %rax
mov    %edi,-0x10(%rbp)
mov    -0x10(%rbp),%ebx
xor    %edi,%edi
mov    $0x0,%al
call   1030 <syscall@plt>
mov    %eax,-0xc(%rbp)

x86 assembly (clang, -O2):
<exit>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,0xc(%rsp)
mov    0xc(%rsp),%ebx
xor    %edi,%edi
xor    %eax,%eax
call   1030 <syscall@plt>

LLVM IR (-O0):
define i32 @exit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i32, ...) bitcast (i32 (...)* @syscall to i32 (i32, ...)*)(i32 0)
store i32 %4, i32* %2
unreachable
}

LLVM IR (-O2):
define i32 @exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i32, ...) bitcast (i32 (...)* @syscall to i32 (i32, ...)*)(i32 0)
unreachable
}
/* Type definitions */
struct context {
  int dummy;
};

/* Variables and functions */
struct context *__alloc_context(int /*<<< orphan*/);
struct context *alloc_context(void) {
  return __alloc_context(0);
}


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

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

LLVM IR (-O0):
%struct.context = type { i32 }
define %struct.context* @alloc_context() {
%1 = call %struct.context* @__alloc_context(i32 0)
ret %struct.context* %1
}

LLVM IR (-O2):
%struct.context = type { i32 }
define %struct.context* @alloc_context() {
%1 = tail call %struct.context* @__alloc_context(i32 0)
ret %struct.context* %1
}
/* Type definitions */
struct p7_timer_event {
  int dummy;
};
struct p7_coro {
  int dummy;
};
struct p7_cond_event {
  int dummy;
};

/* Variables and functions */
struct p7_timer_event *p7_timer_event_new_(unsigned long long, unsigned int,
                                           struct p7_coro *,
                                           struct p7_cond_event *);
struct p7_timer_event *p7_timer_event_new(unsigned long long dt, unsigned from,
                                          struct p7_coro *coro,
                                          struct p7_cond_event *cond) {
  return p7_timer_event_new_(dt, from, coro, cond);
}


x86 assembly (clang, -O0):
<p7_timer_event_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <p7_timer_event_new_@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p7_timer_event_new>:
jmp    1030 <p7_timer_event_new_@plt>

LLVM IR (-O0):
%struct.p7_timer_event = type { i32 }
%struct.p7_coro = type { i32 }
%struct.p7_cond_event = type { i32 }
define %struct.p7_timer_event* @p7_timer_event_new(i64 %0, i32 %1, %struct.p7_coro* %2, %struct.p7_cond_event* %3) {
%5 = alloca i64
%6 = alloca i32
%7 = alloca %struct.p7_coro*
%8 = alloca %struct.p7_cond_event*
store i64 %0, i64* %5
store i32 %1, i32* %6
store %struct.p7_coro* %2, %struct.p7_coro** %7
store %struct.p7_cond_event* %3, %struct.p7_cond_event** %8
%9 = load i64, i64* %5
%10 = load i32, i32* %6
%11 = load %struct.p7_coro*, %struct.p7_coro** %7
%12 = load %struct.p7_cond_event*, %struct.p7_cond_event** %8
%13 = call %struct.p7_timer_event* @p7_timer_event_new_(i64 %9, i32 %10, %struct.p7_coro* %11, %struct.p7_cond_event* %12)
ret %struct.p7_timer_event* %13
}

LLVM IR (-O2):
%struct.p7_timer_event = type { i32 }
%struct.p7_coro = type { i32 }
%struct.p7_cond_event = type { i32 }
define %struct.p7_timer_event* @p7_timer_event_new(i64 %0, i32 %1, %struct.p7_coro* %2, %struct.p7_cond_event* %3) {
%5 = tail call %struct.p7_timer_event* @p7_timer_event_new_(i64 %0, i32 %1, %struct.p7_coro* %2, %struct.p7_cond_event* %3)
ret %struct.p7_timer_event* %5
}
int param_set_bool(const char *val, struct kernel_param *kp) { return 0; }


x86 assembly (clang, -O0):
<param_set_bool>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.kernel_param = type opaque
define i32 @param_set_bool(i8* %0, %struct.kernel_param* %1) {
%3 = alloca i8*
%4 = alloca %struct.kernel_param*
store i8* %0, i8** %3
store %struct.kernel_param* %1, %struct.kernel_param** %4
ret i32 0
}

LLVM IR (-O2):
%struct.kernel_param = type opaque
define i32 @param_set_bool(i8* nocapture readnone %0, %struct.kernel_param* nocapture readnone %1) {
ret i32 0
}
int procChild() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @procChild() {
ret i32 0
}
double iw_filter_boxavg(struct iw_rr_ctx *rrctx, double x) {
  if (x < 0.4999999)
    return 1.0;
  else if (x <= 0.5000001) {
    return 0.5;
  }
  return 0.0;
}


x86 assembly (clang, -O0):
<iw_filter_boxavg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  0xeeb(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1132 <iw_filter_boxavg+0x32>
movsd  0xef0(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1164 <iw_filter_boxavg+0x64>
movsd  0xece(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     1157 <iw_filter_boxavg+0x57>
movsd  0xec3(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1164 <iw_filter_boxavg+0x64>
jmp    115c <iw_filter_boxavg+0x5c>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<iw_filter_boxavg>:
movapd %xmm0,%xmm1
cmpnlesd 0xef3(%rip),%xmm1
movsd  0xef3(%rip),%xmm2
andnpd %xmm2,%xmm1
cmpltsd 0xeee(%rip),%xmm0
movsd  0xeee(%rip),%xmm2
andpd  %xmm0,%xmm2
andnpd %xmm1,%xmm0
orpd   %xmm2,%xmm0
ret

LLVM IR (-O0):
%struct.iw_rr_ctx = type opaque
define double @iw_filter_boxavg(%struct.iw_rr_ctx* %0, double %1) {
%3 = alloca double
%4 = alloca %struct.iw_rr_ctx*
%5 = alloca double
store %struct.iw_rr_ctx* %0, %struct.iw_rr_ctx** %4
store double %1, double* %5
%6 = load double, double* %5
%7 = fcmp olt double %6, 0x3FDFFFFF94A03595
br i1 %7, label %8, label %9
8: ; preds = %2
store double 1.000000e+00, double* %3
br label %15
9: ; preds = %2
%10 = load double, double* %5
%11 = fcmp ole double %10, 0x3FE0000035AFE535
br i1 %11, label %12, label %13
12: ; preds = %9
store double 5.000000e-01, double* %3
br label %15
13: ; preds = %9
br label %14
14: ; preds = %13
store double 0.000000e+00, double* %3
br label %15
15: ; preds = %14, %12, %8
%16 = load double, double* %3
ret double %16
}

LLVM IR (-O2):
%struct.iw_rr_ctx = type opaque
define double @iw_filter_boxavg(%struct.iw_rr_ctx* nocapture readnone %0, double %1) {
%3 = fcmp olt double %1, 0x3FDFFFFF94A03595
%4 = fcmp ugt double %1, 0x3FE0000035AFE535
%5 = select i1 %4, double 0.000000e+00, double 5.000000e-01
%6 = select i1 %3, double 1.000000e+00, double %5
ret double %6
}