xunge/DecIR huggingface dataset:
int wnn_Substr(s1, s2)
register unsigned short *s1;
register unsigned short *s2;
{
  for (; *s1 != 0 && *s1 == *s2; s1++, s2++)
    ;
  return (int)(!*s1);
}


x86 assembly (clang, -O0):
<wnn_Substr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1137 <wnn_Substr+0x37>
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
mov    -0x10(%rbp),%rcx
movzwl (%rcx),%ecx
cmp    %ecx,%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1147 <wnn_Substr+0x47>
jmp    1169 <wnn_Substr+0x69>
jmp    114c <wnn_Substr+0x4c>
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x10(%rbp)
jmp    110c <wnn_Substr+0xc>
mov    -0x8(%rbp),%rax
cmpw   $0x0,(%rax)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wnn_Substr>:
movzwl (%rdi),%edx
test   %dx,%dx
je     1134 <wnn_Substr+0x34>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
mov    %edx,%r8d
movzwl (%rsi,%rax,1),%ecx
cmp    %cx,%dx
jne    112a <wnn_Substr+0x2a>
movzwl 0x2(%rdi,%rax,1),%edx
add    $0x2,%rax
test   %dx,%dx
jne    1110 <wnn_Substr+0x10>
xor    %eax,%eax
cmp    %cx,%r8w
sete   %al
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @wnn_Substr(i16* nocapture %0, i16* nocapture %1) {
%3 = load i16, i16* %0
%4 = icmp eq i16 %3, 0
br i1 %4, label %18, label %5
5: ; preds = %2, %11
%6 = phi i16 [ %14, %11 ], [ %3, %2 ]
%7 = phi i16* [ %13, %11 ], [ %1, %2 ]
%8 = phi i16* [ %12, %11 ], [ %0, %2 ]
%9 = load i16, i16* %7
%10 = icmp eq i16 %6, %9
br i1 %10, label %11, label %16
11: ; preds = %5
%12 = getelementptr inbounds i16, i16* %8, i64 1
%13 = getelementptr inbounds i16, i16* %7, i64 1
%14 = load i16, i16* %12
%15 = icmp eq i16 %14, 0
br i1 %15, label %16, label %5
16: ; preds = %11, %5
%17 = zext i1 %10 to i32
br label %18
18: ; preds = %16, %2
%19 = phi i32 [ 1, %2 ], [ %17, %16 ]
ret i32 %19
}
int convert(char bin[]) {
  int dec;
  char *ptr;
  for (ptr = &bin[0], dec = 0; *ptr != '\0'; ptr++) {
    dec = (dec << 1) | (*ptr - '0');
  }
  return dec;
}


