xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int const);
int /*<<< orphan*/ scanf(char *, int const *);
int main() {
  const int i = 0;
  scanf("%d", &i);
  printf("%d\n", i);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xed0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
lea    0xec2(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret i32 0
}
signed char signedchar_ignoring_unsignedlonglong(signed char x,
                                                 unsigned long long y) {
  return x;
}


x86 assembly (clang, -O0):
<signedchar_ignoring_unsignedlonglong>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @signedchar_ignoring_unsignedlonglong(i8 signext %0, i64 %1) {
%3 = alloca i8
%4 = alloca i64
store i8 %0, i8* %3
store i64 %1, i64* %4
%5 = load i8, i8* %3
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @signedchar_ignoring_unsignedlonglong(i8 returned signext %0, i64 %1) {
ret i8 %0
}
char *mystrdup(thestr)
char *thestr;
{ return ((char *)strcpy(malloc(strlen(thestr) + 1), thestr)); }


x86 assembly (clang, -O0):
<mystrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrdup>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @mystrdup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strlen(i8* %3)
%5 = add i64 %4, 1
%6 = call i8* @malloc(i64 %5)
%7 = load i8*, i8** %2
%8 = call i8* @strcpy(i8* %6, i8* %7)
ret i8* %8
}

LLVM IR (-O2):
define i8* @mystrdup(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add i64 %2, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = tail call i8* @strcpy(i8* dereferenceable(1) %4, i8* dereferenceable(1) %0)
ret i8* %4
}
/* Variables and functions */
size_t minipack_sizeof_bool() { return 1; }


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

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

LLVM IR (-O0):
define i64 @minipack_sizeof_bool() {
ret i64 1
}

LLVM IR (-O2):
define i64 @minipack_sizeof_bool() {
ret i64 1
}
/* Type definitions */
typedef scalar_t__ uint16_t;

/* Variables and functions */
void x8006143D143D0000(uint16_t *accusative, uint16_t *instrumental) {
  *accusative = (uint16_t)(*accusative + *instrumental);
}


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

x86 assembly (clang, -O2):
mov    (%rsi),%rax
add    %rax,(%rdi)
ret

LLVM IR (-O0):
define void @x8006143D143D0000(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
store i64* %0, i64** %3
store i64* %1, i64** %4
%5 = load i64*, i64** %3
%6 = load i64, i64* %5
%7 = load i64*, i64** %4
%8 = load i64, i64* %7
%9 = add nsw i64 %6, %8
%10 = load i64*, i64** %3
store i64 %9, i64* %10
ret void
}

LLVM IR (-O2):
define void @x8006143D143D0000(i64* nocapture %0, i64* nocapture %1) {
%3 = load i64, i64* %0
%4 = load i64, i64* %1
%5 = add nsw i64 %4, %3
store i64 %5, i64* %0
ret void
}
double mult(double a, double b) { return a * b; }


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

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

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

LLVM IR (-O2):
define double @mult(double %0, double %1) {
%3 = fmul double %0, %1
ret double %3
}
void func() {
  printf("[%s] from [%s] is be called.\n", __func__,
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/WeiqiChenCN/symbol_test/refs/heads/master/"
         "sample1/b.c");
  printf("calling other_func() from [%s].\n",
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/WeiqiChenCN/symbol_test/refs/heads/master/"
         "sample1/b.c");
  other_func();
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xeec(%rip),%rsi
lea    0xeea(%rip),%rdx
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf6c(%rip),%rdi
lea    0xed5(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <other_func@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
push   %rbx
lea    0xed8(%rip),%rdi
lea    0xeef(%rip),%rsi
lea    0xeed(%rip),%rbx
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf6c(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <other_func@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"[%s] from [%s] is be called.\0A\00"
@__func__.func = [5 x i8] c"func\00"
@.str.1 = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/WeiqiChenCN/symbol_test/refs/heads/master/sample1/b.c\00"
@.str.2 = [33 x i8] c"calling other_func() from [%s].\0A\00"
define void @func() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.func, i64 0, i64 0), i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @other_func()
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"[%s] from [%s] is be called.\0A\00"
@__func__.func = [5 x i8] c"func\00"
@.str.1 = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/WeiqiChenCN/symbol_test/refs/heads/master/sample1/b.c\00"
@.str.2 = [33 x i8] c"calling other_func() from [%s].\0A\00"
define void @func() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.func, i64 0, i64 0), i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (...) @other_func()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ AES_KEY;

/* Variables and functions */
int OAES_SET_ENCRYPT_KEY(unsigned char const *, int const,
                         int /*<<< orphan*/ *);
int hash_proto_aes_set_encrypt_key(const unsigned char *userKey, const int bits,
                                   AES_KEY *key) {
  return OAES_SET_ENCRYPT_KEY(userKey, bits, key);
}


x86 assembly (clang, -O0):
<hash_proto_aes_set_encrypt_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <OAES_SET_ENCRYPT_KEY@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_proto_aes_set_encrypt_key>:
jmp    1030 <OAES_SET_ENCRYPT_KEY@plt>

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

LLVM IR (-O2):
define i32 @hash_proto_aes_set_encrypt_key(i8* %0, i32 %1, i32* %2) {
%4 = tail call i32 @OAES_SET_ENCRYPT_KEY(i8* %0, i32 %1, i32* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ FIONBIO;
int ioctl(int, int /*<<< orphan*/, int *);
int oct_set_blocking(int fd) {
  int nb = 0;
  return ioctl(fd, FIONBIO, &nb);
}


x86 assembly (clang, -O0):
<oct_set_blocking>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb4(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdx
call   1030 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<oct_set_blocking>:
push   %rax
movl   $0x0,0x4(%rsp)
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
call   1030 <ioctl@plt>
pop    %rcx
ret

LLVM IR (-O0):
@FIONBIO = global i32 0
define i32 @oct_set_blocking(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* @FIONBIO
%6 = call i32 @ioctl(i32 %4, i32 %5, i32* %3)
ret i32 %6
}

LLVM IR (-O2):
@FIONBIO = global i32 0
define i32 @oct_set_blocking(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = load i32, i32* @FIONBIO
%5 = call i32 @ioctl(i32 %0, i32 %4, i32* %2)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int i = 5, j = 3, *p = &i, *q = &j, x = (*p)++;
  printf("%d %d \n", *p, x + *q);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x5,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rcx
mov    (%rcx),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,(%rcx)
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%rax
add    (%rax),%edx
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"%d %d \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 6, i32 8)
ret i32 0
}
void INT_Excep_PERIA_INTA212(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_PERIA_INTA212() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lua_error(int /*<<< orphan*/);
int /*<<< orphan*/ lua_getstring(int /*<<< orphan*/);
int /*<<< orphan*/ lua_lua2C(int);
void luaB_error(void) { lua_error(lua_getstring(lua_lua2C(1))); }


x86 assembly (clang, -O0):
<luaB_error>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1050 <lua_lua2C@plt>
mov    %eax,%edi
call   1030 <lua_getstring@plt>
mov    %eax,%edi
call   1040 <lua_error@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<luaB_error>:
push   %rax
mov    $0x1,%edi
call   1050 <lua_lua2C@plt>
mov    %eax,%edi
call   1030 <lua_getstring@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <lua_error@plt>

LLVM IR (-O0):
define void @luaB_error() {
%1 = call i32 @lua_lua2C(i32 1)
%2 = call i32 @lua_getstring(i32 %1)
%3 = call i32 @lua_error(i32 %2)
ret void
}

LLVM IR (-O2):
define void @luaB_error() {
%1 = tail call i32 @lua_lua2C(i32 1)
%2 = tail call i32 @lua_getstring(i32 %1)
%3 = tail call i32 @lua_error(i32 %2)
ret void
}
/* Variables and functions */
double CubeRoot(float);
double f(double t) {
  const double Limit = (24.0 / 116.0) * (24.0 / 116.0) * (24.0 / 116.0);
  if (t <= Limit)
    return (841.0 / 108.0) * t + (16.0 / 116.0);
  else
    return CubeRoot((float)t);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  0xedb(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xece(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1164 <f+0x54>
movsd  -0x10(%rbp),%xmm0
movsd  0xebe(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeba(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1177 <f+0x67>
movsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1030 <CubeRoot@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movsd  0xee8(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    1127 <f+0x17>
cvtsd2ss %xmm0,%xmm0
jmp    1030 <CubeRoot@plt>
mulsd  0xed9(%rip),%xmm0
addsd  0xed9(%rip),%xmm0
ret

LLVM IR (-O0):
define double @f(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double 0x3F822354D28F7CD6, double* %4
%5 = load double, double* %3
%6 = fcmp ole double %5, 0x3F822354D28F7CD6
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load double, double* %3
%9 = call double @llvm.fmuladd.f64(double 0x401F25ED097B425F, double %8, double 0x3FC1A7B9611A7B96)
store double %9, double* %2
br label %14
10: ; preds = %1
%11 = load double, double* %3
%12 = fptrunc double %11 to float
%13 = call double @CubeRoot(float %12)
store double %13, double* %2
br label %14
14: ; preds = %10, %7
%15 = load double, double* %2
ret double %15
}

LLVM IR (-O2):
define double @f(double %0) {
%2 = fcmp ugt double %0, 0x3F822354D28F7CD6
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call double @llvm.fmuladd.f64(double %0, double 0x401F25ED097B425F, double 0x3FC1A7B9611A7B96)
br label %8
5: ; preds = %1
%6 = fptrunc double %0 to float
%7 = tail call double @CubeRoot(float %6)
br label %8
8: ; preds = %5, %3
%9 = phi double [ %4, %3 ], [ %7, %5 ]
ret double %9
}
void yy_2_TagHeader(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fread(char *, int, int, int /*<<< orphan*/ *);
void platform_getuuid(char *uuid) {
  FILE *rnd = fopen("/dev/random", "rb");
  fread(uuid, 16, 1, rnd);
  fclose(rnd);
}


x86 assembly (clang, -O0):
<platform_getuuid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
lea    0xec2(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x10,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    -0x10(%rbp),%rdi
call   1040 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<platform_getuuid>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
lea    0xec2(%rip),%rdi
lea    0xec7(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    $0x10,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1030 <fread@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fclose@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"/dev/random\00"
@.str.1 = [3 x i8] c"rb\00"
define void @platform_getuuid(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %4, i32** %3
%5 = load i8*, i8** %2
%6 = load i32*, i32** %3
%7 = call i32 @fread(i8* %5, i32 16, i32 1, i32* %6)
%8 = load i32*, i32** %3
%9 = call i32 @fclose(i32* %8)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"/dev/random\00"
@.str.1 = [3 x i8] c"rb\00"
define void @platform_getuuid(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @fread(i8* %0, i32 16, i32 1, i32* %2)
%4 = tail call i32 @fclose(i32* %2)
ret void
}
void asctoe53(s, y) char *s;
unsigned short *y;
{ asctoeg(s, y, 53); }


x86 assembly (clang, -O0):
<asctoe53>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x35,%edx
mov    $0x0,%al
call   1030 <asctoeg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asctoe53>:
mov    $0x35,%edx
xor    %eax,%eax
jmp    1030 <asctoeg@plt>

LLVM IR (-O0):
define void @asctoe53(i8* %0, i16* %1) {
%3 = alloca i8*
%4 = alloca i16*
store i8* %0, i8** %3
store i16* %1, i16** %4
%5 = load i8*, i8** %3
%6 = load i16*, i16** %4
%7 = call i32 (i8*, i16*, i32, ...) bitcast (i32 (...)* @asctoeg to i32 (i8*, i16*, i32, ...)*)(i8* %5, i16* %6, i32 53)
ret void
}

LLVM IR (-O2):
define void @asctoe53(i8* %0, i16* %1) {
%3 = tail call i32 (i8*, i16*, i32, ...) bitcast (i32 (...)* @asctoeg to i32 (i8*, i16*, i32, ...)*)(i8* %0, i16* %1, i32 53)
ret void
}
int test_imm_CCint8_reg(signed char val) {
  return ((val) & (-0xCC << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_CCint8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, -204
%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_CCint8_reg(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = and i32 %2, -204
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main() {
  int a[3] = {5, 6};
  printf("a[0] = %d\na[1] = %d\na[2] = %d\n", a[0], a[1], a[2]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xed8(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xec9(%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
mov    $0x5,%esi
mov    $0x6,%edx
xor    %ecx,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [31 x i8] c"a[0] = %d\0Aa[1] = %d\0Aa[2] = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 5, i32 6, i32 0)
ret i32 0
}
/* Variables and functions */
char *oem_supermicro_lan_port_string(unsigned char);
int /*<<< orphan*/ printf(char *, char *);
void oem_supermicro_show_lan_port(unsigned char val) {
  printf("Current LAN interface is %s\n", oem_supermicro_lan_port_string(val));
}


x86 assembly (clang, -O0):
<oem_supermicro_show_lan_port>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1040 <oem_supermicro_lan_port_string@plt>
mov    %rax,%rsi
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<oem_supermicro_show_lan_port>:
push   %rax
call   1040 <oem_supermicro_lan_port_string@plt>
lea    0xed3(%rip),%rdi
mov    %rax,%rsi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"Current LAN interface is %s\0A\00"
define void @oem_supermicro_show_lan_port(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i8* @oem_supermicro_lan_port_string(i8 zeroext %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"Current LAN interface is %s\0A\00"
define void @oem_supermicro_show_lan_port(i8 zeroext %0) {
%2 = tail call i8* @oem_supermicro_lan_port_string(i8 zeroext %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: rup [host ...]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [23 x i8] c"usage: rup [host ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [23 x i8] c"usage: rup [host ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct dnsresp {
  int dummy;
};

/* Variables and functions */
char *_resolv_unspec_gai(char *raddr, struct dnsresp *d_resp, char *extra) {
  return NULL;
}


x86 assembly (clang, -O0):
<_resolv_unspec_gai>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.dnsresp = type { i32 }
define i8* @_resolv_unspec_gai(i8* %0, %struct.dnsresp* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca %struct.dnsresp*
%6 = alloca i8*
store i8* %0, i8** %4
store %struct.dnsresp* %1, %struct.dnsresp** %5
store i8* %2, i8** %6
ret i8* null
}

LLVM IR (-O2):
%struct.dnsresp = type { i32 }
define noalias i8* @_resolv_unspec_gai(i8* nocapture readnone %0, %struct.dnsresp* nocapture readnone %1, i8* nocapture readnone %2) {
ret i8* null
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int label_cmp(const void *a, const void *b) {
  uint32_t aa = *((const uint32_t *)a);
  uint32_t bb = *((const uint32_t *)b);
  return (aa > bb) ? 1 : (aa < bb) ? -1 : 0;
}


x86 assembly (clang, -O0):
<label_cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jle    113d <label_cmp+0x3d>
mov    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1155 <label_cmp+0x55>
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rsi
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    %rsi,%rdx
cmovl  %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<label_cmp>:
mov    (%rdi),%rax
mov    (%rsi),%rcx
xor    %edx,%edx
cmp    %rcx,%rax
setl   %dl
neg    %edx
cmp    %rcx,%rax
mov    $0x1,%eax
cmovle %edx,%eax
ret

LLVM IR (-O0):
define i32 @label_cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i64*
%9 = load i64, i64* %8
store i64 %9, i64* %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i64*
%12 = load i64, i64* %11
store i64 %12, i64* %6
%13 = load i64, i64* %5
%14 = load i64, i64* %6
%15 = icmp sgt i64 %13, %14
br i1 %15, label %16, label %17
16: ; preds = %2
br label %23
17: ; preds = %2
%18 = load i64, i64* %5
%19 = load i64, i64* %6
%20 = icmp slt i64 %18, %19
%21 = zext i1 %20 to i64
%22 = select i1 %20, i32 -1, i32 0
br label %23
23: ; preds = %17, %16
%24 = phi i32 [ 1, %16 ], [ %22, %17 ]
ret i32 %24
}

LLVM IR (-O2):
define i32 @label_cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp sgt i64 %4, %6
%8 = icmp slt i64 %4, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Variables and functions */
scalar_t__ malloc(int);
int *make(int rows, int cols) {
  return (int *)malloc(rows * cols * sizeof(int));
}


x86 assembly (clang, -O0):
<make>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
cltq
shl    $0x2,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make>:
imul   %esi,%edi
shl    $0x2,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i32* @make(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = mul nsw i32 %5, %6
%8 = sext i32 %7 to i64
%9 = mul i64 %8, 4
%10 = trunc i64 %9 to i32
%11 = call i64 @malloc(i32 %10)
%12 = inttoptr i64 %11 to i32*
ret i32* %12
}

LLVM IR (-O2):
define i32* @make(i32 %0, i32 %1) {
%3 = shl i32 %0, 2
%4 = mul i32 %3, %1
%5 = tail call i64 @malloc(i32 %4)
%6 = inttoptr i64 %5 to i32*
ret i32* %6
}
/* Variables and functions */
void *__arch_fetch_and_add_ptr(void **, long);
void *sas_fetch_and_add_ptr(void **pointer, long int delta) {
  return __arch_fetch_and_add_ptr(pointer, delta);
}


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

x86 assembly (clang, -O2):
<sas_fetch_and_add_ptr>:
jmp    1030 <__arch_fetch_and_add_ptr@plt>

LLVM IR (-O0):
define i8* @sas_fetch_and_add_ptr(i8** %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 i8* @__arch_fetch_and_add_ptr(i8** %5, i64 %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @sas_fetch_and_add_ptr(i8** %0, i64 %1) {
%3 = tail call i8* @__arch_fetch_and_add_ptr(i8** %0, i64 %1)
ret i8* %3
}
unsigned long long mod(unsigned long long *a, unsigned long long b) {
  return *a - (b * (*a / b));
}


x86 assembly (clang, -O0):
<mod>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
xor    %edx,%edx
divq   -0x10(%rbp)
mov    %rax,%rdx
mov    -0x18(%rbp),%rax
imul   %rdx,%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mod>:
mov    (%rdi),%rax
mov    %rax,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     1118 <mod+0x18>
xor    %edx,%edx
div    %rsi
mov    %rdx,%rax
ret
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i64 @mod(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
%5 = load i64*, i64** %3
%6 = load i64, i64* %5
%7 = load i64, i64* %4
%8 = load i64*, i64** %3
%9 = load i64, i64* %8
%10 = load i64, i64* %4
%11 = udiv i64 %9, %10
%12 = mul i64 %7, %11
%13 = sub i64 %6, %12
ret i64 %13
}

LLVM IR (-O2):
define i64 @mod(i64* nocapture %0, i64 %1) {
%3 = load i64, i64* %0
%4 = urem i64 %3, %1
ret i64 %4
}
unsigned int f(void) { return 0xffffffff; }


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

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

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

LLVM IR (-O2):
define i32 @f() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ perror(char *);
int recv(int, char *, int, int /*<<< orphan*/);
int recibir(int sock, char *buf, int longitud) {
  int numbytes;
  if ((numbytes = recv(sock, buf, longitud, 0)) == -1) {
    perror("ERROR recv");
    return (-1);
  }
  return numbytes;
}


x86 assembly (clang, -O0):
<recibir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
mov    %eax,-0x18(%rbp)
cmp    $0xffffffff,%eax
jne    1167 <recibir+0x47>
lea    0xeaa(%rip),%rdi
call   1040 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    116d <recibir+0x4d>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recibir>:
push   %rbx
xor    %ecx,%ecx
call   1030 <recv@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
je     1133 <recibir+0x13>
mov    %ebx,%eax
pop    %rbx
ret
lea    0xec6(%rip),%rdi
call   1040 <perror@plt>
jmp    112f <recibir+0xf>

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

LLVM IR (-O2):
@.str = [11 x i8] c"ERROR recv\00"
define i32 @recibir(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @recv(i32 %0, i8* %1, i32 %2, i32 0)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %3, %6
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ do_csi(char *, int);
void decsnls(int pn) { do_csi("%d*|", pn); }


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

x86 assembly (clang, -O2):
<decsnls>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <do_csi@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%d*|\00"
define void @decsnls(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @do_csi(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d*|\00"
define void @decsnls(i32 %0) {
%2 = tail call i32 @do_csi(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int drain() {
  printf("Hello world\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"Hello world\0A\00"
define i32 @drain() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"Hello world\00"
define i32 @drain() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bar(int);
void foo(int arg) { bar(arg); }


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

x86 assembly (clang, -O2):
<foo>:
jmp    1030 <bar@plt>

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

LLVM IR (-O2):
define void @foo(i32 %0) {
%2 = tail call i32 @bar(i32 %0)
ret void
}
int CMUTIL_MemRcyComparator(const void *a, const void *b) {
  if (a > b)
    return 1;
  else if (a < b)
    return -1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<CMUTIL_MemRcyComparator>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jbe    1126 <CMUTIL_MemRcyComparator+0x26>
movl   $0x1,-0x4(%rbp)
jmp    1147 <CMUTIL_MemRcyComparator+0x47>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1140 <CMUTIL_MemRcyComparator+0x40>
movl   $0xffffffff,-0x4(%rbp)
jmp    1147 <CMUTIL_MemRcyComparator+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CMUTIL_MemRcyComparator>:
cmp    %rsi,%rdi
sbb    %ecx,%ecx
cmp    %rsi,%rdi
mov    $0x1,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @CMUTIL_MemRcyComparator(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = load i8*, i8** %5
%8 = icmp ugt i8* %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 1, i32* %3
br label %16
10: ; preds = %2
%11 = load i8*, i8** %4
%12 = load i8*, i8** %5
%13 = icmp ult i8* %11, %12
br i1 %13, label %14, label %15
14: ; preds = %10
store i32 -1, i32* %3
br label %16
15: ; preds = %10
store i32 0, i32* %3
br label %16
16: ; preds = %15, %14, %9
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @CMUTIL_MemRcyComparator(i8* readnone %0, i8* readnone %1) {
%3 = icmp ugt i8* %0, %1
%4 = icmp ult i8* %0, %1
%5 = sext i1 %4 to i32
%6 = select i1 %3, i32 1, i32 %5
ret i32 %6
}
int qcs_fast_power_mod(int b, int x, int m) {
  int erg = 1;
  while (x > 0) {
    if (x & 1) {
      erg = (erg * b) % m;
    }
    b = (b * b) % m;
    x = x >> 1;
  }
  return erg;
}


x86 assembly (clang, -O0):
<qcs_fast_power_mod>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1157 <qcs_fast_power_mod+0x57>
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     113b <qcs_fast_power_mod+0x3b>
mov    -0x10(%rbp),%eax
imul   -0x4(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x4(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1114 <qcs_fast_power_mod+0x14>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qcs_fast_power_mod>:
test   %esi,%esi
jle    113c <qcs_fast_power_mod+0x3c>
mov    %edx,%r8d
mov    $0x1,%ecx
jmp    1126 <qcs_fast_power_mod+0x26>
xchg   %ax,%ax
imul   %edi,%edi
mov    %edi,%eax
cltd
idiv   %r8d
mov    %esi,%eax
shr    %eax
mov    %edx,%edi
cmp    $0x1,%esi
mov    %eax,%esi
jbe    1139 <qcs_fast_power_mod+0x39>
test   $0x1,%sil
je     1110 <qcs_fast_power_mod+0x10>
imul   %edi,%ecx
mov    %ecx,%eax
cltd
idiv   %r8d
mov    %edx,%ecx
jmp    1110 <qcs_fast_power_mod+0x10>
mov    %ecx,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @qcs_fast_power_mod(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %20
5: ; preds = %3, %14
%6 = phi i32 [ %15, %14 ], [ 1, %3 ]
%7 = phi i32 [ %17, %14 ], [ %0, %3 ]
%8 = phi i32 [ %18, %14 ], [ %1, %3 ]
%9 = and i32 %8, 1
%10 = icmp eq i32 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %5
%12 = mul nsw i32 %6, %7
%13 = srem i32 %12, %2
br label %14
14: ; preds = %11, %5
%15 = phi i32 [ %13, %11 ], [ %6, %5 ]
%16 = mul nsw i32 %7, %7
%17 = srem i32 %16, %2
%18 = lshr i32 %8, 1
%19 = icmp ult i32 %8, 2
br i1 %19, label %20, label %5
20: ; preds = %14, %3
%21 = phi i32 [ 1, %3 ], [ %15, %14 ]
ret i32 %21
}
/* Variables and functions */
int /*<<< orphan*/ pushNarray(char *, unsigned int);
void pushinteger8array(long int *x, int n) {
  pushNarray((char *)x, (unsigned int)(n * 8));
}


x86 assembly (clang, -O0):
<pushinteger8array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
shl    $0x3,%esi
call   1030 <pushNarray@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pushinteger8array>:
shl    $0x3,%esi
jmp    1030 <pushNarray@plt>

LLVM IR (-O0):
define void @pushinteger8array(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%5 = load i64*, i64** %3
%6 = bitcast i64* %5 to i8*
%7 = load i32, i32* %4
%8 = mul nsw i32 %7, 8
%9 = call i32 @pushNarray(i8* %6, i32 %8)
ret void
}

LLVM IR (-O2):
define void @pushinteger8array(i64* %0, i32 %1) {
%3 = bitcast i64* %0 to i8*
%4 = shl nsw i32 %1, 3
%5 = tail call i32 @pushNarray(i8* %3, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char);
int main() {
  char b;
  char *ptr = &b;
  *ptr = 1;
  printf("%d %d\n", b, *ptr);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x1(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x1,(%rax)
mov    -0x1(%rbp),%cl
mov    -0x10(%rbp),%rax
lea    0xecb(%rip),%rdi
movsbl %cl,%esi
movsbl (%rax),%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8 signext 1, i8 signext 1)
ret i32 0
}
unsigned xrop3_156_0_0(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;
  stk2 = T & stk3;
  stk1 = S ^ stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_156_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
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
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @xrop3_156_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%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 = xor i32 %23, -1
store i32 %24, i32* %10
%25 = load i32, i32* %7
%26 = load i32, i32* %10
%27 = and i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %6
%29 = load i32, i32* %9
%30 = xor i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
ret i32 %31
}

LLVM IR (-O2):
define i32 @xrop3_156_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = shl nuw nsw i32 %5, 8
%7 = xor i32 %4, %6
ret i32 %7
}
/* Type definitions */
struct msszddd_header {
  int dummy;
};
struct msszdd_decompressor_p {
  int dummy;
};
struct msszdd_decompressor {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int szddd_extract(struct msszdd_decompressor *self, struct msszddd_header *szdd,
                  char *filename) {
  struct msszdd_decompressor_p *this = (struct msszdd_decompressor_p *)self;
  if (!this)
    return (1);
  assert(0);
  return 0;
}


x86 assembly (clang, -O0):
<szddd_extract>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    1143 <szddd_extract+0x33>
movl   $0x1,-0x4(%rbp)
jmp    1151 <szddd_extract+0x41>
xor    %edi,%edi
call   1030 <assert@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<szddd_extract>:
push   %rbx
test   %rdi,%rdi
je     1121 <szddd_extract+0x11>
xor    %ebx,%ebx
xor    %edi,%edi
call   1030 <assert@plt>
jmp    1126 <szddd_extract+0x16>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.msszdd_decompressor = type { i32 }
%struct.msszddd_header = type { i32 }
%struct.msszdd_decompressor_p = type { i32 }
define i32 @szddd_extract(%struct.msszdd_decompressor* %0, %struct.msszddd_header* %1, i8* %2) {
%4 = alloca i32
%5 = alloca %struct.msszdd_decompressor*
%6 = alloca %struct.msszddd_header*
%7 = alloca i8*
%8 = alloca %struct.msszdd_decompressor_p*
store %struct.msszdd_decompressor* %0, %struct.msszdd_decompressor** %5
store %struct.msszddd_header* %1, %struct.msszddd_header** %6
store i8* %2, i8** %7
%9 = load %struct.msszdd_decompressor*, %struct.msszdd_decompressor** %5
%10 = bitcast %struct.msszdd_decompressor* %9 to %struct.msszdd_decompressor_p*
store %struct.msszdd_decompressor_p* %10, %struct.msszdd_decompressor_p** %8
%11 = load %struct.msszdd_decompressor_p*, %struct.msszdd_decompressor_p** %8
%12 = icmp ne %struct.msszdd_decompressor_p* %11, null
br i1 %12, label %14, label %13
13: ; preds = %3
store i32 1, i32* %4
br label %16
14: ; preds = %3
%15 = call i32 @assert(i32 0)
store i32 0, i32* %4
br label %16
16: ; preds = %14, %13
%17 = load i32, i32* %4
ret i32 %17
}

LLVM IR (-O2):
%struct.msszdd_decompressor = type { i32 }
%struct.msszddd_header = type { i32 }
define i32 @szddd_extract(%struct.msszdd_decompressor* readnone %0, %struct.msszddd_header* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = icmp eq %struct.msszdd_decompressor* %0, null
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @assert(i32 0)
br label %7
7: ; preds = %3, %5
%8 = phi i32 [ 0, %5 ], [ 1, %3 ]
ret i32 %8
}
int nfsd_fault_inject_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @nfsd_fault_inject_init() {
ret i32 0
}