xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, float, ...);
char *dtostrf(float val, int width, unsigned int precision, char *buf) {
  char format[20];
  sprintf(format, "%%%d.%df", width, precision);
  sprintf(buf, format, val);
  return buf;
}


x86 assembly (clang, -O0):
<dtostrf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x30(%rbp),%rdi
cvtsi2ssl -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%edx
lea    0xec6(%rip),%rsi
mov    $0x1,%al
call   1030 <sprintf@plt>
mov    -0x18(%rbp),%rdi
lea    -0x30(%rbp),%rsi
movss  -0x4(%rbp),%xmm0
mov    $0x1,%al
call   1030 <sprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dtostrf>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rdx,%rbx
mov    %esi,%edx
movss  %xmm0,0xc(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ss %edi,%xmm0
lea    0xed0(%rip),%rsi
lea    0x10(%rsp),%r14
mov    %r14,%rdi
mov    $0x1,%al
call   1030 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
movss  0xc(%rsp),%xmm0
mov    $0x1,%al
call   1030 <sprintf@plt>
mov    %rbx,%rax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%%%d.%df\00"
define i8* @dtostrf(float %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca float
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
%9 = alloca [20 x i8]
store float %0, float* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%10 = getelementptr inbounds [20 x i8], [20 x i8]* %9, i64 0, i64 0
%11 = load i32, i32* %6
%12 = sitofp i32 %11 to float
%13 = load i32, i32* %7
%14 = call i32 (i8*, i8*, float, ...) @sprintf(i8* %10, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float %12, i32 %13)
%15 = load i8*, i8** %8
%16 = getelementptr inbounds [20 x i8], [20 x i8]* %9, i64 0, i64 0
%17 = load float, float* %5
%18 = call i32 (i8*, i8*, float, ...) @sprintf(i8* %15, i8* %16, float %17)
%19 = load i8*, i8** %8
ret i8* %19
}

LLVM IR (-O2):
@.str = [9 x i8] c"%%%d.%df\00"
define i8* @dtostrf(float %0, i32 %1, i32 %2, i8* returned writeonly %3) {
%5 = alloca [20 x i8]
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%7 = sitofp i32 %1 to float
%8 = call i32 (i8*, i8*, float, ...) @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float %7, i32 %2)
%9 = call i32 (i8*, i8*, float, ...) @sprintf(i8* dereferenceable(1) %3, i8* %6, float %0)
ret i8* %3
}
__attribute__((__target__("sse4.2"))) void
__cyg_profile_func_exit(void *func __attribute__((unused)),
                        void *caller __attribute__((unused))) {
  return;
}


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

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

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

