xunge/DecIR huggingface dataset:
/* Variables and functions */
int blink1_degamma_log2lin(int);
int blink1_degamma(int n) { return blink1_degamma_log2lin(n); }


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

x86 assembly (clang, -O2):
<blink1_degamma>:
jmp    1030 <blink1_degamma_log2lin@plt>

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

LLVM IR (-O2):
define i32 @blink1_degamma(i32 %0) {
%2 = tail call i32 @blink1_degamma_log2lin(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ dpeek();
int /*<<< orphan*/ drepl(int /*<<< orphan*/);
int /*<<< orphan*/ float_to_fixnum(int /*<<< orphan*/);
int /*<<< orphan*/ tag_fixnum(int /*<<< orphan*/);
void primitive_float_to_fixnum_impl(void) {
  drepl(tag_fixnum(float_to_fixnum(dpeek())));
}


x86 assembly (clang, -O0):
<primitive_float_to_fixnum_impl>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <dpeek@plt>
mov    %eax,%edi
call   1060 <float_to_fixnum@plt>
mov    %eax,%edi
call   1040 <tag_fixnum@plt>
mov    %eax,%edi
call   1050 <drepl@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<primitive_float_to_fixnum_impl>:
push   %rax
xor    %eax,%eax
call   1030 <dpeek@plt>
mov    %eax,%edi
call   1060 <float_to_fixnum@plt>
mov    %eax,%edi
call   1040 <tag_fixnum@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <drepl@plt>

LLVM IR (-O0):
define void @primitive_float_to_fixnum_impl() {
%1 = call i32 (...) @dpeek()
%2 = call i32 @float_to_fixnum(i32 %1)
%3 = call i32 @tag_fixnum(i32 %2)
%4 = call i32 @drepl(i32 %3)
ret void
}

LLVM IR (-O2):
define void @primitive_float_to_fixnum_impl() {
%1 = tail call i32 (...) @dpeek()
%2 = tail call i32 @float_to_fixnum(i32 %1)
%3 = tail call i32 @tag_fixnum(i32 %2)
%4 = tail call i32 @drepl(i32 %3)
ret void
}
int test_imm_25uint32_reg(unsigned int val) {
  return ((val) & (0x25 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_25uint32_reg(i32 %0) {
%2 = and i32 %0, 37
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void compilerBarrier(void) { asm volatile("" ::: "memory"); }


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

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

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

LLVM IR (-O2):
define void @compilerBarrier() {
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int getegid();
int geteuid();
int getgid();
int getuid();
int /*<<< orphan*/ printf(char *, int, int, int, int);
void print(void) {
  int uid, euid;
  int gid, egid;
  uid = getuid();
  euid = geteuid();
  gid = getgid();
  egid = getegid();
  printf("UID/eUID: %d/%d GID/eGID: %d/%d\n", uid, euid, gid, egid);
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getuid@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1050 <geteuid@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1060 <getgid@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1070 <getegid@plt>
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
lea    0xe6c(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %rbp
push   %r14
push   %rbx
xor    %eax,%eax
call   1030 <getuid@plt>
mov    %eax,%r14d
xor    %eax,%eax
call   1050 <geteuid@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1060 <getgid@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1070 <getegid@plt>
lea    0xe82(%rip),%rdi
mov    %r14d,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
mov    %eax,%r8d
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"UID/eUID: %d/%d GID/eGID: %d/%d\0A\00"
define void @print() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 (...) @getuid()
store i32 %5, i32* %1
%6 = call i32 (...) @geteuid()
store i32 %6, i32* %2
%7 = call i32 (...) @getgid()
store i32 %7, i32* %3
%8 = call i32 (...) @getegid()
store i32 %8, i32* %4
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10, i32 %11, i32 %12)
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"UID/eUID: %d/%d GID/eGID: %d/%d\0A\00"
define void @print() {
%1 = tail call i32 (...) @getuid()
%2 = tail call i32 (...) @geteuid()
%3 = tail call i32 (...) @getgid()
%4 = tail call i32 (...) @getegid()
%5 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2, i32 %3, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, int /*<<< orphan*/, int);
const char *put_txt(const char *fr, int *ret) {
  while (*fr && *fr != '%') {
    write(1, fr++, 1);
    (*ret)++;
  }
  return (fr);
}


x86 assembly (clang, -O0):
<put_txt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1145 <put_txt+0x35>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x25,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1155 <put_txt+0x45>
jmp    1182 <put_txt+0x72>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    %eax,%esi
mov    $0x1,%edx
mov    %edx,%edi
call   1030 <write@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
jmp    1120 <put_txt+0x10>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_txt>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rdi,%rbx
xchg   %ax,%ax
movzbl (%rbx),%eax
test   %al,%al
je     114b <put_txt+0x3b>
cmp    $0x25,%al
je     114b <put_txt+0x3b>
add    $0x1,%rbx
mov    $0x1,%edi
mov    %r15d,%esi
mov    $0x1,%edx
call   1030 <write@plt>
addl   $0x1,(%r14)
add    $0x1,%r15d
jmp    1120 <put_txt+0x10>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @put_txt(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
br label %5
5: ; preds = %17, %2
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 37
br label %15
15: ; preds = %10, %5
%16 = phi i1 [ false, %5 ], [ %14, %10 ]
br i1 %16, label %17, label %25
17: ; preds = %15
%18 = load i8*, i8** %3
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %3
%20 = ptrtoint i8* %18 to i32
%21 = call i32 @write(i32 1, i32 %20, i32 1)
%22 = load i32*, i32** %4
%23 = load i32, i32* %22
%24 = add nsw i32 %23, 1
store i32 %24, i32* %22
br label %5
25: ; preds = %15
%26 = load i8*, i8** %3
ret i8* %26
}

LLVM IR (-O2):
define i8* @put_txt(i8* %0, i32* nocapture %1) {
br label %3
3: ; preds = %6, %2
%4 = phi i8* [ %0, %2 ], [ %7, %6 ]
%5 = load i8, i8* %4
switch i8 %5, label %6 [
i8 0, label %13
i8 37, label %13
]
6: ; preds = %3
%7 = getelementptr inbounds i8, i8* %4, i64 1
%8 = ptrtoint i8* %4 to i64
%9 = trunc i64 %8 to i32
%10 = tail call i32 @write(i32 1, i32 %9, i32 1)
%11 = load i32, i32* %1
%12 = add nsw i32 %11, 1
store i32 %12, i32* %1
br label %3
13: ; preds = %3, %3
ret i8* %4
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int);
int main(void) {
  int ch;
  while ((ch = getchar()) != EOF) {
    if (ch >= 65 && ch <= 90)
      ch += ('a' - 'A');
    putchar(ch);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea8(%rip),%rcx
cmp    (%rcx),%eax
je     1172 <main+0x52>
cmpl   $0x41,-0x8(%rbp)
jl     1165 <main+0x45>
cmpl   $0x5a,-0x8(%rbp)
jg     1165 <main+0x45>
mov    -0x8(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rbx
cmp    (%rbx),%eax
je     115c <main+0x3c>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    -0x41(%rax),%ecx
lea    0x20(%rax),%edi
cmp    $0x1a,%ecx
cmovae %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %16, %0
%4 = call i32 (...) @getchar()
store i32 %4, i32* %2
%5 = load i32, i32* @EOF
%6 = icmp ne i32 %4, %5
br i1 %6, label %7, label %19
7: ; preds = %3
%8 = load i32, i32* %2
%9 = icmp sge i32 %8, 65
br i1 %9, label %10, label %16
10: ; preds = %7
%11 = load i32, i32* %2
%12 = icmp sle i32 %11, 90
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 32
store i32 %15, i32* %2
br label %16
16: ; preds = %13, %10, %7
%17 = load i32, i32* %2
%18 = call i32 @putchar(i32 %17)
br label %3
19: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %14, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %11, %4 ], [ %1, %0 ]
%6 = add i32 %5, -65
%7 = icmp ult i32 %6, 26
%8 = add nsw i32 %5, 32
%9 = select i1 %7, i32 %8, i32 %5
%10 = tail call i32 @putchar(i32 %9)
%11 = tail call i32 (...) @getchar()
%12 = load i32, i32* @EOF
%13 = icmp eq i32 %11, %12
br i1 %13, label %14, label %4
14: ; preds = %4, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void fa(int a, int b) { printf("a = %d, b = %d\n", a, b); }


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

x86 assembly (clang, -O2):
<fa>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [16 x i8] c"a = %d, b = %d\0A\00"
define void @fa(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
int DNSServiceQueryRecord() { return 1; }


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

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

LLVM IR (-O0):
define i32 @DNSServiceQueryRecord() {
ret i32 1
}

LLVM IR (-O2):
define i32 @DNSServiceQueryRecord() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, int);
void adin_get_optname(char *buf, int buflen) { strncpy(buf, "myadin", buflen); }


x86 assembly (clang, -O0):
<adin_get_optname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rsi
call   1030 <strncpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<adin_get_optname>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <strncpy@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"myadin\00"
define void @adin_get_optname(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 @strncpy(i8* %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"myadin\00"
define void @adin_get_optname(i8* %0, i32 %1) {
%3 = tail call i32 @strncpy(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(double *, double const *, int const);
int cd_mat_memcpy(double *dst, const double *src, const int m, const int n) {
  memcpy(dst, src, m * n * sizeof(double));
  return 0;
}


x86 assembly (clang, -O0):
<cd_mat_memcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%eax
imul   -0x18(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cd_mat_memcpy>:
push   %rax
imul   %ecx,%edx
shl    $0x3,%edx
call   1030 <memcpy@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cd_mat_memcpy(double* %0, double* %1, i32 %2, i32 %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca i32
%8 = alloca i32
store double* %0, double** %5
store double* %1, double** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load double*, double** %5
%10 = load double*, double** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = mul nsw i32 %11, %12
%14 = sext i32 %13 to i64
%15 = mul i64 %14, 8
%16 = trunc i64 %15 to i32
%17 = call i32 @memcpy(double* %9, double* %10, i32 %16)
ret i32 0
}

LLVM IR (-O2):
define i32 @cd_mat_memcpy(double* %0, double* %1, i32 %2, i32 %3) {
%5 = shl i32 %2, 3
%6 = mul i32 %5, %3
%7 = tail call i32 @memcpy(double* %0, double* %1, i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test(char *);
int main() {
  char lo[] = "abcdefghijklmnopqrstuv!@#$%^&*()_+{}\":?><,./;'[]=-|";
  char up[] = "ABCDEFGHIJKLMNOPQRSTUV!@#$%^&*()_+{}\":?><,./;'[]=-|";
  test(lo);
  test(up);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
lea    -0x40(%rbp),%rdi
lea    0xeca(%rip),%rsi
mov    $0x34,%edx
call   1030 <memcpy@plt>
lea    -0x80(%rbp),%rdi
lea    0xef5(%rip),%rsi
mov    $0x34,%edx
call   1030 <memcpy@plt>
lea    -0x40(%rbp),%rdi
call   1040 <test@plt>
lea    -0x80(%rbp),%rdi
call   1040 <test@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x78,%rsp
movaps 0xf05(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movl   $0x7c2d3d,0x70(%rsp)
movaps 0xf19(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xefd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xee1(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x7c2d3d,0x30(%rsp)
lea    0x40(%rsp),%rdi
call   1030 <test@plt>
mov    %rsp,%rdi
call   1030 <test@plt>
xor    %eax,%eax
add    $0x78,%rsp
ret

LLVM IR (-O0):
@__const.main.lo = [52 x i8] c"abcdefghijklmnopqrstuv!@#$%^&*()_+{}\22:?><,./;'[]=-|\00"
@__const.main.up = [52 x i8] c"ABCDEFGHIJKLMNOPQRSTUV!@#$%^&*()_+{}\22:?><,./;'[]=-|\00"
define i32 @main() {
%1 = alloca [52 x i8]
%2 = alloca [52 x i8]
%3 = bitcast [52 x i8]* %1 to i8*
%4 = bitcast [52 x i8]* %2 to i8*
%5 = getelementptr inbounds [52 x i8], [52 x i8]* %1, i64 0, i64 0
%6 = call i32 @test(i8* %5)
%7 = getelementptr inbounds [52 x i8], [52 x i8]* %2, i64 0, i64 0
%8 = call i32 @test(i8* %7)
ret i32 0
}

LLVM IR (-O2):
@__const.main.lo = [52 x i8] c"abcdefghijklmnopqrstuv!@#$%^&*()_+{}\22:?><,./;'[]=-|\00"
@__const.main.up = [52 x i8] c"ABCDEFGHIJKLMNOPQRSTUV!@#$%^&*()_+{}\22:?><,./;'[]=-|\00"
define i32 @main() {
%1 = alloca [52 x i8]
%2 = alloca [52 x i8]
%3 = getelementptr inbounds [52 x i8], [52 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [52 x i8], [52 x i8]* %2, i64 0, i64 0
%5 = call i32 @test(i8* %3)
%6 = call i32 @test(i8* %4)
ret i32 0
}
/* Variables and functions */
int pms_set_wakeup_timers(unsigned long long);
int pms_change_wakeup_timers(unsigned long long second) {
  pms_set_wakeup_timers(0);
  return pms_set_wakeup_timers(second);
}


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

x86 assembly (clang, -O2):
<pms_change_wakeup_timers>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
call   1030 <pms_set_wakeup_timers@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <pms_set_wakeup_timers@plt>

LLVM IR (-O0):
define i32 @pms_change_wakeup_timers(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 @pms_set_wakeup_timers(i64 0)
%4 = load i64, i64* %2
%5 = call i32 @pms_set_wakeup_timers(i64 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @pms_change_wakeup_timers(i64 %0) {
%2 = tail call i32 @pms_set_wakeup_timers(i64 0)
%3 = tail call i32 @pms_set_wakeup_timers(i64 %0)
ret i32 %3
}
int hostsfile_clusterlist_interface_version(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @hostsfile_clusterlist_interface_version() {
ret i32 1
}

LLVM IR (-O2):
define i32 @hostsfile_clusterlist_interface_version() {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ tmp;
struct rtattr {
  int dummy;
};
typedef int /*<<< orphan*/ __s64;

/* Variables and functions */
int /*<<< orphan*/ RTA_DATA(struct rtattr const *);
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/, int);
__s64 rta_getattr_s64(const struct rtattr *rta) {
  __s64 tmp;
  memcpy(&tmp, RTA_DATA(rta), sizeof(tmp));
  return tmp;
}


x86 assembly (clang, -O0):
<rta_getattr_s64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <RTA_DATA@plt>
mov    %eax,%esi
lea    -0xc(%rbp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rta_getattr_s64>:
push   %rax
call   1040 <RTA_DATA@plt>
lea    0x4(%rsp),%rdi
mov    %eax,%esi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.rtattr = type { i32 }
define i32 @rta_getattr_s64(%struct.rtattr* %0) {
%2 = alloca %struct.rtattr*
%3 = alloca i32
store %struct.rtattr* %0, %struct.rtattr** %2
%4 = load %struct.rtattr*, %struct.rtattr** %2
%5 = call i32 @RTA_DATA(%struct.rtattr* %4)
%6 = call i32 @memcpy(i32* %3, i32 %5, i32 4)
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
%struct.rtattr = type { i32 }
define i32 @rta_getattr_s64(%struct.rtattr* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @RTA_DATA(%struct.rtattr* %0)
%5 = call i32 @memcpy(i32* %2, i32 %4, i32 4)
%6 = load i32, i32* %2
ret i32 %6
}
int VP8LNearLosslessBits(int near_lossless_quality) {
  return 5 - near_lossless_quality / 20;
}


x86 assembly (clang, -O0):
<VP8LNearLosslessBits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    $0x5,%eax
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<VP8LNearLosslessBits>:
movslq %edi,%rax
imul   $0xffffffff99999999,%rax,%rax
mov    %rax,%rcx
sar    $0x23,%rcx
shr    $0x3f,%rax
add    %ecx,%eax
add    $0x5,%eax
ret

LLVM IR (-O0):
define i32 @VP8LNearLosslessBits(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, 20
%5 = sub nsw i32 5, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @VP8LNearLosslessBits(i32 %0) {
%2 = sdiv i32 %0, -20
%3 = add nsw i32 %2, 5
ret i32 %3
}
int foo(int x, int y) {
  int res = x + y;
  return res;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @foo(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 = add nsw i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @foo(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
void displaySum(double n1, double n2) { printf("%2.2lf\n", n1 + n2); }


x86 assembly (clang, -O0):
<displaySum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<displaySum>:
addsd  %xmm1,%xmm0
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"%2.2lf\0A\00"
define void @displaySum(double %0, double %1) {
%3 = fadd double %0, %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int, int,
                           int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void yell_xorriso() {
  fprintf(stderr,
          "%sxorriso %d.%d.%d%s : RockRidge filesystem manipulator, libburnia "
          "project.\n\n",
          "GNU ", 1, 3, 0, "");
}


x86 assembly (clang, -O0):
<yell_xorriso>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    0xed8(%rip),%rsi
lea    0xf1f(%rip),%rdx
mov    $0x1,%ecx
mov    $0x3,%r8d
xor    %r9d,%r9d
lea    0xf09(%rip),%rax
mov    %rax,(%rsp)
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yell_xorriso>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xf2c(%rip),%rax
mov    %rax,(%rsp)
lea    0xed4(%rip),%rsi
lea    0xf1b(%rip),%rdx
mov    $0x1,%ecx
mov    $0x3,%r8d
xor    %r9d,%r9d
call   1030 <fprintf@plt>
pop    %rax
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [78 x i8] c"%sxorriso %d.%d.%d%s : RockRidge filesystem manipulator, libburnia project.\0A\0A\00"
@.str.1 = [5 x i8] c"GNU \00"
@.str.2 = [1 x i8] zeroinitializer
define void @yell_xorriso() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 3, i32 0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [78 x i8] c"%sxorriso %d.%d.%d%s : RockRidge filesystem manipulator, libburnia project.\0A\0A\00"
@.str.1 = [5 x i8] c"GNU \00"
@.str.2 = [1 x i8] zeroinitializer
define void @yell_xorriso() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 3, i32 0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
ret void
}
int stty(fildes, argp)
int fildes;
char *argp;
{ return _ioctl(fildes, (('t' << 8) | 9), argp); }


x86 assembly (clang, -O0):
<stty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    $0x7409,%esi
mov    $0x0,%al
call   1030 <_ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stty>:
mov    %rsi,%rdx
mov    $0x7409,%esi
xor    %eax,%eax
jmp    1030 <_ioctl@plt>

LLVM IR (-O0):
define i32 @stty(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 i8*, i8** %4
%7 = call i32 (i32, i32, i8*, ...) bitcast (i32 (...)* @_ioctl to i32 (i32, i32, i8*, ...)*)(i32 %5, i32 29705, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @stty(i32 %0, i8* %1) {
%3 = tail call i32 (i32, i32, i8*, ...) bitcast (i32 (...)* @_ioctl to i32 (i32, i32, i8*, ...)*)(i32 %0, i32 29705, i8* %1)
ret i32 %3
}
/* Type definitions */
struct passwd {
  int dummy;
};

/* Variables and functions */
struct passwd *getpwnam(const char *name) {
  ;
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.passwd = type { i32 }
define %struct.passwd* @getpwnam(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret %struct.passwd* null
}

LLVM IR (-O2):
%struct.passwd = type { i32 }
define noalias %struct.passwd* @getpwnam(i8* nocapture readnone %0) {
ret %struct.passwd* null
}
void sws_addVec() {}


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

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

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

LLVM IR (-O2):
define void @sws_addVec() {
ret void
}
/* Variables and functions */
int read(int /*<<< orphan*/, char *, int);
char *ft_trmread(void) {
  int len;
  static char buffer[256];
  if ((len = read(0, buffer, 255))) {
    buffer[len] = '\0';
    return (buffer);
  }
  return (NULL);
}


x86 assembly (clang, -O0):
<ft_trmread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
lea    0x2f1f(%rip),%rsi
mov    $0xff,%edx
call   1030 <read@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     1156 <ft_trmread+0x46>
movslq -0xc(%rbp),%rcx
lea    0x2efe(%rip),%rax
movb   $0x0,(%rax,%rcx,1)
lea    0x2ef3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    115e <ft_trmread+0x4e>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_trmread>:
push   %rbx
lea    0x2f28(%rip),%rbx
xor    %edi,%edi
mov    %rbx,%rsi
mov    $0xff,%edx
call   1030 <read@plt>
test   %eax,%eax
je     1133 <ft_trmread+0x23>
cltq
movb   $0x0,(%rax,%rbx,1)
jmp    1135 <ft_trmread+0x25>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@ft_trmread.buffer = internal global [256 x i8] zeroinitializer
define i8* @ft_trmread() {
%1 = alloca i8*
%2 = alloca i32
%3 = call i32 @read(i32 0, i8* getelementptr inbounds ([256 x i8], [256 x i8]* @ft_trmread.buffer, i64 0, i64 0), i32 255)
store i32 %3, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = load i32, i32* %2
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [256 x i8], [256 x i8]* @ft_trmread.buffer, i64 0, i64 %7
store i8 0, i8* %8
store i8* getelementptr inbounds ([256 x i8], [256 x i8]* @ft_trmread.buffer, i64 0, i64 0), i8** %1
br label %10
9: ; preds = %0
store i8* null, i8** %1
br label %10
10: ; preds = %9, %5
%11 = load i8*, i8** %1
ret i8* %11
}

LLVM IR (-O2):
@ft_trmread.buffer = internal global [256 x i8] zeroinitializer
define i8* @ft_trmread() {
%1 = tail call i32 @read(i32 0, i8* getelementptr inbounds ([256 x i8], [256 x i8]* @ft_trmread.buffer, i64 0, i64 0), i32 255)
%2 = icmp eq i32 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds [256 x i8], [256 x i8]* @ft_trmread.buffer, i64 0, i64 %4
store i8 0, i8* %5
br label %6
6: ; preds = %0, %3
%7 = phi i8* [ getelementptr inbounds ([256 x i8], [256 x i8]* @ft_trmread.buffer, i64 0, i64 0), %3 ], [ null, %0 ]
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ ParseArgs(int, char **, char const **, char const **,
                             char const **);
int Simulate(char const *, char const *, char const *);
int /*<<< orphan*/ Welcome();
int main(int argc, char **argv) {
  const char *inputFile = NULL;
  const char *pathlossFile = NULL;
  const char *logFile = NULL;
  Welcome();
  ParseArgs(argc, argv, &inputFile, &pathlossFile, &logFile);
  return Simulate(inputFile, pathlossFile, logFile);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
mov    $0x0,%al
call   1030 <Welcome@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
lea    -0x28(%rbp),%r8
call   1050 <ParseArgs@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1040 <Simulate@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
movq   $0x0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
movq   $0x0,(%rsp)
xor    %eax,%eax
call   1030 <Welcome@plt>
lea    0x10(%rsp),%rdx
lea    0x8(%rsp),%rcx
mov    %rsp,%r8
mov    %ebp,%edi
mov    %rbx,%rsi
call   1050 <ParseArgs@plt>
mov    0x10(%rsp),%rdi
mov    0x8(%rsp),%rsi
mov    (%rsp),%rdx
call   1040 <Simulate@plt>
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* null, i8** %6
store i8* null, i8** %7
store i8* null, i8** %8
%9 = call i32 (...) @Welcome()
%10 = load i32, i32* %4
%11 = load i8**, i8*** %5
%12 = call i32 @ParseArgs(i32 %10, i8** %11, i8** %6, i8** %7, i8** %8)
%13 = load i8*, i8** %6
%14 = load i8*, i8** %7
%15 = load i8*, i8** %8
%16 = call i32 @Simulate(i8* %13, i8* %14, i8* %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%7 = bitcast i8** %4 to i8*
store i8* null, i8** %4
%8 = bitcast i8** %5 to i8*
store i8* null, i8** %5
%9 = tail call i32 (...) @Welcome()
%10 = call i32 @ParseArgs(i32 %0, i8** %1, i8** %3, i8** %4, i8** %5)
%11 = load i8*, i8** %3
%12 = load i8*, i8** %4
%13 = load i8*, i8** %5
%14 = call i32 @Simulate(i8* %11, i8* %12, i8* %13)
ret i32 %14
}
int is_upper_case(char ch) {
  int flag = 0;
  if (ch >= 'A' && ch <= 'Z')
    flag = 1;
  return flag;
}


x86 assembly (clang, -O0):
<is_upper_case>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     1132 <is_upper_case+0x32>
movsbl -0x1(%rbp),%eax
cmp    $0x5a,%eax
jg     1132 <is_upper_case+0x32>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_upper_case>:
add    $0xbf,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @is_upper_case(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
store i32 0, i32* %3
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %3
br label %12
12: ; preds = %11, %7, %1
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @is_upper_case(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int padcon_get_quaddobl_series_step(double *step) {
  int fail;
  int precision = 2;
  int *b;
  fail = _ada_use_c2phc4c(885, &precision, b, step, 0);
  return fail;
}


x86 assembly (clang, -O0):
<padcon_get_quaddobl_series_step>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x2,-0x10(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    $0x375,%edi
lea    -0x10(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<padcon_get_quaddobl_series_step>:
push   %rax
mov    %rdi,%rcx
movl   $0x2,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x375,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @padcon_get_quaddobl_series_step(double* %0) {
%2 = alloca double*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store double* %0, double** %2
store i32 2, i32* %4
%6 = load i32*, i32** %5
%7 = load double*, double** %2
%8 = call i32 @_ada_use_c2phc4c(i32 885, i32* %4, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @padcon_get_quaddobl_series_step(double* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 2, i32* %2
%4 = call i32 @_ada_use_c2phc4c(i32 885, i32* %2, i32* undef, double* %0, i32 0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_context_ref() {
  printf("NOT IMPLEMENTED:"
         "pa_context_ref"
         "\n");
}


x86 assembly (clang, -O0):
<pa_context_ref>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [32 x i8] c"NOT IMPLEMENTED:pa_context_ref\0A\00"
define i32 @pa_context_ref() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [31 x i8] c"NOT IMPLEMENTED:pa_context_ref\00"
define i32 @pa_context_ref() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *xfree(void *ptr) {
  if (ptr)
    free(ptr);
  return NULL;
}


x86 assembly (clang, -O0):
<xfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <xfree+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xfree>:
test   %rdi,%rdi
je     111f <xfree+0xf>
push   %rax
call   1030 <free@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define noalias i8* @xfree(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret i8* null
}
/* Type definitions */
struct cpu {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cpu_set_r8(struct cpu *, int, unsigned char);
void cpu_set_c(struct cpu *cpu, unsigned char c) { cpu_set_r8(cpu, (2), c); }


x86 assembly (clang, -O0):
<cpu_set_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2,%esi
movzbl -0x9(%rbp),%edx
call   1030 <cpu_set_r8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpu_set_c>:
mov    %esi,%edx
mov    $0x2,%esi
jmp    1030 <cpu_set_r8@plt>

LLVM IR (-O0):
%struct.cpu = type { i32 }
define void @cpu_set_c(%struct.cpu* %0, i8 zeroext %1) {
%3 = alloca %struct.cpu*
%4 = alloca i8
store %struct.cpu* %0, %struct.cpu** %3
store i8 %1, i8* %4
%5 = load %struct.cpu*, %struct.cpu** %3
%6 = load i8, i8* %4
%7 = call i32 @cpu_set_r8(%struct.cpu* %5, i32 2, i8 zeroext %6)
ret void
}

LLVM IR (-O2):
%struct.cpu = type { i32 }
define void @cpu_set_c(%struct.cpu* %0, i8 zeroext %1) {
%3 = tail call i32 @cpu_set_r8(%struct.cpu* %0, i32 2, i8 zeroext %1)
ret void
}
void init_tax_rates() {}


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

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

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

LLVM IR (-O2):
define void @init_tax_rates() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ xcb_get_property_reply_t;
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ xcb_ewmh_get_cardinal_from_reply(int /*<<< orphan*/ *,
                                                    int /*<<< orphan*/ *);
uint8_t xcb_ewmh_get_wm_desktop_from_reply(uint32_t *desktop,
                                           xcb_get_property_reply_t *r) {
  return xcb_ewmh_get_cardinal_from_reply(desktop, r);
}


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

x86 assembly (clang, -O2):
<xcb_ewmh_get_wm_desktop_from_reply>:
jmp    1030 <xcb_ewmh_get_cardinal_from_reply@plt>

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

LLVM IR (-O2):
define i32 @xcb_ewmh_get_wm_desktop_from_reply(i32* %0, i32* %1) {
%3 = tail call i32 @xcb_ewmh_get_cardinal_from_reply(i32* %0, i32* %1)
ret i32 %3
}
/* Variables and functions */
scalar_t__ SYS_mprotect;
int syscall(long, long, long, long);
int mprotect(void *addr, size_t len, int prot) {
  return syscall((long)SYS_mprotect, (long)addr, (long)len, (long)prot);
}


x86 assembly (clang, -O0):
<mprotect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
movslq -0x14(%rbp),%rcx
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mprotect>:
mov    %rsi,%rax
mov    %rdi,%rsi
mov    0x2ed3(%rip),%rcx
mov    (%rcx),%rdi
movslq %edx,%rcx
mov    %rax,%rdx
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@SYS_mprotect = global i64 0
define i32 @mprotect(i8* %0, i64 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i64, i64* @SYS_mprotect
%8 = load i8*, i8** %4
%9 = ptrtoint i8* %8 to i64
%10 = load i64, i64* %5
%11 = load i32, i32* %6
%12 = sext i32 %11 to i64
%13 = call i32 @syscall(i64 %7, i64 %9, i64 %10, i64 %12)
ret i32 %13
}

LLVM IR (-O2):
@SYS_mprotect = global i64 0
define i32 @mprotect(i8* %0, i64 %1, i32 %2) {
%4 = load i64, i64* @SYS_mprotect
%5 = ptrtoint i8* %0 to i64
%6 = sext i32 %2 to i64
%7 = tail call i32 @syscall(i64 %4, i64 %5, i64 %1, i64 %6)
ret i32 %7
}
/* Type definitions */
struct utsname {
  char *machine;
};

/* Variables and functions */
int EXIT_SUCCESS;
struct utsname *calloc(int, int);
int /*<<< orphan*/ file_print(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ uname(struct utsname *);
int main() {
  struct utsname *unameData = calloc(1, sizeof(struct utsname));
  uname(unameData);
  file_print(unameData->machine, stdout);
  file_print("\n", stdout);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0x8,%esi
call   1040 <calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <uname@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    0x2e77(%rip),%rax
mov    (%rax),%esi
call   1050 <file_print@plt>
mov    0x2e69(%rip),%rax
mov    (%rax),%esi
lea    0xe80(%rip),%rdi
call   1050 <file_print@plt>
mov    0x2e4c(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%edi
mov    $0x8,%esi
call   1040 <calloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <uname@plt>
mov    (%rbx),%rdi
mov    0x2e8b(%rip),%rbx
mov    (%rbx),%esi
call   1050 <file_print@plt>
mov    (%rbx),%esi
lea    0xe9b(%rip),%rdi
call   1050 <file_print@plt>
mov    0x2e67(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.utsname = type { i8* }
@stdout = global i32 0
@.str = [2 x i8] c"\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.utsname*
store i32 0, i32* %1
%3 = call %struct.utsname* @calloc(i32 1, i32 8)
store %struct.utsname* %3, %struct.utsname** %2
%4 = load %struct.utsname*, %struct.utsname** %2
%5 = call i32 @uname(%struct.utsname* %4)
%6 = load %struct.utsname*, %struct.utsname** %2
%7 = getelementptr inbounds %struct.utsname, %struct.utsname* %6, i32 0, i32 0
%8 = load i8*, i8** %7
%9 = load i32, i32* @stdout
%10 = call i32 @file_print(i8* %8, i32 %9)
%11 = load i32, i32* @stdout
%12 = call i32 @file_print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load i32, i32* @EXIT_SUCCESS
ret i32 %13
}

LLVM IR (-O2):
%struct.utsname = type { i8* }
@stdout = global i32 0
@.str = [2 x i8] c"\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call %struct.utsname* @calloc(i32 1, i32 8)
%2 = tail call i32 @uname(%struct.utsname* %1)
%3 = getelementptr inbounds %struct.utsname, %struct.utsname* %1, i64 0, i32 0
%4 = load i8*, i8** %3
%5 = load i32, i32* @stdout
%6 = tail call i32 @file_print(i8* %4, i32 %5)
%7 = load i32, i32* @stdout
%8 = tail call i32 @file_print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}
double min(double x1, double x2) {
  if (x1 < x2)
    return x1;
  else
    return x2;
}


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <min+0x31>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    113b <min+0x3b>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
minsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @min(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = load double, double* %5
%8 = fcmp olt double %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load double, double* %4
store double %10, double* %3
br label %13
11: ; preds = %2
%12 = load double, double* %5
store double %12, double* %3
br label %13
13: ; preds = %11, %9
%14 = load double, double* %3
ret double %14
}

LLVM IR (-O2):
define double @min(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
int isblank(int c) { return (c == ' ' || c == '\t'); }


x86 assembly (clang, -O0):
<isblank>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1120 <isblank+0x20>
cmpl   $0x9,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isblank>:
cmp    $0x20,%edi
sete   %al
cmp    $0x9,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isblank(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 32
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 9
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @isblank(i32 %0) {
%2 = icmp eq i32 %0, 32
%3 = icmp eq i32 %0, 9
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ IniAdj();
int /*<<< orphan*/ IniClk();
int /*<<< orphan*/ IniCmd();
int /*<<< orphan*/ IniDgy();
int /*<<< orphan*/ IniFil();
int /*<<< orphan*/ IniGyr();
int /*<<< orphan*/ IniIop();
int /*<<< orphan*/ IniMon();
int /*<<< orphan*/ IniSrv();
void IniSet(void) {
  IniCmd();
  IniClk();
  IniIop();
  IniDgy();
  IniMon();
  IniSrv();
  IniGyr();
  IniFil();
  IniAdj();
}


x86 assembly (clang, -O0):
<IniSet>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   10b0 <IniCmd@plt>
mov    $0x0,%al
call   1030 <IniClk@plt>
mov    $0x0,%al
call   1040 <IniIop@plt>
mov    $0x0,%al
call   10a0 <IniDgy@plt>
mov    $0x0,%al
call   1060 <IniMon@plt>
mov    $0x0,%al
call   1090 <IniSrv@plt>
mov    $0x0,%al
call   1070 <IniGyr@plt>
mov    $0x0,%al
call   1050 <IniFil@plt>
mov    $0x0,%al
call   1080 <IniAdj@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<IniSet>:
push   %rax
xor    %eax,%eax
call   10b0 <IniCmd@plt>
xor    %eax,%eax
call   1030 <IniClk@plt>
xor    %eax,%eax
call   1040 <IniIop@plt>
xor    %eax,%eax
call   10a0 <IniDgy@plt>
xor    %eax,%eax
call   1060 <IniMon@plt>
xor    %eax,%eax
call   1090 <IniSrv@plt>
xor    %eax,%eax
call   1070 <IniGyr@plt>
xor    %eax,%eax
call   1050 <IniFil@plt>
xor    %eax,%eax
pop    %rcx
jmp    1080 <IniAdj@plt>

LLVM IR (-O0):
define void @IniSet() {
%1 = call i32 (...) @IniCmd()
%2 = call i32 (...) @IniClk()
%3 = call i32 (...) @IniIop()
%4 = call i32 (...) @IniDgy()
%5 = call i32 (...) @IniMon()
%6 = call i32 (...) @IniSrv()
%7 = call i32 (...) @IniGyr()
%8 = call i32 (...) @IniFil()
%9 = call i32 (...) @IniAdj()
ret void
}

LLVM IR (-O2):
define void @IniSet() {
%1 = tail call i32 (...) @IniCmd()
%2 = tail call i32 (...) @IniClk()
%3 = tail call i32 (...) @IniIop()
%4 = tail call i32 (...) @IniDgy()
%5 = tail call i32 (...) @IniMon()
%6 = tail call i32 (...) @IniSrv()
%7 = tail call i32 (...) @IniGyr()
%8 = tail call i32 (...) @IniFil()
%9 = tail call i32 (...) @IniAdj()
ret void
}
/* Variables and functions */
int _main();
int startup(void) {
  int result;
  result = _main();
  return (result);
}


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

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

LLVM IR (-O0):
define i32 @startup() {
%1 = alloca i32
%2 = call i32 (...) @_main()
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @startup() {
%1 = tail call i32 (...) @_main()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ foo();
int init(void) { foo(); }


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

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

LLVM IR (-O0):
define i32 @init() {
%1 = alloca i32
%2 = call i32 (...) @foo()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @init() {
%1 = tail call i32 (...) @foo()
ret i32 undef
}