x86 assembly (clang, -O0):
<convert>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     114d <convert+0x4d>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
sub    $0x30,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1117 <convert+0x17>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert>:
mov    (%rdi),%cl
test   %cl,%cl
je     1126 <convert+0x26>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
add    %eax,%eax
add    $0xffffffd0,%ecx
or     %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <convert+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @convert(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %13, %4 ], [ %2, %1 ]
%6 = phi i8* [ %12, %4 ], [ %0, %1 ]
%7 = phi i32 [ %11, %4 ], [ 0, %1 ]
%8 = sext i8 %5 to i32
%9 = shl i32 %7, 1
%10 = add nsw i32 %8, -48
%11 = or i32 %10, %9
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %16
}
int test_imm_C0uint16_reg(unsigned short val) {
  return ((val) & (-0xC0 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C0uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffff40,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_C0uint16_reg>:
test   $0xff40,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_C0uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, -192
%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_C0uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -192
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int __attribute__((no)) debug(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @debug() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void *tfn1(void *arg) {
  printf("the thread\n");
  return NULL;
}


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"the thread\0A\00"
define i8* @tfn1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i8* null
}

LLVM IR (-O2):
@str = [11 x i8] c"the thread\00"
define noalias i8* @tfn1(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret i8* null
}
__attribute__((always_)) void thor_free(void *p) {}


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

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

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

LLVM IR (-O2):
define void @thor_free(i8* nocapture %0) {
ret void
}
__attribute__((no)) int foo(int x) {
  int c = x;
  if (x > 10)
    c += 2;
  else
    c -= 3;
  return x;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0xa,-0x4(%rbp)
jle    1125 <foo+0x25>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    112e <foo+0x2e>
mov    -0x8(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @foo(i32 returned %0) {
ret i32 %0
}
int _lseek(int fd, int offset, int whence) { return -1; }


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

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

LLVM IR (-O0):
define i32 @_lseek(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
ret i32 -1
}

LLVM IR (-O2):
define i32 @_lseek(i32 %0, i32 %1, i32 %2) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ DirectIndirectIndexedE0X1(int);
int /*<<< orphan*/ STA16(int /*<<< orphan*/, int);
void Op91E0M0X1(void) { STA16(DirectIndirectIndexedE0X1(2), 0xFFFFFF); }


x86 assembly (clang, -O0):
<Op91E0M0X1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <DirectIndirectIndexedE0X1@plt>
mov    %eax,%edi
mov    $0xffffff,%esi
call   1040 <STA16@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op91E0M0X1>:
push   %rax
mov    $0x2,%edi
call   1030 <DirectIndirectIndexedE0X1@plt>
mov    %eax,%edi
mov    $0xffffff,%esi
pop    %rax
jmp    1040 <STA16@plt>

LLVM IR (-O0):
define void @Op91E0M0X1() {
%1 = call i32 @DirectIndirectIndexedE0X1(i32 2)
%2 = call i32 @STA16(i32 %1, i32 16777215)
ret void
}

LLVM IR (-O2):
define void @Op91E0M0X1() {
%1 = tail call i32 @DirectIndirectIndexedE0X1(i32 2)
%2 = tail call i32 @STA16(i32 %1, i32 16777215)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ simputc(unsigned long);
extern void simputn(unsigned long int i) {
  if (i > 9) {
    simputn(i / 10);
  }
  simputc('0' + (i % 10));
}


x86 assembly (clang, -O0):
<simputn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x9,-0x8(%rbp)
jbe    114d <simputn+0x2d>
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,%rdi
call   1030 <simputn@plt>
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %rdx,%rdi
add    $0x30,%rdi
call   1040 <simputc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<simputn>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movabs $0xcccccccccccccccd,%r14
cc cc cc
cmp    $0xa,%rdi
jb     1149 <simputn+0x29>
mov    %rbx,%rax
mul    %r14
mov    %rdx,%rdi
shr    $0x3,%rdi
call   1030 <simputn@plt>
mov    %rbx,%rax
mul    %r14
shr    $0x2,%rdx
and    $0xfffffffffffffffe,%rdx
lea    (%rdx,%rdx,4),%rax
sub    %rax,%rbx
or     $0x30,%rbx
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <simputc@plt>

LLVM IR (-O0):
define void @simputn(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ugt i64 %3, 9
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = udiv i64 %6, 10
br label %8
8: ; preds = %5, %1
%9 = load i64, i64* %2
%10 = urem i64 %9, 10
%11 = add i64 48, %10
%12 = call i32 @simputc(i64 %11)
ret void
}

LLVM IR (-O2):
define void @simputn(i64 %0) {
%2 = icmp ugt i64 %0, 9
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = udiv i64 %0, 10
tail call void @simputn(i64 %4)
br label %5
5: ; preds = %3, %1
%6 = urem i64 %0, 10
%7 = or i64 %6, 48
%8 = tail call i32 @simputc(i64 %7)
ret void
}
int isxdigit(int c) {
  return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') ||
         (c >= 'A' && c <= 'F');
}


x86 assembly (clang, -O0):
<isxdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x30,-0x4(%rbp)
jl     1120 <isxdigit+0x20>
mov    $0x1,%al
cmpl   $0x39,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1158 <isxdigit+0x58>
cmpl   $0x61,-0x4(%rbp)
jl     1139 <isxdigit+0x39>
mov    $0x1,%al
cmpl   $0x66,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1158 <isxdigit+0x58>
xor    %eax,%eax
cmpl   $0x41,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     1152 <isxdigit+0x52>
cmpl   $0x46,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isxdigit>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%eax
setb   %al
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
cmp    $0x6,%edi
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isxdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 48
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 57
br i1 %7, label %22, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 97
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 102
br i1 %13, label %22, label %14
14: ; preds = %11, %8
%15 = load i32, i32* %2
%16 = icmp sge i32 %15, 65
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp sle i32 %18, 70
br label %20
20: ; preds = %17, %14
%21 = phi i1 [ false, %14 ], [ %19, %17 ]
br label %22
22: ; preds = %20, %11, %5
%23 = phi i1 [ true, %11 ], [ true, %5 ], [ %21, %20 ]
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @isxdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = and i32 %0, -33
%5 = add i32 %4, -65
%6 = icmp ult i32 %5, 6
%7 = or i1 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
deleteElement() {}


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

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

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

LLVM IR (-O2):
define i32 @deleteElement() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ normal_fun();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("hello ...\n");
  normal_fun();
  printf("world ...\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <normal_fun@plt>
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [10 x i8] c"hello ...\00"
@str.2 = [10 x i8] c"world ...\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @normal_fun()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
void fn_pragma_1_0(void) {}


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

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

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

LLVM IR (-O2):
define void @fn_pragma_1_0() {
ret void
}
int goal_state_pause(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @goal_state_pause() {
ret i32 0
}

LLVM IR (-O2):
define i32 @goal_state_pause() {
ret i32 0
}
/* Variables and functions */
scalar_t__ func();
int /*<<< orphan*/ printf(char *);
int main(void) {
  if (func() == 0) {
    printf("Iz success.\n");
  } else {
    printf("Iz fail.\n");
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <func@plt>
cmp    $0x0,%rax
jne    1151 <main+0x31>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
jmp    1169 <main+0x49>
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1170 <main+0x50>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <func@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
lea    0xed2(%rip),%rax
lea    0xec2(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@str = [9 x i8] c"Iz fail.\00"
@str.2 = [12 x i8] c"Iz success.\00"
define i32 @main() {
%1 = tail call i64 (...) @func()
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0)
%4 = xor i1 %2, true
%5 = zext i1 %4 to i32
%6 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret i32 %5
}
void RTCAlarm_IRQHandler(void) {}


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

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

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

LLVM IR (-O2):
define void @RTCAlarm_IRQHandler() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char const *);
void print_string_fix(const char *s, int l) {
  printf("%d characters in '%s'\n", l, s);
}


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

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

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

LLVM IR (-O2):
@.str = [23 x i8] c"%d characters in '%s'\0A\00"
define void @print_string_fix(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %0)
ret void
}
__attribute__((cfi_canonical_jump_table)) void g() {}


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

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

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

LLVM IR (-O2):
define void @g() {
ret void
}
double sec2hour(double x) { return (x / 3600.0); }


x86 assembly (clang, -O0):
<sec2hour>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sec2hour>:
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @sec2hour(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 3.600000e+03
ret double %4
}

LLVM IR (-O2):
define double @sec2hour(double %0) {
%2 = fdiv double %0, 3.600000e+03
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ GL_FLAT;
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
int /*<<< orphan*/ makeRasterFont();
void init(void) {
  glShadeModel(GL_FLAT);
  makeRasterFont();
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
call   1040 <glShadeModel@plt>
mov    $0x0,%al
call   1030 <makeRasterFont@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
call   1040 <glShadeModel@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <makeRasterFont@plt>

LLVM IR (-O0):
@GL_FLAT = global i32 0
define void @init() {
%1 = load i32, i32* @GL_FLAT
%2 = call i32 @glShadeModel(i32 %1)
%3 = call i32 (...) @makeRasterFont()
ret void
}

LLVM IR (-O2):
@GL_FLAT = global i32 0
define void @init() {
%1 = load i32, i32* @GL_FLAT
%2 = tail call i32 @glShadeModel(i32 %1)
%3 = tail call i32 (...) @makeRasterFont()
ret void
}
int get_max_shield(int obj_type) {
  int value;
  switch (obj_type) {
  case 0:
    value = 100;
    break;
  case 1:
    value = 30;
    break;
  case 2:
    value = 10;
    break;
  case 3:
    value = 20;
    break;
  case 4:
    value = 30;
    break;
  }
  return value;
}


x86 assembly (clang, -O0):
<get_max_shield>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x4,%rax
ja     1163 <get_max_shield+0x63>
mov    -0x10(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x64,-0x8(%rbp)
jmp    1163 <get_max_shield+0x63>
movl   $0x1e,-0x8(%rbp)
jmp    1163 <get_max_shield+0x63>
movl   $0xa,-0x8(%rbp)
jmp    1163 <get_max_shield+0x63>
movl   $0x14,-0x8(%rbp)
jmp    1163 <get_max_shield+0x63>
movl   $0x1e,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_max_shield>:
add    $0xffffffff,%edi
mov    $0x64,%eax
cmp    $0x3,%edi
ja     111a <get_max_shield+0x1a>
movslq %edi,%rax
lea    0xee9(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @get_max_shield(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
switch i32 %4, label %10 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
i32 3, label %8
i32 4, label %9
]
5: ; preds = %1
store i32 100, i32* %3
br label %10
6: ; preds = %1
store i32 30, i32* %3
br label %10
7: ; preds = %1
store i32 10, i32* %3
br label %10
8: ; preds = %1
store i32 20, i32* %3
br label %10
9: ; preds = %1
store i32 30, i32* %3
br label %10
10: ; preds = %1, %9, %8, %7, %6, %5
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
@switch.table.get_max_shield = [4 x i32] [i32 30, i32 10, i32 20, i32 30]
define i32 @get_max_shield(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 4
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [4 x i32], [4 x i32]* @switch.table.get_max_shield, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 100, %1 ], [ %7, %4 ]
ret i32 %9
}
void g_type_check_instance() {}


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

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

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

LLVM IR (-O2):
define void @g_type_check_instance() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void *malloc(size_t);
int /*<<< orphan*/ perror(char *);
void *safe_malloc(size_t size) {
  void *ptr = malloc(size);
  if (ptr == NULL) {
    perror("safe malloc failed.");
    exit(EXIT_FAILURE);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<safe_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116e <safe_malloc+0x3e>
lea    0xea5(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [20 x i8] c"safe malloc failed.\00"
@EXIT_FAILURE = global i32 0
define noalias i8* @safe_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, char *);
void PAK_Error(char *txt) {
  printf("%s", txt);
  getchar();
  exit(0);
}


x86 assembly (clang, -O0):
<PAK_Error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<PAK_Error>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @PAK_Error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (...) @getchar()
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @PAK_Error(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (...) @getchar()
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int mktemp_internal(char *, int /*<<< orphan*/, int, int /*<<< orphan*/);
char *mkdtemp(char *path) {
  int error;
  error = mktemp_internal(path, 0, 2, 0);
  return (error ? NULL : path);
}


x86 assembly (clang, -O0):
<mkdtemp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %ecx,%ecx
mov    $0x2,%edx
mov    %ecx,%esi
call   1030 <mktemp_internal@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1146 <mkdtemp+0x36>
xor    %eax,%eax
mov    %rax,-0x18(%rbp)
jmp    114e <mkdtemp+0x3e>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkdtemp>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
xor    %esi,%esi
mov    $0x2,%edx
xor    %ecx,%ecx
call   1030 <mktemp_internal@plt>
test   %eax,%eax
cmove  %r14,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @mkdtemp(i8* %0) {
%2 = tail call i32 @mktemp_internal(i8* %0, i32 0, i32 2, i32 0)
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i8* %0, i8* null
ret i8* %4
}
void TM10_intr(void) {}


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

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

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

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

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, size_t, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void get_now_str(char *buf, size_t bufsize) {
  time_t now = time(NULL);
  struct tm *p = localtime(&now);
  strftime(buf, bufsize, "%Y-%m-%d %H:%M:%S", p);
}


x86 assembly (clang, -O0):
<get_now_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0x14(%rbp)
lea    -0x14(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rcx
lea    0xe94(%rip),%rdx
call   1050 <strftime@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_now_str>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
lea    0xeaa(%rip),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rax,%rcx
call   1050 <strftime@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [18 x i8] c"%Y-%m-%d %H:%M:%S\00"
define void @get_now_str(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
%6 = alloca %struct.tm*
store i8* %0, i8** %3
store i64 %1, i64* %4
%7 = call i32 @time(i32* null)
store i32 %7, i32* %5
%8 = call %struct.tm* @localtime(i32* %5)
store %struct.tm* %8, %struct.tm** %6
%9 = load i8*, i8** %3
%10 = load i64, i64* %4
%11 = load %struct.tm*, %struct.tm** %6
%12 = call i32 @strftime(i8* %9, i64 %10, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %11)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [18 x i8] c"%Y-%m-%d %H:%M:%S\00"
define void @get_now_str(i8* %0, i64 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 @time(i32* null)
store i32 %5, i32* %3
%6 = call %struct.tm* @localtime(i32* %3)
%7 = call i32 @strftime(i8* %0, i64 %1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CFG_EEPROM_Enable();
void CFG_EEPROM_Start(void) { CFG_EEPROM_Enable(); }


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

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

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

LLVM IR (-O2):
define void @CFG_EEPROM_Start() {
%1 = tail call i32 (...) @CFG_EEPROM_Enable()
ret void
}
int __nacl_tls_aligment() { return (1 << 12); }


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

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

LLVM IR (-O0):
define i32 @__nacl_tls_aligment() {
ret i32 4096
}

LLVM IR (-O2):
define i32 @__nacl_tls_aligment() {
ret i32 4096
}
float *test_func_01(float *p, float c) {
  *--p = c;
  *--p = c;
  *--p = c;
  return p;
}


x86 assembly (clang, -O0):
<test_func_01>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x8(%rbp)
movss  %xmm0,-0x4(%rax)
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x8(%rbp)
movss  %xmm0,-0x4(%rax)
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x8(%rbp)
movss  %xmm0,-0x4(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_func_01>:
movss  %xmm0,-0x4(%rdi)
movss  %xmm0,-0x8(%rdi)
movss  %xmm0,-0xc(%rdi)
lea    -0xc(%rdi),%rax
ret

LLVM IR (-O0):
define float* @test_func_01(float* %0, float %1) {
%3 = alloca float*
%4 = alloca float
store float* %0, float** %3
store float %1, float* %4
%5 = load float, float* %4
%6 = load float*, float** %3
%7 = getelementptr inbounds float, float* %6, i32 -1
store float* %7, float** %3
store float %5, float* %7
%8 = load float, float* %4
%9 = load float*, float** %3
%10 = getelementptr inbounds float, float* %9, i32 -1
store float* %10, float** %3
store float %8, float* %10
%11 = load float, float* %4
%12 = load float*, float** %3
%13 = getelementptr inbounds float, float* %12, i32 -1
store float* %13, float** %3
store float %11, float* %13
%14 = load float*, float** %3
ret float* %14
}

LLVM IR (-O2):
define float* @test_func_01(float* writeonly %0, float %1) {
%3 = getelementptr inbounds float, float* %0, i64 -1
store float %1, float* %3
%4 = getelementptr inbounds float, float* %0, i64 -2
store float %1, float* %4
%5 = getelementptr inbounds float, float* %0, i64 -3
store float %1, float* %5
ret float* %5
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
void fatal(char *s) {
  fprintf(stderr, "%s: %s\n", s, strerror(errno));
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    %rax,%rcx
lea    0xe91(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e55(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fatal>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ea3(%rip),%rax
mov    (%rax),%ebp
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
lea    0xeac(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
call   1030 <fprintf@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [8 x i8] c"%s: %s\0A\00"
@errno = global i32 0
@EXIT_FAILURE = global i32 0
define void @fatal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = load i32, i32* @errno
%6 = call i8* @strerror(i32 %5)
%7 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %6)
%8 = load i32, i32* @EXIT_FAILURE
%9 = call i32 @exit(i32 %8)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [8 x i8] c"%s: %s\0A\00"
@errno = global i32 0
@EXIT_FAILURE = global i32 0
define void @fatal(i8* %0) {
%2 = load i32, i32* @stderr
%3 = load i32, i32* @errno
%4 = tail call i8* @strerror(i32 %3)
%5 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
}
unsigned xrop3_160_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  stk1 = D & T;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_160_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_160_1_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
not    %eax
and    %esi,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_160_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = or i32 %11, %13
store i32 %14, i32* %6
%15 = load i8, i8* %4
%16 = zext i8 %15 to i32
%17 = shl i32 %16, 8
%18 = load i8, i8* %4
%19 = zext i8 %18 to i32
%20 = or i32 %17, %19
store i32 %20, i32* %7
%21 = load i32, i32* %5
%22 = load i32, i32* %7
%23 = and i32 %21, %22
store i32 %23, i32* %8
%24 = load i32, i32* %8
%25 = load i32, i32* %6
%26 = xor i32 %25, -1
%27 = and i32 %24, %26
%28 = load i32, i32* %5
%29 = load i32, i32* %6
%30 = and i32 %28, %29
%31 = or i32 %27, %30
ret i32 %31
}

LLVM IR (-O2):
define i32 @xrop3_160_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = xor i32 %4, -1
%7 = and i32 %6, %5
%8 = or i32 %7, %3
ret i32 %8
}
double getabs(double x) {
  if (x < 0) {
    x *= -1;
  }
  return x;
}


x86 assembly (clang, -O0):
<getabs>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1129 <getabs+0x29>
movsd  0xee1(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<getabs>:
movapd 0xef8(%rip),%xmm2
xorpd  %xmm0,%xmm2
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm1
cmpltsd %xmm3,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @getabs(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load double, double* %2
%7 = fmul double %6, -1.000000e+00
store double %7, double* %2
br label %8
8: ; preds = %5, %1
%9 = load double, double* %2
ret double %9
}

LLVM IR (-O2):
define double @getabs(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %3, double %0
ret double %4
}
int triangulo(int p, int q, int r) {
  if (p < q + r && q < p + r && r < p + q)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<triangulo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    -0x10(%rbp),%ecx
cmp    %ecx,%eax
jge    114c <triangulo+0x4c>
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    -0x10(%rbp),%ecx
cmp    %ecx,%eax
jge    114c <triangulo+0x4c>
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
cmp    %ecx,%eax
jge    114c <triangulo+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    1153 <triangulo+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<triangulo>:
lea    (%rdx,%rsi,1),%eax
cmp    %edi,%eax
setg   %al
lea    (%rdx,%rdi,1),%ecx
cmp    %esi,%ecx
setg   %cl
and    %al,%cl
add    %edi,%esi
cmp    %edx,%esi
setg   %al
and    %cl,%al
movzbl %al,%eax
ret

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

LLVM IR (-O2):
define i32 @triangulo(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %2, %1
%5 = icmp sgt i32 %4, %0
%6 = add nsw i32 %2, %0
%7 = icmp sgt i32 %6, %1
%8 = select i1 %5, i1 %7, i1 false
%9 = add nsw i32 %1, %0
%10 = icmp sgt i32 %9, %2
%11 = select i1 %8, i1 %10, i1 false
%12 = zext i1 %11 to i32
ret i32 %12
}
void ARGBColorMatrixRow_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ARGBColorMatrixRow_NEON() {
ret void
}
unsigned char product(unsigned int a, unsigned int b) { return a * b / 255; }


x86 assembly (clang, -O0):
<product>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    $0xff,%ecx
xor    %edx,%edx
div    %ecx
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<product>:
imul   %esi,%edi
mov    $0x80808081,%eax
imul   %rdi,%rax
shr    $0x27,%rax
ret

LLVM IR (-O0):
define zeroext i8 @product(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 = mul i32 %5, %6
%8 = udiv i32 %7, 255
%9 = trunc i32 %8 to i8
ret i8 %9
}

LLVM IR (-O2):
define zeroext i8 @product(i32 %0, i32 %1) {
%3 = mul i32 %1, %0
%4 = udiv i32 %3, 255
%5 = trunc i32 %4 to i8
ret i8 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ loff_t;

/* Variables and functions */
int /*<<< orphan*/ syscall(int, int, int /*<<< orphan*/ *, int,
                           int /*<<< orphan*/ *, size_t, unsigned int);
ssize_t missing_copy_file_range(int fd_in, loff_t *off_in, int fd_out,
                                loff_t *off_out, size_t len,
                                unsigned int flags) {
  return syscall(326, fd_in, off_in, fd_out, off_out, len, flags);
}


x86 assembly (clang, -O0):
<missing_copy_file_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x2c(%rbp),%eax
mov    $0x146,%edi
mov    %eax,(%rsp)
call   1030 <syscall@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<missing_copy_file_range>:
push   %rax
mov    %r8,%rax
mov    %rcx,%r8
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
mov    %r9d,(%rsp)
mov    $0x146,%edi
mov    %rax,%r9
call   1030 <syscall@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @missing_copy_file_range(i32 %0, i32* %1, i32 %2, i32* %3, i64 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i64
%12 = alloca i32
store i32 %0, i32* %7
store i32* %1, i32** %8
store i32 %2, i32* %9
store i32* %3, i32** %10
store i64 %4, i64* %11
store i32 %5, i32* %12
%13 = load i32, i32* %7
%14 = load i32*, i32** %8
%15 = load i32, i32* %9
%16 = load i32*, i32** %10
%17 = load i64, i64* %11
%18 = load i32, i32* %12
%19 = call i32 @syscall(i32 326, i32 %13, i32* %14, i32 %15, i32* %16, i64 %17, i32 %18)
ret i32 %19
}

LLVM IR (-O2):
define i32 @missing_copy_file_range(i32 %0, i32* %1, i32 %2, i32* %3, i64 %4, i32 %5) {
%7 = tail call i32 @syscall(i32 326, i32 %0, i32* %1, i32 %2, i32* %3, i64 %4, i32 %5)
ret i32 %7
}
int main(void) {
  int a = 0;
  for (; a != 0; a++) {
    break;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1121 <main+0x21>
jmp    1121 <main+0x21>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %7, %0
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %3
br label %10
7: ; No predecessors!
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
store i32 %9, i32* %2
br label %3
10: ; preds = %6, %3
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int xmlUCSIsSupplementaryPrivateUseAreaA(int code) {
  return (((code >= 0xF0000) && (code <= 0xFFFFF)));
}


x86 assembly (clang, -O0):
<xmlUCSIsSupplementaryPrivateUseAreaA>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0xf0000,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsSupplementaryPrivateUseAreaA+0x26>
cmpl   $0xfffff,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsSupplementaryPrivateUseAreaA>:
and    $0xffff0000,%edi
xor    %eax,%eax
cmp    $0xf0000,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @xmlUCSIsSupplementaryPrivateUseAreaA(i32 %0) {
%2 = and i32 %0, -65536
%3 = icmp eq i32 %2, 983040
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
void *malloc(size_t);
void *ntfs_align(size_t size) { return malloc(size); }


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

x86 assembly (clang, -O2):
<ntfs_align>:
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @ntfs_align(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @malloc(i64 %3)
ret i8* %4
}

LLVM IR (-O2):
define noalias i8* @ntfs_align(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ op_write1(int);
void op_enc_add_hl_bc(void) { op_write1(0x09); }


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

x86 assembly (clang, -O2):
<op_enc_add_hl_bc>:
mov    $0x9,%edi
jmp    1030 <op_write1@plt>

LLVM IR (-O0):
define void @op_enc_add_hl_bc() {
%1 = call i32 @op_write1(i32 9)
ret void
}

LLVM IR (-O2):
define void @op_enc_add_hl_bc() {
%1 = tail call i32 @op_write1(i32 9)
ret void
}