LLVM IR (-O2):
define void @__cyg_profile_func_exit(i8* nocapture %0, i8* nocapture %1) {
ret void
}
int test_imm_5Eint32_reg(int val) { return ((val) & (0x5E << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_5Eint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x5e,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_5Eint32_reg(i32 %0) {
%2 = and i32 %0, 94
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int test_imm_CDuint16_mem(unsigned short *val) {
  return ((*val) & (-0xCD << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_CDuint16_mem>:
movzwl (%rdi),%eax
test   $0xff33,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_CDuint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -205
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ pushmatrix();
void pushma_() { pushmatrix(); }


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

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

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

LLVM IR (-O2):
define void @pushma_() {
%1 = tail call i32 (...) @pushmatrix()
ret void
}
void UI_add_input_string(void) {}


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

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

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

LLVM IR (-O2):
define void @UI_add_input_string() {
ret void
}
/* Type definitions */
struct forth_instance {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ create_addr(struct forth_instance *);
int /*<<< orphan*/ parse(struct forth_instance *);
int /*<<< orphan*/ st_push(struct forth_instance *, intptr_t);
void create(struct forth_instance *fi) {
  st_push(fi, (intptr_t)' ');
  parse(fi);
  create_addr(fi);
}


x86 assembly (clang, -O0):
<create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x20,%esi
call   1050 <st_push@plt>
mov    -0x8(%rbp),%rdi
call   1040 <parse@plt>
mov    -0x8(%rbp),%rdi
call   1030 <create_addr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create>:
push   %rbx
mov    %rdi,%rbx
mov    $0x20,%esi
call   1050 <st_push@plt>
mov    %rbx,%rdi
call   1040 <parse@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <create_addr@plt>

LLVM IR (-O0):
%struct.forth_instance = type { i32 }
define void @create(%struct.forth_instance* %0) {
%2 = alloca %struct.forth_instance*
store %struct.forth_instance* %0, %struct.forth_instance** %2
%3 = load %struct.forth_instance*, %struct.forth_instance** %2
%4 = call i32 @st_push(%struct.forth_instance* %3, i64 32)
%5 = load %struct.forth_instance*, %struct.forth_instance** %2
%6 = call i32 @parse(%struct.forth_instance* %5)
%7 = load %struct.forth_instance*, %struct.forth_instance** %2
%8 = call i32 @create_addr(%struct.forth_instance* %7)
ret void
}

LLVM IR (-O2):
%struct.forth_instance = type { i32 }
define void @create(%struct.forth_instance* %0) {
%2 = tail call i32 @st_push(%struct.forth_instance* %0, i64 32)
%3 = tail call i32 @parse(%struct.forth_instance* %0)
%4 = tail call i32 @create_addr(%struct.forth_instance* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ h2o__fatal(char *);
void *malloc(size_t);
void *h2o_mem_alloc(size_t sz) {
  void *p = malloc(sz);
  if (p == NULL)
    h2o__fatal("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/lkwg82/h2o/refs/heads/master/"
               "lib/common/h2o/memory.h"
               ":"
               "350"
               ":"
               "no memory");
  return p;
}


x86 assembly (clang, -O0):
<h2o_mem_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <h2o_mem_alloc+0x30>
lea    0xeb5(%rip),%rdi
call   1030 <h2o__fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h2o_mem_alloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <h2o_mem_alloc+0x1a>
lea    0xecb(%rip),%rdi
call   1030 <h2o__fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [157 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/lkwg82/h2o/refs/heads/master/lib/common/h2o/memory.h:350:no memory\00"
define i8* @h2o_mem_alloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @h2o__fatal(i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [157 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/lkwg82/h2o/refs/heads/master/lib/common/h2o/memory.h:350:no memory\00"
define noalias i8* @h2o_mem_alloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @h2o__fatal(i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *);
int /*<<< orphan*/ stderr;
scalar_t__ strcmp(char const *, char const *);
void checkstr(const char *s1, const char *expect) {
  if (strcmp(s1, expect) != 0) {
    fprintf(stderr, "check failed: expected [%s] got [%s]\n", expect, s1);
    abort();
  }
}


x86 assembly (clang, -O0):
<checkstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
je     117b <checkstr+0x4b>
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rcx
lea    0xe91(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkstr>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strcmp@plt>
test   %rax,%rax
jne    114c <checkstr+0x1c>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
lea    0xea4(%rip),%rsi
mov    %r14,%rdx
mov    %rbx,%rcx
call   1050 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [38 x i8] c"check failed: expected [%s] got [%s]\0A\00"
define void @checkstr(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i64 @strcmp(i8* %5, i8* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = load i8*, i8** %4
%12 = load i8*, i8** %3
%13 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %12)
%14 = call i32 (...) @abort()
unreachable
15: ; preds = %2
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [38 x i8] c"check failed: expected [%s] got [%s]\0A\00"
define void @checkstr(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %0)
%8 = tail call i32 (...) @abort()
unreachable
9: ; preds = %2
ret void
}
/* Variables and functions */
int input_compare(int, int *);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num, sum;
  scanf("%d", &num);
  int array[num];
  sum = input_compare(num, array);
  printf("%d", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rsi
sub    %rcx,%rsi
mov    %rsi,%rsp
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <input_compare@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe79(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xebe(%rip),%r14
lea    -0x14(%rbp),%rsi
mov    %r14,%rdi
call   1040 <scanf@plt>
mov    %rsp,%rbx
mov    -0x14(%rbp),%eax
mov    %rsp,%rsi
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rsi
mov    %rsi,%rsp
mov    -0x14(%rbp),%edi
call   1050 <input_compare@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %rbx,%rsp
xor    %eax,%eax
lea    -0x10(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = zext i32 %4 to i64
%6 = call i8* @llvm.stacksave()
%7 = alloca i32, i64 %5
%8 = load i32, i32* %1
%9 = call i32 @input_compare(i32 %8, i32* %7)
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
scalar_t__ Fork();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int main() {
  pid_t pid;
  int x = 1;
  Fork();
  pid = Fork();
  if (pid == 0) {
    printf("child : x=%d\n", ++x);
    exit(0);
  }
  printf("parent: x=%d\n", --x);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x14(%rbp)
mov    $0x0,%al
call   1030 <Fork@plt>
mov    $0x0,%al
call   1030 <Fork@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    117f <main+0x4f>
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x14(%rbp)
lea    0xe8d(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>
mov    -0x14(%rbp),%esi
add    $0xffffffff,%esi
mov    %esi,-0x14(%rbp)
lea    0xe7f(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <Fork@plt>
xor    %eax,%eax
call   1030 <Fork@plt>
test   %rax,%rax
jne    1152 <main+0x22>
lea    0xeb5(%rip),%rdi
mov    $0x2,%esi
jmp    115b <main+0x2b>
lea    0xeb5(%rip),%rdi
xor    %esi,%esi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"child : x=%d\0A\00"
@.str.1 = [14 x i8] c"parent: x=%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %3
%4 = call i64 (...) @Fork()
%5 = call i64 (...) @Fork()
store i64 %5, i64* %2
%6 = load i64, i64* %2
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %0
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 1
store i32 %10, i32* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = call i32 @exit(i32 0)
unreachable
13: ; preds = %0
%14 = load i32, i32* %3
%15 = add nsw i32 %14, -1
store i32 %15, i32* %3
%16 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %15)
%17 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [14 x i8] c"child : x=%d\0A\00"
@.str.1 = [14 x i8] c"parent: x=%d\0A\00"
define i32 @main() {
%1 = tail call i64 (...) @Fork()
%2 = tail call i64 (...) @Fork()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 2)
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %0
%8 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 0)
%9 = tail call i32 @exit(i32 0)
unreachable
}
float __negsf2(float a_fp) {
  unsigned long a;
  a = (*(unsigned long *)&(a_fp));
  a ^= 0x80000000;
  return (*(float *)&(a));
}


x86 assembly (clang, -O0):
<__negsf2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
movabs $0x80000000,%rax
xor    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @__negsf2(float %0) {
%2 = alloca float
%3 = alloca i64
store float %0, float* %2
%4 = bitcast float* %2 to i64*
%5 = load i64, i64* %4
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = xor i64 %6, 2147483648
store i64 %7, i64* %3
%8 = bitcast i64* %3 to float*
%9 = load float, float* %8
ret float %9
}

LLVM IR (-O2):
define float @__negsf2(float %0) {
ret float poison
}
/* Variables and functions */
int /*<<< orphan*/ D();
int /*<<< orphan*/ prebuilt_func_C();
int /*<<< orphan*/ static_func_C();
void C() {
  D();
  static_func_C();
  prebuilt_func_C();
}


x86 assembly (clang, -O0):
<C>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <D@plt>
mov    $0x0,%al
call   1040 <static_func_C@plt>
mov    $0x0,%al
call   1050 <prebuilt_func_C@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<C>:
push   %rax
xor    %eax,%eax
call   1030 <D@plt>
xor    %eax,%eax
call   1040 <static_func_C@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <prebuilt_func_C@plt>

LLVM IR (-O0):
define void @C() {
%1 = call i32 (...) @D()
%2 = call i32 (...) @static_func_C()
%3 = call i32 (...) @prebuilt_func_C()
ret void
}

LLVM IR (-O2):
define void @C() {
%1 = tail call i32 (...) @D()
%2 = tail call i32 (...) @static_func_C()
%3 = tail call i32 (...) @prebuilt_func_C()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PR_SET_NAME;
int /*<<< orphan*/ prctl(int /*<<< orphan*/, unsigned long);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ sleep(int);
void *new_thread_1(void *arg) {
  prctl(PR_SET_NAME, (unsigned long)"New_thread_1");
  int iloop;
  for (iloop = 0;; iloop++) {
    printf("New thread 1 never return loop %d\n", iloop);
    sleep(1);
  }
  return NULL;
}


x86 assembly (clang, -O0):
<new_thread_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
lea    0xeb4(%rip),%rsi
call   1040 <prctl@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1158 <new_thread_1+0x28>

x86 assembly (clang, -O2):
<new_thread_1>:
push   %r14
push   %rbx
push   %rax
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
lea    0xebc(%rip),%rsi
call   1040 <prctl@plt>
xor    %ebx,%ebx
lea    0xebb(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
add    $0x1,%ebx
jmp    1160 <new_thread_1+0x30>

LLVM IR (-O0):
@PR_SET_NAME = global i32 0
@.str = [13 x i8] c"New_thread_1\00"
@.str.1 = [35 x i8] c"New thread 1 never return loop %d\0A\00"
define i8* @new_thread_1(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i32, i32* @PR_SET_NAME
%5 = call i32 @prctl(i32 %4, i64 ptrtoint ([13 x i8]* @.str to i64))
store i32 0, i32* %3
br label %6
6: ; preds = %10, %1
%7 = load i32, i32* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = call i32 @sleep(i32 1)
br label %10
10: ; preds = %6
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
br label %6
}

LLVM IR (-O2):
@PR_SET_NAME = global i32 0
@.str = [13 x i8] c"New_thread_1\00"
@.str.1 = [35 x i8] c"New thread 1 never return loop %d\0A\00"
define noalias i8* @new_thread_1(i8* nocapture readnone %0) {
%2 = load i32, i32* @PR_SET_NAME
%3 = tail call i32 @prctl(i32 %2, i64 ptrtoint ([13 x i8]* @.str to i64))
br label %4
4: ; preds = %4, %1
%5 = phi i32 [ 0, %1 ], [ %8, %4 ]
%6 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = tail call i32 @sleep(i32 1)
%8 = add nuw nsw i32 %5, 1
br label %4
}
/* Type definitions */
struct tokenizer {
  int dummy;
};

/* Variables and functions */
unsigned long ULONG_MAX;
int /*<<< orphan*/ to_ulong(struct tokenizer *, unsigned long *);
int to_uint(struct tokenizer *t, unsigned int *x) {
  unsigned long int y;
  if (!to_ulong(t, &y) || y > ULONG_MAX)
    return 0;
  *x = y;
  return 1;
}


x86 assembly (clang, -O0):
<to_uint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <to_ulong@plt>
cmp    $0x0,%eax
je     114a <to_uint+0x3a>
mov    -0x20(%rbp),%rax
mov    0x2e97(%rip),%rcx
cmp    (%rcx),%rax
jbe    1156 <to_uint+0x46>
movl   $0x0,-0x4(%rbp)
jmp    1169 <to_uint+0x59>
mov    -0x20(%rbp),%rax
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_uint>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
lea    0x8(%rsp),%rsi
call   1030 <to_ulong@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
je     1142 <to_uint+0x32>
mov    0x8(%rsp),%rcx
mov    0x2ea2(%rip),%rdx
cmp    (%rdx),%rcx
ja     1142 <to_uint+0x32>
mov    %ecx,(%rbx)
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tokenizer = type { i32 }
@ULONG_MAX = global i64 0
define i32 @to_uint(%struct.tokenizer* %0, i32* %1) {
%3 = alloca i32
%4 = alloca %struct.tokenizer*
%5 = alloca i32*
%6 = alloca i64
store %struct.tokenizer* %0, %struct.tokenizer** %4
store i32* %1, i32** %5
%7 = load %struct.tokenizer*, %struct.tokenizer** %4
%8 = call i32 @to_ulong(%struct.tokenizer* %7, i64* %6)
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i64, i64* %6
%12 = load i64, i64* @ULONG_MAX
%13 = icmp ugt i64 %11, %12
br i1 %13, label %14, label %15
14: ; preds = %10, %2
store i32 0, i32* %3
br label %19
15: ; preds = %10
%16 = load i64, i64* %6
%17 = trunc i64 %16 to i32
%18 = load i32*, i32** %5
store i32 %17, i32* %18
store i32 1, i32* %3
br label %19
19: ; preds = %15, %14
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
%struct.tokenizer = type { i32 }
@ULONG_MAX = global i64 0
define i32 @to_uint(%struct.tokenizer* %0, i32* nocapture writeonly %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
%5 = call i32 @to_ulong(%struct.tokenizer* %0, i64* %3)
%6 = icmp eq i32 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %2
%8 = load i64, i64* %3
%9 = load i64, i64* @ULONG_MAX
%10 = icmp ugt i64 %8, %9
br i1 %10, label %13, label %11
11: ; preds = %7
%12 = trunc i64 %8 to i32
store i32 %12, i32* %1
br label %13
13: ; preds = %2, %7, %11
%14 = phi i32 [ 1, %11 ], [ 0, %7 ], [ 0, %2 ]
ret i32 %14
}
int findComplement(int num) {
  unsigned mask = 0;
  unsigned bit = 1;
  while (bit <= (unsigned)num) {
    mask = (mask << 1) | 1;
    bit <<= 1;
  }
  return (~num) & mask;
}


x86 assembly (clang, -O0):
<findComplement>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
ja     113b <findComplement+0x3b>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
or     $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <findComplement+0x15>
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
and    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<findComplement>:
mov    %edi,%eax
xor    %ecx,%ecx
test   %edi,%edi
je     111b <findComplement+0x1b>
mov    $0x1,%edx
nopl   (%rax)
add    %ecx,%ecx
add    $0x1,%ecx
add    %edx,%edx
cmp    %eax,%edx
jbe    1110 <findComplement+0x10>
not    %eax
and    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @findComplement(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 1, %1 ]
%5 = phi i32 [ %7, %3 ], [ 0, %1 ]
%6 = shl i32 %5, 1
%7 = or i32 %6, 1
%8 = shl i32 %4, 1
%9 = icmp ugt i32 %8, %0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %7, %3 ]
%12 = xor i32 %0, -1
%13 = and i32 %11, %12
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ _ce_diag_print_sq120_to_sq64();
int /*<<< orphan*/ _ce_diag_print_tbl_files_ranks_boards();
void ce_diag_print_tbls() {
  _ce_diag_print_sq120_to_sq64();
  _ce_diag_print_tbl_files_ranks_boards();
}


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

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

LLVM IR (-O0):
define void @ce_diag_print_tbls() {
%1 = call i32 (...) @_ce_diag_print_sq120_to_sq64()
%2 = call i32 (...) @_ce_diag_print_tbl_files_ranks_boards()
ret void
}

LLVM IR (-O2):
define void @ce_diag_print_tbls() {
%1 = tail call i32 (...) @_ce_diag_print_sq120_to_sq64()
%2 = tail call i32 (...) @_ce_diag_print_tbl_files_ranks_boards()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("This test is not relevant on this platform\n");
  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
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [44 x i8] c"This test is not relevant on this platform\0A\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 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [43 x i8] c"This test is not relevant on this platform\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage_cx() {
  printf("Usage: gioctl cx add <lcr> <cellid>\n");
  printf("Usage: gioctl cx del <lcr>\n");
  printf("Usage: gioctl cx list\n");
}


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

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

LLVM IR (-O0):
@.str = [37 x i8] c"Usage: gioctl cx add <lcr> <cellid>\0A\00"
@.str.1 = [28 x i8] c"Usage: gioctl cx del <lcr>\0A\00"
@.str.2 = [23 x i8] c"Usage: gioctl cx list\0A\00"
define void @print_usage_cx() {
%1 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [36 x i8] c"Usage: gioctl cx add <lcr> <cellid>\00"
@str.3 = [27 x i8] c"Usage: gioctl cx del <lcr>\00"
@str.4 = [22 x i8] c"Usage: gioctl cx list\00"
define void @print_usage_cx() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int link(char *, char *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  int ret;
  ret = link("./stat.c", "stat.link");
  printf("%d\n", ret);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeca(%rip),%rdi
lea    0xecc(%rip),%rsi
call   1040 <link@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xeda(%rip),%rsi
call   1040 <link@plt>
lea    0xed8(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"./stat.c\00"
@.str.1 = [10 x i8] c"stat.link\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @link(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Type definitions */
struct in6_addr {
  int dummy;
};

/* Variables and functions */
int ipv6_route_op(int /*<<< orphan*/, int, struct in6_addr *, int, int, int);
int add_ipv6_route(int sock_fd, struct in6_addr *addr, int prefix_len,
                   int metric, int ifindex) {
  return ipv6_route_op(0, sock_fd, addr, prefix_len, metric, ifindex);
}


x86 assembly (clang, -O0):
<add_ipv6_route>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
xor    %edi,%edi
call   1030 <ipv6_route_op@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_ipv6_route>:
mov    %r8d,%r9d
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <ipv6_route_op@plt>

LLVM IR (-O0):
%struct.in6_addr = type { i32 }
define i32 @add_ipv6_route(i32 %0, %struct.in6_addr* %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca %struct.in6_addr*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store %struct.in6_addr* %1, %struct.in6_addr** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load %struct.in6_addr*, %struct.in6_addr** %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call i32 @ipv6_route_op(i32 0, i32 %11, %struct.in6_addr* %12, i32 %13, i32 %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
%struct.in6_addr = type { i32 }
define i32 @add_ipv6_route(i32 %0, %struct.in6_addr* %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @ipv6_route_op(i32 0, i32 %0, %struct.in6_addr* %1, i32 %2, i32 %3, i32 %4)
ret i32 %6
}
int test_imm_70uint16_reg(unsigned short val) {
  return ((val) & (0x70 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_70uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0x70,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_70uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 112
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void kasan_poison_free_pages(struct page *page, unsigned int order) {}


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

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

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

LLVM IR (-O2):
%struct.page = type opaque
define void @kasan_poison_free_pages(%struct.page* nocapture %0, i32 %1) {
ret void
}
int g(int b) { return b; }


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

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

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

LLVM IR (-O2):
define i32 @g(i32 returned %0) {
ret i32 %0
}
void d99(char *p, int v) {
  int t = (v * 205) >> 11;
  *(short *)p = (short)(t + ((v - 10 * t) << 8) + 0x3030);
}


x86 assembly (clang, -O0):
<d99>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
imul   $0xcd,-0xc(%rbp),%eax
sar    $0xb,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   $0xa,-0x10(%rbp),%edx
sub    %edx,%ecx
shl    $0x8,%ecx
add    %ecx,%eax
add    $0x3030,%eax
mov    %ax,%cx
mov    -0x8(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<d99>:
imul   $0xcd,%esi,%eax
sar    $0xb,%eax
lea    (%rax,%rax,1),%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%esi
shl    $0x8,%esi
add    %esi,%eax
add    $0x3030,%eax
mov    %ax,(%rdi)
ret

LLVM IR (-O0):
define void @d99(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = mul nsw i32 %6, 205
%8 = ashr i32 %7, 11
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = mul nsw i32 10, %11
%13 = sub nsw i32 %10, %12
%14 = shl i32 %13, 8
%15 = add nsw i32 %9, %14
%16 = add nsw i32 %15, 12336
%17 = trunc i32 %16 to i16
%18 = load i8*, i8** %3
%19 = bitcast i8* %18 to i16*
store i16 %17, i16* %19
ret void
}

LLVM IR (-O2):
define void @d99(i8* nocapture writeonly %0, i32 %1) {
%3 = mul nsw i32 %1, 205
%4 = ashr i32 %3, 11
%5 = mul nsw i32 %4, -10
%6 = add i32 %5, %1
%7 = shl i32 %6, 8
%8 = add nsw i32 %7, %4
%9 = trunc i32 %8 to i16
%10 = add i16 %9, 12336
%11 = bitcast i8* %0 to i16*
store i16 %10, i16* %11
ret void
}
void arch_decomp_setup(void) { unsigned char tmp; }


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

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

LLVM IR (-O0):
define void @arch_decomp_setup() {
%1 = alloca i8
ret void
}

LLVM IR (-O2):
define void @arch_decomp_setup() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f_free(void *);
void my_free(void *ptr) { f_free(ptr); }


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

x86 assembly (clang, -O2):
<my_free>:
jmp    1030 <f_free@plt>

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

LLVM IR (-O2):
define void @my_free(i8* %0) {
%2 = tail call i32 @f_free(i8* %0)
ret void
}
unsigned xrop3_97_1_0(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;
  unsigned stk4;
  stk4 = D & S;
  stk3 = T | stk4;
  stk2 = S ^ stk3;
  stk1 = D ^ stk2;
  stk1 = ~stk1;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_97_1_0>:
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    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
or     -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
xor    -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    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @xrop3_97_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i32 %6, %3
%8 = xor i32 %4, %7
%9 = xor i32 %8, -256
%10 = xor i32 %4, -1
%11 = and i32 %9, %10
%12 = or i32 %11, %3
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalpha(int);
void t_isalpha_0x64() {
  Assert_real((isalpha(100)),
              "/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_isalpha.c",
              505, ("isalpha should be 1 for d"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 1 for d\00"
define void @t_isalpha_0x64() {
%1 = tail call i32 @isalpha(i32 100)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 505, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int anetTcpGenericConnect(char *, char *, int, int /*<<< orphan*/);
int kr_net_tcp_connect(char *err, char *addr, int port) {
  return anetTcpGenericConnect(err, addr, port, 0);
}


x86 assembly (clang, -O0):
<kr_net_tcp_connect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
call   1030 <anetTcpGenericConnect@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kr_net_tcp_connect>:
xor    %ecx,%ecx
jmp    1030 <anetTcpGenericConnect@plt>

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

LLVM IR (-O2):
define i32 @kr_net_tcp_connect(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @anetTcpGenericConnect(i8* %0, i8* %1, i32 %2, i32 0)
ret i32 %4
}
/* Variables and functions */
int EXIT_SUCCESS;
int buscarSubcadena(char *, char *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  char c[] = "123456";
  char s[] = "345";
  printf("%d", buscarSubcadena(c, s));
  return (EXIT_SUCCESS);
}


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    0xec4(%rip),%eax
mov    %eax,-0x17(%rbp)
mov    0xebe(%rip),%ax
mov    %ax,-0x13(%rbp)
mov    0xeb6(%rip),%al
mov    %al,-0x11(%rbp)
mov    0xeae(%rip),%eax
mov    %eax,-0x1b(%rbp)
lea    -0x17(%rbp),%rdi
lea    -0x1b(%rbp),%rsi
call   1040 <buscarSubcadena@plt>
mov    %eax,%esi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e62(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0x363534,0x13(%rsp)
movl   $0x34333231,0x10(%rsp)
34
movl   $0x353433,0xc(%rsp)
lea    0x10(%rsp),%rdi
lea    0xc(%rsp),%rsi
call   1040 <buscarSubcadena@plt>
lea    0xeb5(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.c = [7 x i8] c"123456\00"
@__const.main.s = [4 x i8] c"345\00"
@.str = [3 x i8] c"%d\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [7 x i8]
%7 = alloca [4 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [7 x i8]* %6 to i8*
%9 = bitcast [4 x i8]* %7 to i8*
%10 = getelementptr inbounds [7 x i8], [7 x i8]* %6, i64 0, i64 0
%11 = getelementptr inbounds [4 x i8], [4 x i8]* %7, i64 0, i64 0
%12 = call i32 @buscarSubcadena(i8* %10, i8* %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %12)
%14 = load i32, i32* @EXIT_SUCCESS
ret i32 %14
}

LLVM IR (-O2):
@__const.main.c = [7 x i8] c"123456\00"
@.str = [3 x i8] c"%d\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [7 x i8]
%4 = alloca i32
%5 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
%6 = bitcast i32* %4 to i8*
store i32 3486771, i32* %4
%7 = call i32 @buscarSubcadena(i8* %5, i8* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}