xunge/DecIR huggingface dataset:
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint64_t;

/* Variables and functions */
void store_bigendian_32(uint8_t *x, uint64_t u) {
  x[3] = (uint8_t)u;
  u >>= 8;
  x[2] = (uint8_t)u;
  u >>= 8;
  x[1] = (uint8_t)u;
  u >>= 8;
  x[0] = (uint8_t)u;
}


x86 assembly (clang, -O0):
<store_bigendian_32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x18(%rax)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x10(%rax)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<store_bigendian_32>:
movslq %esi,%rax
mov    %rax,0x18(%rdi)
mov    %eax,%ecx
sar    $0x8,%ecx
movslq %ecx,%rcx
mov    %rcx,0x10(%rdi)
mov    %eax,%ecx
sar    $0x10,%ecx
movslq %ecx,%rcx
mov    %rcx,0x8(%rdi)
sar    $0x18,%eax
cltq
mov    %rax,(%rdi)
ret

LLVM IR (-O0):
define void @store_bigendian_32(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = sext i32 %5 to i64
%7 = load i64*, i64** %3
%8 = getelementptr inbounds i64, i64* %7, i64 3
store i64 %6, i64* %8
%9 = load i32, i32* %4
%10 = ashr i32 %9, 8
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = load i64*, i64** %3
%14 = getelementptr inbounds i64, i64* %13, i64 2
store i64 %12, i64* %14
%15 = load i32, i32* %4
%16 = ashr i32 %15, 8
store i32 %16, i32* %4
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = load i64*, i64** %3
%20 = getelementptr inbounds i64, i64* %19, i64 1
store i64 %18, i64* %20
%21 = load i32, i32* %4
%22 = ashr i32 %21, 8
store i32 %22, i32* %4
%23 = load i32, i32* %4
%24 = sext i32 %23 to i64
%25 = load i64*, i64** %3
%26 = getelementptr inbounds i64, i64* %25, i64 0
store i64 %24, i64* %26
ret void
}

LLVM IR (-O2):
define void @store_bigendian_32(i64* nocapture writeonly %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i64, i64* %0, i64 3
store i64 %3, i64* %4
%5 = ashr i32 %1, 8
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i64, i64* %0, i64 2
store i64 %6, i64* %7
%8 = ashr i32 %1, 16
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i64, i64* %0, i64 1
store i64 %9, i64* %10
%11 = ashr i32 %1, 24
%12 = sext i32 %11 to i64
store i64 %12, i64* %0
ret void
}
int mlx_int_param_undef() {}


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

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

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

LLVM IR (-O2):
define i32 @mlx_int_param_undef() {
ret i32 undef
}
void henchman_projectile(int p, float dt) {}


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

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

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

LLVM IR (-O2):
define void @henchman_projectile(i32 %0, float %1) {
ret void
}
/* Variables and functions */
int factorial(int);
int combinacion(int m, int n) {
  return (factorial(m) / (factorial(n) * factorial(m - n)));
}


