xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ psh_print_prompt();
int /*<<< orphan*/ signal(int /*<<< orphan*/, void (*)(int));
int /*<<< orphan*/ stdout;
void handle_sigint(int sig) {
  printf("\n");
  psh_print_prompt();
  fflush(stdout);
  signal(SIGINT, handle_sigint);
}


x86 assembly (clang, -O0):
<handle_sigint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1060 <psh_print_prompt@plt>
mov    0x2e73(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
mov    0x2e4c(%rip),%rsi
call   1040 <signal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_sigint>:
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1060 <psh_print_prompt@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
mov    0x2e58(%rip),%rsi
pop    %rax
jmp    1040 <signal@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@stdout = global i32 0
@SIGINT = global i32 0
define void @handle_sigint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @psh_print_prompt()
%5 = load i32, i32* @stdout
%6 = call i32 @fflush(i32 %5)
%7 = load i32, i32* @SIGINT
%8 = call i32 @signal(i32 %7, void (i32)* @handle_sigint)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@SIGINT = global i32 0
define void @handle_sigint(i32 %0) {
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 (...) @psh_print_prompt()
%4 = load i32, i32* @stdout
%5 = tail call i32 @fflush(i32 %4)
%6 = load i32, i32* @SIGINT
%7 = tail call i32 @signal(i32 %6, void (i32)* @handle_sigint)
ret void
}
void devm_opp_domain_unregister(struct pm_opp_domain_dev *oppdm_dev) {}


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

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

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

LLVM IR (-O2):
%struct.pm_opp_domain_dev = type opaque
define void @devm_opp_domain_unregister(%struct.pm_opp_domain_dev* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ assume(int);
int main() {
  int i;
  int k;
  int n;
  assume((i == 0) && (k == 0) && (n > 0));
  while (i < n) {
    i++;
    k++;
  }
  assert((i == k) && (k == n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
jne    1157 <main+0x37>
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0x11(%rbp)
jne    1157 <main+0x37>
cmpl   $0x0,-0x10(%rbp)
setg   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assume@plt>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1187 <main+0x67>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1164 <main+0x44>
mov    -0x8(%rbp),%ecx
xor    %eax,%eax
cmp    -0xc(%rbp),%ecx
mov    %al,-0x12(%rbp)
jne    11a4 <main+0x84>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
sete   %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %0
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load i32, i32* %4
%12 = icmp sgt i32 %11, 0
br label %13
13: ; preds = %10, %7, %0
%14 = phi i1 [ false, %7 ], [ false, %0 ], [ %12, %10 ]
%15 = zext i1 %14 to i32
%16 = call i32 @assume(i32 %15)
br label %17
17: ; preds = %21, %13
%18 = load i32, i32* %2
%19 = load i32, i32* %4
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %26
21: ; preds = %17
%22 = load i32, i32* %2
%23 = add nsw i32 %22, 1
store i32 %23, i32* %2
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
store i32 %25, i32* %3
br label %17
26: ; preds = %17
%27 = load i32, i32* %2
%28 = load i32, i32* %3
%29 = icmp eq i32 %27, %28
br i1 %29, label %30, label %34
30: ; preds = %26
%31 = load i32, i32* %3
%32 = load i32, i32* %4
%33 = icmp eq i32 %31, %32
br label %34
34: ; preds = %30, %26
%35 = phi i1 [ false, %26 ], [ %33, %30 ]
%36 = zext i1 %35 to i32
%37 = call i32 @assert(i32 %36)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assume(i32 0)
%2 = tail call i32 @assert(i32 0)
ret i32 0
}
/* Variables and functions */
size_t FSE_compressBound(size_t);
size_t ZSTD_compressBound(size_t srcSize) {
  return FSE_compressBound(srcSize) + 12;
}


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

x86 assembly (clang, -O2):
<ZSTD_compressBound>:
push   %rax
call   1030 <FSE_compressBound@plt>
add    $0xc,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @ZSTD_compressBound(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @FSE_compressBound(i64 %3)
%5 = add i64 %4, 12
ret i64 %5
}

LLVM IR (-O2):
define i64 @ZSTD_compressBound(i64 %0) {
%2 = tail call i64 @FSE_compressBound(i64 %0)
%3 = add i64 %2, 12
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int vsnprintf(char *, size_t, char const *, int /*<<< orphan*/);
int r_vsnprintf(char *str, size_t size, const char *format, va_list ap) {
  return vsnprintf(str, size, format, ap);
}


x86 assembly (clang, -O0):
<r_vsnprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <vsnprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<r_vsnprintf>:
jmp    1030 <vsnprintf@plt>

LLVM IR (-O0):
define i32 @r_vsnprintf(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i8*, i8** %7
%12 = load i32, i32* %8
%13 = call i32 @vsnprintf(i8* %9, i64 %10, i8* %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @r_vsnprintf(i8* nocapture %0, i64 %1, i8* nocapture %2, i32 %3) {
%5 = tail call i32 @vsnprintf(i8* %0, i64 %1, i8* %2, i32 %3)
ret i32 %5
}
int same_net(unsigned int ip, unsigned int address, unsigned int mask) {
  return ((address & mask) == (ip & mask));
}


x86 assembly (clang, -O0):
<same_net>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x4(%rbp),%ecx
and    -0xc(%rbp),%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<same_net>:
xor    %esi,%edi
xor    %eax,%eax
test   %edx,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @same_net(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* %5
%8 = load i32, i32* %6
%9 = and i32 %7, %8
%10 = load i32, i32* %4
%11 = load i32, i32* %6
%12 = and i32 %10, %11
%13 = icmp eq i32 %9, %12
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @same_net(i32 %0, i32 %1, i32 %2) {
%4 = xor i32 %1, %0
%5 = and i32 %4, %2
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
void rmv2_(dx, dy) float *dx, *dy;
{ rmv2(*dx, *dy); }


x86 assembly (clang, -O0):
<rmv2_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
cvtss2sd %xmm1,%xmm1
mov    $0x2,%al
call   1030 <rmv2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rmv2_>:
movss  (%rdi),%xmm0
cvtss2sd %xmm0,%xmm0
movss  (%rsi),%xmm1
cvtss2sd %xmm1,%xmm1
mov    $0x2,%al
jmp    1030 <rmv2@plt>

LLVM IR (-O0):
define void @rmv2_(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = load float, float* %5
%7 = fpext float %6 to double
%8 = load float*, float** %4
%9 = load float, float* %8
%10 = fpext float %9 to double
%11 = call i32 (double, double, ...) bitcast (i32 (...)* @rmv2 to i32 (double, double, ...)*)(double %7, double %10)
ret void
}

LLVM IR (-O2):
define void @rmv2_(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = fpext float %3 to double
%5 = load float, float* %1
%6 = fpext float %5 to double
%7 = tail call i32 (double, double, ...) bitcast (i32 (...)* @rmv2 to i32 (double, double, ...)*)(double %4, double %6)
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int __lxstat(int, char const *, struct stat *);
__attribute__((__weak__, __always___)) int
softboundmpx___lxstat(int __ver, const char *__filename,
                      struct stat *__stat_buf) {
  return __lxstat(__ver, __filename, __stat_buf);
}


x86 assembly (clang, -O0):
<softboundmpx___lxstat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <__lxstat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundmpx___lxstat>:
jmp    1030 <__lxstat@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define weak i32 @softboundmpx___lxstat(i32 %0, i8* %1, %struct.stat* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca %struct.stat*
store i32 %0, i32* %4
store i8* %1, i8** %5
store %struct.stat* %2, %struct.stat** %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load %struct.stat*, %struct.stat** %6
%10 = call i32 @__lxstat(i32 %7, i8* %8, %struct.stat* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define weak i32 @softboundmpx___lxstat(i32 %0, i8* %1, %struct.stat* %2) {
%4 = tail call i32 @__lxstat(i32 %0, i8* %1, %struct.stat* %2)
ret i32 %4
}
int ascending(int x, int y) { return y < x; }


x86 assembly (clang, -O0):
<ascending>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ascending>:
xor    %eax,%eax
cmp    %edi,%esi
setl   %al
ret

LLVM IR (-O0):
define i32 @ascending(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = icmp slt i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ascending(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, %0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ adafinal();
int /*<<< orphan*/ adainit();
int /*<<< orphan*/ named_input_files();
int main(int argc, char *argv[]) {
  adainit();
  named_input_files();
  adafinal();
  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    $0x0,%al
call   1050 <adainit@plt>
mov    $0x0,%al
call   1030 <named_input_files@plt>
mov    $0x0,%al
call   1040 <adafinal@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <adainit@plt>
xor    %eax,%eax
call   1030 <named_input_files@plt>
xor    %eax,%eax
call   1040 <adafinal@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 = call i32 (...) @adainit()
%7 = call i32 (...) @named_input_files()
%8 = call i32 (...) @adafinal()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @adainit()
%4 = tail call i32 (...) @named_input_files()
%5 = tail call i32 (...) @adafinal()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ runend();
int runintro();
int main(int argc, char *argv[]) {
  int ch;
  ch = runintro();
  if (ch == -1)
    runend();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <runintro@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    1151 <main+0x31>
mov    $0x0,%al
call   1040 <runend@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <runintro@plt>
cmp    $0xffffffff,%eax
jne    1134 <main+0x14>
xor    %eax,%eax
call   1040 <runend@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**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (...) @runintro()
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 (...) @runend()
br label %12
12: ; preds = %10, %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @runintro()
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @runend()
br label %7
7: ; preds = %5, %2
ret i32 0
}
/* Variables and functions */
size_t omp_get_thread_num();
size_t pumaGetThreadNum(void) { return omp_get_thread_num(); }


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

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

LLVM IR (-O0):
define i64 @pumaGetThreadNum() {
%1 = call i64 (...) @omp_get_thread_num()
ret i64 %1
}

LLVM IR (-O2):
define i64 @pumaGetThreadNum() {
%1 = tail call i64 (...) @omp_get_thread_num()
ret i64 %1
}
int abnormal_sun_adjust(int scode, int *dawnp, int *duskp) {
  switch (scode) {
  case 0:
    break;
  case 2:
    *dawnp = 1;
    *duskp = 23 * 60 + 58;
    break;
  case 1:
    *dawnp = 23 * 60 + 58;
    *duskp = 1;
    break;
  case 4:
    *dawnp = 1;
    break;
  case 8:
    *duskp = 23 * 60 + 58;
    break;
  default:
    break;
  }
  return scode;
}


x86 assembly (clang, -O0):
<abnormal_sun_adjust>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x20(%rbp)
sub    $0x8,%rax
ja     1189 <abnormal_sun_adjust+0x89>
mov    -0x20(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
jmp    118e <abnormal_sun_adjust+0x8e>
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x59e,(%rax)
jmp    118e <abnormal_sun_adjust+0x8e>
mov    -0x10(%rbp),%rax
movl   $0x59e,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
jmp    118e <abnormal_sun_adjust+0x8e>
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
jmp    118e <abnormal_sun_adjust+0x8e>
mov    -0x18(%rbp),%rax
movl   $0x59e,(%rax)
jmp    118e <abnormal_sun_adjust+0x8e>
jmp    118e <abnormal_sun_adjust+0x8e>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<abnormal_sun_adjust>:
mov    %edi,%eax
lea    -0x1(%rax),%ecx
cmp    $0x7,%ecx
ja     1133 <abnormal_sun_adjust+0x33>
lea    0xeef(%rip),%rdi
movslq (%rdi,%rcx,4),%rcx
add    %rdi,%rcx
jmp    *%rcx
movl   $0x59e,(%rsi)
movl   $0x1,(%rdx)
ret
movl   $0x1,(%rsi)
movl   $0x59e,(%rdx)
ret
movl   $0x1,(%rsi)
ret

LLVM IR (-O0):
define i32 @abnormal_sun_adjust(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
switch i32 %7, label %19 [
i32 0, label %8
i32 2, label %9
i32 1, label %12
i32 4, label %15
i32 8, label %17
]
8: ; preds = %3
br label %20
9: ; preds = %3
%10 = load i32*, i32** %5
store i32 1, i32* %10
%11 = load i32*, i32** %6
store i32 1438, i32* %11
br label %20
12: ; preds = %3
%13 = load i32*, i32** %5
store i32 1438, i32* %13
%14 = load i32*, i32** %6
store i32 1, i32* %14
br label %20
15: ; preds = %3
%16 = load i32*, i32** %5
store i32 1, i32* %16
br label %20
17: ; preds = %3
%18 = load i32*, i32** %6
store i32 1438, i32* %18
br label %20
19: ; preds = %3
br label %20
20: ; preds = %19, %17, %15, %12, %9, %8
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
define i32 @abnormal_sun_adjust(i32 returned %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2) {
switch i32 %0, label %8 [
i32 8, label %7
i32 2, label %4
i32 1, label %5
i32 4, label %6
]
4: ; preds = %3
store i32 1, i32* %1
store i32 1438, i32* %2
br label %8
5: ; preds = %3
store i32 1438, i32* %1
store i32 1, i32* %2
br label %8
6: ; preds = %3
store i32 1, i32* %1
br label %8
7: ; preds = %3
store i32 1438, i32* %2
br label %8
8: ; preds = %3, %7, %6, %5, %4
ret i32 %0
}
void spin_unlock(struct spinlock *s) {}


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

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

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

LLVM IR (-O2):
%struct.spinlock = type opaque
define void @spin_unlock(%struct.spinlock* nocapture %0) {
ret void
}
void foo380(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo380(i32 %0) {
ret void
}
/* Variables and functions */
char *strrchr(char const *, int);
char *c_strrchr(const char *arg0, int arg1) { return strrchr(arg0, arg1); }


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

x86 assembly (clang, -O2):
<c_strrchr>:
jmp    1030 <strrchr@plt>

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

LLVM IR (-O2):
define i8* @c_strrchr(i8* %0, i32 %1) {
%3 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i32 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ do_solve(char **, int /*<<< orphan*/);
void solveSudoku(char **board, int boardRowSize, int boardColSize) {
  do_solve(board, 0);
}


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

x86 assembly (clang, -O2):
<solveSudoku>:
xor    %esi,%esi
jmp    1030 <do_solve@plt>

LLVM IR (-O0):
define void @solveSudoku(i8** %0, i32 %1, i32 %2) {
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
store i8** %0, i8*** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8**, i8*** %4
%8 = call i32 @do_solve(i8** %7, i32 0)
ret void
}

LLVM IR (-O2):
define void @solveSudoku(i8** %0, i32 %1, i32 %2) {
%4 = tail call i32 @do_solve(i8** %0, i32 0)
ret void
}
/* Variables and functions */
unsigned short csum_fold(int /*<<< orphan*/);
int /*<<< orphan*/ csum_partial(unsigned char *, unsigned int,
                                int /*<<< orphan*/);
unsigned short ip_fast_csum(unsigned char *iph, unsigned int ihl) {
  return csum_fold(csum_partial(iph, ihl * 4, 0));
}


x86 assembly (clang, -O0):
<ip_fast_csum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
shl    $0x2,%esi
xor    %edx,%edx
call   1030 <csum_partial@plt>
mov    %eax,%edi
call   1040 <csum_fold@plt>
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ip_fast_csum>:
push   %rax
shl    $0x2,%esi
xor    %edx,%edx
call   1030 <csum_partial@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <csum_fold@plt>

LLVM IR (-O0):
define zeroext i16 @ip_fast_csum(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = mul i32 %6, 4
%8 = call i32 @csum_partial(i8* %5, i32 %7, i32 0)
%9 = call zeroext i16 @csum_fold(i32 %8)
ret i16 %9
}

LLVM IR (-O2):
define zeroext i16 @ip_fast_csum(i8* %0, i32 %1) {
%3 = shl i32 %1, 2
%4 = tail call i32 @csum_partial(i8* %0, i32 %3, i32 0)
%5 = tail call zeroext i16 @csum_fold(i32 %4)
ret i16 %5
}
void add_piece(char *s, int piece) {
  switch (piece) {
  case 4:
    *s = 'Q';
    break;
  case 3:
    *s = 'R';
    break;
  case 2:
    *s = 'B';
    break;
  case 1:
    *s = 'N';
    break;
  case 5:
    *s = 'K';
  }
}


x86 assembly (clang, -O0):
<add_piece>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x4,%eax
ja     116b <add_piece+0x6b>
mov    -0x18(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x8(%rbp),%rax
movb   $0x51,(%rax)
jmp    116b <add_piece+0x6b>
mov    -0x8(%rbp),%rax
movb   $0x52,(%rax)
jmp    116b <add_piece+0x6b>
mov    -0x8(%rbp),%rax
movb   $0x42,(%rax)
jmp    116b <add_piece+0x6b>
mov    -0x8(%rbp),%rax
movb   $0x4e,(%rax)
jmp    116b <add_piece+0x6b>
mov    -0x8(%rbp),%rax
movb   $0x4b,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_piece>:
add    $0xffffffff,%esi
cmp    $0x4,%esi
ja     111c <add_piece+0x1c>
shl    $0x3,%esi
movabs $0x4b5152424e,%rax
mov    %esi,%ecx
shr    %cl,%rax
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @add_piece(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
switch i32 %5, label %16 [
i32 4, label %6
i32 3, label %8
i32 2, label %10
i32 1, label %12
i32 5, label %14
]
6: ; preds = %2
%7 = load i8*, i8** %3
store i8 81, i8* %7
br label %16
8: ; preds = %2
%9 = load i8*, i8** %3
store i8 82, i8* %9
br label %16
10: ; preds = %2
%11 = load i8*, i8** %3
store i8 66, i8* %11
br label %16
12: ; preds = %2
%13 = load i8*, i8** %3
store i8 78, i8* %13
br label %16
14: ; preds = %2
%15 = load i8*, i8** %3
store i8 75, i8* %15
br label %16
16: ; preds = %14, %2, %12, %10, %8, %6
ret void
}

LLVM IR (-O2):
define void @add_piece(i8* nocapture writeonly %0, i32 %1) {
%3 = add i32 %1, -1
%4 = icmp ult i32 %3, 5
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = zext i32 %3 to i40
%7 = shl nuw nsw i40 %6, 3
%8 = lshr i40 323486892622, %7
%9 = trunc i40 %8 to i8
store i8 %9, i8* %0
br label %10
10: ; preds = %2, %5
ret void
}
/* Type definitions */
struct list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ list_add_front_real(struct list *, int /*<<< orphan*/);
int /*<<< orphan*/ new_item_by_param(void *, int);
void list_add_front(struct list *list, void *data, int len) {
  list_add_front_real(list, new_item_by_param(data, len));
}


x86 assembly (clang, -O0):
<list_add_front>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <new_item_by_param@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
call   1040 <list_add_front_real@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_add_front>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %edx,%esi
call   1030 <new_item_by_param@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <list_add_front_real@plt>

LLVM IR (-O0):
%struct.list = type { i32 }
define void @list_add_front(%struct.list* %0, i8* %1, i32 %2) {
%4 = alloca %struct.list*
%5 = alloca i8*
%6 = alloca i32
store %struct.list* %0, %struct.list** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load %struct.list*, %struct.list** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @new_item_by_param(i8* %8, i32 %9)
%11 = call i32 @list_add_front_real(%struct.list* %7, i32 %10)
ret void
}

LLVM IR (-O2):
%struct.list = type { i32 }
define void @list_add_front(%struct.list* %0, i8* %1, i32 %2) {
%4 = tail call i32 @new_item_by_param(i8* %1, i32 %2)
%5 = tail call i32 @list_add_front_real(%struct.list* %0, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ xfree(void *);
void argv_destroy(char **argv) {
  int i;
  for (i = 0; argv[i] != NULL; i++)
    xfree((void *)argv[i]);
  xfree((void *)argv);
}


x86 assembly (clang, -O0):
<argv_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1155 <argv_destroy+0x45>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <xfree@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <argv_destroy+0x13>
mov    -0x8(%rbp),%rdi
call   1030 <xfree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<argv_destroy>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1141 <argv_destroy+0x31>
lea    0x8(%r14),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
call   1030 <xfree@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <argv_destroy+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <xfree@plt>

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

LLVM IR (-O2):
define void @argv_destroy(i8** %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %10, %4 ], [ %2, %1 ]
%7 = tail call i32 @xfree(i8* %6)
%8 = add nuw i64 %5, 1
%9 = getelementptr inbounds i8*, i8** %0, i64 %8
%10 = load i8*, i8** %9
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %4
12: ; preds = %4, %1
%13 = bitcast i8** %0 to i8*
%14 = tail call i32 @xfree(i8* %13)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_CUR;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, unsigned int,
                         int /*<<< orphan*/);
void stdio_skip(void *user, unsigned n) { fseek((FILE *)user, n, SEEK_CUR); }


x86 assembly (clang, -O0):
<stdio_skip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    0x2ebb(%rip),%rax
mov    (%rax),%edx
call   1030 <fseek@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdio_skip>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edx
jmp    1030 <fseek@plt>

LLVM IR (-O0):
@SEEK_CUR = global i32 0
define void @stdio_skip(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %4
%8 = load i32, i32* @SEEK_CUR
%9 = call i32 @fseek(i32* %6, i32 %7, i32 %8)
ret void
}

LLVM IR (-O2):
@SEEK_CUR = global i32 0
define void @stdio_skip(i8* nocapture %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* @SEEK_CUR
%5 = tail call i32 @fseek(i32* %3, i32 %1, i32 %4)
ret void
}
/* Type definitions */
struct Var {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pA(char *, char const *, char const *, char const *);
void __func_lshift_uint(struct Var *avar, const char *areg, const char *lreg,
                        const char *rreg) {
  pA("%s = %s << %s;", areg, lreg, rreg);
}


x86 assembly (clang, -O0):
<__func_lshift_uint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xec5(%rip),%rdi
call   1030 <pA@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.Var = type { i32 }
@.str = [15 x i8] c"%s = %s << %s;\00"
define void @__func_lshift_uint(%struct.Var* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca %struct.Var*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store %struct.Var* %0, %struct.Var** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %6
%10 = load i8*, i8** %7
%11 = load i8*, i8** %8
%12 = call i32 @pA(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10, i8* %11)
ret void
}

LLVM IR (-O2):
%struct.Var = type { i32 }
@.str = [15 x i8] c"%s = %s << %s;\00"
define void @__func_lshift_uint(%struct.Var* nocapture readnone %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @pA(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void closeConnection(int sockfd, int cli_sockfd) {
  close(sockfd);
  close(cli_sockfd);
}


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

x86 assembly (clang, -O2):
<closeConnection>:
push   %rbx
mov    %esi,%ebx
call   1030 <close@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <close@plt>

LLVM IR (-O0):
define void @closeConnection(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 = call i32 @close(i32 %5)
%7 = load i32, i32* %4
%8 = call i32 @close(i32 %7)
ret void
}

LLVM IR (-O2):
define void @closeConnection(i32 %0, i32 %1) {
%3 = tail call i32 @close(i32 %0)
%4 = tail call i32 @close(i32 %1)
ret void
}
/* Variables and functions */
void *repoint(void *);
void rewireptrsarray(void **a) {
  void **p;
  for (p = a; *p; p++)
    *p = repoint(*p);
}


x86 assembly (clang, -O0):
<rewireptrsarray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     1159 <rewireptrsarray+0x49>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <repoint@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <rewireptrsarray+0x14>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rewireptrsarray>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1135 <rewireptrsarray+0x25>
add    $0x8,%rbx
call   1030 <repoint@plt>
mov    %rax,-0x8(%rbx)
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1120 <rewireptrsarray+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @rewireptrsarray(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %9, %4 ], [ %2, %1 ]
%6 = phi i8** [ %8, %4 ], [ %0, %1 ]
%7 = tail call i8* @repoint(i8* %5)
store i8* %7, i8** %6
%8 = getelementptr inbounds i8*, i8** %6, i64 1
%9 = load i8*, i8** %8
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOMEM;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ printf(char *);
int epoll_create(int size __attribute__((unused))) {
  printf("epoll_create\n");
  errno = ENOMEM;
  return -1;
}


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

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

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

LLVM IR (-O2):
@ENOMEM = global i32 0
@errno = global i32 0
@str = [13 x i8] c"epoll_create\00"
define i32 @epoll_create(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%3 = load i32, i32* @ENOMEM
store i32 %3, i32* @errno
ret i32 -1
}
void RTUuidClear(void) {}


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

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

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

LLVM IR (-O2):
define void @RTUuidClear() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x69() {
  Assert_real((isbdigit(105) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isbdigit.c",
              530, ("isbdigit should be 0 for i"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0x69>:
push   %rax
mov    $0x69,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x212,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for i\00"
define void @t_isbdigit_0x69() {
%1 = call i64 @isbdigit(i32 105)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 530, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for i\00"
define void @t_isbdigit_0x69() {
%1 = tail call i64 @isbdigit(i32 105)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 530, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct RNAcofold_args_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/
RNAcofold_cmdline_parser_release(struct RNAcofold_args_info *);
void RNAcofold_cmdline_parser_free(struct RNAcofold_args_info *args_info) {
  RNAcofold_cmdline_parser_release(args_info);
}


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

x86 assembly (clang, -O2):
<RNAcofold_cmdline_parser_free>:
jmp    1030 <RNAcofold_cmdline_parser_release@plt>

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

LLVM IR (-O2):
%struct.RNAcofold_args_info = type { i32 }
define void @RNAcofold_cmdline_parser_free(%struct.RNAcofold_args_info* %0) {
%2 = tail call i32 @RNAcofold_cmdline_parser_release(%struct.RNAcofold_args_info* %0)
ret void
}
int Romanvalue(char c) {
  int s = 0;
  switch (c) {
  case 'I':
    s = 1;
    break;
  case 'V':
    s = 5;
    break;
  case 'X':
    s = 10;
    break;
  case 'L':
    s = 50;
    break;
  case 'C':
    s = 100;
    break;
  case '\0':
    s = 0;
    break;
  }
  return s;
}


x86 assembly (clang, -O0):
<Romanvalue>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     11b6 <Romanvalue+0xb6>
jmp    1125 <Romanvalue+0x25>
mov    -0xc(%rbp),%eax
sub    $0x43,%eax
je     11aa <Romanvalue+0xaa>
jmp    1136 <Romanvalue+0x36>
mov    -0xc(%rbp),%eax
sub    $0x49,%eax
je     117a <Romanvalue+0x7a>
jmp    1147 <Romanvalue+0x47>
mov    -0xc(%rbp),%eax
sub    $0x4c,%eax
je     119e <Romanvalue+0x9e>
jmp    1158 <Romanvalue+0x58>
mov    -0xc(%rbp),%eax
sub    $0x56,%eax
je     1186 <Romanvalue+0x86>
jmp    1169 <Romanvalue+0x69>
mov    -0xc(%rbp),%eax
sub    $0x58,%eax
je     1192 <Romanvalue+0x92>
jmp    11bd <Romanvalue+0xbd>
movl   $0x1,-0x8(%rbp)
jmp    11bd <Romanvalue+0xbd>
movl   $0x5,-0x8(%rbp)
jmp    11bd <Romanvalue+0xbd>
movl   $0xa,-0x8(%rbp)
jmp    11bd <Romanvalue+0xbd>
movl   $0x32,-0x8(%rbp)
jmp    11bd <Romanvalue+0xbd>
movl   $0x64,-0x8(%rbp)
jmp    11bd <Romanvalue+0xbd>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Romanvalue>:
xor    %eax,%eax
add    $0xffffffbd,%edi
cmp    $0x15,%edi
ja     111f <Romanvalue+0x1f>
lea    0xeef(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
mov    $0x64,%eax
ret
mov    $0x1,%eax
ret
mov    $0x32,%eax
ret
mov    $0x5,%eax
ret
mov    $0xa,%eax
ret

LLVM IR (-O0):
define i32 @Romanvalue(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
store i32 0, i32* %3
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
switch i32 %5, label %12 [
i32 73, label %6
i32 86, label %7
i32 88, label %8
i32 76, label %9
i32 67, label %10
i32 0, label %11
]
6: ; preds = %1
store i32 1, i32* %3
br label %12
7: ; preds = %1
store i32 5, i32* %3
br label %12
8: ; preds = %1
store i32 10, i32* %3
br label %12
9: ; preds = %1
store i32 50, i32* %3
br label %12
10: ; preds = %1
store i32 100, i32* %3
br label %12
11: ; preds = %1
store i32 0, i32* %3
br label %12
12: ; preds = %1, %11, %10, %9, %8, %7, %6
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @Romanvalue(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %8 [
i32 73, label %3
i32 86, label %4
i32 88, label %5
i32 76, label %6
i32 67, label %7
]
3: ; preds = %1
br label %8
4: ; preds = %1
br label %8
5: ; preds = %1
br label %8
6: ; preds = %1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %1, %7, %6, %5, %4, %3
%9 = phi i32 [ 100, %7 ], [ 50, %6 ], [ 10, %5 ], [ 5, %4 ], [ 1, %3 ], [ 0, %1 ]
ret i32 %9
}
void mt_save_irq_counts(void) {}


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

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

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

LLVM IR (-O2):
define void @mt_save_irq_counts() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void swap(int x, int y) {
  int temp;
  printf("Inside non-pointer based swap Function\n");
  temp = y;
  y = x;
  x = temp;
  printf("Exiting non-pointer based swap Function x = %d, y = %d\n", x, y);
}


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

x86 assembly (clang, -O2):
<swap>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xf0a(%rip),%rdi
call   1030 <puts@plt>
lea    0xec6(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"Inside non-pointer based swap Function\0A\00"
@.str.1 = [56 x i8] c"Exiting non-pointer based swap Function x = %d, y = %d\0A\00"
define void @swap(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* %4
store i32 %7, i32* %5
%8 = load i32, i32* %3
store i32 %8, i32* %4
%9 = load i32, i32* %5
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0), i32 %10, i32 %11)
ret void
}

LLVM IR (-O2):
@.str.1 = [56 x i8] c"Exiting non-pointer based swap Function x = %d, y = %d\0A\00"
@str = [39 x i8] c"Inside non-pointer based swap Function\00"
define void @swap(i32 %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0), i32 %1, i32 %0)
ret void
}
/* Variables and functions */
unsigned long long __blsmsk_u64(unsigned long long);
unsigned long long test__blsmsk_u64(unsigned long long __X) {
  return __blsmsk_u64(__X);
}


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

x86 assembly (clang, -O2):
<test__blsmsk_u64>:
jmp    1030 <__blsmsk_u64@plt>

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

LLVM IR (-O2):
define i64 @test__blsmsk_u64(i64 %0) {
%2 = tail call i64 @__blsmsk_u64(i64 %0)
ret i64 %2
}
unsigned short parse_CLS() { return 0x00E0; }


x86 assembly (clang, -O0):
<parse_CLS>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe0,%ax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_CLS>:
mov    $0xe0,%ax
ret

LLVM IR (-O0):
define zeroext i16 @parse_CLS() {
ret i16 224
}

LLVM IR (-O2):
define zeroext i16 @parse_CLS() {
ret i16 224
}
int cairo_code_draw_hip2bg_get_width() { return 400; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_hip2bg_get_width() {
ret i32 400
}

LLVM IR (-O2):
define i32 @cairo_code_draw_hip2bg_get_width() {
ret i32 400
}
/* Type definitions */
struct wav2prg_tolerance {
  int dummy;
};

/* Variables and functions */
struct wav2prg_tolerance *get_strict_tolerances(const char *loader_name) {
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.wav2prg_tolerance = type { i32 }
define %struct.wav2prg_tolerance* @get_strict_tolerances(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret %struct.wav2prg_tolerance* null
}

LLVM IR (-O2):
%struct.wav2prg_tolerance = type { i32 }
define noalias %struct.wav2prg_tolerance* @get_strict_tolerances(i8* nocapture readnone %0) {
ret %struct.wav2prg_tolerance* null
}
int ft_min(int a, int b, int c) {
  int min;
  min = a;
  if (min > b)
    min = b;
  if (min > c)
    min = c;
  return (min);
}


x86 assembly (clang, -O0):
<ft_min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1125 <ft_min+0x25>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1137 <ft_min+0x37>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_min>:
mov    %edi,%eax
cmp    %esi,%edi
cmovg  %esi,%eax
cmp    %edx,%eax
cmovg  %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_min(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %0, %1
%5 = select i1 %4, i32 %1, i32 %0
%6 = icmp sgt i32 %5, %2
%7 = select i1 %6, i32 %2, i32 %5
ret i32 %7
}