xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ SIGINT;
scalar_t__ SIG_ERR;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ pause();
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *);
scalar_t__ signal(int /*<<< orphan*/, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  if (signal(SIGINT, SIG_IGN) == SIG_ERR) {
    perror("signal");
  }
  pause();
  printf("Bye\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
mov    0x2e7a(%rip),%rax
mov    (%rax),%esi
call   1040 <signal@plt>
mov    0x2e5c(%rip),%rcx
cmp    (%rcx),%rax
jne    1189 <main+0x49>
lea    0xe7c(%rip),%rdi
call   1060 <perror@plt>
mov    $0x0,%al
call   1050 <pause@plt>
lea    0xe70(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
mov    0x2e8f(%rip),%rax
mov    (%rax),%esi
call   1040 <signal@plt>
mov    0x2e71(%rip),%rcx
cmp    (%rcx),%rax
je     117b <main+0x3b>
xor    %eax,%eax
call   1050 <pause@plt>
lea    0xe95(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xe7e(%rip),%rdi
call   1060 <perror@plt>
jmp    1164 <main+0x24>

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

LLVM IR (-O2):
@SIGINT = global i32 0
@SIG_IGN = global i32 0
@SIG_ERR = global i64 0
@.str = [7 x i8] c"signal\00"
@str = [4 x i8] c"Bye\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @SIGINT
%4 = load i32, i32* @SIG_IGN
%5 = tail call i64 @signal(i32 %3, i32 %4)
%6 = load i64, i64* @SIG_ERR
%7 = icmp eq i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
%11 = tail call i32 (...) @pause()
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int _strlen(const char *str) {
  int i = 0;
  if (str)
    while (str[i])
      ++i;
  return i;
}


x86 assembly (clang, -O0):
<_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1144 <_strlen+0x44>
jmp    111f <_strlen+0x1f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     113f <_strlen+0x3f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    111f <_strlen+0x1f>
jmp    1144 <_strlen+0x44>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_strlen>:
test   %rdi,%rdi
je     111d <_strlen+0x1d>
mov    $0xffffffff,%eax
nopw   0x0(%rax,%rax,1)
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <_strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @_strlen(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %8, %3 ], [ 0, %1 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = add nuw i64 %4, 1
br i1 %7, label %9, label %3
9: ; preds = %3
%10 = trunc i64 %4 to i32
br label %11
11: ; preds = %9, %1
%12 = phi i32 [ 0, %1 ], [ %10, %9 ]
ret i32 %12
}
int test_imm_1Cint16_reg(short val) {
  return ((val) & (-0x1C << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_1Cint16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, -28
%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_1Cint16_reg(i16 signext %0) {
%2 = and i16 %0, -28
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, size_t, size_t, size_t, size_t);
void print_test_type(size_t block_length, size_t message_length,
                     size_t num_errors, size_t num_erasures) {
  printf("testing reed solomon block length=%zu, message length=%zu, "
         "errors=%zu, erasures=%zu...",
         block_length, message_length, num_errors, num_erasures);
}


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

x86 assembly (clang, -O2):
<print_test_type>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xedd(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [87 x i8] c"testing reed solomon block length=%zu, message length=%zu, errors=%zu, erasures=%zu...\00"
define void @print_test_type(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i64, i64* %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = load i64, i64* %8
%13 = call i32 @printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str, i64 0, i64 0), i64 %9, i64 %10, i64 %11, i64 %12)
ret void
}

LLVM IR (-O2):
@.str = [87 x i8] c"testing reed solomon block length=%zu, message length=%zu, errors=%zu, erasures=%zu...\00"
define void @print_test_type(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str, i64 0, i64 0), i64 %0, i64 %1, i64 %2, i64 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bufNum(char *, long);
int /*<<< orphan*/ outString(char *);
void outNum(long n) {
  char buf[(8 * ((int)sizeof(long))) / 2];
  bufNum(buf, n);
  outString(buf);
}


x86 assembly (clang, -O0):
<outNum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <bufNum@plt>
lea    -0x30(%rbp),%rdi
call   1040 <outString@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outNum>:
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <bufNum@plt>
mov    %rbx,%rdi
call   1040 <outString@plt>
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define void @outNum(i64 %0) {
%2 = alloca [32 x i8]
%3 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%4 = call i32 @bufNum(i8* %3, i64 %0)
%5 = call i32 @outString(i8* %3)
ret void
}
int test_imm_A0uint8_reg(unsigned char val) {
  return ((val) & (0xA0 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_A0uint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 160
%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_A0uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -96
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
unsigned int dict_identity_hash_function(unsigned int key) { return key; }


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

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

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

LLVM IR (-O2):
define i32 @dict_identity_hash_function(i32 returned %0) {
ret i32 %0
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fprintf(int /*<<< orphan*/ *, char *, int /*<<< orphan*/ *);
int Loopr_print_wcs(FILE *fp, wchar_t *str) { return fprintf(fp, "%ls", str); }


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

x86 assembly (clang, -O2):
<Loopr_print_wcs>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%ls\00"
define i32 @Loopr_print_wcs(i32* nocapture %0, i32* %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %1)
ret i32 %3
}
/* Variables and functions */
int util_is_zeroed(const void *addr, size_t len) {
  const char *a = addr;
  while (len-- > 0)
    if (*a++)
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<util_is_zeroed>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x18(%rbp)
cmp    $0x0,%rax
jbe    1156 <util_is_zeroed+0x56>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
cmpb   $0x0,(%rax)
je     1151 <util_is_zeroed+0x51>
movl   $0x0,-0x4(%rbp)
jmp    115d <util_is_zeroed+0x5d>
jmp    1114 <util_is_zeroed+0x14>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_is_zeroed>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmp    %rax,%rsi
je     1122 <util_is_zeroed+0x22>
cmpb   $0x0,(%rdi,%rax,1)
lea    0x1(%rax),%rax
je     1110 <util_is_zeroed+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @util_is_zeroed(i8* nocapture %0, i64 %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i64 [ %1, %2 ], [ %8, %7 ]
%5 = phi i8* [ %0, %2 ], [ %9, %7 ]
%6 = icmp eq i64 %4, 0
br i1 %6, label %12, label %7
7: ; preds = %3
%8 = add i64 %4, -1
%9 = getelementptr inbounds i8, i8* %5, i64 1
%10 = load i8, i8* %5
%11 = icmp eq i8 %10, 0
br i1 %11, label %3, label %12
12: ; preds = %3, %7
%13 = phi i32 [ 0, %7 ], [ 1, %3 ]
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/ *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ prstate(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
void writestate(char *f) {
  FILE *fp;
  fp = fopen(f, "w");
  assert(fp);
  prstate(fp, 2, 0);
  fclose(fp);
}


x86 assembly (clang, -O0):
<writestate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xea9(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rdi
mov    $0x2,%esi
xor    %edx,%edx
call   1050 <prstate@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writestate>:
push   %rbx
lea    0xeb8(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <assert@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %edx,%edx
call   1050 <prstate@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"w\00"
define void @writestate(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 = call i32 @assert(i32* %6)
%8 = load i32*, i32** %3
%9 = call i32 @prstate(i32* %8, i32 2, i32 0)
%10 = load i32*, i32** %3
%11 = call i32 @fclose(i32* %10)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
define void @writestate(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 = tail call i32 @assert(i32* %2)
%4 = tail call i32 @prstate(i32* %2, i32 2, i32 0)
%5 = tail call i32 @fclose(i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int sumx(int, int);
int main(void) {
  int x;
  printf("Enter your number: \n");
  scanf("%d", &x);
  int y;
  printf("Enter your number: \n");
  scanf("%d", &y);
  int sum = sumx(x, y);
  return sum;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
lea    0xea7(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1050 <sumx@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xec8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xeb6(%rip),%r14
lea    0x4(%rsp),%rsi
mov    %r14,%rdi
call   1040 <scanf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rsp,%rsi
mov    %r14,%rdi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1050 <sumx@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str.2 = [20 x i8] c"Enter your number: \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.2, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%6 = bitcast i32* %2 to i8*
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.2, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = call i32 @sumx(i32 %9, i32 %10)
ret i32 %11
}
int isnan_ld(long double x) { return x != x; }


x86 assembly (clang, -O0):
<isnan_ld>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fucomip %st(0),%st
setp   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isnan_ld>:
fldt   0x8(%rsp)
xor    %eax,%eax
fucomip %st(0),%st
setp   %al
ret

LLVM IR (-O0):
define i32 @isnan_ld(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = load x86_fp80, x86_fp80* %2
%5 = fcmp une x86_fp80 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @isnan_ld(x86_fp80 %0) {
%2 = fcmp uno x86_fp80 %0, 0xK00000000000000000000
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
double sinf(double);
double cog_math_sinf(double radians) { return sinf(radians); }


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

x86 assembly (clang, -O2):
<cog_math_sinf>:
jmp    1030 <sinf@plt>

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

LLVM IR (-O2):
define double @cog_math_sinf(double %0) {
%2 = tail call double @sinf(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
void print_help() {
  puts("Usage: book-db-lite [filename]");
  exit(0);
}


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_help>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"Usage: book-db-lite [filename]\00"
define void @print_help() {
%1 = call i32 @puts(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [31 x i8] c"Usage: book-db-lite [filename]\00"
define void @print_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
void *__memcpy(void *, void const *, size_t);
void *__memcpy_reverse(void *, void const *, size_t);
void *__memmove(void *dest, const void *src, size_t len) {
  if (dest <= src) {
    return __memcpy(dest, src, len);
  } else {
    return __memcpy_reverse(dest, src, len);
  }
}


x86 assembly (clang, -O0):
<__memmove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
ja     115c <__memmove+0x3c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <__memcpy@plt>
mov    %rax,-0x8(%rbp)
jmp    1171 <__memmove+0x51>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <__memcpy_reverse@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__memmove>:
cmp    %rsi,%rdi
jbe    112a <__memmove+0xa>
jmp    1030 <__memcpy_reverse@plt>
jmp    1040 <__memcpy@plt>

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

LLVM IR (-O2):
define i8* @__memmove(i8* %0, i8* %1, i64 %2) {
%4 = icmp ugt i8* %0, %1
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i8* @__memcpy(i8* %0, i8* %1, i64 %2)
br label %9
7: ; preds = %3
%8 = tail call i8* @__memcpy_reverse(i8* %0, i8* %1, i64 %2)
br label %9
9: ; preds = %7, %5
%10 = phi i8* [ %6, %5 ], [ %8, %7 ]
ret i8* %10
}
/* Variables and functions */
float ptrtest3(float a) { return a * 2; }


x86 assembly (clang, -O0):
<ptrtest3>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptrtest3>:
addss  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @ptrtest3(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 2.000000e+00
ret float %4
}

LLVM IR (-O2):
define float @ptrtest3(float %0) {
%2 = fmul float %0, 2.000000e+00
ret float %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
float pack_get_flt(uint8_t *buffer, int byteNr) {
  float retVal;
  uint8_t *ptr;
  ptr = (uint8_t *)&retVal;
  *(ptr + 3) = *(buffer + byteNr + 3);
  *(ptr + 2) = *(buffer + byteNr + 2);
  *(ptr + 1) = *(buffer + byteNr + 1);
  *(ptr + 0) = *(buffer + byteNr + 0);
  return (retVal);
}


x86 assembly (clang, -O0):
<pack_get_flt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    0xc(%rax,%rcx,4),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0xc(%rax)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    0x8(%rax,%rcx,4),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    0x4(%rax,%rcx,4),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pack_get_flt>:
movslq %esi,%rax
movss  (%rdi,%rax,4),%xmm0
ret

LLVM IR (-O0):
define float @pack_get_flt(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca float
%6 = alloca i32*
store i32* %0, i32** %3
store i32 %1, i32* %4
%7 = bitcast float* %5 to i32*
store i32* %7, i32** %6
%8 = load i32*, i32** %3
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = getelementptr inbounds i32, i32* %11, i64 3
%13 = load i32, i32* %12
%14 = load i32*, i32** %6
%15 = getelementptr inbounds i32, i32* %14, i64 3
store i32 %13, i32* %15
%16 = load i32*, i32** %3
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* %16, i64 %18
%20 = getelementptr inbounds i32, i32* %19, i64 2
%21 = load i32, i32* %20
%22 = load i32*, i32** %6
%23 = getelementptr inbounds i32, i32* %22, i64 2
store i32 %21, i32* %23
%24 = load i32*, i32** %3
%25 = load i32, i32* %4
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i32, i32* %24, i64 %26
%28 = getelementptr inbounds i32, i32* %27, i64 1
%29 = load i32, i32* %28
%30 = load i32*, i32** %6
%31 = getelementptr inbounds i32, i32* %30, i64 1
store i32 %29, i32* %31
%32 = load i32*, i32** %3
%33 = load i32, i32* %4
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i32, i32* %32, i64 %34
%36 = getelementptr inbounds i32, i32* %35, i64 0
%37 = load i32, i32* %36
%38 = load i32*, i32** %6
%39 = getelementptr inbounds i32, i32* %38, i64 0
store i32 %37, i32* %39
%40 = load float, float* %5
ret float %40
}

LLVM IR (-O2):
define float @pack_get_flt(i32* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = bitcast i32* %4 to float*
%6 = load float, float* %5
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ core7_print(char *, char *, char *, char const *);
void U_EMRSETWINDOWEXTEX_print(const char *contents) {
  core7_print("U_EMRSETWINDOWEXTEX", "szlExtent:", "", contents);
}


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

x86 assembly (clang, -O2):
<U_EMRSETWINDOWEXTEX_print>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
lea    0xef3(%rip),%rsi
lea    0xef6(%rip),%rdx
jmp    1030 <core7_print@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"U_EMRSETWINDOWEXTEX\00"
@.str.1 = [11 x i8] c"szlExtent:\00"
@.str.2 = [1 x i8] zeroinitializer
define void @U_EMRSETWINDOWEXTEX_print(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @core7_print(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"U_EMRSETWINDOWEXTEX\00"
@.str.1 = [11 x i8] c"szlExtent:\00"
@.str.2 = [1 x i8] zeroinitializer
define void @U_EMRSETWINDOWEXTEX_print(i8* %0) {
%2 = tail call i32 @core7_print(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cgsynxor();
int /*<<< orphan*/ gentext();
void genxor(void) {
  gentext();
  cgsynxor();
}


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

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

LLVM IR (-O0):
define void @genxor() {
%1 = call i32 (...) @gentext()
%2 = call i32 (...) @cgsynxor()
ret void
}

LLVM IR (-O2):
define void @genxor() {
%1 = tail call i32 (...) @gentext()
%2 = tail call i32 (...) @cgsynxor()
ret void
}
int charCount(char *buffer) { return sizeof(buffer); }


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

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

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

LLVM IR (-O2):
define i32 @charCount(i8* nocapture readnone %0) {
ret i32 8
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
int write(int, char const *, int /*<<< orphan*/);
int write_string(int fd, const char *a) { return write(fd, a, strlen(a)); }


x86 assembly (clang, -O0):
<write_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_string>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define i32 @write_string(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @write(i32 %0, i8* %1, i32 %3)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
size_t uint32_size(int /*<<< orphan*/);
int /*<<< orphan*/ zigzag32(int /*<<< orphan*/);
size_t sint32_size(int32_t v) { return uint32_size(zigzag32(v)); }


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

x86 assembly (clang, -O2):
<sint32_size>:
push   %rax
call   1030 <zigzag32@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <uint32_size@plt>

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

LLVM IR (-O2):
define i64 @sint32_size(i32 %0) {
%2 = tail call i32 @zigzag32(i32 %0)
%3 = tail call i64 @uint32_size(i32 %2)
ret i64 %3
}
void __attribute__((
    __warning__("curl_easy_setopt expects a "
                "char buffer of CURL_ERROR_SIZE as argument for this option")))
__attribute__((__unused__)) __attribute__((__no__))
_curl_easy_setopt_err_error_buffer(void) {
  __asm__("");
}


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

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

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

LLVM IR (-O2):
define void @_curl_easy_setopt_err_error_buffer() {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void packi32(unsigned char *buf, unsigned long int i) {
  *buf++ = i >> 24;
  *buf++ = i >> 16;
  *buf++ = i >> 8;
  *buf++ = i;
}


x86 assembly (clang, -O0):
<packi32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x18,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
shr    $0x10,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
shr    $0x8,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<packi32>:
bswap  %esi
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @packi32(i8* nocapture writeonly %0, i64 %1) {
%3 = lshr i64 %1, 24
%4 = trunc i64 %3 to i8
%5 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %4, i8* %0
%6 = lshr i64 %1, 16
%7 = trunc i64 %6 to i8
%8 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %7, i8* %5
%9 = lshr i64 %1, 8
%10 = trunc i64 %9 to i8
%11 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %10, i8* %8
%12 = trunc i64 %1 to i8
store i8 %12, i8* %11
ret void
}
void INT_Excep_PERIB_INTB205(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_PERIB_INTB205() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("My salary is $10000");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"My salary is $10000\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"My salary is $10000\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int yahoo_M1ObfuscatedTableCommon(int, int, unsigned char *);
int yahoo_f01_11(int Salt, int Parameter) {
  static unsigned char LUT[32] = {
      0x1A, 0x1C, 0x0F, 0x0C, 0x00, 0x02, 0x13, 0x09, 0x11, 0x05, 0x0D,
      0x12, 0x18, 0x0B, 0x04, 0x10, 0x14, 0x1B, 0x1E, 0x16, 0x07, 0x08,
      0x03, 0x17, 0x19, 0x1F, 0x01, 0x0E, 0x15, 0x06, 0x0A, 0x1D,
  };
  return yahoo_M1ObfuscatedTableCommon(Salt, Parameter, LUT);
}


x86 assembly (clang, -O0):
<yahoo_f01_11>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
lea    0x2f05(%rip),%rdx
call   1030 <yahoo_M1ObfuscatedTableCommon@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yahoo_f01_11>:
lea    0x2f19(%rip),%rdx
jmp    1030 <yahoo_M1ObfuscatedTableCommon@plt>

LLVM IR (-O0):
@yahoo_f01_11.LUT = internal global [32 x i8] c"\1A\1C\0F\0C\00\02\13\09\11\05\0D\12\18\0B\04\10\14\1B\1E\16\07\08\03\17\19\1F\01\0E\15\06\0A\1D"
define i32 @yahoo_f01_11(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @yahoo_M1ObfuscatedTableCommon(i32 %5, i32 %6, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @yahoo_f01_11.LUT, i64 0, i64 0))
ret i32 %7
}

LLVM IR (-O2):
@yahoo_f01_11.LUT = internal global [32 x i8] c"\1A\1C\0F\0C\00\02\13\09\11\05\0D\12\18\0B\04\10\14\1B\1E\16\07\08\03\17\19\1F\01\0E\15\06\0A\1D"
define i32 @yahoo_f01_11(i32 %0, i32 %1) {
%3 = tail call i32 @yahoo_M1ObfuscatedTableCommon(i32 %0, i32 %1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @yahoo_f01_11.LUT, i64 0, i64 0))
ret i32 %3
}
void *self(void *p) { return p; }


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

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

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

LLVM IR (-O2):
define i8* @self(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
char *PICA_id_to_base64(unsigned char const *, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, char *);
void accepted_file_cb(const unsigned char *peer_id) {
  printf("accepted_file_cb: peer_id %s \n", PICA_id_to_base64(peer_id, NULL));
}


x86 assembly (clang, -O0):
<accepted_file_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <PICA_id_to_base64@plt>
mov    %rax,%rsi
lea    0xebd(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<accepted_file_cb>:
push   %rax
xor    %esi,%esi
call   1030 <PICA_id_to_base64@plt>
lea    0xed1(%rip),%rdi
mov    %rax,%rsi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"accepted_file_cb: peer_id %s \0A\00"
define void @accepted_file_cb(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @PICA_id_to_base64(i8* %3, i32* null)
%5 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"accepted_file_cb: peer_id %s \0A\00"
define void @accepted_file_cb(i8* %0) {
%2 = tail call i8* @PICA_id_to_base64(i8* %0, i32* null)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
void maskdata(int *data, int len) {
  int i = len;
  for (; i > 0; i -= 2) {
    data[i] &= 0xff00ff;
    data[i + 1] &= 0xff00ff;
  }
}


x86 assembly (clang, -O0):
<maskdata>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jle    1156 <maskdata+0x56>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
and    $0xff00ff,%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
and    $0xff00ff,%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x10(%rbp)
jmp    1111 <maskdata+0x11>
pop    %rbp
ret

x86 assembly (clang, -O2):
<maskdata>:
test   %esi,%esi
jle    112d <maskdata+0x2d>
mov    %esi,%eax
cs nopw 0x0(%rax,%rax,1)
andl   $0xff00ff,(%rdi,%rax,4)
lea    0x1(%rax),%ecx
andl   $0xff00ff,(%rdi,%rcx,4)
add    $0xfffffffffffffffe,%rax
lea    0x2(%rax),%ecx
cmp    $0x2,%ecx
ja     1110 <maskdata+0x10>
ret

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

LLVM IR (-O2):
define void @maskdata(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %17
4: ; preds = %2, %4
%5 = phi i32 [ %15, %4 ], [ %1, %2 ]
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = and i32 %8, 16711935
store i32 %9, i32* %7
%10 = add nuw nsw i32 %5, 1
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %0, i64 %11
%13 = load i32, i32* %12
%14 = and i32 %13, 16711935
store i32 %14, i32* %12
%15 = add nsw i32 %5, -2
%16 = icmp ugt i32 %5, 2
br i1 %16, label %4, label %17
17: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vx86_NBSB_Write(int /*<<< orphan*/, unsigned char,
                                   unsigned long);
void nb_Write(unsigned char offset, unsigned long val) {
  vx86_NBSB_Write(0, offset, val);
}


x86 assembly (clang, -O0):
<nb_Write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x1(%rbp),%al
mov    -0x10(%rbp),%rdx
xor    %edi,%edi
movzbl %al,%esi
call   1030 <vx86_NBSB_Write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nb_Write>:
mov    %rsi,%rdx
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <vx86_NBSB_Write@plt>

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

LLVM IR (-O2):
define void @nb_Write(i8 zeroext %0, i64 %1) {
%3 = tail call i32 @vx86_NBSB_Write(i32 0, i8 zeroext %0, i64 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fake_acquire_cpu(int /*<<< orphan*/);
int /*<<< orphan*/ fake_release_cpu(int /*<<< orphan*/);
int /*<<< orphan*/ get_cpu();
int /*<<< orphan*/ rcu_sched_qs(int /*<<< orphan*/);
int cond_resched(void) {
  rcu_sched_qs(get_cpu());
  fake_release_cpu(get_cpu());
  fake_acquire_cpu(get_cpu());
  return 0;
}


x86 assembly (clang, -O0):
<cond_resched>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <get_cpu@plt>
mov    %eax,%edi
call   1060 <rcu_sched_qs@plt>
mov    $0x0,%al
call   1050 <get_cpu@plt>
mov    %eax,%edi
call   1030 <fake_release_cpu@plt>
mov    $0x0,%al
call   1050 <get_cpu@plt>
mov    %eax,%edi
call   1040 <fake_acquire_cpu@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cond_resched>:
push   %rax
xor    %eax,%eax
call   1050 <get_cpu@plt>
mov    %eax,%edi
call   1060 <rcu_sched_qs@plt>
xor    %eax,%eax
call   1050 <get_cpu@plt>
mov    %eax,%edi
call   1030 <fake_release_cpu@plt>
xor    %eax,%eax
call   1050 <get_cpu@plt>
mov    %eax,%edi
call   1040 <fake_acquire_cpu@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cond_resched() {
%1 = call i32 (...) @get_cpu()
%2 = call i32 @rcu_sched_qs(i32 %1)
%3 = call i32 (...) @get_cpu()
%4 = call i32 @fake_release_cpu(i32 %3)
%5 = call i32 (...) @get_cpu()
%6 = call i32 @fake_acquire_cpu(i32 %5)
ret i32 0
}

LLVM IR (-O2):
define i32 @cond_resched() {
%1 = tail call i32 (...) @get_cpu()
%2 = tail call i32 @rcu_sched_qs(i32 %1)
%3 = tail call i32 (...) @get_cpu()
%4 = tail call i32 @fake_release_cpu(i32 %3)
%5 = tail call i32 (...) @get_cpu()
%6 = tail call i32 @fake_acquire_cpu(i32 %5)
ret i32 0
}
double B3(u)
double u;
{ return (u * u * u); }


x86 assembly (clang, -O0):
<B3>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<B3>:
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @B3(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
%6 = load double, double* %2
%7 = fmul double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @B3(double %0) {
%2 = fmul double %0, %0
%3 = fmul double %2, %0
ret double %3
}
/* Variables and functions */
void *memcpy(void *, void *, size_t);
void *xmemcpy(void *dst, void *src, size_t sz) {
  if (dst != (void *)NULL && src != (void *)NULL && sz > (long)NULL) {
    return memcpy(dst, src, sz);
  }
  return (void *)NULL;
}


x86 assembly (clang, -O0):
<xmemcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115f <xmemcpy+0x4f>
cmpq   $0x0,-0x18(%rbp)
je     115f <xmemcpy+0x4f>
cmpq   $0x0,-0x20(%rbp)
jbe    115f <xmemcpy+0x4f>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <memcpy@plt>
mov    %rax,-0x8(%rbp)
jmp    1167 <xmemcpy+0x57>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmemcpy>:
xor    %eax,%eax
test   %rdi,%rdi
je     112e <xmemcpy+0x1e>
test   %rsi,%rsi
je     112e <xmemcpy+0x1e>
test   %rdx,%rdx
je     112e <xmemcpy+0x1e>
push   %rbx
mov    %rdi,%rbx
call   1030 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @xmemcpy(i8* writeonly %0, i8* %1, i64 %2) {
%4 = icmp ne i8* %0, null
%5 = icmp ne i8* %1, null
%6 = and i1 %4, %5
%7 = icmp ne i64 %2, 0
%8 = and i1 %6, %7
br i1 %8, label %9, label %10
9: ; preds = %3
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 %2, i1 false)
br label %10
10: ; preds = %3, %9
%11 = phi i8* [ %0, %9 ], [ null, %3 ]
ret i8* %11
}
void upd_termresize() {}


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

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

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

LLVM IR (-O2):
define void @upd_termresize() {
ret void
}
int wake_up_process(struct task_struct *tsk) {
  int a;
  return a;
}


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

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

LLVM IR (-O0):
%struct.task_struct = type opaque
define i32 @wake_up_process(%struct.task_struct* %0) {
%2 = alloca %struct.task_struct*
%3 = alloca i32
store %struct.task_struct* %0, %struct.task_struct** %2
%4 = load i32, i32* %3
ret i32 %4
}

LLVM IR (-O2):
%struct.task_struct = type opaque
define i32 @wake_up_process(%struct.task_struct* nocapture readnone %0) {
ret i32 undef
}