xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
int _kill(int pid, int sig) {
  if (pid == 1)
    _exit(sig);
  return 0;
}


x86 assembly (clang, -O0):
<_kill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1130 <_kill+0x20>
mov    -0x8(%rbp),%edi
call   1030 <_exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_kill>:
cmp    $0x1,%edi
je     1118 <_kill+0x8>
xor    %eax,%eax
ret
push   %rax
mov    %esi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define i32 @_kill(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 = icmp eq i32 %5, 1
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %4
%9 = call i32 @_exit(i32 %8)
unreachable
10: ; preds = %2
ret i32 0
}

LLVM IR (-O2):
define i32 @_kill(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @_exit(i32 %1)
unreachable
6: ; preds = %2
ret i32 0
}
/* Variables and functions */
char *test_handle_flow_mod() { return NULL; }


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

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

LLVM IR (-O0):
define i8* @test_handle_flow_mod() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @test_handle_flow_mod() {
ret i8* null
}
void my_sprintf(char *const c __attribute__((pass_object_size(0))), ...) {}


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

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

LLVM IR (-O0):
define void @my_sprintf(i8* %0, i64 %1, ...) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
ret void
}

LLVM IR (-O2):
define void @my_sprintf(i8* nocapture %0, i64 %1, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ xml_deinit();
void kml_rd_deinit(void) { xml_deinit(); }


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

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

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

LLVM IR (-O2):
define void @kml_rd_deinit() {
%1 = tail call i32 (...) @xml_deinit()
ret void
}
int test8(void) {
  int i;
  __builtin_choose_expr(0, 42, i) = 10;
  return i;
}


x86 assembly (clang, -O0):
<test8>:
push   %rbp
mov    %rsp,%rbp
movl   $0xa,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test8() {
%1 = alloca i32
store i32 10, i32* %1
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @test8() {
ret i32 10
}
void iw(int gu, int mq, int r2) {
  int yn = 0;
  while (gu < 1) {
    int ay = 0;
    for (;;)
      ;
  bb:
    while (ay < 1)
      ++mq;
  }
  if (yn != 0)
    goto up;
  if (0) {
  up:
    if (r2 == 0)
      goto bb;
  }
  goto up;
}


x86 assembly (clang, -O0):
<iw>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x1,-0x4(%rbp)
jge    114c <iw+0x4c>
movl   $0x0,-0x14(%rbp)
jmp    1125 <iw+0x25>
jmp    112f <iw+0x2f>
cmpl   $0x1,-0x14(%rbp)
jge    1147 <iw+0x47>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112f <iw+0x2f>
jmp    1114 <iw+0x14>
cmpl   $0x0,-0x10(%rbp)
je     115b <iw+0x5b>
jmp    116f <iw+0x6f>
xor    %eax,%eax
test   $0x1,%al
jne    116a <iw+0x6a>
jmp    1183 <iw+0x83>
jmp    116f <iw+0x6f>
cmpl   $0x0,-0xc(%rbp)
jne    117e <iw+0x7e>
jmp    112a <iw+0x2a>
jmp    1183 <iw+0x83>
jmp    116f <iw+0x6f>

x86 assembly (clang, -O2):
<iw>:
test   %edi,%edi
jle    1120 <iw+0x20>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
jmp    1110 <iw+0x10>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
jmp    1120 <iw+0x20>

LLVM IR (-O0):
define void @iw(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
br label %9
9: ; preds = %21, %3
%10 = load i32, i32* %4
%11 = icmp slt i32 %10, 1
br i1 %11, label %12, label %22
12: ; preds = %9
store i32 0, i32* %8
br label %13
13: ; preds = %13, %12
br label %13
14: ; preds = %31
br label %15
15: ; preds = %18, %14
%16 = load i32, i32* %8
%17 = icmp slt i32 %16, 1
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %15
21: ; preds = %15
br label %9
22: ; preds = %9
%23 = load i32, i32* %7
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %26
25: ; preds = %22
br label %28
26: ; preds = %22
br i1 false, label %27, label %33
27: ; preds = %26
br label %28
28: ; preds = %33, %27, %25
%29 = load i32, i32* %6
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %32
31: ; preds = %28
br label %14
32: ; preds = %28
br label %33
33: ; preds = %32, %26
br label %28
}

LLVM IR (-O2):
define void @iw(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, 1
br i1 %4, label %5, label %6
5: ; preds = %3, %5
br label %5
6: ; preds = %3
%7 = icmp ne i32 %2, 0
br label %8
8: ; preds = %6, %8
br label %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
void celsius(float x) {
  float c;
  c = (5 * (x - 32) / 9);
  printf("%.2f\n", c);
}


x86 assembly (clang, -O0):
<celsius>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm1
movss  0xede(%rip),%xmm0
subss  %xmm0,%xmm1
movss  0xece(%rip),%xmm0
mulss  %xmm1,%xmm0
movss  0xebe(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<celsius>:
addss  0xee8(%rip),%xmm0
mulss  0xee4(%rip),%xmm0
divss  0xee0(%rip),%xmm0
lea    0xedd(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%.2f\0A\00"
define void @celsius(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fsub float %4, 3.200000e+01
%6 = fmul float 5.000000e+00, %5
%7 = fdiv float %6, 9.000000e+00
store float %7, float* %3
%8 = load float, float* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %8)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%.2f\0A\00"
define void @celsius(float %0) {
%2 = fadd float %0, -3.200000e+01
%3 = fmul float %2, 5.000000e+00
%4 = fdiv float %3, 9.000000e+00
%5 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log_allocation(char *, int /*<<< orphan*/, void *);
int /*<<< orphan*/ real_free(void *);
void free(void *ptr) {
  real_free(ptr);
  log_allocation("free", 0, ptr);
}


x86 assembly (clang, -O0):
<free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <real_free@plt>
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rdi
xor    %esi,%esi
call   1040 <log_allocation@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free>:
push   %rbx
mov    %rdi,%rbx
call   1030 <real_free@plt>
lea    0xed0(%rip),%rdi
xor    %esi,%esi
mov    %rbx,%rdx
pop    %rbx
jmp    1040 <log_allocation@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"free\00"
define void @free(i8* %0) {
%2 = tail call i32 @real_free(i8* %0)
%3 = tail call i32 @log_allocation(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 0, i8* %0)
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
scalar_t__ malloc(int);
uint64_t *allocate_bit_array(int len) {
  uint64_t *ret;
  ret = (uint64_t *)malloc(len * sizeof(uint64_t));
  for (int i = 0; i < len; i++)
    ret[i] = 0;
  return ret;
}


x86 assembly (clang, -O0):
<allocate_bit_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    115f <allocate_bit_array+0x4f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1135 <allocate_bit_array+0x25>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<allocate_bit_array>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x0(,%rbx,8),%edi
call   1040 <malloc@plt>
mov    %rax,%r14
test   %ebx,%ebx
jle    1149 <allocate_bit_array+0x29>
mov    %ebx,%edx
shl    $0x3,%rdx
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i64* @allocate_bit_array(i32 %0) {
%2 = shl i32 %0, 3
%3 = tail call i64 @malloc(i32 %2)
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = inttoptr i64 %3 to i8*
%7 = zext i32 %0 to i64
%8 = shl nuw nsw i64 %7, 3
br label %9
9: ; preds = %5, %1
%10 = inttoptr i64 %3 to i64*
ret i64* %10
}
/* Variables and functions */
char *SkipSpaces(char const *);
char *SkipEquiv(const char *line) {
  char *c = SkipSpaces(line);
  if (*c != '=')
    return "";
  c++;
  return SkipSpaces(c);
}


x86 assembly (clang, -O0):
<SkipEquiv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <SkipSpaces@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3d,%eax
je     1149 <SkipEquiv+0x39>
lea    0xec0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1162 <SkipEquiv+0x52>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <SkipSpaces@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SkipEquiv>:
push   %rax
call   1030 <SkipSpaces@plt>
cmpb   $0x3d,(%rax)
jne    1128 <SkipEquiv+0x18>
add    $0x1,%rax
mov    %rax,%rdi
pop    %rax
jmp    1030 <SkipSpaces@plt>
lea    0xed1(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @SkipEquiv(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i8* @SkipSpaces(i8* %5)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 61
br i1 %10, label %11, label %12
11: ; preds = %1
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %2
br label %17
12: ; preds = %1
%13 = load i8*, i8** %4
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %4
%15 = load i8*, i8** %4
%16 = call i8* @SkipSpaces(i8* %15)
store i8* %16, i8** %2
br label %17
17: ; preds = %12, %11
%18 = load i8*, i8** %2
ret i8* %18
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @SkipEquiv(i8* %0) {
%2 = tail call i8* @SkipSpaces(i8* %0)
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 61
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %2, i64 1
%7 = tail call i8* @SkipSpaces(i8* %6)
br label %8
8: ; preds = %1, %5
%9 = phi i8* [ %7, %5 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ Menu_ExeCmd();
int /*<<< orphan*/ printf(char *);
int main(void) {
  int key;
  printf("enter any key.......\n");
  Menu_ExeCmd();
  printf("The End\n");
  while (1)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <Menu_ExeCmd@plt>
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
jmp    114e <main+0x2e>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <Menu_ExeCmd@plt>
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
jmp    1140 <main+0x20>

LLVM IR (-O0):
@.str = [22 x i8] c"enter any key.......\0A\00"
@.str.1 = [9 x i8] c"The End\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @Menu_ExeCmd()
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %0, %6
br label %6
}

LLVM IR (-O2):
@str = [21 x i8] c"enter any key.......\00"
@str.2 = [8 x i8] c"The End\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @Menu_ExeCmd()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.2, i64 0, i64 0))
br label %4
4: ; preds = %4, %0
br label %4
}
void center(row, buf) int row;
char *buf;
{
  int margin;
  margin = ((80 - strlen(buf)) / 2);
  mvaddstr(row, margin, buf);
}


x86 assembly (clang, -O0):
<center>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    $0x50,%eax
sub    %rcx,%rax
shr    $0x1,%rax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    $0x0,%al
call   1040 <mvaddstr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<center>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    $0x50,%esi
sub    %rax,%rsi
shr    %rsi
mov    %ebp,%edi
mov    %rbx,%rdx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <mvaddstr@plt>

LLVM IR (-O0):
define void @center(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i64 @strlen(i8* %6)
%8 = sub i64 80, %7
%9 = udiv i64 %8, 2
%10 = trunc i64 %9 to i32
store i32 %10, i32* %5
%11 = load i32, i32* %3
%12 = load i32, i32* %5
%13 = load i8*, i8** %4
%14 = call i32 (i32, i32, i8*, ...) bitcast (i32 (...)* @mvaddstr to i32 (i32, i32, i8*, ...)*)(i32 %11, i32 %12, i8* %13)
ret void
}

LLVM IR (-O2):
define void @center(i32 %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = sub i64 80, %3
%5 = lshr i64 %4, 1
%6 = trunc i64 %5 to i32
%7 = tail call i32 (i32, i32, i8*, ...) bitcast (i32 (...)* @mvaddstr to i32 (i32, i32, i8*, ...)*)(i32 %0, i32 %6, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dumpmem(char *, int, int);
int main(int argc, char **argv) {
  dumpmem("./dump2030_2264.raw", 0x48002030, 0x48002264);
  dumpmem("./dump25D8_25F8.raw", 0x480025D8, 0x480025F8);
  dumpmem("./dump2A00_2A24.raw", 0x48002A00, 0x48002A24);
  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)
lea    0xed3(%rip),%rdi
mov    $0x48002030,%esi
mov    $0x48002264,%edx
call   1030 <dumpmem@plt>
lea    0xed1(%rip),%rdi
mov    $0x480025d8,%esi
mov    $0x480025f8,%edx
call   1030 <dumpmem@plt>
lea    0xecf(%rip),%rdi
mov    $0x48002a00,%esi
mov    $0x48002a24,%edx
call   1030 <dumpmem@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x48002030,%esi
mov    $0x48002264,%edx
call   1030 <dumpmem@plt>
lea    0xee6(%rip),%rdi
mov    $0x480025d8,%esi
mov    $0x480025f8,%edx
call   1030 <dumpmem@plt>
lea    0xee4(%rip),%rdi
mov    $0x48002a00,%esi
mov    $0x48002a24,%edx
call   1030 <dumpmem@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"./dump2030_2264.raw\00"
@.str.1 = [20 x i8] c"./dump25D8_25F8.raw\00"
@.str.2 = [20 x i8] c"./dump2A00_2A24.raw\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @dumpmem(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 1207967792, i32 1207968356)
%7 = call i32 @dumpmem(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 1207969240, i32 1207969272)
%8 = call i32 @dumpmem(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 1207970304, i32 1207970340)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"./dump2030_2264.raw\00"
@.str.1 = [20 x i8] c"./dump25D8_25F8.raw\00"
@.str.2 = [20 x i8] c"./dump2A00_2A24.raw\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @dumpmem(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 1207967792, i32 1207968356)
%4 = tail call i32 @dumpmem(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 1207969240, i32 1207969272)
%5 = tail call i32 @dumpmem(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 1207970304, i32 1207970340)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint64_t;

/* Variables and functions */
uint64_t hash_keccak_le64(const uint8_t *x) {
  uint64_t r = 0;
  uint64_t i;
  for (i = 0; i < 8; i++)
    r |= (uint64_t)x[i] << (8 * i);
  return r;
}


x86 assembly (clang, -O0):
<hash_keccak_le64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x8,-0x10(%rbp)
jge    1148 <hash_keccak_le64+0x48>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x10(%rbp),%ecx
shl    $0x3,%ecx
shl    %cl,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <hash_keccak_le64+0x16>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @hash_keccak_le64(i64* nocapture %0) {
ret i32 poison
}
unsigned xrop3_81_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~T;
  stk2 = S & stk3;
  stk1 = D | stk2;
  stk1 = ~stk1;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_81_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_81_1_1>:
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
not    %eax
or     %edi,%esi
not    %edi
shl    $0x8,%edi
and    %edi,%eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_81_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = xor i32 %23, -1
store i32 %24, i32* %10
%25 = load i32, i32* %6
%26 = load i32, i32* %10
%27 = and i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %5
%29 = load i32, i32* %9
%30 = or i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = xor i32 %31, -1
store i32 %32, i32* %8
%33 = load i32, i32* %8
%34 = load i32, i32* %6
%35 = xor i32 %34, -1
%36 = and i32 %33, %35
%37 = load i32, i32* %7
%38 = xor i32 %37, -1
%39 = and i32 %36, %38
%40 = load i32, i32* %5
%41 = load i32, i32* %6
%42 = and i32 %40, %41
%43 = or i32 %39, %42
%44 = load i32, i32* %5
%45 = load i32, i32* %7
%46 = and i32 %44, %45
%47 = or i32 %43, %46
ret i32 %47
}

LLVM IR (-O2):
define i32 @xrop3_81_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = zext i8 %1 to i32
%5 = mul nuw nsw i32 %4, 257
%6 = xor i32 %5, -1
%7 = xor i32 %3, -1
%8 = shl nsw i32 %7, 8
%9 = and i32 %8, %6
%10 = or i8 %1, %0
%11 = zext i8 %10 to i32
%12 = or i32 %9, %11
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ AssertFailure(char *, int);
int /*<<< orphan*/ UARTBaseValid(unsigned long);
void UARTFIFODisable(unsigned long ulBase) {
  {
    if (!(UARTBaseValid(ulBase))) {
      AssertFailure(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/AmesianX/OpenBLT/refs/heads/master/Target/"
          "Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/lib/driverlib/"
          "uartlib.c",
          597);
    }
  };
  (*((volatile unsigned long *)(ulBase + 0x0000002C))) &= ~(0x00000010);
}


x86 assembly (clang, -O0):
<UARTFIFODisable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <UARTBaseValid@plt>
cmp    $0x0,%eax
jne    114f <UARTFIFODisable+0x2f>
lea    0xebb(%rip),%rdi
mov    $0x255,%esi
call   1030 <AssertFailure@plt>
mov    -0x8(%rbp),%rax
mov    0x2c(%rax),%rcx
and    $0xffffffffffffffef,%rcx
mov    %rcx,0x2c(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTFIFODisable>:
push   %rbx
mov    %rdi,%rbx
call   1040 <UARTBaseValid@plt>
test   %eax,%eax
jne    113e <UARTFIFODisable+0x1e>
lea    0xecc(%rip),%rdi
mov    $0x255,%esi
call   1030 <AssertFailure@plt>
andq   $0xffffffffffffffef,0x2c(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@.str = [201 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AmesianX/OpenBLT/refs/heads/master/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/lib/driverlib/uartlib.c\00"
define void @UARTFIFODisable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @UARTBaseValid(i64 %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 597)
br label %8
8: ; preds = %6, %1
%9 = load i64, i64* %2
%10 = add i64 %9, 44
%11 = inttoptr i64 %10 to i64*
%12 = load volatile i64, i64* %11
%13 = and i64 %12, -17
store volatile i64 %13, i64* %11
ret void
}

LLVM IR (-O2):
@.str = [201 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AmesianX/OpenBLT/refs/heads/master/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/lib/driverlib/uartlib.c\00"
define void @UARTFIFODisable(i64 %0) {
%2 = tail call i32 @UARTBaseValid(i64 %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @AssertFailure(i8* getelementptr inbounds ([201 x i8], [201 x i8]* @.str, i64 0, i64 0), i32 597)
br label %6
6: ; preds = %4, %1
%7 = add i64 %0, 44
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
%10 = and i64 %9, -17
store volatile i64 %10, i64* %8
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ iconv_t;

/* Variables and functions */
size_t iconv(int /*<<< orphan*/, void *, size_t *, char **, size_t *);
size_t hs_iconv(iconv_t cd, const char **inbuf, size_t *inbytesleft,
                char **outbuf, size_t *outbytesleft) {
  return iconv(cd, (void *)inbuf, inbytesleft, outbuf, outbytesleft);
}


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

x86 assembly (clang, -O2):
<hs_iconv>:
jmp    1030 <iconv@plt>

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

LLVM IR (-O2):
define i64 @hs_iconv(i32 %0, i8** %1, i64* %2, i8** %3, i64* %4) {
%6 = bitcast i8** %1 to i8*
%7 = tail call i64 @iconv(i32 %0, i8* %6, i64* %2, i8** %3, i64* %4)
ret i64 %7
}
void gtk_menu_shell_cancel() {}


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

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

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

LLVM IR (-O2):
define void @gtk_menu_shell_cancel() {
ret void
}
void lang_specific_driver(in_argc, in_argv, in_added_libraries) int *in_argc
    __attribute__((__unused__));
char ***in_argv __attribute__((__unused__));
int *in_added_libraries __attribute__((__unused__));
{ return; }


x86 assembly (clang, -O0):
<lang_specific_driver>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @lang_specific_driver(i32* nocapture %0, i8*** nocapture %1, i32* nocapture %2) {
ret void
}
int ishex(char chr) {
  return (chr >= '0' && chr <= '9') || (chr >= 'a' && chr <= 'f') ||
         (chr >= 'A' && chr <= 'F');
}


x86 assembly (clang, -O0):
<ishex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x30,%eax
jl     1129 <ishex+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x39,%ecx
mov    %al,-0x2(%rbp)
jle    116d <ishex+0x6d>
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1148 <ishex+0x48>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x66,%ecx
mov    %al,-0x2(%rbp)
jle    116d <ishex+0x6d>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x41,%ecx
mov    %al,-0x3(%rbp)
jl     1167 <ishex+0x67>
movsbl -0x1(%rbp),%eax
cmp    $0x46,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ishex>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%al
setb   %al
and    $0xdf,%dil
add    $0xbf,%dil
cmp    $0x6,%dil
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @ishex(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 57
br i1 %9, label %28, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 97
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 102
br i1 %17, label %28, label %18
18: ; preds = %14, %10
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp sge i32 %20, 65
br i1 %21, label %22, label %26
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp sle i32 %24, 70
br label %26
26: ; preds = %22, %18
%27 = phi i1 [ false, %18 ], [ %25, %22 ]
br label %28
28: ; preds = %26, %14, %6
%29 = phi i1 [ true, %14 ], [ true, %6 ], [ %27, %26 ]
%30 = zext i1 %29 to i32
ret i32 %30
}

LLVM IR (-O2):
define i32 @ishex(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = and i8 %0, -33
%5 = add i8 %4, -65
%6 = icmp ult i8 %5, 6
%7 = or i1 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
const char *Size_Name(void) { return "Size"; }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"Size\00"
define i8* @Size_Name() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [5 x i8] c"Size\00"
define i8* @Size_Name() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
long *(wcheck_long_ptr)(long *to_check) { return to_check; }


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

x86 assembly (clang, -O2):
<wcheck_long_ptr>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i64* @wcheck_long_ptr(i64* readnone returned %0) {
ret i64* %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void help(char **hp) {
  char **dp;
  for (dp = hp; *dp; ++dp)
    printf("%s\n", *dp);
}


x86 assembly (clang, -O0):
<help>:
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     1156 <help+0x46>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <help+0x14>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%rsi
test   %rsi,%rsi
je     1144 <help+0x34>
mov    %rdi,%rbx
add    $0x8,%rbx
lea    0xed6(%rip),%r14
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <printf@plt>
mov    (%rbx),%rsi
add    $0x8,%rbx
test   %rsi,%rsi
jne    1130 <help+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @help(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 = %13, %1
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %16
9: ; preds = %5
%10 = load i8**, i8*** %3
%11 = load i8*, i8** %10
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %11)
br label %13
13: ; preds = %9
%14 = load i8**, i8*** %3
%15 = getelementptr inbounds i8*, i8** %14, i32 1
store i8** %15, i8*** %3
br label %5
16: ; preds = %5
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @help(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 i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
%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
}
/* Type definitions */
typedef scalar_t__ int64_t;
typedef int /*<<< orphan*/ Z3_context;
typedef int /*<<< orphan*/ Z3_ast;

/* Variables and functions */
char *Z3_ast_to_string(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void redz3_prin2Ast(int64_t ctx, int64_t ast) {
  printf("%s", Z3_ast_to_string((Z3_context)ctx, (Z3_ast)ast));
}


x86 assembly (clang, -O0):
<redz3_prin2Ast>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%edi
mov    -0x10(%rbp),%rax
mov    %eax,%esi
call   1040 <Z3_ast_to_string@plt>
mov    %rax,%rsi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<redz3_prin2Ast>:
push   %rax
call   1040 <Z3_ast_to_string@plt>
lea    0xed3(%rip),%rdi
mov    %rax,%rsi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @redz3_prin2Ast(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = trunc i64 %5 to i32
%7 = load i64, i64* %4
%8 = trunc i64 %7 to i32
%9 = call i8* @Z3_ast_to_string(i32 %6, i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @redz3_prin2Ast(i64 %0, i64 %1) {
%3 = trunc i64 %0 to i32
%4 = trunc i64 %1 to i32
%5 = tail call i8* @Z3_ast_to_string(i32 %3, i32 %4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}
double ceil(double value) {
  int temporal = (int)value;
  return value < temporal ? temporal : temporal + 1;
}


x86 assembly (clang, -O0):
<ceil>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm1
cvtsi2sdl -0xc(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1130 <ceil+0x30>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1139 <ceil+0x39>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceil>:
cvttsd2si %xmm0,%eax
cvttpd2dq %xmm0,%xmm1
cvtdq2pd %xmm1,%xmm1
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
setbe  %cl
add    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
ret

LLVM IR (-O0):
define double @ceil(double %0) {
%2 = alloca double
%3 = alloca i32
store double %0, double* %2
%4 = load double, double* %2
%5 = fptosi double %4 to i32
store i32 %5, i32* %3
%6 = load double, double* %2
%7 = load i32, i32* %3
%8 = sitofp i32 %7 to double
%9 = fcmp olt double %6, %8
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = load i32, i32* %3
br label %15
12: ; preds = %1
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
br label %15
15: ; preds = %12, %10
%16 = phi i32 [ %11, %10 ], [ %14, %12 ]
%17 = sitofp i32 %16 to double
ret double %17
}

LLVM IR (-O2):
define double @ceil(double %0) {
%2 = fptosi double %0 to i32
%3 = sitofp i32 %2 to double
%4 = fcmp ule double %3, %0
%5 = zext i1 %4 to i32
%6 = add nsw i32 %5, %2
%7 = sitofp i32 %6 to double
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void gloc_fs_write() { exit(1); }


x86 assembly (clang, -O0):
<gloc_fs_write>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<gloc_fs_write>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @gloc_fs_write() {
%1 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @gloc_fs_write() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int nread(unsigned char *, unsigned int, unsigned int);
int read_msg(unsigned char *buf, unsigned int maxlen) {
  unsigned int len;
  if (nread(buf, 2, maxlen) != 2) {
    return -1;
  }
  len = (buf[0] << 8) | buf[1];
  return nread(buf, len, maxlen);
}


x86 assembly (clang, -O0):
<read_msg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    $0x2,%esi
call   1030 <nread@plt>
cmp    $0x2,%eax
je     1145 <read_msg+0x35>
movl   $0xffffffff,-0x4(%rbp)
jmp    116e <read_msg+0x5e>
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
shl    $0x8,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
or     %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <nread@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_msg>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    $0x2,%esi
mov    %ebp,%edx
call   1030 <nread@plt>
cmp    $0x2,%eax
jne    1141 <read_msg+0x31>
movzwl (%rbx),%esi
shl    $0x10,%esi
bswap  %esi
mov    %rbx,%rdi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <nread@plt>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @read_msg(i8* %0, i32 %1) {
%3 = tail call i32 @nread(i8* %0, i32 2, i32 %1)
%4 = icmp eq i32 %3, 2
br i1 %4, label %5, label %14
5: ; preds = %2
%6 = load i8, i8* %0
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %7, 8
%9 = getelementptr inbounds i8, i8* %0, i64 1
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = or i32 %8, %11
%13 = tail call i32 @nread(i8* %0, i32 %12, i32 %1)
br label %14
14: ; preds = %2, %5
%15 = phi i32 [ %13, %5 ], [ -1, %2 ]
ret i32 %15
}
void mp_squh_use_in1fft(int n, int radix, double inoutfft[], int out[],
                        int nfft) {
  void rdft(int n, int isgn, double *a);
  void mp_mul_csqu(int nfft, double dinout[]);
  void mp_mul_d2i(int n, int radix, int nfft, double din[], int out[]);
  mp_mul_csqu(nfft, inoutfft);
  rdft(nfft, -1, &inoutfft[1]);
  mp_mul_d2i(n, radix, nfft, inoutfft, out);
}


x86 assembly (clang, -O0):
<mp_squh_use_in1fft>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <mp_mul_csqu@plt>
mov    -0x1c(%rbp),%edi
mov    -0x10(%rbp),%rdx
add    $0x8,%rdx
mov    $0xffffffff,%esi
call   1040 <rdft@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
call   1050 <mp_mul_d2i@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp_squh_use_in1fft>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8d,%ebp
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %esi,%r15d
mov    %edi,%r12d
mov    %r8d,%edi
mov    %rdx,%rsi
call   1030 <mp_mul_csqu@plt>
lea    0x8(%rbx),%rdx
mov    %ebp,%edi
mov    $0xffffffff,%esi
call   1040 <rdft@plt>
mov    %r12d,%edi
mov    %r15d,%esi
mov    %ebp,%edx
mov    %rbx,%rcx
mov    %r14,%r8
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <mp_mul_d2i@plt>

LLVM IR (-O0):
define void @mp_squh_use_in1fft(i32 %0, i32 %1, double* %2, i32* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca double*
%9 = alloca i32*
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store double* %2, double** %8
store i32* %3, i32** %9
store i32 %4, i32* %10
%11 = load i32, i32* %10
%12 = load double*, double** %8
%13 = load i32, i32* %10
%14 = load double*, double** %8
%15 = getelementptr inbounds double, double* %14, i64 1
%16 = load i32, i32* %6
%17 = load i32, i32* %7
%18 = load i32, i32* %10
%19 = load double*, double** %8
%20 = load i32*, i32** %9
ret void
}

LLVM IR (-O2):
define void @mp_squh_use_in1fft(i32 %0, i32 %1, double* %2, i32* %3, i32 %4) {
tail call void @mp_mul_csqu(i32 %4, double* %2)
%6 = getelementptr inbounds double, double* %2, i64 1
tail call void @rdft(i32 %4, i32 -1, double* %6)
tail call void @mp_mul_d2i(i32 %0, i32 %1, i32 %4, double* %2, i32* %3)
ret void
}
void foo_2_2_2_1_1_1_1_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_2_2_1_1_1_1_2_2() {
ret void
}
void x86_write_cr3(unsigned long val) {
  __asm__ __volatile__("mov %0, %%cr3" ::"r"(val));
}


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

x86 assembly (clang, -O2):
<x86_write_cr3>:
mov    %rdi,%cr3
ret

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

LLVM IR (-O2):
define void @x86_write_cr3(i64 %0) {
tail call void asm sideeffect "mov $0, %cr3", "r,~{dirflag},~{fpsr},~{flags}"(i64 %0)
ret void
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_addnwstr(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


x86 assembly (clang, -O0):
<cmd_addnwstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    115a <cmd_addnwstr+0x2a>
jmp    1170 <cmd_addnwstr+0x40>
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xe95(%rip),%rdi
call   1050 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_addnwstr>:
push   %rax
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1142 <cmd_addnwstr+0x12>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xead(%rip),%rdi
pop    %rax
jmp    1050 <report_error@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_addnwstr(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = call i32 @check_arg_count(i32 %5, i32 1)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %12
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_addnwstr(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}
void __cxa_pure_virtual() {
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<__cxa_pure_virtual>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <__cxa_pure_virtual+0x9>
jmp    1109 <__cxa_pure_virtual+0x9>

x86 assembly (clang, -O2):
<__cxa_pure_virtual>:
jmp    1100 <__cxa_pure_virtual>

LLVM IR (-O0):
define void @__cxa_pure_virtual() {
br label %1
1: ; preds = %1, %0
br label %1
}

LLVM IR (-O2):
define void @__cxa_pure_virtual() {
br label %1
1: ; preds = %1, %0
br label %1
}
char hex2int(unsigned char hex) {
  unsigned char n;
  return (((n) = (hex) - '0') <= 9 ||
          (((n) = ((hex)&0xdf) - 'A') <= 5 ? ((n) += 10) : 0))
             ? (char)n
             : 0xFF;
}


x86 assembly (clang, -O0):
<hex2int>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
sub    $0x30,%eax
mov    %al,-0x2(%rbp)
movzbl %al,%eax
cmp    $0x9,%eax
jle    1165 <hex2int+0x65>
movzbl -0x1(%rbp),%eax
and    $0xdf,%eax
sub    $0x41,%eax
mov    %al,-0x2(%rbp)
movzbl %al,%eax
cmp    $0x5,%eax
jg     1156 <hex2int+0x56>
movzbl -0x2(%rbp),%eax
add    $0xa,%eax
mov    %al,-0x2(%rbp)
movzbl %al,%eax
cmp    $0x0,%eax
jne    1165 <hex2int+0x65>
jmp    1171 <hex2int+0x71>
xor    %eax,%eax
test   $0x1,%al
jne    1165 <hex2int+0x65>
jmp    1171 <hex2int+0x71>
movsbl -0x2(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    117e <hex2int+0x7e>
mov    $0xff,%eax
mov    %eax,-0x8(%rbp)
jmp    117e <hex2int+0x7e>
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex2int>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%al
jb     1120 <hex2int+0x20>
and    $0xdf,%dil
lea    -0x41(%rdi),%eax
add    $0xc9,%dil
cmp    $0x6,%al
movzbl %dil,%ecx
mov    $0xff,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @hex2int(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = zext i8 %4 to i32
%6 = sub nsw i32 %5, 48
%7 = trunc i32 %6 to i8
store i8 %7, i8* %3
%8 = zext i8 %7 to i32
%9 = icmp sle i32 %8, 9
br i1 %9, label %26, label %10
10: ; preds = %1
%11 = load i8, i8* %2
%12 = zext i8 %11 to i32
%13 = and i32 %12, 223
%14 = sub nsw i32 %13, 65
%15 = trunc i32 %14 to i8
store i8 %15, i8* %3
%16 = zext i8 %15 to i32
%17 = icmp sle i32 %16, 5
br i1 %17, label %18, label %25
18: ; preds = %10
%19 = load i8, i8* %3
%20 = zext i8 %19 to i32
%21 = add nsw i32 %20, 10
%22 = trunc i32 %21 to i8
store i8 %22, i8* %3
%23 = zext i8 %22 to i32
%24 = icmp ne i32 %23, 0
br i1 %24, label %26, label %29
25: ; preds = %10
br i1 false, label %26, label %29
26: ; preds = %25, %18, %1
%27 = load i8, i8* %3
%28 = sext i8 %27 to i32
br label %30
29: ; preds = %25, %18
br label %30
30: ; preds = %29, %26
%31 = phi i32 [ %28, %26 ], [ 255, %29 ]
%32 = trunc i32 %31 to i8
ret i8 %32
}

LLVM IR (-O2):
define signext i8 @hex2int(i8 zeroext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
br i1 %3, label %10, label %4
4: ; preds = %1
%5 = and i8 %0, -33
%6 = add i8 %5, -65
%7 = icmp ult i8 %6, 6
%8 = add i8 %5, -55
%9 = select i1 %7, i8 %8, i8 -1
br label %10
10: ; preds = %4, %1
%11 = phi i8 [ %2, %1 ], [ %9, %4 ]
ret i8 %11
}