x86 assembly (clang, -O0):
<combinacion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <factorial@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <factorial@plt>
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
sub    -0x8(%rbp),%edi
call   1030 <factorial@plt>
mov    -0x10(%rbp),%ecx
mov    %eax,%edx
mov    -0xc(%rbp),%eax
imul   %edx,%ecx
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<combinacion>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <factorial@plt>
mov    %eax,%r14d
mov    %ebx,%edi
call   1030 <factorial@plt>
mov    %eax,%r15d
sub    %ebx,%ebp
mov    %ebp,%edi
call   1030 <factorial@plt>
mov    %eax,%ecx
imul   %r15d,%ecx
mov    %r14d,%eax
cltd
idiv   %ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @combinacion(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 @factorial(i32 %5)
%7 = load i32, i32* %4
%8 = call i32 @factorial(i32 %7)
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = sub nsw i32 %9, %10
%12 = call i32 @factorial(i32 %11)
%13 = mul nsw i32 %8, %12
%14 = sdiv i32 %6, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @combinacion(i32 %0, i32 %1) {
%3 = tail call i32 @factorial(i32 %0)
%4 = tail call i32 @factorial(i32 %1)
%5 = sub nsw i32 %0, %1
%6 = tail call i32 @factorial(i32 %5)
%7 = mul nsw i32 %6, %4
%8 = sdiv i32 %3, %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ abort();
unsigned long minuscczext(unsigned int a, unsigned int b) {
  unsigned int difference = a - b;
  if (difference > a)
    abort();
  return difference;
}


x86 assembly (clang, -O0):
<minuscczext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jbe    113a <minuscczext+0x2a>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<minuscczext>:
sub    %esi,%edi
jb     1118 <minuscczext+0x8>
mov    %rdi,%rax
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i64 @minuscczext(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = sub i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %3
%11 = icmp ugt i32 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 (...) @abort()
unreachable
14: ; preds = %2
%15 = load i32, i32* %5
%16 = zext i32 %15 to i64
ret i64 %16
}

LLVM IR (-O2):
define i64 @minuscczext(i32 %0, i32 %1) {
%3 = icmp ult i32 %0, %1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %2
%7 = sub i32 %0, %1
%8 = zext i32 %7 to i64
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/
__softboundcets_propagate_metadata_shadow_stack_from(int, int /*<<< orphan*/);
char *mkdtemp(char *);
__attribute__((__weak__, __always___)) char *
softboundcets_mkdtemp(char *template) {
  char *ret_ptr = mkdtemp(template);
  __softboundcets_propagate_metadata_shadow_stack_from(1, 0);
  return ret_ptr;
}


x86 assembly (clang, -O0):
<softboundcets_mkdtemp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <mkdtemp@plt>
mov    %rax,-0x10(%rbp)
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <__softboundcets_propagate_metadata_shadow_stack_from@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundcets_mkdtemp>:
push   %rbx
call   1040 <mkdtemp@plt>
mov    %rax,%rbx
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <__softboundcets_propagate_metadata_shadow_stack_from@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define weak i8* @softboundcets_mkdtemp(i8* %0) {
%2 = tail call i8* @mkdtemp(i8* %0)
%3 = tail call i32 @__softboundcets_propagate_metadata_shadow_stack_from(i32 1, i32 0)
ret i8* %2
}
unsigned prepareIovec(const struct iovec *iov, int iovcnt) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.iovec = type opaque
define i32 @prepareIovec(%struct.iovec* nocapture readnone %0, i32 %1) {
ret i32 0
}
int getLimit(void) { return 1000; }


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

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

LLVM IR (-O0):
define i32 @getLimit() {
ret i32 1000
}

LLVM IR (-O2):
define i32 @getLimit() {
ret i32 1000
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ fork();
void e(void) {
  if (fork() != 0)
    exit(1);
}


x86 assembly (clang, -O0):
<e>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <fork@plt>
cmp    $0x0,%rax
je     113f <e+0x1f>
mov    $0x1,%edi
call   1030 <exit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<e>:
push   %rax
xor    %eax,%eax
call   1040 <fork@plt>
test   %rax,%rax
jne    112f <e+0xf>
pop    %rax
ret
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @e() {
%1 = call i64 (...) @fork()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @exit(i32 1)
unreachable
5: ; preds = %0
ret void
}

LLVM IR (-O2):
define void @e() {
%1 = tail call i64 (...) @fork()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @exit(i32 1)
unreachable
5: ; preds = %0
ret void
}
void foo675(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo675(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isgraph(int);
void t_isgraph_0x61() {
  Assert_real((isgraph(97)),
              "/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_isgraph.c",
              490, ("isgraph should be 1 for a"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0x61>:
push   %rax
mov    $0x61,%edi
call   1040 <isgraph@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x1ea,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for a\00"
define void @t_isgraph_0x61() {
%1 = call i32 @isgraph(i32 97)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 490, 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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for a\00"
define void @t_isgraph_0x61() {
%1 = tail call i32 @isgraph(i32 97)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 490, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void extern_predeclared2(void) {}


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

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

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

LLVM IR (-O2):
define void @extern_predeclared2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: ypwhich [-t] [-d domain] [[-h] host]\n"
                  "       ypwhich [-t] [-d domain] [-h host] -m [mname]\n"
                  "       ypwhich -x\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [116 x i8] c"usage: ypwhich [-t] [-d domain] [[-h] host]\0A ypwhich [-t] [-d domain] [-h host] -m [mname]\0A ypwhich -x\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([116 x i8], [116 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [116 x i8] c"usage: ypwhich [-t] [-d domain] [[-h] host]\0A ypwhich [-t] [-d domain] [-h host] -m [mname]\0A ypwhich -x\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([116 x i8], [116 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void g_unichar_isalpha() {}


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

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

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

LLVM IR (-O2):
define void @g_unichar_isalpha() {
ret void
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, double *, double *);
int main() {
  double salary, sales;
  while (getchar() != '\n') {
  }
  scanf("%lf %lf", &salary, &sales);
  printf("TOTAL = R$ %.2lf\n", (salary + (sales * 0.15)));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     1157 <main+0x27>
jmp    113f <main+0xf>
lea    0xeaa(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1050 <scanf@plt>
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  0xe83(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0xa,%al
jne    1140 <main+0x10>
lea    0xeb6(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1050 <scanf@plt>
movsd  0x8(%rsp),%xmm0
mulsd  0xe91(%rip),%xmm0
addsd  0x10(%rsp),%xmm0
lea    0xe94(%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 = [18 x i8] c"TOTAL = R$ %.2lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
br label %4
4: ; preds = %8, %0
%5 = call signext i8 (...) @getchar()
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 10
br i1 %7, label %8, label %9
8: ; preds = %4
br label %4
9: ; preds = %4
%10 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double* %2, double* %3)
%11 = load double, double* %2
%12 = load double, double* %3
%13 = call double @llvm.fmuladd.f64(double %12, double 1.500000e-01, double %11)
%14 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), double %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"%lf %lf\00"
@.str.1 = [18 x i8] c"TOTAL = R$ %.2lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
br label %5
5: ; preds = %5, %0
%6 = tail call signext i8 (...) @getchar()
%7 = icmp eq i8 %6, 10
br i1 %7, label %8, label %5
8: ; preds = %5
%9 = call i32 @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
%10 = load double, double* %1
%11 = load double, double* %2
%12 = call double @llvm.fmuladd.f64(double %11, double 1.500000e-01, double %10)
%13 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), double %12)
ret i32 0
}
__attribute__((pure)) int str_cmp(const char *restrict sa,
                                  const char *restrict sb) {
  if (!sa || !sb)
    return 1;
  while (*sa == *sb++)
    if (!*sa++)
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<str_cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1122 <str_cmp+0x22>
cmpq   $0x0,-0x18(%rbp)
jne    112e <str_cmp+0x2e>
movl   $0x1,-0x4(%rbp)
jmp    1184 <str_cmp+0x84>
jmp    1133 <str_cmp+0x33>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    117d <str_cmp+0x7d>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
cmpb   $0x0,(%rax)
jne    1178 <str_cmp+0x78>
movl   $0x0,-0x4(%rbp)
jmp    1184 <str_cmp+0x84>
jmp    1133 <str_cmp+0x33>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_cmp>:
mov    $0x1,%eax
test   %rdi,%rdi
je     1133 <str_cmp+0x33>
test   %rsi,%rsi
je     1133 <str_cmp+0x33>
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl (%rdi,%rcx,1),%edx
cmp    (%rsi,%rcx,1),%dl
jne    1133 <str_cmp+0x33>
add    $0x1,%rcx
test   %dl,%dl
jne    1120 <str_cmp+0x20>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @str_cmp(i8* noalias %0, i8* noalias %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %16
6: ; preds = %2, %12
%7 = phi i8* [ %14, %12 ], [ %0, %2 ]
%8 = phi i8* [ %13, %12 ], [ %1, %2 ]
%9 = load i8, i8* %7
%10 = load i8, i8* %8
%11 = icmp eq i8 %9, %10
br i1 %11, label %12, label %16
12: ; preds = %6
%13 = getelementptr inbounds i8, i8* %8, i64 1
%14 = getelementptr inbounds i8, i8* %7, i64 1
%15 = icmp eq i8 %9, 0
br i1 %15, label %16, label %6
16: ; preds = %6, %12, %2
%17 = phi i32 [ 1, %2 ], [ 1, %6 ], [ 0, %12 ]
ret i32 %17
}
/* Variables and functions */
scalar_t__ malloc(int);
int *AlocaVetor(int tam) {
  int *vetor = NULL;
  vetor = (int *)malloc(sizeof(int) * tam);
  return vetor;
}


x86 assembly (clang, -O0):
<AlocaVetor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AlocaVetor>:
shl    $0x2,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i32* @AlocaVetor(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
store i32* null, i32** %3
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = mul i64 4, %5
%7 = trunc i64 %6 to i32
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i32*
store i32* %9, i32** %3
%10 = load i32*, i32** %3
ret i32* %10
}

LLVM IR (-O2):
define i32* @AlocaVetor(i32 %0) {
%2 = shl i32 %0, 2
%3 = tail call i64 @malloc(i32 %2)
%4 = inttoptr i64 %3 to i32*
ret i32* %4
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("Usage: eichorncad [-h] [--help]\n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"Usage: eichorncad [-h] [--help]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_FAILURE
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@str = [32 x i8] c"Usage: eichorncad [-h] [--help]\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_FAILURE
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Variables and functions */
double pow(float, float);
float ECFP_LP(float ECFP_con) {
  float coeff = (1 / 0.699);
  float y = 100.13 * pow(ECFP_con, coeff);
  return y;
}


x86 assembly (clang, -O0):
<ECFP_LP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xee3(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xebc(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ECFP_LP>:
push   %rax
movss  0xee7(%rip),%xmm1
call   1030 <pow@plt>
mulsd  0xee2(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @ECFP_LP(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float %0, float* %2
store float 0x3FF6E3CCC0000000, float* %3
%5 = load float, float* %2
%6 = load float, float* %3
%7 = call double @pow(float %5, float %6)
%8 = fmul double 1.001300e+02, %7
%9 = fptrunc double %8 to float
store float %9, float* %4
%10 = load float, float* %4
ret float %10
}

LLVM IR (-O2):
define float @ECFP_LP(float %0) {
%2 = tail call double @pow(float %0, float 0x3FF6E3CCC0000000)
%3 = fmul double %2, 1.001300e+02
%4 = fptrunc double %3 to float
ret float %4
}
void umocktypes_free_longlong(long long *value) { (void)value; }


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

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

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

LLVM IR (-O2):
define void @umocktypes_free_longlong(i64* nocapture %0) {
ret void
}
void RTLogFlush(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLogFlush() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Scheme_EndSubgraph();
void WSQ_EndSubgraph() { Scheme_EndSubgraph(); }


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

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

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

LLVM IR (-O2):
define void @WSQ_EndSubgraph() {
%1 = tail call i32 (...) @Scheme_EndSubgraph()
ret void
}
int test_imm_CAuint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0xCA << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_CAuint64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x10,%rdx
and    $0xca,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_CAuint64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 16
%6 = and i64 %5, 202
%7 = icmp ne i64 %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_CAuint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 13238272
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int test2(int);
int test7(int b) { return test2(2 + test2(2)) ?: 2; }


x86 assembly (clang, -O0):
<test7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x2,%edi
call   1030 <test2@plt>
mov    %eax,%edi
add    $0x2,%edi
call   1030 <test2@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     1146 <test7+0x36>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1153 <test7+0x43>
mov    $0x2,%eax
mov    %eax,-0xc(%rbp)
jmp    1153 <test7+0x43>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test7>:
push   %rbx
mov    $0x2,%ebx
mov    $0x2,%edi
call   1030 <test2@plt>
lea    0x2(%rax),%edi
call   1030 <test2@plt>
test   %eax,%eax
cmove  %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @test7(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @test2(i32 2)
%4 = add nsw i32 2, %3
%5 = call i32 @test2(i32 %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
br label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %7
%10 = phi i32 [ %5, %7 ], [ 2, %8 ]
ret i32 %10
}

LLVM IR (-O2):
define i32 @test7(i32 %0) {
%2 = tail call i32 @test2(i32 2)
%3 = add nsw i32 %2, 2
%4 = tail call i32 @test2(i32 %3)
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 2, i32 %4
ret i32 %6
}
double farthest_planet(stell_mass_ratio)
double stell_mass_ratio;
{ return (50.0 * pow(stell_mass_ratio, (1.0 / 3.0))); }


x86 assembly (clang, -O0):
<farthest_planet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xede(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xec6(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<farthest_planet>:
push   %rax
movsd  0xee7(%rip),%xmm1
call   1030 <pow@plt>
mulsd  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @farthest_planet(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @pow(double %3, double 0x3FD5555555555555)
%5 = fmul double 5.000000e+01, %4
ret double %5
}

LLVM IR (-O2):
define double @farthest_planet(double %0) {
%2 = tail call double @pow(double %0, double 0x3FD5555555555555)
%3 = fmul double %2, 5.000000e+01
ret double %3
}
/* Variables and functions */
double RAND_MAX;
scalar_t__ rand();
double rnd_uniform_d(void) { return (double)rand() / RAND_MAX; }


x86 assembly (clang, -O0):
<rnd_uniform_d>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec1(%rip),%rax
divsd  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rnd_uniform_d>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec4(%rip),%rax
divsd  (%rax),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define double @rnd_uniform_d() {
%1 = call i64 (...) @rand()
%2 = sitofp i64 %1 to double
%3 = load double, double* @RAND_MAX
%4 = fdiv double %2, %3
ret double %4
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define double @rnd_uniform_d() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to double
%3 = load double, double* @RAND_MAX
%4 = fdiv double %2, %3
ret double %4
}
void handle_52(sig) int sig;
{}


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

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

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

LLVM IR (-O2):
define void @handle_52(i32 %0) {
ret void
}
void logic32() {}


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

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

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

LLVM IR (-O2):
define void @logic32() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *stdout;
__attribute__((visibility("default"))) FILE *get_stdin() { return stdout; }


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

x86 assembly (clang, -O2):
<get_stdin>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%rax
ret

LLVM IR (-O0):
@stdout = global i32* null
define i32* @get_stdin() {
%1 = load i32*, i32** @stdout
ret i32* %1
}

LLVM IR (-O2):
@stdout = global i32* null
define i32* @get_stdin() {
%1 = load i32*, i32** @stdout
ret i32* %1
}
int fn6(int z) { return ~(z | 3) | z; }


x86 assembly (clang, -O0):
<fn6>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
or     $0x3,%eax
xor    $0xffffffff,%eax
or     -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn6>:
mov    %edi,%eax
or     $0xfffffffc,%eax
ret

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

LLVM IR (-O2):
define i32 @fn6(i32 %0) {
%2 = or i32 %0, -4
ret i32 %2
}
int isnan(x)
double x;
{
  union {
    double d;
    unsigned short s[4];
    unsigned int i[2];
  } u;
  u.d = x;
  if (sizeof(int) == 4) {
    if (((u.i[1] & 0x7ff00000) == 0x7ff00000) &&
        (((u.i[1] & 0x000fffff) != 0) || (u.i[0] != 0)))
      return 1;
    return (0);
  } else {
    if ((u.s[3] & 0x7ff0) == 0x7ff0) {
      if (((u.s[3] & 0x000f) | u.s[2] | u.s[1] | u.s[0]) != 0)
        return (1);
    }
    return (0);
  }
}


x86 assembly (clang, -O0):
<isnan>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
and    $0x7ff00000,%eax
cmp    $0x7ff00000,%eax
jne    114d <isnan+0x4d>
mov    -0x14(%rbp),%eax
and    $0xfffff,%eax
cmp    $0x0,%eax
jne    1141 <isnan+0x41>
cmpl   $0x0,-0x18(%rbp)
je     114d <isnan+0x4d>
movl   $0x1,-0x4(%rbp)
jmp    1154 <isnan+0x54>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isnan>:
movq   %xmm0,%rcx
mov    %rcx,%rdx
shr    $0x20,%rdx
mov    %edx,%eax
not    %eax
test   $0x7ff00000,%eax
jne    1127 <isnan+0x27>
and    $0xfffff,%edx
mov    $0x1,%eax
or     %edx,%ecx
je     1127 <isnan+0x27>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
%union.anon = type { double }
define i32 @isnan(double %0) {
%2 = alloca i32
%3 = alloca double
%4 = alloca %union.anon
store double %0, double* %3
%5 = load double, double* %3
%6 = bitcast %union.anon* %4 to double*
store double %5, double* %6
%7 = bitcast %union.anon* %4 to [2 x i32]*
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
%9 = load i32, i32* %8
%10 = and i32 %9, 2146435072
%11 = icmp eq i32 %10, 2146435072
br i1 %11, label %12, label %24
12: ; preds = %1
%13 = bitcast %union.anon* %4 to [2 x i32]*
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %13, i64 0, i64 1
%15 = load i32, i32* %14
%16 = and i32 %15, 1048575
%17 = icmp ne i32 %16, 0
br i1 %17, label %23, label %18
18: ; preds = %12
%19 = bitcast %union.anon* %4 to [2 x i32]*
%20 = getelementptr inbounds [2 x i32], [2 x i32]* %19, i64 0, i64 0
%21 = load i32, i32* %20
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %18, %12
store i32 1, i32* %2
br label %25
24: ; preds = %18, %1
store i32 0, i32* %2
br label %25
25: ; preds = %24, %23
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @isnan(double %0) {
%2 = bitcast double %0 to i64
%3 = lshr i64 %2, 32
%4 = trunc i64 %3 to i32
%5 = and i32 %4, 2146435072
%6 = icmp eq i32 %5, 2146435072
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = and i32 %4, 1048575
%9 = trunc i64 %2 to i32
%10 = or i32 %8, %9
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %7, %1
br label %13
13: ; preds = %7, %12
%14 = phi i32 [ 0, %12 ], [ 1, %7 ]
ret i32 %14
}
int test_imm_7Duint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x7D << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_7Duint64_lowword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 125
%5 = icmp ne i64 %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_7Duint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 125
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
char toupper(char);
char *upstr(char *str) {
  register char *s = str;
  while ((*s = toupper(*s)))
    s++;
  return str;
}


x86 assembly (clang, -O0):
<upstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <toupper@plt>
mov    -0x10(%rbp),%rcx
mov    %al,(%rcx)
cmp    $0x0,%al
je     114f <upstr+0x3f>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <upstr+0x14>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<upstr>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %rdi,%rbx
nopw   0x0(%rax,%rax,1)
movsbl (%rbx),%edi
call   1030 <toupper@plt>
mov    %al,(%rbx)
add    $0x1,%rbx
test   %al,%al
jne    1120 <upstr+0x10>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @upstr(i8* returned %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call signext i8 @toupper(i8 signext %4)
store i8 %5, i8* %3
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %0
}
int rt5677_hotword_free(struct device *dev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.device = type opaque
define i32 @rt5677_hotword_free(%struct.device* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *,
                           int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void __create_3_print(void *c, void *k, void *v) {
  fprintf(stdout, "(%s,%zu)\n", (char *)k, *(uint64_t *)v);
}


x86 assembly (clang, -O0):
<__create_3_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
lea    0xec2(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__create_3_print>:
mov    %rsi,%rax
mov    0x2ec6(%rip),%rcx
mov    (%rcx),%edi
mov    (%rdx),%ecx
lea    0xedb(%rip),%rsi
mov    %rax,%rdx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [10 x i8] c"(%s,%zu)\0A\00"
define void @__create_3_print(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* @stdout
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = bitcast i8* %9 to i32*
%11 = load i32, i32* %10
%12 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %8, i32 %11)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [10 x i8] c"(%s,%zu)\0A\00"
define void @__create_3_print(i8* nocapture readnone %0, i8* %1, i8* nocapture %2) {
%4 = load i32, i32* @stdout
%5 = bitcast i8* %2 to i32*
%6 = load i32, i32* %5
%7 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %6)
ret void
}
/* Variables and functions */
scalar_t__ GLeeInit();
int /*<<< orphan*/ pglStartInstrumentsSGIX();
void _Lazy_glStartInstrumentsSGIX(void) {
  if (GLeeInit())
    pglStartInstrumentsSGIX();
}


x86 assembly (clang, -O0):
<_Lazy_glStartInstrumentsSGIX>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <GLeeInit@plt>
cmp    $0x0,%rax
je     113c <_Lazy_glStartInstrumentsSGIX+0x1c>
mov    $0x0,%al
call   1040 <pglStartInstrumentsSGIX@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Lazy_glStartInstrumentsSGIX>:
push   %rax
xor    %eax,%eax
call   1030 <GLeeInit@plt>
test   %rax,%rax
je     1135 <_Lazy_glStartInstrumentsSGIX+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1040 <pglStartInstrumentsSGIX@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @_Lazy_glStartInstrumentsSGIX() {
%1 = call i64 (...) @GLeeInit()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @pglStartInstrumentsSGIX()
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @_Lazy_glStartInstrumentsSGIX() {
%1 = tail call i64 (...) @GLeeInit()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @pglStartInstrumentsSGIX()
br label %5
5: ; preds = %3, %0
ret void
}
/* Variables and functions */
int add_el_full(char *, int, int, int);
int add_el(char *id, int type) { return add_el_full(id, type, -1, -1); }


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

x86 assembly (clang, -O2):
<add_el>:
mov    $0xffffffff,%edx
mov    $0xffffffff,%ecx
jmp    1030 <add_el_full@plt>

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

LLVM IR (-O2):
define i32 @add_el(i8* %0, i32 %1) {
%3 = tail call i32 @add_el_full(i8* %0, i32 %1, i32 -1, i32 -1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ memmove(char *, char *, int);
int strlen(char *);
int shift_string(char *str, int nshift) {
  memmove(str, str + nshift, strlen(str) - (nshift - 1));
  return strlen(str);
}


x86 assembly (clang, -O0):
<shift_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
sub    %eax,%edx
call   1040 <memmove@plt>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shift_string>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
movslq %esi,%r15
lea    (%rdi,%r15,1),%r14
call   1030 <strlen@plt>
sub    %r15d,%eax
lea    0x1(%rax),%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <memmove@plt>
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <strlen@plt>

LLVM IR (-O0):
define i32 @shift_string(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8*, i8** %3
%11 = call i32 @strlen(i8* %10)
%12 = load i32, i32* %4
%13 = sub nsw i32 %12, 1
%14 = sub nsw i32 %11, %13
%15 = call i32 @memmove(i8* %5, i8* %9, i32 %14)
%16 = load i8*, i8** %3
%17 = call i32 @strlen(i8* %16)
ret i32 %17
}

LLVM IR (-O2):
define i32 @shift_string(i8* %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = tail call i32 @strlen(i8* %0)
%6 = sub i32 1, %1
%7 = add i32 %6, %5
%8 = tail call i32 @memmove(i8* %0, i8* %4, i32 %7)
%9 = tail call i32 @strlen(i8* %0)
ret i32 %9
}
int main(void) {
  int f();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ err_template(int, char *);
void errMutex(int n_error) {
  err_template(n_error, "\nFalha ao manipular mutex.\n");
}


x86 assembly (clang, -O0):
<errMutex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xedb(%rip),%rsi
call   1030 <err_template@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<errMutex>:
lea    0xee9(%rip),%rsi
jmp    1030 <err_template@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"\0AFalha ao manipular mutex.\0A\00"
define void @errMutex(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @err_template(i32 %3, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"\0AFalha ao manipular mutex.\0A\00"
define void @errMutex(i32 %0) {
%2 = tail call i32 @err_template(i32 %0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_SETFL;
int /*<<< orphan*/ O_NONBLOCK;
int /*<<< orphan*/ fcntl(int, int /*<<< orphan*/, int /*<<< orphan*/);
scalar_t__ read(int, char *, int);
void serial_clear(int fd) {
  char buf[10];
  fcntl(fd, F_SETFL, O_NONBLOCK);
  while (read(fd, buf, 10) > 0)
    ;
  fcntl(fd, F_SETFL, 0);
}


x86 assembly (clang, -O0):
<serial_clear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ea3(%rip),%rax
mov    (%rax),%esi
mov    0x2eaa(%rip),%rax
mov    (%rax),%edx
call   1030 <fcntl@plt>
mov    -0x4(%rbp),%edi
lea    -0xe(%rbp),%rsi
mov    $0xa,%edx
call   1040 <read@plt>
cmp    $0x0,%rax
jle    1165 <serial_clear+0x45>
jmp    1145 <serial_clear+0x25>
mov    -0x4(%rbp),%edi
mov    0x2e69(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fcntl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_clear>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
mov    0x2ea6(%rip),%r15
mov    (%r15),%esi
mov    0x2eac(%rip),%rax
mov    (%rax),%edx
call   1030 <fcntl@plt>
lea    0x6(%rsp),%r14
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0xa,%edx
call   1040 <read@plt>
test   %rax,%rax
jg     1150 <serial_clear+0x30>
mov    (%r15),%esi
mov    %ebx,%edi
xor    %edx,%edx
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <fcntl@plt>

LLVM IR (-O0):
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
define void @serial_clear(i32 %0) {
%2 = alloca i32
%3 = alloca [10 x i8]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @F_SETFL
%6 = load i32, i32* @O_NONBLOCK
%7 = call i32 @fcntl(i32 %4, i32 %5, i32 %6)
br label %8
8: ; preds = %13, %1
%9 = load i32, i32* %2
%10 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%11 = call i64 @read(i32 %9, i8* %10, i32 10)
%12 = icmp sgt i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %8
br label %8
14: ; preds = %8
%15 = load i32, i32* %2
%16 = load i32, i32* @F_SETFL
%17 = call i32 @fcntl(i32 %15, i32 %16, i32 0)
ret void
}

LLVM IR (-O2):
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
define void @serial_clear(i32 %0) {
%2 = alloca [10 x i8]
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%4 = load i32, i32* @F_SETFL
%5 = load i32, i32* @O_NONBLOCK
%6 = tail call i32 @fcntl(i32 %0, i32 %4, i32 %5)
br label %7
7: ; preds = %7, %1
%8 = call i64 @read(i32 %0, i8* %3, i32 10)
%9 = icmp sgt i64 %8, 0
br i1 %9, label %7, label %10
10: ; preds = %7
%11 = load i32, i32* @F_SETFL
%12 = tail call i32 @fcntl(i32 %0, i32 %11, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage() { printf("msgd-test\n"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"msgd-test\0A\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [10 x i8] c"msgd-test\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret void
}