xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ ECHILD;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ printf(char *);
pid_t waitpid(pid_t pid __attribute__((unused)),
              int *stat_loc __attribute__((unused)),
              int options __attribute__((unused))) {
  printf("waitpid\n");
  errno = ECHILD;
  return -1;
}


x86 assembly (clang, -O0):
<waitpid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea3(%rip),%rax
mov    (%rax),%ecx
mov    0x2ea2(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<waitpid>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eb4(%rip),%rax
mov    (%rax),%eax
mov    0x2eb3(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@ECHILD = global i32 0
@errno = global i32 0
@str = [8 x i8] c"waitpid\00"
define i32 @waitpid(i32 %0, i32* nocapture readnone %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%5 = load i32, i32* @ECHILD
store i32 %5, i32* @errno
ret i32 -1
}
void wbxml_tree_clb_wbxml_pi(void *ctx, const unsigned char *target,
                             unsigned char *data) {}


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

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

LLVM IR (-O0):
define void @wbxml_tree_clb_wbxml_pi(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
ret void
}

LLVM IR (-O2):
define void @wbxml_tree_clb_wbxml_pi(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2) {
ret void
}
/* Type definitions */
struct uc_program {
  int dummy;
};

/* Variables and functions */
scalar_t__ uc_program_current_character(struct uc_program *);
char uc_lowercase(struct uc_program *program) {
  return (char)(uc_program_current_character(program) + 32);
}


x86 assembly (clang, -O0):
<uc_lowercase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <uc_program_current_character@plt>
add    $0x20,%rax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uc_lowercase>:
push   %rax
call   1030 <uc_program_current_character@plt>
add    $0x20,%al
pop    %rcx
ret

LLVM IR (-O0):
%struct.uc_program = type { i32 }
define signext i8 @uc_lowercase(%struct.uc_program* %0) {
%2 = alloca %struct.uc_program*
store %struct.uc_program* %0, %struct.uc_program** %2
%3 = load %struct.uc_program*, %struct.uc_program** %2
%4 = call i64 @uc_program_current_character(%struct.uc_program* %3)
%5 = add nsw i64 %4, 32
%6 = trunc i64 %5 to i8
ret i8 %6
}

LLVM IR (-O2):
%struct.uc_program = type { i32 }
define signext i8 @uc_lowercase(%struct.uc_program* %0) {
%2 = tail call i64 @uc_program_current_character(%struct.uc_program* %0)
%3 = trunc i64 %2 to i8
%4 = add i8 %3, 32
ret i8 %4
}
void _M2_StringConvert_init(__attribute__((unused)) int argc,
                            __attribute__((unused)) char *argv[]) {}


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

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

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

LLVM IR (-O2):
define void @_M2_StringConvert_init(i32 %0, i8** nocapture %1) {
ret void
}
unsigned short hi16(x) { return ((unsigned short)(((unsigned int)x) >> 16UL)); }


x86 assembly (clang, -O0):
<hi16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hi16>:
mov    %edi,%eax
shr    $0x10,%eax
ret

LLVM IR (-O0):
define zeroext i16 @hi16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 16
%5 = trunc i32 %4 to i16
ret i16 %5
}

LLVM IR (-O2):
define zeroext i16 @hi16(i32 %0) {
%2 = lshr i32 %0, 16
%3 = trunc i32 %2 to i16
ret i16 %3
}
int f(int n) { return n / 2; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    %edi,%eax
shr    $0x1f,%eax
add    %edi,%eax
sar    %eax
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = sdiv i32 %0, 2
ret i32 %2
}
void writeConvertedContent(char *writeData) {}


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

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

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

LLVM IR (-O2):
define void @writeConvertedContent(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int strlen(char *);
int pstrwidth(char *str) { return strlen(str) * 8; }


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

x86 assembly (clang, -O2):
<pstrwidth>:
push   %rax
call   1030 <strlen@plt>
shl    $0x3,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @pstrwidth(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strlen(i8* %3)
%5 = mul nsw i32 %4, 8
ret i32 %5
}

LLVM IR (-O2):
define i32 @pstrwidth(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = shl nsw i32 %2, 3
ret i32 %3
}
/* Variables and functions */
int rand();
char ascii_dado() { return 'a' + (rand() % 6); }


x86 assembly (clang, -O0):
<ascii_dado>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x6,%ecx
cltd
idiv   %ecx
add    $0x61,%edx
mov    %dl,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ascii_dado>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0x2aaaaaab,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
add    $0x61,%al
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @ascii_dado() {
%1 = call i32 (...) @rand()
%2 = srem i32 %1, 6
%3 = add nsw i32 97, %2
%4 = trunc i32 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @ascii_dado() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 6
%3 = trunc i32 %2 to i8
%4 = add nsw i8 %3, 97
ret i8 %4
}
/* Variables and functions */
int StdOutM__StdOut__print(char const *);
int HalCC2430RadioP__StdOut__print(const char *str) {
  int result;
  result = StdOutM__StdOut__print(str);
  return result;
}


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

x86 assembly (clang, -O2):
<HalCC2430RadioP__StdOut__print>:
jmp    1030 <StdOutM__StdOut__print@plt>

LLVM IR (-O0):
define i32 @HalCC2430RadioP__StdOut__print(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @StdOutM__StdOut__print(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @HalCC2430RadioP__StdOut__print(i8* %0) {
%2 = tail call i32 @StdOutM__StdOut__print(i8* %0)
ret i32 %2
}
/* Variables and functions */
size_t strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
void strncpy_no_null_4_Bad() {
  char src[15] = "test.test.test";
  char dst[10];
  strncpy(dst, src, 10);
  int a[10];
  a[strlen(dst)] = 0;
}


x86 assembly (clang, -O0):
<strncpy_no_null_4_Bad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0xf(%rbp)
mov    0xecf(%rip),%eax
mov    %eax,-0x7(%rbp)
mov    0xec9(%rip),%ax
mov    %ax,-0x3(%rbp)
mov    0xec1(%rip),%al
mov    %al,-0x1(%rbp)
lea    -0x19(%rbp),%rdi
lea    -0xf(%rbp),%rsi
mov    $0xa,%edx
call   1030 <strncpy@plt>
lea    -0x19(%rbp),%rdi
call   1040 <strlen@plt>
movl   $0x0,-0x50(%rbp,%rax,4)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncpy_no_null_4_Bad>:
sub    $0x28,%rsp
movabs $0x747365742e7473,%rax
mov    %rax,0xf(%rsp)
movabs $0x7365742e74736574,%rax
74 65 73
mov    %rax,0x8(%rsp)
lea    0x1e(%rsp),%rdi
lea    0x8(%rsp),%rsi
mov    $0xa,%edx
call   1030 <strncpy@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.strncpy_no_null_4_Bad.src = [15 x i8] c"test.test.test\00"
define void @strncpy_no_null_4_Bad() {
%1 = alloca [15 x i8]
%2 = alloca [10 x i8]
%3 = alloca [10 x i32]
%4 = bitcast [15 x i8]* %1 to i8*
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 0
%7 = call i32 @strncpy(i8* %5, i8* %6, i32 10)
%8 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%9 = call i64 @strlen(i8* %8)
%10 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 %9
store i32 0, i32* %10
ret void
}

LLVM IR (-O2):
@__const.strncpy_no_null_4_Bad.src = [15 x i8] c"test.test.test\00"
define void @strncpy_no_null_4_Bad() {
%1 = alloca [15 x i8]
%2 = alloca [10 x i8]
%3 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%5 = call i32 @strncpy(i8* %4, i8* %3, i32 10)
ret void
}
/* Variables and functions */
int is_prime(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n = 0, answr;
  scanf("%d", &n);
  answr = is_prime(n);
  printf("%d", answr);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
lea    0xebc(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
call   1040 <is_prime@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\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 = load i32, i32* %1
%5 = call i32 @is_prime(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
char *ReadInt64FromString(char const *, char const *, char const *, long long *,
                          int);
const char *ReadIntFromString(const char *szStr, const char *szValueTermination,
                              const char *szAllowedPadding, int *pValue,
                              int iTrimCount) {
  long long i64Val;
  const char *pRes = ReadInt64FromString(szStr, szValueTermination,
                                         szAllowedPadding, &i64Val, iTrimCount);
  (*pValue) = (int)i64Val;
  return pRes;
}


x86 assembly (clang, -O0):
<ReadIntFromString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x24(%rbp),%r8d
lea    -0x30(%rbp),%rcx
call   1030 <ReadInt64FromString@plt>
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rax
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x38(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReadIntFromString>:
push   %rbx
sub    $0x10,%rsp
mov    %rcx,%rbx
lea    0x8(%rsp),%rcx
call   1030 <ReadInt64FromString@plt>
mov    0x8(%rsp),%ecx
mov    %ecx,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @ReadIntFromString(i8* %0, i8* %1, i8* %2, i32* nocapture writeonly %3, i32 %4) {
%6 = alloca i64
%7 = bitcast i64* %6 to i8*
%8 = call i8* @ReadInt64FromString(i8* %0, i8* %1, i8* %2, i64* %6, i32 %4)
%9 = load i64, i64* %6
%10 = trunc i64 %9 to i32
store i32 %10, i32* %3
ret i8* %8
}
/* Type definitions */
typedef int /*<<< orphan*/ Display;
typedef int /*<<< orphan*/ Atom;

/* Variables and functions */
int /*<<< orphan*/ XInternAtom(int /*<<< orphan*/ *, char *, int);
Atom ParseAtom(Display *dpy, char *name, int only_flag) {
  return (XInternAtom(dpy, name, only_flag));
}


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

x86 assembly (clang, -O2):
<ParseAtom>:
jmp    1030 <XInternAtom@plt>

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

LLVM IR (-O2):
define i32 @ParseAtom(i32* %0, i8* %1, i32 %2) {
%4 = tail call i32 @XInternAtom(i32* %0, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int get_int();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int x;
  x = get_int();
  printf("You entered %d.", x);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [16 x i8] c"You entered %d.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @get_int()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ glmStep3fs(float *, float *, float);
void glmStep3fs_(float x[3], float edge) { glmStep3fs(x, x, edge); }


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

x86 assembly (clang, -O2):
<glmStep3fs_>:
mov    %rdi,%rsi
jmp    1030 <glmStep3fs@plt>

LLVM IR (-O0):
define void @glmStep3fs_(float* %0, float %1) {
%3 = alloca float*
%4 = alloca float
store float* %0, float** %3
store float %1, float* %4
%5 = load float*, float** %3
%6 = load float*, float** %3
%7 = load float, float* %4
%8 = call i32 @glmStep3fs(float* %5, float* %6, float %7)
ret void
}

LLVM IR (-O2):
define void @glmStep3fs_(float* %0, float %1) {
%3 = tail call i32 @glmStep3fs(float* %0, float* %0, float %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ findMinSum(long long *, long long *, int);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main() {
  long long int a[] = {4, 1, 8, 7};
  long long int b[] = {2, 3, 6, 5};
  int n = sizeof(a) / sizeof(a[0]);
  printf("%lld\n", findMinSum(a, b, n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec1(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xebe(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xebb(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xeb8(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xeb5(%rip),%rax
mov    %rax,-0x38(%rbp)
movl   $0x4,-0x54(%rbp)
lea    -0x30(%rbp),%rdi
lea    -0x50(%rbp),%rsi
mov    -0x54(%rbp),%edx
call   1040 <findMinSum@plt>
mov    %eax,%esi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xeed(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xed1(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x20(%rsp),%rdi
mov    %rsp,%rsi
mov    $0x4,%edx
call   1040 <findMinSum@plt>
lea    0xed4(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

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

LLVM IR (-O2):
@__const.main.a = [4 x i64] [i64 4, i64 1, i64 8, i64 7]
@__const.main.b = [4 x i64] [i64 2, i64 3, i64 6, i64 5]
@.str = [6 x i8] c"%lld\0A\00"
define i32 @main() {
%1 = alloca [4 x i64]
%2 = alloca [4 x i64]
%3 = bitcast [4 x i64]* %1 to i8*
%4 = bitcast [4 x i64]* %2 to i8*
%5 = getelementptr inbounds [4 x i64], [4 x i64]* %1, i64 0, i64 0
%6 = getelementptr inbounds [4 x i64], [4 x i64]* %2, i64 0, i64 0
%7 = call i32 @findMinSum(i64* %5, i64* %6, i32 4)
%8 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}
/* Variables and functions */
long sok_history_getlen(char *history) {
  int res = 0;
  if (history == NULL)
    return (0);
  while (*history != 0) {
    res += 1;
    history += 1;
  }
  return (res);
}


x86 assembly (clang, -O0):
<sok_history_getlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1127 <sok_history_getlen+0x27>
movq   $0x0,-0x8(%rbp)
jmp    115e <sok_history_getlen+0x5e>
jmp    112c <sok_history_getlen+0x2c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1156 <sok_history_getlen+0x56>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    112c <sok_history_getlen+0x2c>
movslq -0x14(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sok_history_getlen>:
test   %rdi,%rdi
je     111f <sok_history_getlen+0x1f>
cmpb   $0x0,(%rdi)
je     111f <sok_history_getlen+0x1f>
xor    %ecx,%ecx
nopl   0x0(%rax)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <sok_history_getlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @sok_history_getlen(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %15, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %15, label %6
6: ; preds = %3, %6
%7 = phi i32 [ %9, %6 ], [ 0, %3 ]
%8 = phi i8* [ %10, %6 ], [ %0, %3 ]
%9 = add nuw nsw i32 %7, 1
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %6
%14 = zext i32 %9 to i64
br label %15
15: ; preds = %3, %13, %1
%16 = phi i64 [ 0, %1 ], [ 0, %3 ], [ %14, %13 ]
ret i64 %16
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int, char *,
                           int);
int /*<<< orphan*/ stderr;
extern int s_rnge(char *var, int index, char *routine, int lineno) {
  fprintf(stderr, "array index out-of-bounds for %s[%d] in routine %s:%d\n",
          var, index, routine, lineno);
  fflush(stderr);
  abort();
}


x86 assembly (clang, -O0):
<s_rnge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    -0x1c(%rbp),%r9d
lea    0xe9b(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e6f(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<s_rnge>:
push   %rbx
mov    %ecx,%r9d
mov    %rdx,%r8
mov    %esi,%ecx
mov    %rdi,%rdx
mov    0x2e9d(%rip),%rbx
mov    (%rbx),%edi
lea    0xeb4(%rip),%rsi
call   1040 <fprintf@plt>
mov    (%rbx),%edi
call   1050 <fflush@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [55 x i8] c"array index out-of-bounds for %s[%d] in routine %s:%d\0A\00"
define i32 @s_rnge(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = load i8*, i8** %7
%13 = load i32, i32* %8
%14 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i8* %10, i32 %11, i8* %12, i32 %13)
%15 = load i32, i32* @stderr
%16 = call i32 @fflush(i32 %15)
%17 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [55 x i8] c"array index out-of-bounds for %s[%d] in routine %s:%d\0A\00"
define i32 @s_rnge(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i8* %2, i32 %3)
%7 = load i32, i32* @stderr
%8 = tail call i32 @fflush(i32 %7)
%9 = tail call i32 (...) @abort()
unreachable
}
int isFloat(const char *z) {
  while (z[0]) {
    if (z[0] == '.' || z[0] == 'E' || z[0] == 'e')
      return 1;
    z++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<isFloat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1162 <isFloat+0x62>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
je     1145 <isFloat+0x45>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x45,%eax
je     1145 <isFloat+0x45>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x65,%eax
jne    1151 <isFloat+0x51>
movl   $0x1,-0x4(%rbp)
jmp    1169 <isFloat+0x69>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1108 <isFloat+0x8>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isFloat>:
movabs $0x80000000800001,%rax
nopw   0x0(%rax,%rax,1)
movzbl (%rdi),%ecx
lea    -0x2e(%rcx),%edx
cmp    $0x37,%dl
ja     1124 <isFloat+0x24>
movzbl %dl,%edx
bt     %rdx,%rax
jb     112e <isFloat+0x2e>
test   %cl,%cl
je     1134 <isFloat+0x34>
add    $0x1,%rdi
jmp    1110 <isFloat+0x10>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @isFloat(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
br label %4
4: ; preds = %28, %1
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %31
9: ; preds = %4
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 46
br i1 %14, label %27, label %15
15: ; preds = %9
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i64 0
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 69
br i1 %20, label %27, label %21
21: ; preds = %15
%22 = load i8*, i8** %3
%23 = getelementptr inbounds i8, i8* %22, i64 0
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 101
br i1 %26, label %27, label %28
27: ; preds = %21, %15, %9
store i32 1, i32* %2
br label %32
28: ; preds = %21
%29 = load i8*, i8** %3
%30 = getelementptr inbounds i8, i8* %29, i32 1
store i8* %30, i8** %3
br label %4
31: ; preds = %4
store i32 0, i32* %2
br label %32
32: ; preds = %31, %27
%33 = load i32, i32* %2
ret i32 %33
}

LLVM IR (-O2):
define i32 @isFloat(i8* nocapture %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %8
i8 46, label %7
i8 69, label %7
i8 101, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2, %2
br label %8
8: ; preds = %2, %7
%9 = phi i32 [ 1, %7 ], [ 0, %2 ]
ret i32 %9
}
int *func(int a, int *b) {
  static int result = 0;
  int i;
  for (i = 0; i < a; i++) {
    result += (*b)--;
  }
  return &result;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1145 <func+0x45>
mov    -0x10(%rbp),%rcx
mov    (%rcx),%eax
mov    %eax,%edx
add    $0xffffffff,%edx
mov    %edx,(%rcx)
add    0x2ef3(%rip),%eax
mov    %eax,0x2eed(%rip)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1112 <func+0x12>
lea    0x2ed8(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
test   %edi,%edi
jle    1142 <func+0x42>
cmp    $0x1,%edi
je     112f <func+0x2f>
mov    %edi,%eax
and    $0xfffffffe,%eax
xchg   %ax,%ax
mov    (%rsi),%ecx
lea    -0x1(%rcx),%edx
mov    %edx,(%rsi)
add    %ecx,0x2f07(%rip)
mov    (%rsi),%ecx
lea    -0x1(%rcx),%edx
mov    %edx,(%rsi)
add    %ecx,0x2efa(%rip)
add    $0xfffffffe,%eax
jne    1110 <func+0x10>
test   $0x1,%dil
je     1142 <func+0x42>
mov    (%rsi),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,(%rsi)
add    %eax,0x2ee2(%rip)
lea    0x2edb(%rip),%rax
ret

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

LLVM IR (-O2):
@func.result = internal global i32 0
define i32* @func(i32 %0, i32* nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %28
4: ; preds = %2
%5 = and i32 %0, 1
%6 = icmp eq i32 %0, 1
br i1 %6, label %21, label %7
7: ; preds = %4
%8 = and i32 %0, -2
br label %9
9: ; preds = %9, %7
%10 = phi i32 [ 0, %7 ], [ %19, %9 ]
%11 = load i32, i32* %1
%12 = add nsw i32 %11, -1
store i32 %12, i32* %1
%13 = load i32, i32* @func.result
%14 = add nsw i32 %13, %11
store i32 %14, i32* @func.result
%15 = load i32, i32* %1
%16 = add nsw i32 %15, -1
store i32 %16, i32* %1
%17 = load i32, i32* @func.result
%18 = add nsw i32 %17, %15
store i32 %18, i32* @func.result
%19 = add i32 %10, 2
%20 = icmp eq i32 %19, %8
br i1 %20, label %21, label %9
21: ; preds = %9, %4
%22 = icmp eq i32 %5, 0
br i1 %22, label %28, label %23
23: ; preds = %21
%24 = load i32, i32* %1
%25 = add nsw i32 %24, -1
store i32 %25, i32* %1
%26 = load i32, i32* @func.result
%27 = add nsw i32 %26, %24
store i32 %27, i32* @func.result
br label %28
28: ; preds = %23, %21, %2
ret i32* @func.result
}
/* Variables and functions */
int /*<<< orphan*/ unpack_content(char *);
int /*<<< orphan*/ unpack_info(int);
void unpack_pkg(void) {
  unpack_info(0);
  unpack_info(1);
  unpack_content("content");
}


x86 assembly (clang, -O0):
<unpack_pkg>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <unpack_info@plt>
mov    $0x1,%edi
call   1040 <unpack_info@plt>
lea    0xec4(%rip),%rdi
call   1030 <unpack_content@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpack_pkg>:
push   %rax
xor    %edi,%edi
call   1040 <unpack_info@plt>
mov    $0x1,%edi
call   1040 <unpack_info@plt>
lea    0xec7(%rip),%rdi
pop    %rax
jmp    1030 <unpack_content@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"content\00"
define void @unpack_pkg() {
%1 = call i32 @unpack_info(i32 0)
%2 = call i32 @unpack_info(i32 1)
%3 = call i32 @unpack_content(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"content\00"
define void @unpack_pkg() {
%1 = tail call i32 @unpack_info(i32 0)
%2 = tail call i32 @unpack_info(i32 1)
%3 = tail call i32 @unpack_content(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, unsigned int);
void KeccakP1600_ExtractBytes(const void *state, unsigned char *data,
                              unsigned int offset, unsigned int length) {
  assert(offset < 200);
  assert(offset + length <= 200);
  memcpy(data, (unsigned char *)state + offset, length);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
cmpl   $0xc8,-0x14(%rbp)
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
cmp    $0xc8,%eax
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%eax
add    %rax,%rsi
mov    -0x18(%rbp),%edx
call   1040 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%ebx
mov    %rsi,%r15
mov    %rdi,%r12
xor    %edi,%edi
cmp    $0xc8,%edx
setb   %dil
call   1030 <assert@plt>
lea    (%r14,%rbx,1),%eax
xor    %edi,%edi
cmp    $0xc9,%eax
setb   %dil
call   1030 <assert@plt>
mov    %ebx,%esi
add    %r12,%rsi
mov    %r15,%rdi
mov    %r14d,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <memcpy@plt>

LLVM IR (-O0):
define void @KeccakP1600_ExtractBytes(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %7
%10 = icmp ult i32 %9, 200
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = add i32 %13, %14
%16 = icmp ule i32 %15, 200
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = load i8*, i8** %6
%20 = load i8*, i8** %5
%21 = load i32, i32* %7
%22 = zext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %20, i64 %22
%24 = load i32, i32* %8
%25 = call i32 @memcpy(i8* %19, i8* %23, i32 %24)
ret void
}

LLVM IR (-O2):
define void @KeccakP1600_ExtractBytes(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = icmp ult i32 %2, 200
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = add i32 %3, %2
%9 = icmp ult i32 %8, 201
%10 = zext i1 %9 to i32
%11 = tail call i32 @assert(i32 %10)
%12 = zext i32 %2 to i64
%13 = getelementptr inbounds i8, i8* %0, i64 %12
%14 = tail call i32 @memcpy(i8* %1, i8* %13, i32 %3)
ret void
}
/* Variables and functions */
int solve_degree_2(double const *, double *);
int polynomial_solve_degree_2(const double *c, double *x) {
  return solve_degree_2(c, x);
}


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

x86 assembly (clang, -O2):
<polynomial_solve_degree_2>:
jmp    1030 <solve_degree_2@plt>

LLVM IR (-O0):
define i32 @polynomial_solve_degree_2(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 = call i32 @solve_degree_2(double* %5, double* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @polynomial_solve_degree_2(double* %0, double* %1) {
%3 = tail call i32 @solve_degree_2(double* %0, double* %1)
ret i32 %3
}
/* Variables and functions */
bool should_add_conjunction(int *arr, int j) {
  bool flag = false;
  for (int x = j - 1; x >= 0; x--) {
    if (arr[x] != 0) {
      flag = true;
      break;
    }
  }
  return flag;
}


x86 assembly (clang, -O0):
<should_add_conjunction>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     1156 <should_add_conjunction+0x56>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     1143 <should_add_conjunction+0x43>
movl   $0x1,-0x10(%rbp)
jmp    1156 <should_add_conjunction+0x56>
jmp    1148 <should_add_conjunction+0x48>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    111b <should_add_conjunction+0x1b>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<should_add_conjunction>:
mov    %esi,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
test   %eax,%eax
jle    1125 <should_add_conjunction+0x25>
cmpl   $0x0,-0x4(%rdi,%rax,4)
lea    -0x1(%rax),%rax
je     1110 <should_add_conjunction+0x10>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @should_add_conjunction(i32* nocapture %0, i32 %1) {
%3 = zext i32 %1 to i64
br label %4
4: ; preds = %9, %2
%5 = phi i64 [ %6, %9 ], [ %3, %2 ]
%6 = add nsw i64 %5, -1
%7 = trunc i64 %5 to i32
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %4
%10 = getelementptr inbounds i32, i32* %0, i64 %6
%11 = load i32, i32* %10
%12 = icmp eq i32 %11, 0
br i1 %12, label %4, label %13
13: ; preds = %9, %4
%14 = phi i32 [ 0, %4 ], [ 1, %9 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ pci_config_writeb(int const, int, int);
int /*<<< orphan*/ pci_config_writel(int const, int, int);
void setup_ich9_pm(void) {
  const int bdf = 0x1f << 3;
  pci_config_writel(bdf, 0x40, 0x601);
  pci_config_writeb(bdf, 0x44, 0x80);
}


x86 assembly (clang, -O0):
<setup_ich9_pm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xf8,-0x4(%rbp)
mov    $0xf8,%edi
mov    $0x40,%esi
mov    $0x601,%edx
call   1030 <pci_config_writel@plt>
mov    $0xf8,%edi
mov    $0x44,%esi
mov    $0x80,%edx
call   1040 <pci_config_writeb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup_ich9_pm>:
push   %rax
mov    $0xf8,%edi
mov    $0x40,%esi
mov    $0x601,%edx
call   1030 <pci_config_writel@plt>
mov    $0xf8,%edi
mov    $0x44,%esi
mov    $0x80,%edx
pop    %rax
jmp    1040 <pci_config_writeb@plt>

LLVM IR (-O0):
define void @setup_ich9_pm() {
%1 = alloca i32
store i32 248, i32* %1
%2 = call i32 @pci_config_writel(i32 248, i32 64, i32 1537)
%3 = call i32 @pci_config_writeb(i32 248, i32 68, i32 128)
ret void
}

LLVM IR (-O2):
define void @setup_ich9_pm() {
%1 = tail call i32 @pci_config_writel(i32 248, i32 64, i32 1537)
%2 = tail call i32 @pci_config_writeb(i32 248, i32 68, i32 128)
ret void
}
const char *metisAbout_MiniNotice(void) {
  return "Copyright (c) 2017 Cisco and/or its affiliates.\n";
}


x86 assembly (clang, -O0):
<metisAbout_MiniNotice>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<metisAbout_MiniNotice>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [49 x i8] c"Copyright (c) 2017 Cisco and/or its affiliates.\0A\00"
define i8* @metisAbout_MiniNotice() {
ret i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [49 x i8] c"Copyright (c) 2017 Cisco and/or its affiliates.\0A\00"
define i8* @metisAbout_MiniNotice() {
ret i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0)
}
void unpack(unsigned long a, unsigned char *b) {
  b[0] = (unsigned char)a;
  b[1] = (unsigned char)(a >> 8);
  b[2] = (unsigned char)(a >> 16);
  b[3] = (unsigned char)(a >> 24);
}


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

x86 assembly (clang, -O2):
<unpack>:
mov    %edi,(%rsi)
ret

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

LLVM IR (-O2):
define void @unpack(i64 %0, i8* nocapture writeonly %1) {
%3 = trunc i64 %0 to i8
store i8 %3, i8* %1
%4 = lshr i64 %0, 8
%5 = trunc i64 %4 to i8
%6 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %5, i8* %6
%7 = lshr i64 %0, 16
%8 = trunc i64 %7 to i8
%9 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %8, i8* %9
%10 = lshr i64 %0, 24
%11 = trunc i64 %10 to i8
%12 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %11, i8* %12
ret void
}
float EaseCubicOut(float t, float b, float c, float d) {
  t = t / d - 1.0f;
  return (c * (t * t * t + 1.0f) + b);
}


x86 assembly (clang, -O0):
<EaseCubicOut>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x10(%rbp),%xmm0
movss  0xed6(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
mulss  -0x4(%rbp),%xmm2
movss  -0x4(%rbp),%xmm1
mulss  %xmm1,%xmm2
movss  0xead(%rip),%xmm1
addss  %xmm1,%xmm2
movss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<EaseCubicOut>:
divss  %xmm3,%xmm0
addss  0xef4(%rip),%xmm0
movaps %xmm0,%xmm3
mulss  %xmm0,%xmm3
mulss  %xmm3,%xmm0
addss  0xee5(%rip),%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @EaseCubicOut(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %5
%10 = load float, float* %8
%11 = fdiv float %9, %10
%12 = fsub float %11, 1.000000e+00
store float %12, float* %5
%13 = load float, float* %7
%14 = load float, float* %5
%15 = load float, float* %5
%16 = fmul float %14, %15
%17 = load float, float* %5
%18 = call float @llvm.fmuladd.f32(float %16, float %17, float 1.000000e+00)
%19 = load float, float* %6
%20 = call float @llvm.fmuladd.f32(float %13, float %18, float %19)
ret float %20
}

LLVM IR (-O2):
define float @EaseCubicOut(float %0, float %1, float %2, float %3) {
%5 = fdiv float %0, %3
%6 = fadd float %5, -1.000000e+00
%7 = fmul float %6, %6
%8 = tail call float @llvm.fmuladd.f32(float %7, float %6, float 1.000000e+00)
%9 = tail call float @llvm.fmuladd.f32(float %2, float %8, float %1)
ret float %9
}
/* Type definitions */
struct cbor_buf {
  int dummy;
};

/* Variables and functions */
int cbor_buf_append_byte(struct cbor_buf *, int);
bool cbor_add_break(struct cbor_buf *buf) {
  return cbor_buf_append_byte(buf, 0xff);
}


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

x86 assembly (clang, -O2):
<cbor_add_break>:
mov    $0xff,%esi
jmp    1030 <cbor_buf_append_byte@plt>

LLVM IR (-O0):
%struct.cbor_buf = type { i32 }
define i32 @cbor_add_break(%struct.cbor_buf* %0) {
%2 = alloca %struct.cbor_buf*
store %struct.cbor_buf* %0, %struct.cbor_buf** %2
%3 = load %struct.cbor_buf*, %struct.cbor_buf** %2
%4 = call i32 @cbor_buf_append_byte(%struct.cbor_buf* %3, i32 255)
ret i32 %4
}

LLVM IR (-O2):
%struct.cbor_buf = type { i32 }
define i32 @cbor_add_break(%struct.cbor_buf* %0) {
%2 = tail call i32 @cbor_buf_append_byte(%struct.cbor_buf* %0, i32 255)
ret i32 %2
}
int is_not_square(int x) { return (x & 0x88); }


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

x86 assembly (clang, -O2):
<is_not_square>:
mov    %edi,%eax
and    $0x88,%eax
ret

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

LLVM IR (-O2):
define i32 @is_not_square(i32 %0) {
%2 = and i32 %0, 136
ret i32 %2
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ send_event;
};
typedef TYPE_1__ XCrossingEvent;

/* Variables and functions */
int get_XCrossingEvent_send_event(void *_p) {
  return (int)((XCrossingEvent *)_p)->send_event;
}


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

x86 assembly (clang, -O2):
<get_XCrossingEvent_send_event>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XCrossingEvent_send_event(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XCrossingEvent_send_event(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}