xunge/DecIR huggingface dataset:
/* Variables and functions */
void *alloca(size_t);
int /*<<< orphan*/ memcpy(void *, void *, size_t);
void swap(void *fst, void *snd, size_t size) {
  void *temp = alloca(size);
  memcpy(temp, snd, size);
  memcpy(snd, fst, size);
  memcpy(fst, temp, size);
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rax
sub    %rcx,%rax
mov    %rax,%rsp
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdx,%r12
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rsp,%rbx
lea    0xf(%rdx),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdi
call   1030 <memcpy@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
call   1030 <memcpy@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
call   1030 <memcpy@plt>
lea    -0x20(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @swap(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i64, i64* %6
%9 = alloca i8, i64 %8
store i8* %9, i8** %7
%10 = load i8*, i8** %7
%11 = load i8*, i8** %5
%12 = load i64, i64* %6
%13 = call i32 @memcpy(i8* %10, i8* %11, i64 %12)
%14 = load i8*, i8** %5
%15 = load i8*, i8** %4
%16 = load i64, i64* %6
%17 = call i32 @memcpy(i8* %14, i8* %15, i64 %16)
%18 = load i8*, i8** %4
%19 = load i8*, i8** %7
%20 = load i64, i64* %6
%21 = call i32 @memcpy(i8* %18, i8* %19, i64 %20)
ret void
}

LLVM IR (-O2):
define void @swap(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8, i64 %2
%5 = call i32 @memcpy(i8* %4, i8* %1, i64 %2)
%6 = call i32 @memcpy(i8* %1, i8* %0, i64 %2)
%7 = call i32 @memcpy(i8* %0, i8* %4, i64 %2)
ret void
}
void Assignment(int a) {
  a = 12;
  a += a;
}


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

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

LLVM IR (-O0):
define void @Assignment(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
store i32 12, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 %4, %3
store i32 %5, i32* %2
ret void
}

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


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

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

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

LLVM IR (-O2):
define void @lazy2ZEROONE() {
ret void
}
int foo(int x) { return x * 20; }


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

x86 assembly (clang, -O2):
<foo>:
shl    $0x2,%edi
lea    (%rdi,%rdi,4),%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = mul nsw i32 %0, 20
ret i32 %2
}
void sse_init(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ xautolock_resetTriggers();
void xautolock_queryIdleTime(Display *d) {
  Time idleTime = 0;
  {
    {
      d = d;
      return;
    }
  }
  if (idleTime < 5000) {
    xautolock_resetTriggers();
  }
}


x86 assembly (clang, -O0):
<xautolock_queryIdleTime>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @xautolock_queryIdleTime(i32* nocapture %0) {
ret void
}
int is_pure(char base) {
  switch (base) {
  case 'A':
  case 'C':
  case 'G':
  case 'T':
  case 'a':
  case 'c':
  case 'g':
  case 't':
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<is_pure>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x41,%eax
je     1196 <is_pure+0x96>
jmp    111f <is_pure+0x1f>
mov    -0xc(%rbp),%eax
sub    $0x43,%eax
je     1196 <is_pure+0x96>
jmp    1130 <is_pure+0x30>
mov    -0xc(%rbp),%eax
sub    $0x47,%eax
je     1196 <is_pure+0x96>
jmp    1141 <is_pure+0x41>
mov    -0xc(%rbp),%eax
sub    $0x54,%eax
je     1196 <is_pure+0x96>
jmp    1152 <is_pure+0x52>
mov    -0xc(%rbp),%eax
sub    $0x61,%eax
je     1196 <is_pure+0x96>
jmp    1163 <is_pure+0x63>
mov    -0xc(%rbp),%eax
sub    $0x63,%eax
je     1196 <is_pure+0x96>
jmp    1174 <is_pure+0x74>
mov    -0xc(%rbp),%eax
sub    $0x67,%eax
je     1196 <is_pure+0x96>
jmp    1185 <is_pure+0x85>
mov    -0xc(%rbp),%eax
sub    $0x74,%eax
jne    11a2 <is_pure+0xa2>
jmp    1196 <is_pure+0x96>
movl   $0x1,-0x4(%rbp)
jmp    11a9 <is_pure+0xa9>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_pure>:
add    $0xffffffbf,%edi
cmp    $0x33,%edi
ja     111e <is_pure+0x1e>
mov    $0x1,%eax
movabs $0x8004500080045,%rcx
bt     %rdi,%rcx
jae    111e <is_pure+0x1e>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_pure(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %7 [
i32 65, label %6
i32 67, label %6
i32 71, label %6
i32 84, label %6
i32 97, label %6
i32 99, label %6
i32 103, label %6
i32 116, label %6
]
6: ; preds = %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @is_pure(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %3 [
i32 65, label %4
i32 67, label %4
i32 71, label %4
i32 84, label %4
i32 97, label %4
i32 99, label %4
i32 103, label %4
i32 116, label %4
]
3: ; preds = %1
br label %4
4: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %3
%5 = phi i32 [ 0, %3 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %5
}
int test_imm_DAuint8_reg(unsigned char val) {
  return ((val) & (-0xDA << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_DAuint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffff26,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_DAuint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 38
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ prc(char);
void blank(void) { prc(' '); }


x86 assembly (clang, -O0):
<blank>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20,%edi
call   1030 <prc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<blank>:
mov    $0x20,%edi
jmp    1030 <prc@plt>

LLVM IR (-O0):
define void @blank() {
%1 = call i32 @prc(i8 signext 32)
ret void
}

LLVM IR (-O2):
define void @blank() {
%1 = tail call i32 @prc(i8 signext 32)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int in = 1;
  int out = 0;
  if (in == 0)
    goto out_1;
  if (in == 1)
    goto out_0;
out_0:
  out = 0;
  goto exit;
out_1:
  out = 1;
  goto exit;
exit:
  printf("out:%d\n", out);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    113c <main+0x2c>
jmp    115c <main+0x4c>
cmpl   $0x1,-0x8(%rbp)
jne    114b <main+0x3b>
jmp    1150 <main+0x40>
jmp    1150 <main+0x40>
movl   $0x0,-0xc(%rbp)
jmp    1163 <main+0x53>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"out:%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}
int bbu_register_handler(struct bbu_handler *unused) { return -22; }


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

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

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

LLVM IR (-O2):
%struct.bbu_handler = type opaque
define i32 @bbu_register_handler(%struct.bbu_handler* nocapture readnone %0) {
ret i32 -22
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int, unsigned long);
void east_one_test(void **state) {
  assert_int_equal((((0x0101010101010101ul) << 1) & ~0x0101010101010101ul),
                   0x0202020202020202ul);
  assert_int_equal((((0x8080808080808080ul) << 1) & ~0x0101010101010101ul),
                   0ul);
}


x86 assembly (clang, -O0):
<east_one_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x2020202,%edi
movabs $0x202020202020202,%rsi
02 02 02
call   1030 <assert_int_equal@plt>
xor    %edi,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<east_one_test>:
push   %rax
movabs $0x202020202020202,%rsi
02 02 02
mov    $0x2020202,%edi
call   1030 <assert_int_equal@plt>
xor    %edi,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <assert_int_equal@plt>

LLVM IR (-O0):
define void @east_one_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @assert_int_equal(i32 33686018, i64 144680345676153346)
%4 = call i32 @assert_int_equal(i32 0, i64 0)
ret void
}

LLVM IR (-O2):
define void @east_one_test(i8** nocapture readnone %0) {
%2 = tail call i32 @assert_int_equal(i32 33686018, i64 144680345676153346)
%3 = tail call i32 @assert_int_equal(i32 0, i64 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ setgid(int /*<<< orphan*/);
int /*<<< orphan*/ setuid(int /*<<< orphan*/);
int /*<<< orphan*/ system(char *);
main() {
  printf("Hello Alex World!\n");
  setuid(0);
  setgid(0);
  system("/bin/bash");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1060 <setuid@plt>
xor    %edi,%edi
call   1050 <setgid@plt>
lea    0xeae(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec2(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1060 <setuid@plt>
xor    %edi,%edi
call   1050 <setgid@plt>
lea    0xe9e(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Hello Alex World!\0A\00"
@.str.1 = [10 x i8] c"/bin/bash\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @setuid(i32 0)
%3 = call i32 @setgid(i32 0)
%4 = call i32 @system(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [10 x i8] c"/bin/bash\00"
@str = [18 x i8] c"Hello Alex World!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @setuid(i32 0)
%3 = tail call i32 @setgid(i32 0)
%4 = tail call i32 @system(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
void INT_Excep_TMR3_CMIB3(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_TMR3_CMIB3() {
ret void
}
void comparecl(_Complex long double a, long double r, long double i) {
  comparel(__real__ a, r);
  comparel(__imag__ a, i);
}


x86 assembly (clang, -O0):
<comparecl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
fldt   0x40(%rbp)
fldt   0x30(%rbp)
lea    0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   (%rax)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
xor    %eax,%eax
call   1030 <comparel@plt>
mov    -0x28(%rbp),%rax
fldt   0x10(%rax)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
xor    %eax,%eax
call   1030 <comparel@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<comparecl>:
sub    $0x38,%rsp
fldt   0x70(%rsp)
fstpt  0x2c(%rsp)
fldt   0x60(%rsp)
fldt   0x40(%rsp)
fxch   %st(1)
fstpt  0x10(%rsp)
fstpt  (%rsp)
xor    %eax,%eax
call   1030 <comparel@plt>
fldt   0x50(%rsp)
fldt   0x2c(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
xor    %eax,%eax
call   1030 <comparel@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
define void @comparecl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %0, x86_fp80 %1, x86_fp80 %2) {
%4 = alloca x86_fp80
%5 = alloca x86_fp80
store x86_fp80 %1, x86_fp80* %4
store x86_fp80 %2, x86_fp80* %5
%6 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 0
%7 = load x86_fp80, x86_fp80* %6
%8 = load x86_fp80, x86_fp80* %4
%9 = call i32 (x86_fp80, x86_fp80, ...) bitcast (i32 (...)* @comparel to i32 (x86_fp80, x86_fp80, ...)*)(x86_fp80 %7, x86_fp80 %8)
%10 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 1
%11 = load x86_fp80, x86_fp80* %10
%12 = load x86_fp80, x86_fp80* %5
%13 = call i32 (x86_fp80, x86_fp80, ...) bitcast (i32 (...)* @comparel to i32 (x86_fp80, x86_fp80, ...)*)(x86_fp80 %11, x86_fp80 %12)
ret void
}

LLVM IR (-O2):
define void @comparecl({ x86_fp80, x86_fp80 }* nocapture byval({ x86_fp80, x86_fp80 }) align 16 %0, x86_fp80 %1, x86_fp80 %2) {
%4 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 0
%5 = load x86_fp80, x86_fp80* %4
%6 = tail call i32 (x86_fp80, x86_fp80, ...) bitcast (i32 (...)* @comparel to i32 (x86_fp80, x86_fp80, ...)*)(x86_fp80 %5, x86_fp80 %1)
%7 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 1
%8 = load x86_fp80, x86_fp80* %7
%9 = tail call i32 (x86_fp80, x86_fp80, ...) bitcast (i32 (...)* @comparel to i32 (x86_fp80, x86_fp80, ...)*)(x86_fp80 %8, x86_fp80 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ XRotSetMagnification(float, float);
void setusercharsize(int multx, int divx, int multy, int divy) {
  float xmagnification;
  float ymagnification;
  xmagnification = (float)multx / (float)divx;
  ymagnification = (float)multy / (float)divy;
  XRotSetMagnification(xmagnification, ymagnification);
}


x86 assembly (clang, -O0):
<setusercharsize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
cvtsi2ssl -0xc(%rbp),%xmm0
cvtsi2ssl -0x10(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
call   1030 <XRotSetMagnification@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setusercharsize>:
cvtsi2ss %edi,%xmm0
cvtsi2ss %esi,%xmm1
divss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
cvtsi2ss %edx,%xmm1
cvtsi2ss %ecx,%xmm2
divss  %xmm2,%xmm1
jmp    1030 <XRotSetMagnification@plt>

LLVM IR (-O0):
define void @setusercharsize(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca float
%10 = alloca float
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%11 = load i32, i32* %5
%12 = sitofp i32 %11 to float
%13 = load i32, i32* %6
%14 = sitofp i32 %13 to float
%15 = fdiv float %12, %14
store float %15, float* %9
%16 = load i32, i32* %7
%17 = sitofp i32 %16 to float
%18 = load i32, i32* %8
%19 = sitofp i32 %18 to float
%20 = fdiv float %17, %19
store float %20, float* %10
%21 = load float, float* %9
%22 = load float, float* %10
%23 = call i32 @XRotSetMagnification(float %21, float %22)
ret void
}

LLVM IR (-O2):
define void @setusercharsize(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sitofp i32 %0 to float
%6 = sitofp i32 %1 to float
%7 = fdiv float %5, %6
%8 = sitofp i32 %2 to float
%9 = sitofp i32 %3 to float
%10 = fdiv float %8, %9
%11 = tail call i32 @XRotSetMagnification(float %7, float %10)
ret void
}
void strcopy(char *s, char *t) {
  int i;
  i = 0;
  while ((s[i] = t[i]) != '\0')
    i++;
}


x86 assembly (clang, -O0):
<strcopy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    -0x8(%rbp),%rcx
movslq -0x14(%rbp),%rdx
mov    %al,(%rcx,%rdx,1)
movsbl %al,%eax
cmp    $0x0,%eax
je     1143 <strcopy+0x43>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <strcopy+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcopy>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <strcopy+0x10>
ret

LLVM IR (-O0):
define void @strcopy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
store i32 0, i32* %5
br label %6
6: ; preds = %18, %2
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %7, i64 %9
%11 = load i8, i8* %10
%12 = load i8*, i8** %3
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
store i8 %11, i8* %15
%16 = sext i8 %11 to i32
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %6
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %6
21: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @strcopy(i8* nocapture writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %9, %3 ], [ 0, %2 ]
%5 = getelementptr inbounds i8, i8* %1, i64 %4
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 %6, i8* %7
%8 = icmp eq i8 %6, 0
%9 = add nuw i64 %4, 1
br i1 %8, label %10, label %3
10: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void dieError(char *message, int socket) {
  printf("%s\n", message);
  if (socket != 0)
    close(socket);
  exit(1);
}


x86 assembly (clang, -O0):
<dieError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0xc(%rbp)
je     1161 <dieError+0x31>
mov    -0xc(%rbp),%edi
call   1040 <close@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<dieError>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rsi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
test   %ebx,%ebx
je     114d <dieError+0x1d>
mov    %ebx,%edi
call   1040 <close@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @dieError(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 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i32, i32* %4
%11 = call i32 @close(i32 %10)
br label %12
12: ; preds = %9, %2
%13 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @dieError(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = icmp eq i32 %1, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @close(i32 %1)
br label %7
7: ; preds = %5, %2
%8 = tail call i32 @exit(i32 1)
unreachable
}
int cealtesthook_input_iter_isdone() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @cealtesthook_input_iter_isdone() {
ret i32 1
}
void init_prmt(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/);
int main() {
  time_t now = time(0);
  printf("Time: %ld\n", now);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"Time: %ld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @time(i32 0)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"Time: %ld\0A\00"
define i32 @main() {
%1 = tail call i32 @time(i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int main(void) {
  int x;
  int *p;
  x = 10;
  p = &x;
  printf("x = %d\n", x);
  printf("&x = 0x%08x\n", &x);
  printf("p = 0x%08x\n", p);
  printf("*p = %d\n", *p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0xa,0xc(%rsp)
lea    0xedc(%rip),%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed1(%rip),%rdi
lea    0xc(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xc(%rsp),%esi
lea    0xebf(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"x = %d\0A\00"
@.str.1 = [13 x i8] c"&x = 0x%08x\0A\00"
@.str.2 = [12 x i8] c"p = 0x%08x\0A\00"
@.str.3 = [9 x i8] c"*p = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 10, i32* %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 10)
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %6)
ret i32 0
}
int parity(int b) {
  int i;
  int par;
  par = 0;
  for (i = 8; i; i--)
    par ^= (b & 1), b >>= 1;
  return par;
}


x86 assembly (clang, -O0):
<parity>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x8,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1142 <parity+0x42>
mov    -0x4(%rbp),%eax
and    $0x1,%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <parity+0x15>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<parity>:
mov    %edi,%eax
shr    %eax
xor    %edi,%eax
mov    %edi,%ecx
shr    $0x2,%ecx
mov    %edi,%edx
shr    $0x3,%edx
xor    %ecx,%edx
xor    %eax,%edx
mov    %edi,%eax
shr    $0x4,%eax
mov    %edi,%ecx
shr    $0x5,%ecx
xor    %eax,%ecx
mov    %edi,%eax
shr    $0x6,%eax
xor    %ecx,%eax
xor    %edx,%eax
shr    $0x7,%edi
xor    %edi,%eax
and    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @parity(i32 %0) {
%2 = lshr i32 %0, 1
%3 = xor i32 %2, %0
%4 = lshr i32 %0, 2
%5 = xor i32 %3, %4
%6 = lshr i32 %0, 3
%7 = xor i32 %5, %6
%8 = lshr i32 %0, 4
%9 = xor i32 %7, %8
%10 = lshr i32 %0, 5
%11 = xor i32 %9, %10
%12 = lshr i32 %0, 6
%13 = xor i32 %11, %12
%14 = lshr i32 %0, 7
%15 = xor i32 %13, %14
%16 = and i32 %15, 1
ret i32 %16
}
/* Variables and functions */
int pool_alloc_get_size(int, int);
int pool_size_rounding(void) { return pool_alloc_get_size(1, 1) != 20; }


x86 assembly (clang, -O0):
<pool_size_rounding>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%esi
mov    %esi,%edi
call   1030 <pool_alloc_get_size@plt>
cmp    $0x14,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pool_size_rounding>:
push   %rax
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <pool_alloc_get_size@plt>
xor    %ecx,%ecx
cmp    $0x14,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @pool_size_rounding() {
%1 = call i32 @pool_alloc_get_size(i32 1, i32 1)
%2 = icmp ne i32 %1, 20
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @pool_size_rounding() {
%1 = tail call i32 @pool_alloc_get_size(i32 1, i32 1)
%2 = icmp ne i32 %1, 20
%3 = zext i1 %2 to i32
ret i32 %3
}
int euclidean_algorithm_2(int m, int n) {
  int p;
  int q;
  int r;
  if (m > n) {
    p = m;
    q = n;
  } else {
    p = n;
    q = m;
  }
  do {
    r = p % q;
    p = q;
    q = r;
  } while (r != 0);
  return p;
}


x86 assembly (clang, -O0):
<euclidean_algorithm_2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1127 <euclidean_algorithm_2+0x27>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1133 <euclidean_algorithm_2+0x33>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1138 <euclidean_algorithm_2+0x38>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1138 <euclidean_algorithm_2+0x38>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<euclidean_algorithm_2>:
cmp    %esi,%edi
mov    %edi,%edx
cmovg  %esi,%edx
cmovg  %edi,%esi
nopw   0x0(%rax,%rax,1)
mov    %esi,%eax
mov    %edx,%esi
cltd
idiv   %esi
test   %edx,%edx
jne    1110 <euclidean_algorithm_2+0x10>
mov    %esi,%eax
ret

LLVM IR (-O0):
define i32 @euclidean_algorithm_2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = icmp sgt i32 %8, %9
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load i32, i32* %3
store i32 %12, i32* %5
%13 = load i32, i32* %4
store i32 %13, i32* %6
br label %17
14: ; preds = %2
%15 = load i32, i32* %4
store i32 %15, i32* %5
%16 = load i32, i32* %3
store i32 %16, i32* %6
br label %17
17: ; preds = %14, %11
br label %18
18: ; preds = %24, %17
%19 = load i32, i32* %5
%20 = load i32, i32* %6
%21 = srem i32 %19, %20
store i32 %21, i32* %7
%22 = load i32, i32* %6
store i32 %22, i32* %5
%23 = load i32, i32* %7
store i32 %23, i32* %6
br label %24
24: ; preds = %18
%25 = load i32, i32* %7
%26 = icmp ne i32 %25, 0
br i1 %26, label %18, label %27
27: ; preds = %24
%28 = load i32, i32* %5
ret i32 %28
}

LLVM IR (-O2):
define i32 @euclidean_algorithm_2(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
%5 = select i1 %3, i32 %0, i32 %1
br label %6
6: ; preds = %6, %2
%7 = phi i32 [ %4, %2 ], [ %9, %6 ]
%8 = phi i32 [ %5, %2 ], [ %7, %6 ]
%9 = srem i32 %8, %7
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %6
11: ; preds = %6
ret i32 %7
}
/* Variables and functions */
int strcmp(char *, char *);
int Cmp(const void *a, const void *b) { return strcmp((char *)a, (char *)b); }


x86 assembly (clang, -O0):
<Cmp>:
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 <strcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cmp>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @Cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ print_at(char const *, int, int, char);
void printColor(const char *message, char color) {
  print_at(message, -1, -1, color);
}


x86 assembly (clang, -O0):
<printColor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xffffffff,%edx
mov    %edx,%esi
movsbl -0x9(%rbp),%ecx
call   1030 <print_at@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @printColor(i8* %0, i8 signext %1) {
%3 = tail call i32 @print_at(i8* %0, i32 -1, i32 -1, i8 signext %1)
ret void
}
unsigned short f1(unsigned short x) { return x * 10 / 10; }


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
imul   $0xa,%eax,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
movzwl %ax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i16 @f1(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = mul nsw i32 %4, 10
%6 = sdiv i32 %5, 10
%7 = trunc i32 %6 to i16
ret i16 %7
}

LLVM IR (-O2):
define zeroext i16 @f1(i16 returned zeroext %0) {
ret i16 %0
}
/* Variables and functions */
int min_v(int, int);
int calArea(int *height, int l, int r) {
  return (r - l) * min_v(height[l], height[r]);
}


x86 assembly (clang, -O0):
<calArea>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
call   1030 <min_v@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
imul   %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calArea>:
push   %rbx
mov    %edx,%ebx
movslq %edx,%rcx
sub    %esi,%ebx
movslq %esi,%rax
mov    (%rdi,%rax,4),%eax
mov    (%rdi,%rcx,4),%esi
mov    %eax,%edi
call   1030 <min_v@plt>
imul   %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @calArea(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = load i32, i32* %5
%9 = sub nsw i32 %7, %8
%10 = load i32*, i32** %4
%11 = load i32, i32* %5
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %10, i64 %12
%14 = load i32, i32* %13
%15 = load i32*, i32** %4
%16 = load i32, i32* %6
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %15, i64 %17
%19 = load i32, i32* %18
%20 = call i32 @min_v(i32 %14, i32 %19)
%21 = mul nsw i32 %9, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @calArea(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sub nsw i32 %2, %1
%5 = sext i32 %1 to i64
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
%8 = sext i32 %2 to i64
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = tail call i32 @min_v(i32 %7, i32 %10)
%12 = mul nsw i32 %11, %4
ret i32 %12
}
/* Variables and functions */
double __cos(double);
double __sin(double);
void sincos(double x, double *s, double *c) {
  *s = __sin(x);
  *c = __cos(x);
}


x86 assembly (clang, -O0):
<sincos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <__sin@plt>
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x8(%rbp),%xmm0
call   1040 <__cos@plt>
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sincos>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  %xmm0,(%rsp)
call   1030 <__sin@plt>
movsd  %xmm0,(%rbx)
movsd  (%rsp),%xmm0
call   1040 <__cos@plt>
movsd  %xmm0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @sincos(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* %4
%8 = call double @__sin(double %7)
%9 = load double*, double** %5
store double %8, double* %9
%10 = load double, double* %4
%11 = call double @__cos(double %10)
%12 = load double*, double** %6
store double %11, double* %12
ret void
}

LLVM IR (-O2):
define void @sincos(double %0, double* nocapture writeonly %1, double* nocapture writeonly %2) {
%4 = tail call double @__sin(double %0)
store double %4, double* %1
%5 = tail call double @__cos(double %0)
store double %5, double* %2
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ __builtin_wrctl(int, int);
void _Nios2_Set_ctlreg_mpubase(uint32_t value) {
  __builtin_wrctl(14, (int)value);
}


x86 assembly (clang, -O0):
<_Nios2_Set_ctlreg_mpubase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%esi
mov    $0xe,%edi
call   1030 <__builtin_wrctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Nios2_Set_ctlreg_mpubase>:
mov    %rdi,%rsi
mov    $0xe,%edi
jmp    1030 <__builtin_wrctl@plt>

LLVM IR (-O0):
define void @_Nios2_Set_ctlreg_mpubase(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = call i32 @__builtin_wrctl(i32 14, i32 %4)
ret void
}

LLVM IR (-O2):
define void @_Nios2_Set_ctlreg_mpubase(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = tail call i32 @__builtin_wrctl(i32 14, i32 %2)
ret void
}
int main(int argc, char **argv) { return 14; }


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 14
}
/* Type definitions */
typedef int /*<<< orphan*/ z_stream;

/* Variables and functions */
int /*<<< orphan*/ Z_NO_FLUSH;
int inflate(int /*<<< orphan*/ *, int /*<<< orphan*/);
int streaming_commons_call_inflate_noflush(z_stream *stream) {
  return inflate(stream, Z_NO_FLUSH);
}


x86 assembly (clang, -O0):
<streaming_commons_call_inflate_noflush>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
call   1030 <inflate@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<streaming_commons_call_inflate_noflush>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <inflate@plt>

LLVM IR (-O0):
@Z_NO_FLUSH = global i32 0
define i32 @streaming_commons_call_inflate_noflush(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* @Z_NO_FLUSH
%5 = call i32 @inflate(i32* %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@Z_NO_FLUSH = global i32 0
define i32 @streaming_commons_call_inflate_noflush(i32* %0) {
%2 = load i32, i32* @Z_NO_FLUSH
%3 = tail call i32 @inflate(i32* %0, i32 %2)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;
typedef int /*<<< orphan*/ pthread_attr_t;

/* Variables and functions */
int pthread_create(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                   void *(*)(void *), void *);
int /*<<< orphan*/ ref_release(void *);
int /*<<< orphan*/ ref_retain(void *);
int ref_pthread_create(pthread_t *thread, const pthread_attr_t *attr,
                       void *(*start_routine)(void *), void *arg) {
  int ret;
  ref_retain(arg);
  if ((ret = pthread_create(thread, attr, start_routine, arg))) {
    ref_release(arg);
  }
  return ret;
}


x86 assembly (clang, -O0):
<ref_pthread_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <ref_retain@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1040 <pthread_create@plt>
mov    %eax,-0x24(%rbp)
cmp    $0x0,%eax
je     117b <ref_pthread_create+0x4b>
mov    -0x20(%rbp),%rdi
call   1050 <ref_release@plt>
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ref_pthread_create>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbp
mov    %rcx,%rdi
call   1030 <ref_retain@plt>
mov    %rbp,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %rbx,%rcx
call   1040 <pthread_create@plt>
mov    %eax,%ebp
test   %eax,%eax
je     116a <ref_pthread_create+0x3a>
mov    %rbx,%rdi
call   1050 <ref_release@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ref_pthread_create(i32* %0, i32* %1, i8* (i8*)* %2, i8* %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i8* (i8*)*
%8 = alloca i8*
%9 = alloca i32
store i32* %0, i32** %5
store i32* %1, i32** %6
store i8* (i8*)* %2, i8* (i8*)** %7
store i8* %3, i8** %8
%10 = load i8*, i8** %8
%11 = call i32 @ref_retain(i8* %10)
%12 = load i32*, i32** %5
%13 = load i32*, i32** %6
%14 = load i8* (i8*)*, i8* (i8*)** %7
%15 = load i8*, i8** %8
%16 = call i32 @pthread_create(i32* %12, i32* %13, i8* (i8*)* %14, i8* %15)
store i32 %16, i32* %9
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %4
%19 = load i8*, i8** %8
%20 = call i32 @ref_release(i8* %19)
br label %21
21: ; preds = %18, %4
%22 = load i32, i32* %9
ret i32 %22
}

LLVM IR (-O2):
define i32 @ref_pthread_create(i32* %0, i32* %1, i8* (i8*)* %2, i8* %3) {
%5 = tail call i32 @ref_retain(i8* %3)
%6 = tail call i32 @pthread_create(i32* %0, i32* %1, i8* (i8*)* %2, i8* %3)
%7 = icmp eq i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %4
%9 = tail call i32 @ref_release(i8* %3)
br label %10
10: ; preds = %8, %4
ret i32 %6
}
void glTexCoordPointer(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glTexCoordPointer() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void emit_header(char *appname) {
  printf("// File generated by ArduinoML (C/yacc/lex) for %s\n"
         "long time = 0;\n"
         "long debounce = 200;\n\n",
         appname);
}


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

x86 assembly (clang, -O2):
<emit_header>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [89 x i8] c"// File generated by ArduinoML (C/yacc/lex) for %s\0Along time = 0;\0Along debounce = 200;\0A\0A\00"
define void @emit_header(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [89 x i8] c"// File generated by ArduinoML (C/yacc/lex) for %s\0Along time = 0;\0Along debounce = 200;\0A\0A\00"
define void @emit_header(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ niceprint(char *);
void fungus(void) {
  niceprint(
      "The adventurers stumble upon a cavern filled with fungi and mushrooms "
      "of all sizes and types.\n\n");
}


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

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

LLVM IR (-O0):
@.str = [96 x i8] c"The adventurers stumble upon a cavern filled with fungi and mushrooms of all sizes and types.\0A\0A\00"
define void @fungus() {
%1 = call i32 @niceprint(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [96 x i8] c"The adventurers stumble upon a cavern filled with fungi and mushrooms of all sizes and types.\0A\0A\00"
define void @fungus() {
%1 = tail call i32 @niceprint(i8* getelementptr inbounds ([96 x i8], [96 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
char *FP_strerror(int errcode) {
  static char number[8];
  sprintf(number, "%03d", errcode);
  return number;
}


x86 assembly (clang, -O0):
<FP_strerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0x2f04(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2ef1(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FP_strerror>:
push   %rbx
mov    %edi,%edx
lea    0x2f0f(%rip),%rbx
lea    0xedf(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@FP_strerror.number = internal global [8 x i8] zeroinitializer
@.str = [5 x i8] c"%03d\00"
define i8* @FP_strerror(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @sprintf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @FP_strerror.number, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @FP_strerror.number, i64 0, i64 0)
}

LLVM IR (-O2):
@FP_strerror.number = internal global [8 x i8] zeroinitializer
@.str = [5 x i8] c"%03d\00"
define i8* @FP_strerror(i32 %0) {
%2 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @FP_strerror.number, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @FP_strerror.number, i64 0, i64 0)
}