xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, float *, float *);
int main(void) {
  float salario;
  float emprestimo;
  scanf("%f %f", &salario, &emprestimo);
  printf("emprestimo%s concedido", emprestimo / salario <= 1.2 ? "" : " nao");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed9(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
divss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeae(%rip),%xmm0
lea    0xecc(%rip),%rsi
lea    0xead(%rip),%rax
ucomisd %xmm1,%xmm0
cmovae %rax,%rsi
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
movss  (%rsp),%xmm0
divss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb4(%rip),%xmm1
ucomisd %xmm0,%xmm1
lea    0xeb6(%rip),%rax
lea    0xec7(%rip),%rsi
cmovae %rax,%rsi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%f %f\00"
@.str.1 = [23 x i8] c"emprestimo%s concedido\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [5 x i8] c" nao\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %1, float* %2)
%4 = load float, float* %2
%5 = load float, float* %1
%6 = fdiv float %4, %5
%7 = fpext float %6 to double
%8 = fcmp ole double %7, 1.200000e+00
%9 = zext i1 %8 to i64
%10 = select i1 %8, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0)
%11 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%f %f\00"
@.str.1 = [23 x i8] c"emprestimo%s concedido\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [5 x i8] c" nao\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %1, float* %2)
%6 = load float, float* %2
%7 = load float, float* %1
%8 = fdiv float %6, %7
%9 = fpext float %8 to double
%10 = fcmp ole double %9, 1.200000e+00
%11 = select i1 %10, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0)
%12 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %11)
ret i32 0
}
int plat_match_rotpk(const unsigned char *key_buf, unsigned int key_len) {
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @plat_match_rotpk(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 @plat_match_rotpk(i8* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sync();
int main() {
  sync();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @sync()
ret i32 0
}
/* Variables and functions */
float sqrtf(float);
float INV_SQRTF(float x) { return 1.0F / sqrtf(x); }


x86 assembly (clang, -O0):
<INV_SQRTF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sqrtf@plt>
movaps %xmm0,%xmm1
movss  0xece(%rip),%xmm0
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<INV_SQRTF>:
push   %rax
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     111f <INV_SQRTF+0xf>
sqrtss %xmm0,%xmm0
jmp    1124 <INV_SQRTF+0x14>
call   1030 <sqrtf@plt>
movss  0xed4(%rip),%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @INV_SQRTF(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @sqrtf(float %3)
%5 = fdiv float 1.000000e+00, %4
ret float %5
}

LLVM IR (-O2):
define float @INV_SQRTF(float %0) {
%2 = tail call float @sqrtf(float %0)
%3 = fdiv float 1.000000e+00, %2
ret float %3
}
unsigned int vseteq2(unsigned int a, unsigned int b) {
  unsigned int r, c;
  r = a ^ b;
  c = r | 0x80008000;
  r = r ^ c;
  c = c - 0x00010001;
  c = r & ~c;
  r = c >> 15;
  return r;
}


x86 assembly (clang, -O0):
<vseteq2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
or     $0x80008000,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x10001,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shr    $0xf,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vseteq2>:
xor    %esi,%edi
mov    %edi,%ecx
or     $0x80008000,%ecx
xor    %ecx,%edi
mov    $0x10000,%eax
sub    %ecx,%eax
and    %edi,%eax
shr    $0xf,%eax
ret

LLVM IR (-O0):
define i32 @vseteq2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = xor i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = or i32 %10, -2147450880
store i32 %11, i32* %6
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = xor i32 %12, %13
store i32 %14, i32* %5
%15 = load i32, i32* %6
%16 = sub i32 %15, 65537
store i32 %16, i32* %6
%17 = load i32, i32* %5
%18 = load i32, i32* %6
%19 = xor i32 %18, -1
%20 = and i32 %17, %19
store i32 %20, i32* %6
%21 = load i32, i32* %6
%22 = lshr i32 %21, 15
store i32 %22, i32* %5
%23 = load i32, i32* %5
ret i32 %23
}

LLVM IR (-O2):
define i32 @vseteq2(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
%4 = or i32 %3, -2147450880
%5 = xor i32 %4, %3
%6 = sub i32 65536, %4
%7 = and i32 %5, %6
%8 = lshr i32 %7, 15
ret i32 %8
}
void dl_G_SETCONVERT() {}


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

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

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

LLVM IR (-O2):
define void @dl_G_SETCONVERT() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sendfile(int, int /*<<< orphan*/, int /*<<< orphan*/, int);
int main(void) {
  sendfile(1, 0, 0, 4096);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
xor    %edx,%edx
mov    $0x1000,%ecx
mov    %edx,%esi
call   1030 <sendfile@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x1000,%ecx
call   1030 <sendfile@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sendfile(i32 1, i32 0, i32 0, i32 4096)
ret i32 0
}
/* Variables and functions */
void *remote_address(unsigned rank, void *vaddr) {
  uintptr_t addr = (uintptr_t)vaddr;
  addr |= ((uintptr_t)(rank + 1)) << 39;
  return (void *)addr;
}


x86 assembly (clang, -O0):
<remote_address>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,%eax
shl    $0x27,%rax
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<remote_address>:
lea    0x1(%rdi),%eax
shl    $0x27,%rax
or     %rsi,%rax
ret

LLVM IR (-O0):
define i8* @remote_address(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = ptrtoint i8* %6 to i64
store i64 %7, i64* %5
%8 = load i32, i32* %3
%9 = add i32 %8, 1
%10 = zext i32 %9 to i64
%11 = shl i64 %10, 39
%12 = load i64, i64* %5
%13 = or i64 %12, %11
store i64 %13, i64* %5
%14 = load i64, i64* %5
%15 = inttoptr i64 %14 to i8*
ret i8* %15
}

LLVM IR (-O2):
define i8* @remote_address(i32 %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = add i32 %0, 1
%5 = zext i32 %4 to i64
%6 = shl i64 %5, 39
%7 = or i64 %6, %3
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}
void str_lcase(char *str) {
  for (; *str; str++)
    if (*str >= 'A' && *str <= 'Z')
      *str = *str + ('a' - 'A');
}


x86 assembly (clang, -O0):
<str_lcase>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     115d <str_lcase+0x5d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
jl     1147 <str_lcase+0x47>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5a,%eax
jg     1147 <str_lcase+0x47>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
add    $0x20,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
jmp    114c <str_lcase+0x4c>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <str_lcase+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_lcase>:
mov    (%rdi),%al
test   %al,%al
je     112a <str_lcase+0x2a>
add    $0x1,%rdi
jmp    111b <str_lcase+0x1b>
nopl   0x0(%rax)
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
je     112a <str_lcase+0x2a>
lea    -0x41(%rax),%ecx
cmp    $0x19,%cl
ja     1110 <str_lcase+0x10>
add    $0x20,%al
mov    %al,-0x1(%rdi)
jmp    1110 <str_lcase+0x10>
ret

LLVM IR (-O0):
define void @str_lcase(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %25, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %28
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp sge i32 %10, 65
br i1 %11, label %12, label %24
12: ; preds = %7
%13 = load i8*, i8** %2
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp sle i32 %15, 90
br i1 %16, label %17, label %24
17: ; preds = %12
%18 = load i8*, i8** %2
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = add nsw i32 %20, 32
%22 = trunc i32 %21 to i8
%23 = load i8*, i8** %2
store i8 %22, i8* %23
br label %24
24: ; preds = %17, %12, %7
br label %25
25: ; preds = %24
%26 = load i8*, i8** %2
%27 = getelementptr inbounds i8, i8* %26, i32 1
store i8* %27, i8** %2
br label %3
28: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @str_lcase(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %11
%5 = phi i8 [ %13, %11 ], [ %2, %1 ]
%6 = phi i8* [ %12, %11 ], [ %0, %1 ]
%7 = add i8 %5, -65
%8 = icmp ult i8 %7, 26
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = add nuw nsw i8 %5, 32
store i8 %10, i8* %6
br label %11
11: ; preds = %4, %9
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %11, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x59() {
  Assert_real((isxdigit(89) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isxdigit.c",
              450, ("isxdigit should be 0 for Y"));
}


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

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

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for Y\00"
define void @t_isxdigit_0x59() {
%1 = call i64 @isxdigit(i32 89)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 450, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for Y\00"
define void @t_isxdigit_0x59() {
%1 = tail call i64 @isxdigit(i32 89)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 450, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void dv3o_add(double *output, double *a, double *b) {
  output[0] = a[0] - b[0];
  output[1] = a[1] - b[1];
  output[2] = a[2] - b[2];
}


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

x86 assembly (clang, -O2):
<dv3o_add>:
movsd  (%rsi),%xmm0
subsd  (%rdx),%xmm0
movsd  %xmm0,(%rdi)
movsd  0x8(%rsi),%xmm0
subsd  0x8(%rdx),%xmm0
movsd  %xmm0,0x8(%rdi)
movsd  0x10(%rsi),%xmm0
subsd  0x10(%rdx),%xmm0
movsd  %xmm0,0x10(%rdi)
ret

LLVM IR (-O0):
define void @dv3o_add(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %5
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = load double, double* %8
%10 = load double*, double** %6
%11 = getelementptr inbounds double, double* %10, i64 0
%12 = load double, double* %11
%13 = fsub double %9, %12
%14 = load double*, double** %4
%15 = getelementptr inbounds double, double* %14, i64 0
store double %13, double* %15
%16 = load double*, double** %5
%17 = getelementptr inbounds double, double* %16, i64 1
%18 = load double, double* %17
%19 = load double*, double** %6
%20 = getelementptr inbounds double, double* %19, i64 1
%21 = load double, double* %20
%22 = fsub double %18, %21
%23 = load double*, double** %4
%24 = getelementptr inbounds double, double* %23, i64 1
store double %22, double* %24
%25 = load double*, double** %5
%26 = getelementptr inbounds double, double* %25, i64 2
%27 = load double, double* %26
%28 = load double*, double** %6
%29 = getelementptr inbounds double, double* %28, i64 2
%30 = load double, double* %29
%31 = fsub double %27, %30
%32 = load double*, double** %4
%33 = getelementptr inbounds double, double* %32, i64 2
store double %31, double* %33
ret void
}

LLVM IR (-O2):
define void @dv3o_add(double* nocapture writeonly %0, double* nocapture %1, double* nocapture %2) {
%4 = load double, double* %1
%5 = load double, double* %2
%6 = fsub double %4, %5
store double %6, double* %0
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %2, i64 1
%10 = load double, double* %9
%11 = fsub double %8, %10
%12 = getelementptr inbounds double, double* %0, i64 1
store double %11, double* %12
%13 = getelementptr inbounds double, double* %1, i64 2
%14 = load double, double* %13
%15 = getelementptr inbounds double, double* %2, i64 2
%16 = load double, double* %15
%17 = fsub double %14, %16
%18 = getelementptr inbounds double, double* %0, i64 2
store double %17, double* %18
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ X509;

/* Variables and functions */
int /*<<< orphan*/ NID_pkcs9_emailAddress;
int set_cn(int /*<<< orphan*/ *, int /*<<< orphan*/, char *, int /*<<< orphan*/,
           char const *, int /*<<< orphan*/);
int set_email2(X509 *crt, const char *name) {
  return set_cn(crt, NID_pkcs9_emailAddress, "dummy@example.com",
                NID_pkcs9_emailAddress, name, 0);
}


x86 assembly (clang, -O0):
<set_email2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
mov    0x2eb4(%rip),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%r8
lea    0xebf(%rip),%rdx
xor    %r9d,%r9d
call   1030 <set_cn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_email2>:
mov    %rsi,%r8
mov    0x2ece(%rip),%rax
mov    (%rax),%ecx
lea    0xedd(%rip),%rdx
mov    %ecx,%esi
xor    %r9d,%r9d
jmp    1030 <set_cn@plt>

LLVM IR (-O0):
@NID_pkcs9_emailAddress = global i32 0
@.str = [18 x i8] c"dummy@example.com\00"
define i32 @set_email2(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = load i32, i32* @NID_pkcs9_emailAddress
%7 = load i32, i32* @NID_pkcs9_emailAddress
%8 = load i8*, i8** %4
%9 = call i32 @set_cn(i32* %5, i32 %6, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %7, i8* %8, i32 0)
ret i32 %9
}

LLVM IR (-O2):
@NID_pkcs9_emailAddress = global i32 0
@.str = [18 x i8] c"dummy@example.com\00"
define i32 @set_email2(i32* %0, i8* %1) {
%3 = load i32, i32* @NID_pkcs9_emailAddress
%4 = tail call i32 @set_cn(i32* %0, i32 %3, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %3, i8* %1, i32 0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ cut_string(char *, char *, int);
int /*<<< orphan*/ puts(char *);
void command_print(char *inputed_command) {
  char str[1024];
  cut_string(inputed_command, str, 6);
  puts(str);
  return;
}


x86 assembly (clang, -O0):
<command_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x410(%rbp),%rsi
mov    $0x6,%edx
call   1040 <cut_string@plt>
lea    -0x410(%rbp),%rdi
call   1030 <puts@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<command_print>:
push   %rbx
sub    $0x400,%rsp
mov    %rsp,%rbx
mov    %rbx,%rsi
mov    $0x6,%edx
call   1040 <cut_string@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @command_print(i8* %0) {
%2 = alloca i8*
%3 = alloca [1024 x i8]
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%6 = call i32 @cut_string(i8* %4, i8* %5, i32 6)
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%8 = call i32 @puts(i8* %7)
ret void
}

LLVM IR (-O2):
define void @command_print(i8* %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @cut_string(i8* %0, i8* %3, i32 6)
%5 = call i32 @puts(i8* %3)
ret void
}
const char *MakeFastProcName(const char *proc) { return proc; }


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

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

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

LLVM IR (-O2):
define i8* @MakeFastProcName(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int *, int *);
void call(int x, int y) {
  int a;
  int b;
  printf("%lx %lx\n", &x, &y);
  printf("%lx %lx\n", &a, &b);
}


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

x86 assembly (clang, -O2):
<call>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,0x4(%rsp)
mov    %esi,(%rsp)
lea    0xedd(%rip),%rbx
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rbx,%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%lx %lx\0A\00"
define void @call(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = bitcast i32* %5 to i8*
%8 = bitcast i32* %6 to i8*
%9 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4)
%10 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %5, i32* %6)
ret void
}
void kmemleak_no_scan(const void *ptr) {}


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

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

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

LLVM IR (-O2):
define void @kmemleak_no_scan(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void assert(int test, char *msg) {
  if (!test) {
    printf(msg);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    114c <assert+0x2c>
mov    -0x10(%rbp),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert>:
test   %edi,%edi
je     1125 <assert+0x5>
ret
push   %rax
mov    %rsi,%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define void @assert(i32 %0, i8* nocapture %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @printf(i8* dereferenceable(1) %1)
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %2
ret void
}
unsigned int IntAbs(int x) {
  if (x >= 0)
    return x;
  return (-((unsigned int)x));
}


x86 assembly (clang, -O0):
<IntAbs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     111c <IntAbs+0x1c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1124 <IntAbs+0x24>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @IntAbs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 false)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ ADB_Update();
int /*<<< orphan*/ InterruptReset_Update();
int /*<<< orphan*/ Mouse_Update();
int /*<<< orphan*/ RTC_Interrupt();
int /*<<< orphan*/ Sony_Update();
int /*<<< orphan*/ VIA1_iCA1_PulseNtfy();
void SixtiethSecondNotify(void) {
  Mouse_Update();
  InterruptReset_Update();
  ADB_Update();
  VIA1_iCA1_PulseNtfy();
  Sony_Update();
  RTC_Interrupt();
}


x86 assembly (clang, -O0):
<SixtiethSecondNotify>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1070 <Mouse_Update@plt>
mov    $0x0,%al
call   1060 <InterruptReset_Update@plt>
mov    $0x0,%al
call   1040 <ADB_Update@plt>
mov    $0x0,%al
call   1030 <VIA1_iCA1_PulseNtfy@plt>
mov    $0x0,%al
call   1050 <Sony_Update@plt>
mov    $0x0,%al
call   1080 <RTC_Interrupt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SixtiethSecondNotify>:
push   %rax
xor    %eax,%eax
call   1070 <Mouse_Update@plt>
xor    %eax,%eax
call   1060 <InterruptReset_Update@plt>
xor    %eax,%eax
call   1040 <ADB_Update@plt>
xor    %eax,%eax
call   1030 <VIA1_iCA1_PulseNtfy@plt>
xor    %eax,%eax
call   1050 <Sony_Update@plt>
xor    %eax,%eax
pop    %rcx
jmp    1080 <RTC_Interrupt@plt>

LLVM IR (-O0):
define void @SixtiethSecondNotify() {
%1 = call i32 (...) @Mouse_Update()
%2 = call i32 (...) @InterruptReset_Update()
%3 = call i32 (...) @ADB_Update()
%4 = call i32 (...) @VIA1_iCA1_PulseNtfy()
%5 = call i32 (...) @Sony_Update()
%6 = call i32 (...) @RTC_Interrupt()
ret void
}

LLVM IR (-O2):
define void @SixtiethSecondNotify() {
%1 = tail call i32 (...) @Mouse_Update()
%2 = tail call i32 (...) @InterruptReset_Update()
%3 = tail call i32 (...) @ADB_Update()
%4 = tail call i32 (...) @VIA1_iCA1_PulseNtfy()
%5 = tail call i32 (...) @Sony_Update()
%6 = tail call i32 (...) @RTC_Interrupt()
ret void
}
void null_pause(void) {}


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

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

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

LLVM IR (-O2):
define void @null_pause() {
ret void
}
int _wait(int *status) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @_wait(i32* nocapture readnone %0) {
ret i32 -1
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
void writeBer16Fixed(uint16_t value, uint8_t *dest) {
  *dest = 0x80 & 3;
  *(dest + 1) = (value & 0xf0) >> 8;
  *(dest + 2) = value & 0x0f;
}


x86 assembly (clang, -O0):
<writeBer16Fixed>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x4(%rbp),%ecx
and    $0xf0,%ecx
sar    $0x8,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x4(%rbp),%ecx
and    $0xf,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeBer16Fixed>:
movq   $0x0,(%rsi)
and    $0xf,%edi
mov    %edi,0x8(%rsi)
ret

LLVM IR (-O0):
define void @writeBer16Fixed(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
store i32 0, i32* %5
%6 = load i32, i32* %3
%7 = and i32 %6, 240
%8 = ashr i32 %7, 8
%9 = load i32*, i32** %4
%10 = getelementptr inbounds i32, i32* %9, i64 1
store i32 %8, i32* %10
%11 = load i32, i32* %3
%12 = and i32 %11, 15
%13 = load i32*, i32** %4
%14 = getelementptr inbounds i32, i32* %13, i64 2
store i32 %12, i32* %14
ret void
}

LLVM IR (-O2):
define void @writeBer16Fixed(i32 %0, i32* nocapture writeonly %1) {
store i32 0, i32* %1
%3 = getelementptr inbounds i32, i32* %1, i64 1
store i32 0, i32* %3
%4 = and i32 %0, 15
%5 = getelementptr inbounds i32, i32* %1, i64 2
store i32 %4, i32* %5
ret void
}
/* Variables and functions */
char *getenv(char *);
int /*<<< orphan*/ printf(char *, ...);
void main(int argc, char **argv) {
  if (argc < 2) {
    printf("input error");
  } else {
    printf("%s", getenv(argv[1]));
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x4(%rbp)
jge    114c <main+0x2c>
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    116a <main+0x4a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <getenv@plt>
mov    %rax,%rsi
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x1,%edi
jg     1133 <main+0x13>
lea    0xed4(%rip),%rdi
xor    %eax,%eax
jmp    1040 <printf@plt>
push   %rax
mov    0x8(%rsi),%rdi
call   1030 <getenv@plt>
lea    0xec8(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
pop    %rcx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"input error\00"
@.str.1 = [3 x i8] c"%s\00"
define void @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 2
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %15
9: ; preds = %2
%10 = load i8**, i8*** %4
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i8* @getenv(i8* %12)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %13)
br label %15
15: ; preds = %9, %7
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"input error\00"
@.str.1 = [3 x i8] c"%s\00"
define void @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %11
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i8* @getenv(i8* %8)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %6, %4
ret void
}
void test_simple(void) {}


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

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

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

LLVM IR (-O2):
define void @test_simple() {
ret void
}
int set_room(element)
register int element;
{
  if ((element == 1) || (element == 2))
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<set_room>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     111b <set_room+0x1b>
cmpl   $0x2,-0x8(%rbp)
jne    1127 <set_room+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <set_room+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_room>:
add    $0xffffffff,%edi
xor    %eax,%eax
cmp    $0x2,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @set_room(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 2
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ *__m128d;

/* Variables and functions */
__m128d __attribute__((__always___, __nodebug__))
_mm_div_sd(__m128d a, __m128d b) {
  a[0] /= b[0];
  return a;
}


x86 assembly (clang, -O0):
<_mm_div_sd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    (%rax),%eax
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mm_div_sd>:
mov    (%rdi),%eax
cltd
idivl  (%rsi)
mov    %eax,(%rdi)
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i32* @_mm_div_sd(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 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
%11 = sdiv i32 %10, %7
store i32 %11, i32* %9
%12 = load i32*, i32** %3
ret i32* %12
}

LLVM IR (-O2):
define i32* @_mm_div_sd(i32* returned %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = load i32, i32* %0
%5 = sdiv i32 %4, %3
store i32 %5, i32* %0
ret i32* %0
}
/* Type definitions */
struct taskstats {
  scalar_t__ nivcsw;
  scalar_t__ nvcsw;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, unsigned long long,
                          unsigned long long);
void task_context_switch_counts(struct taskstats *t) {
  printf("\n\nTask   %15s%15s\n"
         "       %15llu%15llu\n",
         "voluntary", "nonvoluntary", (unsigned long long)t->nvcsw,
         (unsigned long long)t->nivcsw);
}


x86 assembly (clang, -O0):
<task_context_switch_counts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rcx
mov    -0x8(%rbp),%rax
mov    (%rax),%r8
lea    0xece(%rip),%rdi
lea    0xef1(%rip),%rsi
lea    0xee7(%rip),%rdx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<task_context_switch_counts>:
mov    (%rdi),%r8
mov    0x8(%rdi),%rcx
lea    0xee2(%rip),%rdi
lea    0xf05(%rip),%rsi
lea    0xefb(%rip),%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.taskstats = type { i64, i64 }
@.str = [39 x i8] c"\0A\0ATask %15s%15s\0A %15llu%15llu\0A\00"
@.str.1 = [10 x i8] c"voluntary\00"
@.str.2 = [13 x i8] c"nonvoluntary\00"
define void @task_context_switch_counts(%struct.taskstats* %0) {
%2 = alloca %struct.taskstats*
store %struct.taskstats* %0, %struct.taskstats** %2
%3 = load %struct.taskstats*, %struct.taskstats** %2
%4 = getelementptr inbounds %struct.taskstats, %struct.taskstats* %3, i32 0, i32 1
%5 = load i64, i64* %4
%6 = load %struct.taskstats*, %struct.taskstats** %2
%7 = getelementptr inbounds %struct.taskstats, %struct.taskstats* %6, i32 0, i32 0
%8 = load i64, i64* %7
%9 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i64 %5, i64 %8)
ret void
}

LLVM IR (-O2):
%struct.taskstats = type { i64, i64 }
@.str = [39 x i8] c"\0A\0ATask %15s%15s\0A %15llu%15llu\0A\00"
@.str.1 = [10 x i8] c"voluntary\00"
@.str.2 = [13 x i8] c"nonvoluntary\00"
define void @task_context_switch_counts(%struct.taskstats* nocapture %0) {
%2 = getelementptr inbounds %struct.taskstats, %struct.taskstats* %0, i64 0, i32 1
%3 = load i64, i64* %2
%4 = getelementptr inbounds %struct.taskstats, %struct.taskstats* %0, i64 0, i32 0
%5 = load i64, i64* %4
%6 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i64 %3, i64 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
int main() {
  f(7);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x7,%edi
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ uniquestr_sprintf(char const **, char *, char const *,
                                     void *);
const char *pack_pointer(const char *prefix, void *pointer_addr) {
  const char *result = NULL;
  uniquestr_sprintf(&result, "\"%s:%p\"", prefix, pointer_addr);
  return result;
}


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

x86 assembly (clang, -O2):
<pack_pointer>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rdx
movq   $0x0,(%rsp)
lea    0xeda(%rip),%rsi
mov    %rsp,%rdi
call   1030 <uniquestr_sprintf@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"\22%s:%p\22\00"
define i8* @pack_pointer(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
store i8* null, i8** %5
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @uniquestr_sprintf(i8** %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
%9 = load i8*, i8** %5
ret i8* %9
}

LLVM IR (-O2):
@.str = [8 x i8] c"\22%s:%p\22\00"
define i8* @pack_pointer(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%5 = call i32 @uniquestr_sprintf(i8** %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%6 = load i8*, i8** %3
ret i8* %6
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
typedef TYPE_1__ *z_streamp;
struct TYPE_4__ {
  size_t avail_out;
  void *next_out;
};

/* Variables and functions */
int /*<<< orphan*/ Z_SYNC_FLUSH;
int inflate(TYPE_1__ *, int /*<<< orphan*/);
int GZ_Read(void *buf, size_t size, z_streamp zsp) {
  zsp->next_out = buf;
  zsp->avail_out = size;
  return inflate(zsp, Z_SYNC_FLUSH);
}


x86 assembly (clang, -O0):
<GZ_Read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rdi
mov    0x2ea2(%rip),%rax
mov    (%rax),%esi
call   1030 <inflate@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GZ_Read>:
mov    %rdi,0x8(%rdx)
mov    %rsi,(%rdx)
mov    0x2eca(%rip),%rax
mov    (%rax),%esi
mov    %rdx,%rdi
jmp    1030 <inflate@plt>

LLVM IR (-O0):
%struct.TYPE_4__ = type { i64, i8* }
@Z_SYNC_FLUSH = global i32 0
define i32 @GZ_Read(i8* %0, i64 %1, %struct.TYPE_4__* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca %struct.TYPE_4__*
store i8* %0, i8** %4
store i64 %1, i64* %5
store %struct.TYPE_4__* %2, %struct.TYPE_4__** %6
%7 = load i8*, i8** %4
%8 = load %struct.TYPE_4__*, %struct.TYPE_4__** %6
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %8, i32 0, i32 1
store i8* %7, i8** %9
%10 = load i64, i64* %5
%11 = load %struct.TYPE_4__*, %struct.TYPE_4__** %6
%12 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %11, i32 0, i32 0
store i64 %10, i64* %12
%13 = load %struct.TYPE_4__*, %struct.TYPE_4__** %6
%14 = load i32, i32* @Z_SYNC_FLUSH
%15 = call i32 @inflate(%struct.TYPE_4__* %13, i32 %14)
ret i32 %15
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { i64, i8* }
@Z_SYNC_FLUSH = global i32 0
define i32 @GZ_Read(i8* %0, i64 %1, %struct.TYPE_4__* %2) {
%4 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %2, i64 0, i32 1
store i8* %0, i8** %4
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %2, i64 0, i32 0
store i64 %1, i64* %5
%6 = load i32, i32* @Z_SYNC_FLUSH
%7 = tail call i32 @inflate(%struct.TYPE_4__* %2, i32 %6)
ret i32 %7
}
/* Variables and functions */
scalar_t__ chdir(char const *);
int /*<<< orphan*/ printf(char *);
void cd(char *dir) {
  if ((chdir((const char *)dir)) != 0) {
    printf("Error, directory not found.\n");
  }
}


x86 assembly (clang, -O0):
<cd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <chdir@plt>
cmp    $0x0,%rax
je     114b <cd+0x2b>
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cd>:
push   %rax
call   1040 <chdir@plt>
test   %rax,%rax
je     1138 <cd+0x18>
lea    0xece(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Error, directory not found.\0A\00"
define void @cd(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @chdir(i8* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@str = [28 x i8] c"Error, directory not found.\00"
define void @cd(i8* %0) {
%2 = tail call i64 @chdir(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
double boyancy(double p_air, double p_gas, double gaccel, double volume) {
  double fb = ((p_air - p_gas) * gaccel * volume);
  return fb;
}


x86 assembly (clang, -O0):
<boyancy>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<boyancy>:
subsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @boyancy(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%10 = load double, double* %5
%11 = load double, double* %6
%12 = fsub double %10, %11
%13 = load double, double* %7
%14 = fmul double %12, %13
%15 = load double, double* %8
%16 = fmul double %14, %15
store double %16, double* %9
%17 = load double, double* %9
ret double %17
}

LLVM IR (-O2):
define double @boyancy(double %0, double %1, double %2, double %3) {
%5 = fsub double %0, %1
%6 = fmul double %5, %2
%7 = fmul double %6, %3
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ LCD_command(int);
void LCD_gotoXY(unsigned char columna, unsigned char fila) {
  if (fila == 0)
    LCD_command(0x80 + columna + 0x00);
  else
    LCD_command(0x80 + columna + 0x40);
}


x86 assembly (clang, -O0):
<LCD_gotoXY>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
cmp    $0x0,%eax
jne    1148 <LCD_gotoXY+0x38>
movzbl -0x1(%rbp),%edi
add    $0x80,%edi
add    $0x0,%edi
call   1030 <LCD_command@plt>
jmp    115a <LCD_gotoXY+0x4a>
movzbl -0x1(%rbp),%edi
add    $0x80,%edi
add    $0x40,%edi
call   1030 <LCD_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_gotoXY>:
xor    %eax,%eax
test   %esi,%esi
setne  %al
shl    $0x6,%eax
add    %eax,%edi
add    $0x80,%edi
jmp    1030 <LCD_command@plt>

LLVM IR (-O0):
define void @LCD_gotoXY(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = add nsw i32 128, %10
%12 = add nsw i32 %11, 0
%13 = call i32 @LCD_command(i32 %12)
br label %20
14: ; preds = %2
%15 = load i8, i8* %3
%16 = zext i8 %15 to i32
%17 = add nsw i32 128, %16
%18 = add nsw i32 %17, 64
%19 = call i32 @LCD_command(i32 %18)
br label %20
20: ; preds = %14, %8
ret void
}

LLVM IR (-O2):
define void @LCD_gotoXY(i8 zeroext %0, i8 zeroext %1) {
%3 = icmp eq i8 %1, 0
%4 = zext i8 %0 to i32
%5 = select i1 %3, i32 128, i32 192
%6 = add nuw nsw i32 %5, %4
%7 = tail call i32 @LCD_command(i32 %6)
ret void
}
int cmpfunc(const void *a, const void *b) {
  return (*(long int *)a - *(long int *)b);
}


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

x86 assembly (clang, -O2):
<cmpfunc>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

LLVM IR (-O0):
define i32 @cmpfunc(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i64*
%7 = load i64, i64* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i64*
%10 = load i64, i64* %9
%11 = sub nsw i64 %7, %10
%12 = trunc i64 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @cmpfunc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = sub nsw i64 %4, %6
%8 = trunc i64 %7 to i32
ret i32 %8
}
int **f(const char *a, const char **b) { return (int **)0; }


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

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

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

LLVM IR (-O2):
define noalias i32** @f(i8* nocapture readnone %0, i8** nocapture readnone %1) {
ret i32** null
}
void caller(void (*f)()) { f(); }


x86 assembly (clang, -O0):
<caller>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   *-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<caller>:
xor    %eax,%eax
jmp    *%rdi

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

LLVM IR (-O2):
define void @caller(void (...)* nocapture %0) {
tail call void (...) %0()
ret void
}