xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, double *, double *);
int main(int argc, const char *argv[]) {
  double positive_integer_A, positive_integer_B;
  scanf("%lf %lf", &positive_integer_A, &positive_integer_B);
  printf("%.0lf\n", positive_integer_A + positive_integer_B);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
call   1040 <scanf@plt>
movsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
movsd  0x10(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"%lf %lf\00"
@.str.1 = [7 x i8] c"%.0lf\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca double
%4 = alloca double
%5 = bitcast double* %3 to i8*
%6 = bitcast double* %4 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double* %3, double* %4)
%8 = load double, double* %3
%9 = load double, double* %4
%10 = fadd double %8, %9
%11 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void *malloc(int);
int /*<<< orphan*/ perror(char *);
void *Malloc(int Size) {
  void *Memory;
  if ((Memory = malloc(Size)) == NULL) {
    perror("Malloc");
    exit(EXIT_FAILURE);
  }
  return (Memory);
}


x86 assembly (clang, -O0):
<Malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    116b <Malloc+0x3b>
lea    0xea8(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Malloc>:
push   %rax
call   1030 <malloc@plt>
test   %rax,%rax
je     113d <Malloc+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"Malloc\00"
@EXIT_FAILURE = global i32 0
define noalias i8* @Malloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
ret i8* %2
}
void set_dr7(unsigned long value) {
  asm volatile("mov %0,%%dr7" : : "r"(value));
}


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

x86 assembly (clang, -O2):
<set_dr7>:
mov    %rdi,%db7
ret

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

LLVM IR (-O2):
define void @set_dr7(i64 %0) {
tail call void asm sideeffect "mov $0,%dr7", "r,~{dirflag},~{fpsr},~{flags}"(i64 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
int print_env_value_i(char *name, void *data, FILE *outf) {
  (void)(data);
  fprintf(outf, " %s", name);
  return 1;
}


x86 assembly (clang, -O0):
<print_env_value_i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xecd(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_env_value_i>:
push   %rax
mov    %rdi,%rax
lea    0xee5(%rip),%rsi
mov    %rdx,%rdi
mov    %rax,%rdx
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c" %s\00"
define i32 @print_env_value_i(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** %5
%8 = load i32*, i32** %6
%9 = load i8*, i8** %4
%10 = call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %9)
ret i32 1
}

LLVM IR (-O2):
@.str = [4 x i8] c" %s\00"
define i32 @print_env_value_i(i8* %0, i8* nocapture readnone %1, i32* nocapture %2) {
%4 = tail call i32 @fprintf(i32* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcpy2(char *, char *);
int main(int argc, char *argv[]) {
  char string[32];
  strcpy2(string, "david");
  printf("hello %s\n", string);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xebf(%rip),%rsi
call   1040 <strcpy2@plt>
lea    -0x30(%rbp),%rsi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xed4(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <strcpy2@plt>
lea    0xec8(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"david\00"
@.str.1 = [10 x i8] c"hello %s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [32 x i8]
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%5 = call i32 @strcpy2(i8* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ write_imm(int);
int /*<<< orphan*/ write_instr(int);
int right_handler(char **save) {
  write_instr(0x00);
  write_imm(0x4F);
  write_instr(0x28);
  return 0;
}


x86 assembly (clang, -O0):
<right_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
call   1040 <write_instr@plt>
mov    $0x4f,%edi
call   1030 <write_imm@plt>
mov    $0x28,%edi
call   1040 <write_instr@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<right_handler>:
push   %rax
xor    %edi,%edi
call   1040 <write_instr@plt>
mov    $0x4f,%edi
call   1030 <write_imm@plt>
mov    $0x28,%edi
call   1040 <write_instr@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @right_handler(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @write_instr(i32 0)
%4 = call i32 @write_imm(i32 79)
%5 = call i32 @write_instr(i32 40)
ret i32 0
}

LLVM IR (-O2):
define i32 @right_handler(i8** nocapture readnone %0) {
%2 = tail call i32 @write_instr(i32 0)
%3 = tail call i32 @write_imm(i32 79)
%4 = tail call i32 @write_instr(i32 40)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bit_copy();
int /*<<< orphan*/ bit_invert();
int /*<<< orphan*/ done();
void main(void) {
  bit_invert();
  bit_copy();
  done();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <bit_invert@plt>
mov    $0x0,%al
call   1050 <bit_copy@plt>
mov    $0x0,%al
call   1030 <done@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <bit_invert@plt>
xor    %eax,%eax
call   1050 <bit_copy@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <done@plt>

LLVM IR (-O0):
define void @main() {
%1 = call i32 (...) @bit_invert()
%2 = call i32 (...) @bit_copy()
%3 = call i32 (...) @done()
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @bit_invert()
%2 = tail call i32 (...) @bit_copy()
%3 = tail call i32 (...) @done()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ multiplication_table();
int main() {
  multiplication_table();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <multiplication_table@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @multiplication_table()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @multiplication_table()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int openat(int, char const *, int);
void test_open_at(int directory_fd, const char *relative_path) {
  int fd;
  fd = openat(directory_fd, relative_path, 0x0000);
  if (!fd)
    close(fd);
  fd = openat(directory_fd, relative_path, 0x0200);
  if (!fd)
    close(fd);
}


x86 assembly (clang, -O0):
<test_open_at>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1030 <openat@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1152 <test_open_at+0x32>
mov    -0x14(%rbp),%edi
call   1040 <close@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x200,%edx
call   1030 <openat@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1178 <test_open_at+0x58>
mov    -0x14(%rbp),%edi
call   1040 <close@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_open_at>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %edx,%edx
call   1030 <openat@plt>
test   %eax,%eax
jne    113a <test_open_at+0x1a>
xor    %edi,%edi
call   1040 <close@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x200,%edx
call   1030 <openat@plt>
test   %eax,%eax
je     1154 <test_open_at+0x34>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
xor    %edi,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <close@plt>

LLVM IR (-O0):
define void @test_open_at(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 i32, i32* %3
%7 = load i8*, i8** %4
%8 = call i32 @openat(i32 %6, i8* %7, i32 0)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp ne i32 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %2
%12 = load i32, i32* %5
%13 = call i32 @close(i32 %12)
br label %14
14: ; preds = %11, %2
%15 = load i32, i32* %3
%16 = load i8*, i8** %4
%17 = call i32 @openat(i32 %15, i8* %16, i32 512)
store i32 %17, i32* %5
%18 = load i32, i32* %5
%19 = icmp ne i32 %18, 0
br i1 %19, label %23, label %20
20: ; preds = %14
%21 = load i32, i32* %5
%22 = call i32 @close(i32 %21)
br label %23
23: ; preds = %20, %14
ret void
}

LLVM IR (-O2):
define void @test_open_at(i32 %0, i8* %1) {
%3 = tail call i32 @openat(i32 %0, i8* %1, i32 0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @close(i32 0)
br label %7
7: ; preds = %5, %2
%8 = tail call i32 @openat(i32 %0, i8* %1, i32 512)
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = tail call i32 @close(i32 0)
br label %12
12: ; preds = %10, %7
ret void
}
/* Variables and functions */
void *string_dup(char *);
void *occampi_rawnamenode_hook_copy(void *hook) {
  char *rawname = (char *)hook;
  if (rawname) {
    return string_dup(rawname);
  }
  return NULL;
}


x86 assembly (clang, -O0):
<occampi_rawnamenode_hook_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1141 <occampi_rawnamenode_hook_copy+0x31>
mov    -0x18(%rbp),%rdi
call   1030 <string_dup@plt>
mov    %rax,-0x8(%rbp)
jmp    1149 <occampi_rawnamenode_hook_copy+0x39>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<occampi_rawnamenode_hook_copy>:
test   %rdi,%rdi
je     111a <occampi_rawnamenode_hook_copy+0xa>
jmp    1030 <string_dup@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @occampi_rawnamenode_hook_copy(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i8* @string_dup(i8* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i8* [ %4, %3 ], [ null, %1 ]
ret i8* %6
}
/* Type definitions */
struct nlattr {
  int nla_len;
};

/* Variables and functions */
int nla_ok(const struct nlattr *nla, int remaining) {
  return remaining >= (int)sizeof(*nla) && nla->nla_len >= sizeof(*nla) &&
         nla->nla_len <= remaining;
}


x86 assembly (clang, -O0):
<nla_ok>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x4,-0xc(%rbp)
mov    %al,-0xd(%rbp)
jl     113f <nla_ok+0x3f>
mov    -0x8(%rbp),%rax
movslq (%rax),%rcx
xor    %eax,%eax
cmp    $0x4,%rcx
mov    %al,-0xd(%rbp)
jb     113f <nla_ok+0x3f>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
cmp    -0xc(%rbp),%eax
setle  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nla_ok>:
xor    %eax,%eax
cmp    $0x4,%esi
jl     1115 <nla_ok+0x15>
mov    (%rdi),%ecx
cmp    $0x4,%ecx
jb     1115 <nla_ok+0x15>
xor    %eax,%eax
cmp    %esi,%ecx
setle  %al
ret

LLVM IR (-O0):
%struct.nlattr = type { i32 }
define i32 @nla_ok(%struct.nlattr* %0, i32 %1) {
%3 = alloca %struct.nlattr*
%4 = alloca i32
store %struct.nlattr* %0, %struct.nlattr** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp sge i32 %5, 4
br i1 %6, label %7, label %19
7: ; preds = %2
%8 = load %struct.nlattr*, %struct.nlattr** %3
%9 = getelementptr inbounds %struct.nlattr, %struct.nlattr* %8, i32 0, i32 0
%10 = load i32, i32* %9
%11 = sext i32 %10 to i64
%12 = icmp uge i64 %11, 4
br i1 %12, label %13, label %19
13: ; preds = %7
%14 = load %struct.nlattr*, %struct.nlattr** %3
%15 = getelementptr inbounds %struct.nlattr, %struct.nlattr* %14, i32 0, i32 0
%16 = load i32, i32* %15
%17 = load i32, i32* %4
%18 = icmp sle i32 %16, %17
br label %19
19: ; preds = %13, %7, %2
%20 = phi i1 [ false, %7 ], [ false, %2 ], [ %18, %13 ]
%21 = zext i1 %20 to i32
ret i32 %21
}

LLVM IR (-O2):
%struct.nlattr = type { i32 }
define i32 @nla_ok(%struct.nlattr* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 3
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = getelementptr inbounds %struct.nlattr, %struct.nlattr* %0, i64 0, i32 0
%6 = load i32, i32* %5
%7 = icmp ugt i32 %6, 3
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = icmp sle i32 %6, %1
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %8, %4, %2
%12 = phi i32 [ 0, %4 ], [ 0, %2 ], [ %10, %8 ]
ret i32 %12
}
/* Variables and functions */
size_t FSE_compress2(void *, size_t, void const *, size_t, int, int);
size_t FSE_compress(void *dst, size_t dstCapacity, const void *src,
                    size_t srcSize) {
  return FSE_compress2(dst, dstCapacity, src, srcSize, 255, (13 - 2));
}


x86 assembly (clang, -O0):
<FSE_compress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xff,%r8d
mov    $0xb,%r9d
call   1030 <FSE_compress2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FSE_compress>:
mov    $0xff,%r8d
mov    $0xb,%r9d
jmp    1030 <FSE_compress2@plt>

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

LLVM IR (-O2):
define i64 @FSE_compress(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = tail call i64 @FSE_compress2(i8* %0, i64 %1, i8* %2, i64 %3, i32 255, i32 11)
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ LOG_DAEMON;
int /*<<< orphan*/ LOG_PID;
int /*<<< orphan*/ openlog(char *, int /*<<< orphan*/, int /*<<< orphan*/);
void open_log(void) { openlog("pptp", LOG_PID, LOG_DAEMON); }


x86 assembly (clang, -O0):
<open_log>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
mov    0x2ec4(%rip),%rax
mov    (%rax),%edx
lea    0xed3(%rip),%rdi
call   1030 <openlog@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_log>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
mov    0x2ec8(%rip),%rax
mov    (%rax),%edx
lea    0xed7(%rip),%rdi
jmp    1030 <openlog@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"pptp\00"
@LOG_PID = global i32 0
@LOG_DAEMON = global i32 0
define void @open_log() {
%1 = load i32, i32* @LOG_PID
%2 = load i32, i32* @LOG_DAEMON
%3 = call i32 @openlog(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"pptp\00"
@LOG_PID = global i32 0
@LOG_DAEMON = global i32 0
define void @open_log() {
%1 = load i32, i32* @LOG_PID
%2 = load i32, i32* @LOG_DAEMON
%3 = tail call i32 @openlog(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
ret void
}
fne(int x, int y) {
  if (x != y)
    return 13;
  else
    return 140;
}


x86 assembly (clang, -O0):
<fne>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1122 <fne+0x22>
movl   $0xd,-0x4(%rbp)
jmp    1129 <fne+0x29>
movl   $0x8c,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fne>:
cmp    %esi,%edi
mov    $0x8c,%ecx
mov    $0xd,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @fne(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = select i1 %3, i32 140, i32 13
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ memset(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
int sigemptyset(sigset_t *set) {
  if (!set) {
    return -1;
  }
  memset(set, sizeof(*set), 0);
  return 0;
}


x86 assembly (clang, -O0):
<sigemptyset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <sigemptyset+0x23>
movl   $0xffffffff,-0x4(%rbp)
jmp    114a <sigemptyset+0x3a>
mov    -0x10(%rbp),%rdi
mov    $0x4,%esi
xor    %edx,%edx
call   1030 <memset@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigemptyset>:
push   %rbx
test   %rdi,%rdi
je     1126 <sigemptyset+0x16>
xor    %ebx,%ebx
mov    $0x4,%esi
xor    %edx,%edx
call   1030 <memset@plt>
jmp    112b <sigemptyset+0x1b>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @sigemptyset(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @memset(i32* %0, i32 4, i32 0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ 0, %3 ], [ -1, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ memmove(void *, void const *, size_t);
void memory_move(void *dst, const void *src, size_t size, size_t count) {
  assert(dst && src);
  memmove(dst, src, size * count);
}


x86 assembly (clang, -O0):
<memory_move>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x21(%rbp)
je     1153 <memory_move+0x33>
cmpq   $0x0,-0x10(%rbp)
setne  %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
imul   -0x20(%rbp),%rdx
call   1040 <memmove@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memory_move>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %rsi,%r15
mov    %rdi,%r12
test   %rdi,%rdi
setne  %al
test   %rsi,%rsi
setne  %cl
and    %al,%cl
movzbl %cl,%edi
call   1030 <assert@plt>
imul   %r14,%rbx
mov    %r12,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <memmove@plt>

LLVM IR (-O0):
define void @memory_move(i8* %0, i8* %1, i64 %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
store i8* %0, i8** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %14
11: ; preds = %4
%12 = load i8*, i8** %6
%13 = icmp ne i8* %12, null
br label %14
14: ; preds = %11, %4
%15 = phi i1 [ false, %4 ], [ %13, %11 ]
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
%18 = load i8*, i8** %5
%19 = load i8*, i8** %6
%20 = load i64, i64* %7
%21 = load i64, i64* %8
%22 = mul i64 %20, %21
%23 = call i32 @memmove(i8* %18, i8* %19, i64 %22)
ret void
}

LLVM IR (-O2):
define void @memory_move(i8* %0, i8* %1, i64 %2, i64 %3) {
%5 = icmp ne i8* %0, null
%6 = icmp ne i8* %1, null
%7 = and i1 %5, %6
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
%10 = mul i64 %3, %2
%11 = tail call i32 @memmove(i8* %0, i8* %1, i64 %10)
ret void
}
void paw_my_constants() {}


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

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

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

LLVM IR (-O2):
define void @paw_my_constants() {
ret void
}
int op_mod(int a, int b) { return (a % b); }


x86 assembly (clang, -O0):
<op_mod>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_mod>:
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @op_mod(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
ret i32 %3
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t bytes_to_uint16_le(const unsigned char *p) {
  return (((uint16_t)p[0]) | (((uint16_t)p[1]) << 8));
}


x86 assembly (clang, -O0):
<bytes_to_uint16_le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bytes_to_uint16_le>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @bytes_to_uint16_le(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = or i32 %6, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @bytes_to_uint16_le(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int __int32_t_encoded_array_size(const int32_t *p, int elements) {
  return sizeof(int32_t) * elements;
}


x86 assembly (clang, -O0):
<__int32_t_encoded_array_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__int32_t_encoded_array_size>:
lea    0x0(,%rsi,4),%eax
ret

LLVM IR (-O0):
define i32 @__int32_t_encoded_array_size(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = sext i32 %5 to i64
%7 = mul i64 4, %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @__int32_t_encoded_array_size(i32* nocapture readnone %0, i32 %1) {
%3 = shl i32 %1, 2
ret i32 %3
}
/* Type definitions */
struct xrdp_iso {
  int dummy;
};
struct stream {
  int dummy;
};

/* Variables and functions */
scalar_t__ xrdp_iso_recv_msg(struct xrdp_iso *, struct stream *, int *);
int xrdp_iso_recv(struct xrdp_iso *self, struct stream *s) {
  int code;
  ;
  if (xrdp_iso_recv_msg(self, s, &code) != 0) {
    ;
    return 1;
  }
  if (code != 0xF0) {
    ;
    return 1;
  };
  return 0;
}


x86 assembly (clang, -O0):
<xrdp_iso_recv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
call   1030 <xrdp_iso_recv_msg@plt>
cmp    $0x0,%rax
je     1147 <xrdp_iso_recv+0x37>
movl   $0x1,-0x4(%rbp)
jmp    1167 <xrdp_iso_recv+0x57>
cmpl   $0xf0,-0x1c(%rbp)
je     1160 <xrdp_iso_recv+0x50>
movl   $0x1,-0x4(%rbp)
jmp    1167 <xrdp_iso_recv+0x57>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrdp_iso_recv>:
push   %rax
lea    0x4(%rsp),%rdx
call   1030 <xrdp_iso_recv_msg@plt>
test   %rax,%rax
setne  %al
cmpl   $0xf0,0x4(%rsp)
setne  %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.xrdp_iso = type { i32 }
%struct.stream = type { i32 }
define i32 @xrdp_iso_recv(%struct.xrdp_iso* %0, %struct.stream* %1) {
%3 = alloca i32
%4 = alloca %struct.xrdp_iso*
%5 = alloca %struct.stream*
%6 = alloca i32
store %struct.xrdp_iso* %0, %struct.xrdp_iso** %4
store %struct.stream* %1, %struct.stream** %5
%7 = load %struct.xrdp_iso*, %struct.xrdp_iso** %4
%8 = load %struct.stream*, %struct.stream** %5
%9 = call i64 @xrdp_iso_recv_msg(%struct.xrdp_iso* %7, %struct.stream* %8, i32* %6)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 1, i32* %3
br label %17
12: ; preds = %2
%13 = load i32, i32* %6
%14 = icmp ne i32 %13, 240
br i1 %14, label %15, label %16
15: ; preds = %12
store i32 1, i32* %3
br label %17
16: ; preds = %12
store i32 0, i32* %3
br label %17
17: ; preds = %16, %15, %11
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
%struct.xrdp_iso = type { i32 }
%struct.stream = type { i32 }
define i32 @xrdp_iso_recv(%struct.xrdp_iso* %0, %struct.stream* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i64 @xrdp_iso_recv_msg(%struct.xrdp_iso* %0, %struct.stream* %1, i32* %3)
%6 = icmp ne i64 %5, 0
%7 = load i32, i32* %3
%8 = icmp ne i32 %7, 240
%9 = select i1 %6, i1 true, i1 %8
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ puts(char *);
void tacheC(void) {
  int i = 0;
  long j;
  puts("------> DEBUT tache C");
  while (1) {
    for (j = 0; j < 60000L; j++)
      ;
    printf("======> Dans tache C %d\n", i);
    i++;
  }
}


x86 assembly (clang, -O0):
<tacheC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <puts@plt>
movq   $0x0,-0x10(%rbp)
cmpq   $0xea60,-0x10(%rbp)
jge    1167 <tacheC+0x47>
jmp    1156 <tacheC+0x36>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1143 <tacheC+0x23>
mov    -0x4(%rbp),%esi
lea    0xea5(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113b <tacheC+0x1b>

x86 assembly (clang, -O2):
<tacheC>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
xor    %ebx,%ebx
lea    0xedd(%rip),%r14
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
add    $0x1,%ebx
jmp    1140 <tacheC+0x20>

LLVM IR (-O0):
@.str = [22 x i8] c"------> DEBUT tache C\00"
@.str.1 = [25 x i8] c"======> Dans tache C %d\0A\00"
define void @tacheC() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
%3 = call i32 @puts(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %0, %12
store i64 0, i64* %2
br label %5
5: ; preds = %9, %4
%6 = load i64, i64* %2
%7 = icmp slt i64 %6, 60000
br i1 %7, label %8, label %12
8: ; preds = %5
br label %9
9: ; preds = %8
%10 = load i64, i64* %2
%11 = add nsw i64 %10, 1
store i64 %11, i64* %2
br label %5
12: ; preds = %5
%13 = load i32, i32* %1
%14 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %13)
%15 = load i32, i32* %1
%16 = add nsw i32 %15, 1
store i32 %16, i32* %1
br label %4
}

LLVM IR (-O2):
@.str = [22 x i8] c"------> DEBUT tache C\00"
@.str.1 = [25 x i8] c"======> Dans tache C %d\0A\00"
define void @tacheC() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
%3 = phi i32 [ 0, %0 ], [ %5, %2 ]
%4 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = add nuw nsw i32 %3, 1
br label %2
}
/* Type definitions */
struct array {
  int dummy;
};

/* Variables and functions */
struct array *array_create(int const);
struct array *queue_create(const int amount) {
  return array_create(amount);
}


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

x86 assembly (clang, -O2):
<queue_create>:
jmp    1030 <array_create@plt>

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

LLVM IR (-O2):
%struct.array = type { i32 }
define %struct.array* @queue_create(i32 %0) {
%2 = tail call %struct.array* @array_create(i32 %0)
ret %struct.array* %2
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int send_event;
};
struct TYPE_4__ {
  TYPE_1__ xselectionrequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xselectionrequest_send_event(void *_p, int _v) {
  ((XEvent *)_p)->xselectionrequest.send_event = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xselectionrequest_send_event>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XEvent_xselectionrequest_send_event(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xselectionrequest_send_event(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
float __copysignf(float x, float y) { return __builtin_copysignf(x, y); }


x86 assembly (clang, -O0):
<__copysignf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movaps 0xee1(%rip),%xmm2
pand   %xmm2,%xmm1
movaps 0xee6(%rip),%xmm2
pand   %xmm2,%xmm0
por    %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<__copysignf>:
andps  0xef9(%rip),%xmm1
andps  0xf02(%rip),%xmm0
orps   %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @__copysignf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = call float @llvm.copysign.f32(float %5, float %6)
ret float %7
}

LLVM IR (-O2):
define float @__copysignf(float %0, float %1) {
%3 = tail call float @llvm.copysign.f32(float %0, float %1)
ret float %3
}
/* Variables and functions */
unsigned long pci_read_config32(int, int);
int /*<<< orphan*/ pci_write_config32(int, int, unsigned long);
void sdram_set_spd_registers(void) {
  unsigned long dcl;
  dcl = pci_read_config32(
      ((((0) & 0xFF) << 16) | (((0x18) & 0x1f) << 11) | (((2) & 0x7) << 8)),
      0x90);
  dcl &= ~(1 << 17);
  pci_write_config32(
      ((((0) & 0xFF) << 16) | (((0x18) & 0x1f) << 11) | (((2) & 0x7) << 8)),
      0x90, dcl);
}


x86 assembly (clang, -O0):
<sdram_set_spd_registers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xc200,%edi
mov    $0x90,%esi
call   1030 <pci_read_config32@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xfffffffffffdffff,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0xc200,%edi
mov    $0x90,%esi
call   1040 <pci_write_config32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdram_set_spd_registers>:
push   %rax
mov    $0xc200,%edi
mov    $0x90,%esi
call   1030 <pci_read_config32@plt>
and    $0xfffffffffffdffff,%rax
mov    $0xc200,%edi
mov    $0x90,%esi
mov    %rax,%rdx
pop    %rax
jmp    1040 <pci_write_config32@plt>

LLVM IR (-O0):
define void @sdram_set_spd_registers() {
%1 = alloca i64
%2 = call i64 @pci_read_config32(i32 49664, i32 144)
store i64 %2, i64* %1
%3 = load i64, i64* %1
%4 = and i64 %3, -131073
store i64 %4, i64* %1
%5 = load i64, i64* %1
%6 = call i32 @pci_write_config32(i32 49664, i32 144, i64 %5)
ret void
}

LLVM IR (-O2):
define void @sdram_set_spd_registers() {
%1 = tail call i64 @pci_read_config32(i32 49664, i32 144)
%2 = and i64 %1, -131073
%3 = tail call i32 @pci_write_config32(i32 49664, i32 144, i64 %2)
ret void
}
/* Variables and functions */
double fabs(double);
int feq(double x, double y) { return (fabs(x - y) < 1.0e-8); }


x86 assembly (clang, -O0):
<feq>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
movaps 0xef1(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xed5(%rip),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<feq>:
subsd  %xmm1,%xmm0
andpd  0xef4(%rip),%xmm0
movsd  0xefc(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
ret

LLVM IR (-O0):
define i32 @feq(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fsub double %5, %6
%8 = call double @llvm.fabs.f64(double %7)
%9 = fcmp olt double %8, 1.000000e-08
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @feq(double %0, double %1) {
%3 = fsub double %0, %1
%4 = tail call double @llvm.fabs.f64(double %3)
%5 = fcmp olt double %4, 1.000000e-08
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ zstream;
struct z_stream_s {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ inflateInit(struct z_stream_s *);
int /*<<< orphan*/ memset(struct z_stream_s *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *);
void c_accessing_zlib(void) {
  struct z_stream_s zstream;
  printf("Hello from C!\n");
  memset(&zstream, 0, sizeof(zstream));
  inflateInit(&zstream);
}


x86 assembly (clang, -O0):
<c_accessing_zlib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
lea    -0x8(%rbp),%rdi
call   1050 <inflateInit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_accessing_zlib>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
call   1030 <puts@plt>
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
mov    %rbx,%rdi
call   1050 <inflateInit@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.z_stream_s = type { i32 }
@.str = [15 x i8] c"Hello from C!\0A\00"
define void @c_accessing_zlib() {
%1 = alloca %struct.z_stream_s
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @memset(%struct.z_stream_s* %1, i32 0, i32 4)
%4 = call i32 @inflateInit(%struct.z_stream_s* %1)
ret void
}

LLVM IR (-O2):
%struct.z_stream_s = type { i32 }
@str = [14 x i8] c"Hello from C!\00"
define void @c_accessing_zlib() {
%1 = alloca %struct.z_stream_s
%2 = bitcast %struct.z_stream_s* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%4 = call i32 @memset(%struct.z_stream_s* %1, i32 0, i32 4)
%5 = call i32 @inflateInit(%struct.z_stream_s* %1)
ret void
}
void CFGMR3QueryU64(void) {}


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

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

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

LLVM IR (-O2):
define void @CFGMR3QueryU64() {
ret void
}
int fun932() { return 932; }


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

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

LLVM IR (-O0):
define i32 @fun932() {
ret i32 932
}

LLVM IR (-O2):
define i32 @fun932() {
ret i32 932
}
int gauss_trick(int value) { return (value * (value + 1)) / 2; }


x86 assembly (clang, -O0):
<gauss_trick>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<gauss_trick>:
lea    0x1(%rdi),%ecx
imul   %edi,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
add    %ecx,%eax
sar    %eax
ret

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

LLVM IR (-O2):
define i32 @gauss_trick(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = mul nsw i32 %2, %0
%4 = sdiv i32 %3, 2
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit_from_app();
void sig_del(int signo, int width, int height, int bpp) { exit_from_app(); }


x86 assembly (clang, -O0):
<sig_del>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    $0x0,%al
call   1030 <exit_from_app@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @sig_del(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 (...) @exit_from_app()
ret void
}
/* Variables and functions */
double floor(double);
double pfloat(double value) { return value - floor(value); }


x86 assembly (clang, -O0):
<pfloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pfloat>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <floor@plt>
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @pfloat(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = call double @llvm.floor.f64(double %4)
%6 = fsub double %3, %5
ret double %6
}

LLVM IR (-O2):
define double @pfloat(double %0) {
%2 = tail call double @llvm.floor.f64(double %0)
%3 = fsub double %0, %2
ret double %3
}
int chmod(char **str, int perm) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @chmod(i8** nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn34() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn34");
  return result;
}


x86 assembly (clang, -O0):
<fn34>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1e,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn34>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fn34\00"
define i8* @fn34() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = add nsw i32 20, %3
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 20
%9 = add nsw i32 30, %8
%10 = call i8* @realloc(i8* %6, i32 %9)
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"fn34\00"
define i8* @fn34() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ loop();
int test() {
  int i, sum;
  sum = 0;
  loop();
  for (i = 1; i <= 10; i += 1)
    sum += i;
  return 0;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <loop@plt>
movl   $0x1,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jg     114e <test+0x3e>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112d <test+0x1d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test() {
%1 = tail call i32 (...) @loop()
ret i32 0
}