xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ *fopen(char *, char *);
FILE *loadFile(char *filename) {
  FILE *inp = fopen(filename, "r");
  if (inp != NULL)
    return inp;
  exit(0);
}


x86 assembly (clang, -O0):
<loadFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1030 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1155 <loadFile+0x35>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<loadFile>:
push   %rax
lea    0xed8(%rip),%rsi
call   1030 <fopen@plt>
test   %rax,%rax
je     1134 <loadFile+0x14>
pop    %rcx
ret
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
define i32* @loadFile(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = icmp ne i32* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i32*, i32** %3
ret i32* %9
10: ; preds = %1
%11 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define noalias i32* @loadFile(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %5, label %4
4: ; preds = %1
ret i32* %2
5: ; preds = %1
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int /*<<< orphan*/ assert_context_process();
int put_user(int size, void *ptr) {
  int tmp;
  {
    {
      assert_context_process();
      tmp = __VERIFIER_nondet_int();
    }
    return (tmp);
  }
}


x86 assembly (clang, -O0):
<put_user>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <assert_context_process@plt>
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_user>:
push   %rax
xor    %eax,%eax
call   1030 <assert_context_process@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <__VERIFIER_nondet_int@plt>

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

LLVM IR (-O2):
define i32 @put_user(i32 %0, i8* nocapture readnone %1) {
%3 = tail call i32 (...) @assert_context_process()
%4 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 %4
}
atexit() {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<atexit>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <atexit+0x9>
jmp    1109 <atexit+0x9>

x86 assembly (clang, -O2):
<atexit>:
jmp    1100 <atexit>

LLVM IR (-O0):
define i32 @atexit() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define i32 @atexit() {
br label %1
1: ; preds = %0, %1
br label %1
}
unsigned xrop3_188_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = D & S;
  stk3 = ~stk3;
  stk2 = T & stk3;
  stk1 = S ^ stk2;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_188_1_1>:
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    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @xrop3_188_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %5
%24 = load i32, i32* %6
%25 = and i32 %23, %24
store i32 %25, i32* %10
%26 = load i32, i32* %10
%27 = xor i32 %26, -1
store i32 %27, i32* %10
%28 = load i32, i32* %7
%29 = load i32, i32* %10
%30 = and i32 %28, %29
store i32 %30, i32* %9
%31 = load i32, i32* %6
%32 = load i32, i32* %9
%33 = xor i32 %31, %32
store i32 %33, i32* %8
%34 = load i32, i32* %8
%35 = load i32, i32* %6
%36 = xor i32 %35, -1
%37 = and i32 %34, %36
%38 = load i32, i32* %7
%39 = xor i32 %38, -1
%40 = and i32 %37, %39
%41 = load i32, i32* %5
%42 = load i32, i32* %6
%43 = and i32 %41, %42
%44 = or i32 %40, %43
%45 = load i32, i32* %5
%46 = load i32, i32* %7
%47 = and i32 %45, %46
%48 = or i32 %44, %47
ret i32 %48
}

LLVM IR (-O2):
define i32 @xrop3_188_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = or i8 %1, %0
%4 = zext i8 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printingHiMake();
int main(void) {
  printingHiMake();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @printingHiMake()
ret i32 0
}
void transfer_VYU888_to_YUV888(unsigned char *(*output), unsigned char *input) {
  (*output)[0] = input[1];
  (*output)[1] = input[2];
  (*output)[2] = input[0];
  (*output) += 3;
}


x86 assembly (clang, -O0):
<transfer_VYU888_to_YUV888>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %cl,0x2(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x3,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<transfer_VYU888_to_YUV888>:
mov    0x1(%rsi),%al
mov    (%rdi),%rcx
mov    %al,(%rcx)
mov    0x2(%rsi),%al
mov    (%rdi),%rcx
mov    %al,0x1(%rcx)
mov    (%rsi),%al
mov    (%rdi),%rcx
mov    %al,0x2(%rcx)
addq   $0x3,(%rdi)
ret

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

LLVM IR (-O2):
define void @transfer_VYU888_to_YUV888(i8** nocapture %0, i8* nocapture %1) {
%3 = getelementptr inbounds i8, i8* %1, i64 1
%4 = load i8, i8* %3
%5 = load i8*, i8** %0
store i8 %4, i8* %5
%6 = getelementptr inbounds i8, i8* %1, i64 2
%7 = load i8, i8* %6
%8 = load i8*, i8** %0
%9 = getelementptr inbounds i8, i8* %8, i64 1
store i8 %7, i8* %9
%10 = load i8, i8* %1
%11 = load i8*, i8** %0
%12 = getelementptr inbounds i8, i8* %11, i64 2
store i8 %10, i8* %12
%13 = load i8*, i8** %0
%14 = getelementptr inbounds i8, i8* %13, i64 3
store i8* %14, i8** %0
ret void
}
int movzbw_1(void) {
  int res;
  __asm__ __volatile__("movl $0x12345678, %%eax\n\t"
                       "movb $0x22, %%al\n\t"
                       "movzbw %%al,%%ax\n\t"
                       "mov %%eax, %0"
                       : "=r"(res)
                       :
                       : "eax");
  return res;
}


x86 assembly (clang, -O0):
<movzbw_1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x12345678,%eax
mov    $0x22,%al
movzbw %al,%ax
mov    %eax,%ecx
mov    %ecx,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<movzbw_1>:
mov    $0x12345678,%eax
mov    $0x22,%al
movzbw %al,%ax
mov    %eax,%ecx
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @movzbw_1() {
%1 = alloca i32
%2 = call i32 asm sideeffect "movl $$0x12345678, %eax\0A\09movb $$0x22, %al\0A\09movzbw %al,%ax\0A\09mov %eax, $0", "=r,~{eax},~{dirflag},~{fpsr},~{flags}"()
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @movzbw_1() {
%1 = tail call i32 asm sideeffect "movl $$0x12345678, %eax\0A\09movb $$0x22, %al\0A\09movzbw %al,%ax\0A\09mov %eax, $0", "=r,~{eax},~{dirflag},~{fpsr},~{flags}"()
ret i32 %1
}
/* Variables and functions */
long double __infer_nondet_long_double();
long double nanl(const char *tagp) { return __infer_nondet_long_double(); }


x86 assembly (clang, -O0):
<nanl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
call   1030 <__infer_nondet_long_double@plt>
fld    %st(0)
fstp   %st(0)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define x86_fp80 @nanl(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %3
}

LLVM IR (-O2):
define x86_fp80 @nanl(i8* nocapture readnone %0) {
%2 = tail call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ test_basics();
int /*<<< orphan*/ test_cbc();
int /*<<< orphan*/ test_ecb();
int main() {
  test_basics();
  test_ecb();
  test_cbc();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_basics()
%2 = tail call i32 (...) @test_ecb()
%3 = tail call i32 (...) @test_cbc()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, char *);
void printField(int row, int line, int col, char *fieldValue) {
  printf("row=[%d], line=[%d], col=[%d], data=[%s]\n", row, line, col,
         fieldValue);
}


x86 assembly (clang, -O0):
<printField>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r8
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printField>:
mov    %rcx,%r8
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
lea    0xee0(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"row=[%d], line=[%d], col=[%d], data=[%s]\0A\00"
define void @printField(i32 %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i8*, i8** %8
%13 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10, i32 %11, i8* %12)
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"row=[%d], line=[%d], col=[%d], data=[%s]\0A\00"
define void @printField(i32 %0, i32 %1, i32 %2, i8* %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2, i8* %3)
ret void
}
int arith(int x, int y, int z) {
  int t1 = x + y;
  int t2 = z * 48;
  int t3 = t1 & 0xFFFF;
  int t4 = t2 * t3;
  return t4;
}


x86 assembly (clang, -O0):
<arith>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
imul   $0x30,-0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
and    $0xffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
imul   -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<arith>:
add    %esi,%edi
movzwl %di,%eax
imul   %edx,%eax
shl    $0x4,%eax
lea    (%rax,%rax,2),%eax
ret

LLVM IR (-O0):
define i32 @arith(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = add nsw i32 %11, %12
store i32 %13, i32* %7
%14 = load i32, i32* %6
%15 = mul nsw i32 %14, 48
store i32 %15, i32* %8
%16 = load i32, i32* %7
%17 = and i32 %16, 65535
store i32 %17, i32* %9
%18 = load i32, i32* %8
%19 = load i32, i32* %9
%20 = mul nsw i32 %18, %19
store i32 %20, i32* %10
%21 = load i32, i32* %10
ret i32 %21
}

LLVM IR (-O2):
define i32 @arith(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, %0
%5 = mul nsw i32 %2, 48
%6 = and i32 %4, 65535
%7 = mul nsw i32 %5, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ run();
int main(int argc, const char *argv[]) {
  run();
  run();
  run();
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @run()
%4 = tail call i32 (...) @run()
%5 = tail call i32 (...) @run()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fclose(int /*<<< orphan*/ *);
int jt_Fclose(FILE *stream) { return fclose(stream); }


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

x86 assembly (clang, -O2):
<jt_Fclose>:
jmp    1030 <fclose@plt>

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

LLVM IR (-O2):
define i32 @jt_Fclose(i32* nocapture %0) {
%2 = tail call i32 @fclose(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void pointCal() {
  int array[100];
  int *p = &array[0];
  int *p1 = &array[1];
  printf("result = %d\n", (int)p1 - (int)p);
  printf("result = %ld\n", p1 - p);
}


x86 assembly (clang, -O0):
<pointCal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1a0,%rsp
lea    -0x190(%rbp),%rax
mov    %rax,-0x198(%rbp)
lea    -0x190(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x1a0(%rbp)
mov    -0x1a0(%rbp),%rax
mov    %eax,%esi
mov    -0x198(%rbp),%rax
sub    %eax,%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1a0(%rbp),%rax
mov    -0x198(%rbp),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
mov    %eax,%esi
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
add    $0x1a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pointCal>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
mov    $0x1,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"result = %d\0A\00"
@.str.1 = [14 x i8] c"result = %ld\0A\00"
define void @pointCal() {
%1 = alloca [100 x i32]
%2 = alloca i32*
%3 = alloca i32*
%4 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 0
store i32* %4, i32** %2
%5 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 1
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = ptrtoint i32* %6 to i32
%8 = load i32*, i32** %2
%9 = ptrtoint i32* %8 to i32
%10 = sub nsw i32 %7, %9
%11 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load i32*, i32** %3
%13 = load i32*, i32** %2
%14 = ptrtoint i32* %12 to i64
%15 = ptrtoint i32* %13 to i64
%16 = sub i64 %14, %15
%17 = sdiv exact i64 %16, 4
%18 = trunc i64 %17 to i32
%19 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %18)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"result = %d\0A\00"
@.str.1 = [14 x i8] c"result = %ld\0A\00"
define void @pointCal() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret void
}
double dmin1(a, b)
double a, b;
{
  if (a <= b)
    return (a);
  else
    return (b);
}


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

x86 assembly (clang, -O2):
<dmin1>:
movapd %xmm0,%xmm2
cmplesd %xmm1,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm2,%xmm0
ret

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

LLVM IR (-O2):
define double @dmin1(double %0, double %1) {
%3 = fcmp ole double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ _bytecode_write(int, int /*<<< orphan*/, int /*<<< orphan*/,
                                   int /*<<< orphan*/, int /*<<< orphan*/,
                                   int /*<<< orphan*/);
uint32_t bytecode_idiv(uint8_t r0, uint8_t r1, uint8_t r2) {
  return _bytecode_write(25, 0, 0, r0, r1, r2);
}


x86 assembly (clang, -O0):
<bytecode_idiv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%r8d
mov    -0xc(%rbp),%r9d
mov    $0x19,%edi
xor    %edx,%edx
mov    %edx,%esi
call   1030 <_bytecode_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bytecode_idiv>:
mov    %edx,%r9d
mov    %esi,%r8d
mov    %edi,%ecx
mov    $0x19,%edi
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <_bytecode_write@plt>

LLVM IR (-O0):
define i32 @bytecode_idiv(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* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @_bytecode_write(i32 25, i32 0, i32 0, i32 %7, i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @bytecode_idiv(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @_bytecode_write(i32 25, i32 0, i32 0, i32 %0, i32 %1, i32 %2)
ret i32 %4
}
void RTStrToUInt16Full(void) {}


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

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

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

LLVM IR (-O2):
define void @RTStrToUInt16Full() {
ret void
}
/* Variables and functions */
int usputc(char const, int);
int usputs(const char *s, int fd) {
  while (*s) {
    if (usputc(*s, fd) == -1)
      return -1;
    s++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<usputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1163 <usputs+0x53>
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    -0x14(%rbp),%esi
movsbl %al,%edi
call   1030 <usputc@plt>
cmp    $0xffffffff,%eax
jne    1152 <usputs+0x42>
movl   $0xffffffff,-0x4(%rbp)
jmp    116a <usputs+0x5a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111f <usputs+0xf>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usputs>:
push   %rbp
push   %r14
push   %rbx
mov    (%rdi),%al
xor    %r14d,%r14d
test   %al,%al
je     1152 <usputs+0x42>
mov    %esi,%ebp
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
movsbl %al,%edi
mov    %ebp,%esi
call   1030 <usputc@plt>
cmp    $0xffffffff,%eax
je     114c <usputs+0x3c>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <usputs+0x20>
jmp    1152 <usputs+0x42>
mov    $0xffffffff,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @usputs(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %8
5: ; preds = %8
%6 = load i8, i8* %13
%7 = icmp eq i8 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %2, %5
%9 = phi i8 [ %6, %5 ], [ %3, %2 ]
%10 = phi i8* [ %13, %5 ], [ %0, %2 ]
%11 = tail call i32 @usputc(i8 signext %9, i32 %1)
%12 = icmp eq i32 %11, -1
%13 = getelementptr inbounds i8, i8* %10, i64 1
br i1 %12, label %14, label %5
14: ; preds = %8, %5, %2
%15 = phi i32 [ 0, %2 ], [ 0, %5 ], [ -1, %8 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ warning(char *, char *);
void warn_ignored(char *name) { warning("%s is ignored", name); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"%s is ignored\00"
define void @warn_ignored(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @warning(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"%s is ignored\00"
define void @warn_ignored(i8* %0) {
%2 = tail call i32 @warning(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
struct cart {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _cartVarDbName(char *, char *);
int /*<<< orphan*/ cartSetString(struct cart *, int /*<<< orphan*/, char *);
void cartSetStringDb(struct cart *cart, char *db, char *var, char *val) {
  cartSetString(cart, _cartVarDbName(db, var), val);
}


x86 assembly (clang, -O0):
<cartSetStringDb>:
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    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <_cartVarDbName@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%esi
mov    -0x20(%rbp),%rdx
call   1040 <cartSetString@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cartSetStringDb>:
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1030 <_cartVarDbName@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <cartSetString@plt>

LLVM IR (-O0):
%struct.cart = type { i32 }
define void @cartSetStringDb(%struct.cart* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca %struct.cart*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store %struct.cart* %0, %struct.cart** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load %struct.cart*, %struct.cart** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = call i32 @_cartVarDbName(i8* %10, i8* %11)
%13 = load i8*, i8** %8
%14 = call i32 @cartSetString(%struct.cart* %9, i32 %12, i8* %13)
ret void
}

LLVM IR (-O2):
%struct.cart = type { i32 }
define void @cartSetStringDb(%struct.cart* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @_cartVarDbName(i8* %1, i8* %2)
%6 = tail call i32 @cartSetString(%struct.cart* %0, i32 %5, i8* %3)
ret void
}
void *atomic_swap_ptr(void **addr, void *val) {
  return __sync_lock_test_and_set(addr, val);
}


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

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

LLVM IR (-O0):
define i8* @atomic_swap_ptr(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
store i8** %0, i8*** %3
store i8* %1, i8** %4
%5 = load i8**, i8*** %3
%6 = bitcast i8** %5 to i64*
%7 = load i8*, i8** %4
%8 = ptrtoint i8* %7 to i64
%9 = atomicrmw xchg i64* %6, i64 %8 seq_cst
%10 = inttoptr i64 %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
define i8* @atomic_swap_ptr(i8** nocapture %0, i8* %1) {
%3 = bitcast i8** %0 to i64*
%4 = ptrtoint i8* %1 to i64
%5 = atomicrmw xchg i64* %3, i64 %4 seq_cst
%6 = inttoptr i64 %5 to i8*
ret i8* %6
}
int test03_inv(int a, int b) {
  return ((a & b) != 0) ? 0x80000000 : 0x7FFFFFFF;
}


x86 assembly (clang, -O0):
<test03_inv>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
and    -0x8(%rbp),%edx
mov    $0x7fffffff,%eax
mov    $0x80000000,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test03_inv>:
and    %esi,%edi
cmp    $0x1,%edi
mov    $0x80000000,%eax
sbb    $0x0,%eax
ret

LLVM IR (-O0):
define i32 @test03_inv(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 = and i32 %5, %6
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 -2147483648, i32 2147483647
ret i32 %10
}

LLVM IR (-O2):
define i32 @test03_inv(i32 %0, i32 %1) {
%3 = and i32 %1, %0
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 2147483647, i32 -2147483648
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void ssh_string_free_char(char *s) {
  do {
    if ((s) != NULL) {
      free(s);
      s = NULL;
    }
  } while (0);
}


x86 assembly (clang, -O0):
<ssh_string_free_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1138 <ssh_string_free_char+0x28>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
jmp    113d <ssh_string_free_char+0x2d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssh_string_free_char>:
test   %rdi,%rdi
je     111a <ssh_string_free_char+0xa>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @ssh_string_free_char(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %1, %3
ret void
}
void test_richloc_from_proper_range(void) {}


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

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

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

LLVM IR (-O2):
define void @test_richloc_from_proper_range() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pdie(char *);
char *strdup(char const *);
char *pstrdup(const char *str) {
  char *this;
  if ((this = strdup(str)) == NULL)
    pdie("Out of memory");
  return this;
}


x86 assembly (clang, -O0):
<pstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    114f <pstrdup+0x2f>
lea    0xeb6(%rip),%rdi
call   1030 <pdie@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pstrdup>:
push   %rbx
call   1040 <strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <pstrdup+0x1a>
lea    0xecb(%rip),%rdi
call   1030 <pdie@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Out of memory\00"
define i8* @pstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup(i8* %4)
store i8* %5, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @pdie(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
@.str = [14 x i8] c"Out of memory\00"
define noalias i8* @pstrdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @pdie(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
void not_prune_multiple4(int *m) {
  int a[5];
  if (*m < 5) {
    m++;
    a[*m] = 0;
  }
}


x86 assembly (clang, -O0):
<not_prune_multiple4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x5,(%rax)
jge    1130 <not_prune_multiple4+0x30>
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movslq (%rax),%rax
movl   $0x0,-0x20(%rbp,%rax,4)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @not_prune_multiple4(i32* %0) {
%2 = alloca i32*
%3 = alloca [5 x i32]
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* %4
%6 = icmp slt i32 %5, 5
br i1 %6, label %7, label %14
7: ; preds = %1
%8 = load i32*, i32** %2
%9 = getelementptr inbounds i32, i32* %8, i32 1
store i32* %9, i32** %2
%10 = load i32*, i32** %2
%11 = load i32, i32* %10
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 %12
store i32 0, i32* %13
br label %14
14: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @not_prune_multiple4(i32* nocapture %0) {
ret void
}
void outb(short port, unsigned char b) {
  asm volatile("outb  %1, %0\n" : : "dN"(port), "a"(b));
}


x86 assembly (clang, -O0):
<outb>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    -0x2(%rbp),%dx
mov    -0x3(%rbp),%al
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outb>:
mov    %esi,%eax
mov    %edi,%edx
out    %al,(%dx)
ret

LLVM IR (-O0):
define void @outb(i16 signext %0, i8 zeroext %1) {
%3 = alloca i16
%4 = alloca i8
store i16 %0, i16* %3
store i8 %1, i8* %4
%5 = load i16, i16* %3
%6 = load i8, i8* %4
ret void
}

LLVM IR (-O2):
define void @outb(i16 signext %0, i8 zeroext %1) {
tail call void asm sideeffect "outb $1, $0\0A", "{dx}N,{ax},~{dirflag},~{fpsr},~{flags}"(i16 %0, i8 %1)
ret void
}
/* Variables and functions */
int rand();
int random(int range) { return (rand() % range); }


x86 assembly (clang, -O0):
<random>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cltd
idivl  -0x4(%rbp)
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebx
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @random(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @rand()
%4 = load i32, i32* %2
%5 = srem i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @random(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ akd_mincrypt_init();
void mincrypt_init(void) { akd_mincrypt_init(); }


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

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

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

LLVM IR (-O2):
define void @mincrypt_init() {
%1 = tail call i32 (...) @akd_mincrypt_init()
ret void
}
/* Variables and functions */
long double __infer_nondet_long_double();
long double lgammal(long double x) { return __infer_nondet_long_double(); }


x86 assembly (clang, -O0):
<lgammal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
xor    %eax,%eax
call   1030 <__infer_nondet_long_double@plt>
fld    %st(0)
fstp   %st(0)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define x86_fp80 @lgammal(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %3
}

LLVM IR (-O2):
define x86_fp80 @lgammal(x86_fp80 %0) {
%2 = tail call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %2
}
/* Variables and functions */
double L0_y(double, double, double, double);
double L1_y(double sign, double xi, double et, double qq) {
  double l0_y = L0_y(sign, xi, et, qq);
  return xi * l0_y;
}


x86 assembly (clang, -O0):
<L1_y>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
call   1030 <L0_y@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<L1_y>:
push   %rax
movsd  %xmm1,(%rsp)
call   1030 <L0_y@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define double @L1_y(double %0, double %1, double %2, double %3) {
%5 = tail call double @L0_y(double %0, double %1, double %2, double %3)
%6 = fmul double %5, %1
ret double %6
}
short encode_dir(int x, int y) {
  return ((x + 2) & 0xFF) + (((y + 2) & 0xFF) << 8);
}


x86 assembly (clang, -O0):
<encode_dir>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2,%eax
and    $0xff,%eax
mov    -0x8(%rbp),%ecx
add    $0x2,%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
add    %ecx,%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<encode_dir>:
add    $0x2,%edi
movzbl %dil,%eax
shl    $0x8,%esi
add    %esi,%eax
add    $0x200,%eax
ret

LLVM IR (-O0):
define signext i16 @encode_dir(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 = add nsw i32 %5, 2
%7 = and i32 %6, 255
%8 = load i32, i32* %4
%9 = add nsw i32 %8, 2
%10 = and i32 %9, 255
%11 = shl i32 %10, 8
%12 = add nsw i32 %7, %11
%13 = trunc i32 %12 to i16
ret i16 %13
}

LLVM IR (-O2):
define signext i16 @encode_dir(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 2
%4 = and i32 %3, 255
%5 = shl i32 %1, 8
%6 = add i32 %5, 512
%7 = or i32 %6, %4
%8 = trunc i32 %7 to i16
ret i16 %8
}
/* Variables and functions */
int /*<<< orphan*/ f(unsigned int);
void testTortureExecute(void) {
  unsigned int buflen, i;
  buflen = 4 + 3 * 16;
  for (i = 4; i < buflen; i += 3)
    f(i);
  return;
}


x86 assembly (clang, -O0):
<testTortureExecute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x34,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    1148 <testTortureExecute+0x38>
mov    -0x8(%rbp),%edi
call   1030 <f@plt>
mov    -0x8(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <testTortureExecute+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testTortureExecute>:
push   %rax
mov    $0x4,%edi
call   1030 <f@plt>
mov    $0x7,%edi
call   1030 <f@plt>
mov    $0xa,%edi
call   1030 <f@plt>
mov    $0xd,%edi
call   1030 <f@plt>
mov    $0x10,%edi
call   1030 <f@plt>
mov    $0x13,%edi
call   1030 <f@plt>
mov    $0x16,%edi
call   1030 <f@plt>
mov    $0x19,%edi
call   1030 <f@plt>
mov    $0x1c,%edi
call   1030 <f@plt>
mov    $0x1f,%edi
call   1030 <f@plt>
mov    $0x22,%edi
call   1030 <f@plt>
mov    $0x25,%edi
call   1030 <f@plt>
mov    $0x28,%edi
call   1030 <f@plt>
mov    $0x2b,%edi
call   1030 <f@plt>
mov    $0x2e,%edi
call   1030 <f@plt>
mov    $0x31,%edi
pop    %rax
jmp    1030 <f@plt>

LLVM IR (-O0):
define void @testTortureExecute() {
%1 = alloca i32
%2 = alloca i32
store i32 52, i32* %1
store i32 4, i32* %2
br label %3
3: ; preds = %10, %0
%4 = load i32, i32* %2
%5 = load i32, i32* %1
%6 = icmp ult i32 %4, %5
br i1 %6, label %7, label %13
7: ; preds = %3
%8 = load i32, i32* %2
%9 = call i32 @f(i32 %8)
br label %10
10: ; preds = %7
%11 = load i32, i32* %2
%12 = add i32 %11, 3
store i32 %12, i32* %2
br label %3
13: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @testTortureExecute() {
%1 = tail call i32 @f(i32 4)
%2 = tail call i32 @f(i32 7)
%3 = tail call i32 @f(i32 10)
%4 = tail call i32 @f(i32 13)
%5 = tail call i32 @f(i32 16)
%6 = tail call i32 @f(i32 19)
%7 = tail call i32 @f(i32 22)
%8 = tail call i32 @f(i32 25)
%9 = tail call i32 @f(i32 28)
%10 = tail call i32 @f(i32 31)
%11 = tail call i32 @f(i32 34)
%12 = tail call i32 @f(i32 37)
%13 = tail call i32 @f(i32 40)
%14 = tail call i32 @f(i32 43)
%15 = tail call i32 @f(i32 46)
%16 = tail call i32 @f(i32 49)
ret void
}
/* Variables and functions */
int O_CREAT;
int O_RDWR;
int O_TRUNC;
int rw_test(char const *, int, int, int, int);
int test_rw_trunc(const char *file) {
  return rw_test(file, 16, 26, O_CREAT | O_TRUNC | O_RDWR, 0777);
}


x86 assembly (clang, -O0):
<test_rw_trunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ed1(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec0(%rip),%rax
or     (%rax),%ecx
mov    0x2e9f(%rip),%rax
or     (%rax),%ecx
mov    $0x10,%esi
mov    $0x1a,%edx
mov    $0x1ff,%r8d
call   1030 <rw_test@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_rw_trunc>:
mov    0x2ee1(%rip),%rax
mov    0x2ed2(%rip),%rcx
mov    (%rcx),%ecx
or     (%rax),%ecx
mov    0x2eaf(%rip),%rax
or     (%rax),%ecx
mov    $0x10,%esi
mov    $0x1a,%edx
mov    $0x1ff,%r8d
jmp    1030 <rw_test@plt>

LLVM IR (-O0):
@O_CREAT = global i32 0
@O_TRUNC = global i32 0
@O_RDWR = global i32 0
define i32 @test_rw_trunc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @O_CREAT
%5 = load i32, i32* @O_TRUNC
%6 = or i32 %4, %5
%7 = load i32, i32* @O_RDWR
%8 = or i32 %6, %7
%9 = call i32 @rw_test(i8* %3, i32 16, i32 26, i32 %8, i32 511)
ret i32 %9
}

LLVM IR (-O2):
@O_CREAT = global i32 0
@O_TRUNC = global i32 0
@O_RDWR = global i32 0
define i32 @test_rw_trunc(i8* %0) {
%2 = load i32, i32* @O_CREAT
%3 = load i32, i32* @O_TRUNC
%4 = or i32 %3, %2
%5 = load i32, i32* @O_RDWR
%6 = or i32 %4, %5
%7 = tail call i32 @rw_test(i8* %0, i32 16, i32 26, i32 %6, i32 511)
ret i32 %7
}
/* Variables and functions */
char **stb_tokens_raw(char *, char *, int *, int /*<<< orphan*/,
                      int /*<<< orphan*/, int /*<<< orphan*/,
                      int /*<<< orphan*/);
char **stb_tokens(char *src, char *delimit, int *count) {
  return stb_tokens_raw(src, delimit, count, 0, 0, 0, 0);
}


x86 assembly (clang, -O0):
<stb_tokens>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
call   1030 <stb_tokens_raw@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stb_tokens>:
push   %rax
movl   $0x0,(%rsp)
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <stb_tokens_raw@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i8** @stb_tokens(i8* %0, i8* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32* %2, i32** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32*, i32** %6
%10 = call i8** @stb_tokens_raw(i8* %7, i8* %8, i32* %9, i32 0, i32 0, i32 0, i32 0)
ret i8** %10
}

LLVM IR (-O2):
define i8** @stb_tokens(i8* %0, i8* %1, i32* %2) {
%4 = tail call i8** @stb_tokens_raw(i8* %0, i8* %1, i32* %2, i32 0, i32 0, i32 0, i32 0)
ret i8** %4
}
/* Variables and functions */
char *gs_c_ltrim(char *, char *);
char *gs_ltrim(char *str) { return gs_c_ltrim(str, " \t\v\r\n\f"); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c" \09\0B\0D\0A\0C\00"
define i8* @gs_ltrim(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @gs_c_ltrim(i8* %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i8* %4
}

LLVM IR (-O2):
@.str = [7 x i8] c" \09\0B\0D\0A\0C\00"
define i8* @gs_ltrim(i8* %0) {
%2 = tail call i8* @gs_c_ltrim(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i8* %2
}
int digit(int n) {
  int ret;
  if ((n % 10) == n) {
    ret = 1;
  } else {
    ret = 1 + digit(n / 10);
  }
  return ret;
}


x86 assembly (clang, -O0):
<digit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    -0x4(%rbp),%edx
jne    113b <digit+0x2b>
movl   $0x1,-0x8(%rbp)
jmp    1153 <digit+0x43>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <digit@plt>
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<digit>:
movslq %edi,%rax
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%ecx
mov    $0x1,%eax
test   %ecx,%ecx
je     116a <digit+0x6a>
mov    $0x1,%eax
nopw   0x0(%rax,%rax,1)
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rdi
add    %ecx,%edi
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
add    $0x1,%eax
test   %ecx,%ecx
jne    1130 <digit+0x30>
ret

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

LLVM IR (-O2):
define i32 @digit(i32 %0) {
%2 = srem i32 %0, 10
%3 = icmp eq i32 %2, %0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ %0, %1 ]
%6 = phi i32 [ %8, %4 ], [ 0, %1 ]
%7 = sdiv i32 %5, 10
%8 = add nuw nsw i32 %6, 1
%9 = srem i32 %7, 10
%10 = icmp eq i32 %9, %7
br i1 %10, label %11, label %4
11: ; preds = %4
%12 = add nuw i32 %6, 2
br label %13
13: ; preds = %11, %1
%14 = phi i32 [ 1, %1 ], [ %12, %11 ]
ret i32 %14
}
float f2c(float fahr) {
  float celsius;
  celsius = (5.0 / 9.0) * (fahr - 32.0);
  return celsius;
}


x86 assembly (clang, -O0):
<f2c>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeee(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xeda(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2c>:
cvtss2sd %xmm0,%xmm0
addsd  0xef4(%rip),%xmm0
mulsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @f2c(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = fsub double %5, 3.200000e+01
%7 = fmul double 0x3FE1C71C71C71C72, %6
%8 = fptrunc double %7 to float
store float %8, float* %3
%9 = load float, float* %3
ret float %9
}

LLVM IR (-O2):
define float @f2c(float %0) {
%2 = fpext float %0 to double
%3 = fadd double %2, -3.200000e+01
%4 = fmul double %3, 0x3FE1C71C71C71C72
%5 = fptrunc double %4 to float
ret float %5
}