xunge/DecIR huggingface dataset:
long convert_long(long i) {
  return (((i & 0xff) << 24) | ((i & 0xff00) << 8) | ((i & 0xff0000) >> 8) |
          ((i & 0xff000000) >> 24));
}


x86 assembly (clang, -O0):
<convert_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xff,%rax
shl    $0x18,%rax
mov    -0x8(%rbp),%rcx
and    $0xff00,%rcx
shl    $0x8,%rcx
or     %rcx,%rax
mov    -0x8(%rbp),%rcx
and    $0xff0000,%rcx
sar    $0x8,%rcx
or     %rcx,%rax
movabs $0xff000000,%rcx
and    -0x8(%rbp),%rcx
sar    $0x18,%rcx
or     %rcx,%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @convert_long(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 255
%5 = shl i64 %4, 24
%6 = load i64, i64* %2
%7 = and i64 %6, 65280
%8 = shl i64 %7, 8
%9 = or i64 %5, %8
%10 = load i64, i64* %2
%11 = and i64 %10, 16711680
%12 = ashr i64 %11, 8
%13 = or i64 %9, %12
%14 = load i64, i64* %2
%15 = and i64 %14, 4278190080
%16 = ashr i64 %15, 24
%17 = or i64 %13, %16
ret i64 %17
}

LLVM IR (-O2):
define i64 @convert_long(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = tail call i32 @llvm.bswap.i32(i32 %2)
%4 = zext i32 %3 to i64
ret i64 %4
}
void uma_dbg_send() {}


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

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

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

LLVM IR (-O2):
define void @uma_dbg_send() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f1();
void use_s1(void) { f1(); }


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

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

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

LLVM IR (-O2):
define void @use_s1() {
%1 = tail call i32 (...) @f1()
ret void
}
int empty(int t) {
  if (t == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<empty>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111d <empty+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    1124 <empty+0x24>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<empty>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @empty(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @empty(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
struct genlist {
  int dummy;
};
struct fileinfo_list {
  int dummy;
};
struct fileinfo {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ genlist_append(struct genlist *, struct fileinfo *);
void fileinfo_list_append(struct fileinfo_list *tthis, struct fileinfo *pfoo) {
  genlist_append((struct genlist *)tthis, pfoo);
}


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

x86 assembly (clang, -O2):
<fileinfo_list_append>:
jmp    1030 <genlist_append@plt>

LLVM IR (-O0):
%struct.fileinfo_list = type { i32 }
%struct.fileinfo = type { i32 }
%struct.genlist = type { i32 }
define void @fileinfo_list_append(%struct.fileinfo_list* %0, %struct.fileinfo* %1) {
%3 = alloca %struct.fileinfo_list*
%4 = alloca %struct.fileinfo*
store %struct.fileinfo_list* %0, %struct.fileinfo_list** %3
store %struct.fileinfo* %1, %struct.fileinfo** %4
%5 = load %struct.fileinfo_list*, %struct.fileinfo_list** %3
%6 = bitcast %struct.fileinfo_list* %5 to %struct.genlist*
%7 = load %struct.fileinfo*, %struct.fileinfo** %4
%8 = call i32 @genlist_append(%struct.genlist* %6, %struct.fileinfo* %7)
ret void
}

LLVM IR (-O2):
%struct.fileinfo_list = type { i32 }
%struct.fileinfo = type { i32 }
%struct.genlist = type { i32 }
define void @fileinfo_list_append(%struct.fileinfo_list* %0, %struct.fileinfo* %1) {
%3 = bitcast %struct.fileinfo_list* %0 to %struct.genlist*
%4 = tail call i32 @genlist_append(%struct.genlist* %3, %struct.fileinfo* %1)
ret void
}
/* Variables and functions */
int read_bool(int *, char const *);
int option_read_bool(void *out, const char *in) {
  int *out_bool = out;
  return read_bool(out_bool, in);
}


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

x86 assembly (clang, -O2):
<option_read_bool>:
jmp    1030 <read_bool@plt>

LLVM IR (-O0):
define i32 @option_read_bool(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = load i8*, i8** %4
%10 = call i32 @read_bool(i32* %8, i8* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @option_read_bool(i8* %0, i8* %1) {
%3 = bitcast i8* %0 to i32*
%4 = tail call i32 @read_bool(i32* %3, i8* %1)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ EC_KEY;

/* Variables and functions */
int EC_GROUP_get_degree(int /*<<< orphan*/);
int /*<<< orphan*/ EC_KEY_get0_group(int /*<<< orphan*/ const *);
int ECDH_size(const EC_KEY *d) {
  return ((EC_GROUP_get_degree(EC_KEY_get0_group(d)) + 7) / 8);
}


x86 assembly (clang, -O0):
<ECDH_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <EC_KEY_get0_group@plt>
mov    %eax,%edi
call   1040 <EC_GROUP_get_degree@plt>
add    $0x7,%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ECDH_size>:
push   %rax
call   1030 <EC_KEY_get0_group@plt>
mov    %eax,%edi
call   1040 <EC_GROUP_get_degree@plt>
lea    0x7(%rax),%ecx
add    $0xe,%eax
test   %ecx,%ecx
cmovns %ecx,%eax
sar    $0x3,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ECDH_size(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @EC_KEY_get0_group(i32* %3)
%5 = call i32 @EC_GROUP_get_degree(i32 %4)
%6 = add nsw i32 %5, 7
%7 = sdiv i32 %6, 8
ret i32 %7
}

LLVM IR (-O2):
define i32 @ECDH_size(i32* %0) {
%2 = tail call i32 @EC_KEY_get0_group(i32* %0)
%3 = tail call i32 @EC_GROUP_get_degree(i32 %2)
%4 = add nsw i32 %3, 7
%5 = sdiv i32 %4, 8
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ ST_unloadGraphics();
void ST_unloadData(void) { ST_unloadGraphics(); }


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

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

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

LLVM IR (-O2):
define void @ST_unloadData() {
%1 = tail call i32 (...) @ST_unloadGraphics()
ret void
}
/* Variables and functions */
int getegid();
int geteuid();
int getgid();
int getpid();
int getppid();
int getuid();
int /*<<< orphan*/ printf(char *, int, int, int, int, int, int);
int main(void) {
  printf("pid = %d, ppid = %d, uid = %d, euid = %d, gid = %d, egid =%d\n",
         getpid(), getppid(), getuid(), geteuid(), getgid(), getegid());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1090 <getppid@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1040 <getuid@plt>
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <geteuid@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1070 <getgid@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1080 <getegid@plt>
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%r8d
mov    -0x8(%rbp),%r9d
lea    0xe30(%rip),%rdi
mov    %eax,(%rsp)
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %eax,%r14d
xor    %eax,%eax
call   1090 <getppid@plt>
mov    %eax,%r15d
xor    %eax,%eax
call   1040 <getuid@plt>
mov    %eax,%r12d
xor    %eax,%eax
call   1060 <geteuid@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1070 <getgid@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1080 <getegid@plt>
mov    %eax,(%rsp)
lea    0xe43(%rip),%rdi
mov    %r14d,%esi
mov    %r15d,%edx
mov    %r12d,%ecx
mov    %ebp,%r8d
mov    %ebx,%r9d
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [62 x i8] c"pid = %d, ppid = %d, uid = %d, euid = %d, gid = %d, egid =%d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @getpid()
%3 = call i32 (...) @getppid()
%4 = call i32 (...) @getuid()
%5 = call i32 (...) @geteuid()
%6 = call i32 (...) @getgid()
%7 = call i32 (...) @getegid()
%8 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [62 x i8] c"pid = %d, ppid = %d, uid = %d, euid = %d, gid = %d, egid =%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getpid()
%2 = tail call i32 (...) @getppid()
%3 = tail call i32 (...) @getuid()
%4 = tail call i32 (...) @geteuid()
%5 = tail call i32 (...) @getgid()
%6 = tail call i32 (...) @getegid()
%7 = tail call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6)
ret i32 0
}
void closeall() {}


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

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

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

LLVM IR (-O2):
define void @closeall() {
ret void
}
float hue_dist(float a, float b) {
  float r;
  if (b < a) {
    float t = a;
    a = b;
    b = t;
  }
  r = b - a;
  if (r > 180.0f)
    r = 360.0 + a - b;
  return r;
}


x86 assembly (clang, -O0):
<hue_dist>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0x4(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    113f <hue_dist+0x3f>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  0xea5(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    118f <hue_dist+0x8f>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe93(%rip),%xmm0
addsd  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<hue_dist>:
movaps %xmm0,%xmm2
maxss  %xmm1,%xmm2
minss  %xmm0,%xmm1
movaps %xmm2,%xmm0
subss  %xmm1,%xmm0
ucomiss 0xee7(%rip),%xmm0
jbe    1139 <hue_dist+0x39>
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
addsd  0xede(%rip),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm2,%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @hue_dist(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %3
store float %1, float* %4
%7 = load float, float* %4
%8 = load float, float* %3
%9 = fcmp olt float %7, %8
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load float, float* %3
store float %11, float* %6
%12 = load float, float* %4
store float %12, float* %3
%13 = load float, float* %6
store float %13, float* %4
br label %14
14: ; preds = %10, %2
%15 = load float, float* %4
%16 = load float, float* %3
%17 = fsub float %15, %16
store float %17, float* %5
%18 = load float, float* %5
%19 = fcmp ogt float %18, 1.800000e+02
br i1 %19, label %20, label %28
20: ; preds = %14
%21 = load float, float* %3
%22 = fpext float %21 to double
%23 = fadd double 3.600000e+02, %22
%24 = load float, float* %4
%25 = fpext float %24 to double
%26 = fsub double %23, %25
%27 = fptrunc double %26 to float
store float %27, float* %5
br label %28
28: ; preds = %20, %14
%29 = load float, float* %5
ret float %29
}

LLVM IR (-O2):
define float @hue_dist(float %0, float %1) {
%3 = fcmp olt float %1, %0
%4 = select i1 %3, float %0, float %1
%5 = select i1 %3, float %1, float %0
%6 = fsub float %4, %5
%7 = fcmp ogt float %6, 1.800000e+02
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = fpext float %5 to double
%10 = fadd double %9, 3.600000e+02
%11 = fpext float %4 to double
%12 = fsub double %10, %11
%13 = fptrunc double %12 to float
br label %14
14: ; preds = %8, %2
%15 = phi float [ %13, %8 ], [ %6, %2 ]
ret float %15
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
void *calloc(size_t, size_t);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
void *calloc_errchk(size_t count, size_t size, const char *errmsg) {
  void *mem;
  if ((mem = calloc(count, size)) == NULL) {
    perror(errmsg);
    exit(EXIT_FAILURE);
  } else {
    return mem;
  }
}


x86 assembly (clang, -O0):
<calloc_errchk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <calloc@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    1176 <calloc_errchk+0x46>
mov    -0x18(%rbp),%rdi
call   1040 <perror@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calloc_errchk>:
push   %rbx
mov    %rdx,%rbx
call   1030 <calloc@plt>
test   %rax,%rax
je     1140 <calloc_errchk+0x10>
pop    %rbx
ret
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define i8* @calloc_errchk(i64 %0, i64 %1, i8* %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i8*
store i64 %0, i64* %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%8 = load i64, i64* %4
%9 = load i64, i64* %5
%10 = call i8* @calloc(i64 %8, i64 %9)
store i8* %10, i8** %7
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %17
12: ; preds = %3
%13 = load i8*, i8** %6
%14 = call i32 @perror(i8* %13)
%15 = load i32, i32* @EXIT_FAILURE
%16 = call i32 @exit(i32 %15)
unreachable
17: ; preds = %3
%18 = load i8*, i8** %7
ret i8* %18
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define noalias i8* @calloc_errchk(i64 %0, i64 %1, i8* nocapture %2) {
%4 = tail call i8* @calloc(i64 %0, i64 %1)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = tail call i32 @perror(i8* %2)
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
10: ; preds = %3
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ alarm(int);
int /*<<< orphan*/ printf(char *);
void callme(int sig_no) {
  alarm(5);
  printf("Hello!!\n");
}


x86 assembly (clang, -O0):
<callme>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x5,%edi
call   1040 <alarm@plt>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<callme>:
push   %rax
mov    $0x5,%edi
call   1040 <alarm@plt>
lea    0xece(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"Hello!!\0A\00"
define void @callme(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @alarm(i32 5)
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [8 x i8] c"Hello!!\00"
define void @callme(i32 %0) {
%2 = tail call i32 @alarm(i32 5)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret void
}
void foo406() {}


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

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

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

LLVM IR (-O2):
define void @foo406() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ GLfloat;
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ glFogf(int /*<<< orphan*/, int /*<<< orphan*/);
void Fogf(GLenum pname, GLfloat param) { glFogf(pname, param); }


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

x86 assembly (clang, -O2):
<Fogf>:
jmp    1030 <glFogf@plt>

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

LLVM IR (-O2):
define void @Fogf(i32 %0, i32 %1) {
%3 = tail call i32 @glFogf(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
scalar_t__ ceil(double);
int ceilMe(double v) { return (int)ceil(v); }


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

x86 assembly (clang, -O2):
<ceilMe>:
jmp    1030 <ceil@plt>

LLVM IR (-O0):
define i32 @ceilMe(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i64 @ceil(double %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @ceilMe(double %0) {
%2 = tail call i64 @ceil(double %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
double log(double);
double get_ln_epsprime(double beta, double capi) {
  double lnepp, bsq;
  bsq = beta * beta;
  lnepp = log((1.0 - bsq) * capi * capi / (2.0 * 511.0 * bsq)) + bsq;
  return (lnepp);
}


x86 assembly (clang, -O0):
<get_ln_epsprime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xecf(%rip),%xmm0
subsd  -0x20(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xeb0(%rip),%xmm1
mulsd  -0x20(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1030 <log@plt>
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ln_epsprime>:
push   %rax
movapd %xmm0,%xmm2
mulsd  %xmm0,%xmm2
movsd  %xmm2,(%rsp)
movsd  0xeda(%rip),%xmm0
subsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xece(%rip),%xmm1
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
call   1030 <log@plt>
addsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @get_ln_epsprime(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %3
store double %1, double* %4
%7 = load double, double* %3
%8 = load double, double* %3
%9 = fmul double %7, %8
store double %9, double* %6
%10 = load double, double* %6
%11 = fsub double 1.000000e+00, %10
%12 = load double, double* %4
%13 = fmul double %11, %12
%14 = load double, double* %4
%15 = fmul double %13, %14
%16 = load double, double* %6
%17 = fmul double 1.022000e+03, %16
%18 = fdiv double %15, %17
%19 = call double @log(double %18)
%20 = load double, double* %6
%21 = fadd double %19, %20
store double %21, double* %5
%22 = load double, double* %5
ret double %22
}

LLVM IR (-O2):
define double @get_ln_epsprime(double %0, double %1) {
%3 = fmul double %0, %0
%4 = fsub double 1.000000e+00, %3
%5 = fmul double %4, %1
%6 = fmul double %5, %1
%7 = fmul double %3, 1.022000e+03
%8 = fdiv double %6, %7
%9 = tail call double @log(double %8)
%10 = fadd double %3, %9
ret double %10
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void op_ld_8(void *_a, void *_b) {
  uint8_t *a = (uint8_t *)_a;
  uint8_t *b = (uint8_t *)_b;
  *a = *b;
}


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

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

LLVM IR (-O0):
define void @op_ld_8(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %6
%11 = load i32*, i32** %6
%12 = load i32, i32* %11
%13 = load i32*, i32** %5
store i32 %12, i32* %13
ret void
}

LLVM IR (-O2):
define void @op_ld_8(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %4
store i32 %5, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) { printf("Hello, World from Dublin!\n"); }


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

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

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

LLVM IR (-O2):
@str = [26 x i8] c"Hello, World from Dublin!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ clearArray(char *, int);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, char *);
void skipText(FILE *f, char *regex, char *buffer, int size) {
  fscanf(f, regex, buffer);
  clearArray(buffer, size);
}


x86 assembly (clang, -O0):
<skipText>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <fscanf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1030 <clearArray@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipText>:
push   %rbp
push   %rbx
push   %rax
mov    %ecx,%ebp
mov    %rdx,%rbx
call   1040 <fscanf@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <clearArray@plt>

LLVM IR (-O0):
define void @skipText(i32* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i32* %0, i32** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i32*, i32** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = call i32 @fscanf(i32* %9, i8* %10, i8* %11)
%13 = load i8*, i8** %7
%14 = load i32, i32* %8
%15 = call i32 @clearArray(i8* %13, i32 %14)
ret void
}

LLVM IR (-O2):
define void @skipText(i32* nocapture %0, i8* nocapture %1, i8* %2, i32 %3) {
%5 = tail call i32 @fscanf(i32* %0, i8* %1, i8* %2)
%6 = tail call i32 @clearArray(i8* %2, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time_seed();
int stress(int n) {
  int f = n;
  while (f > 0) {
    while (n > 0) {
      srand(time_seed());
      n--;
    }
    f--;
    n = f;
  }
  return 0;
}


x86 assembly (clang, -O0):
<stress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    117a <stress+0x5a>
jmp    1140 <stress+0x20>
cmpl   $0x0,-0x4(%rbp)
jle    1166 <stress+0x46>
mov    $0x0,%al
call   1040 <time_seed@plt>
mov    %eax,%edi
call   1030 <srand@plt>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    1140 <stress+0x20>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1131 <stress+0x11>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stress>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
jle    1166 <stress+0x46>
mov    %edi,%r14d
lea    0x1(%r14),%ebx
nop
mov    %ebx,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <time_seed@plt>
mov    %eax,%edi
call   1030 <srand@plt>
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
ja     1140 <stress+0x20>
lea    -0x1(%r14),%eax
add    $0xffffffff,%ebx
cmp    $0x1,%r14d
mov    %eax,%r14d
jg     1130 <stress+0x10>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @stress(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %14
3: ; preds = %1, %11
%4 = phi i32 [ %12, %11 ], [ %0, %1 ]
br label %5
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ %4, %3 ]
%7 = tail call i32 (...) @time_seed()
%8 = tail call i32 @srand(i32 %7)
%9 = add nsw i32 %6, -1
%10 = icmp ugt i32 %6, 1
br i1 %10, label %5, label %11
11: ; preds = %5
%12 = add nsw i32 %4, -1
%13 = icmp sgt i32 %4, 1
br i1 %13, label %3, label %14
14: ; preds = %11, %1
ret i32 0
}
/* Type definitions */
struct iam_rec {
  int dummy;
};
struct iam_leaf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ iam_leaf_container(struct iam_leaf const *);
int /*<<< orphan*/ iam_lfix_rec(struct iam_leaf const *);
int /*<<< orphan*/ lfix_reccmp(int /*<<< orphan*/, int /*<<< orphan*/,
                               struct iam_rec const *);
int iam_lfix_rec_eq(const struct iam_leaf *l, const struct iam_rec *r) {
  return !lfix_reccmp(iam_leaf_container(l), iam_lfix_rec(l), r);
}


x86 assembly (clang, -O0):
<iam_lfix_rec_eq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <iam_leaf_container@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <iam_lfix_rec@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
mov    -0x10(%rbp),%rdx
call   1030 <lfix_reccmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iam_lfix_rec_eq>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1050 <iam_leaf_container@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <iam_lfix_rec@plt>
mov    %ebp,%edi
mov    %eax,%esi
mov    %r14,%rdx
call   1030 <lfix_reccmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.iam_leaf = type { i32 }
%struct.iam_rec = type { i32 }
define i32 @iam_lfix_rec_eq(%struct.iam_leaf* %0, %struct.iam_rec* %1) {
%3 = alloca %struct.iam_leaf*
%4 = alloca %struct.iam_rec*
store %struct.iam_leaf* %0, %struct.iam_leaf** %3
store %struct.iam_rec* %1, %struct.iam_rec** %4
%5 = load %struct.iam_leaf*, %struct.iam_leaf** %3
%6 = call i32 @iam_leaf_container(%struct.iam_leaf* %5)
%7 = load %struct.iam_leaf*, %struct.iam_leaf** %3
%8 = call i32 @iam_lfix_rec(%struct.iam_leaf* %7)
%9 = load %struct.iam_rec*, %struct.iam_rec** %4
%10 = call i32 @lfix_reccmp(i32 %6, i32 %8, %struct.iam_rec* %9)
%11 = icmp ne i32 %10, 0
%12 = xor i1 %11, true
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
%struct.iam_leaf = type { i32 }
%struct.iam_rec = type { i32 }
define i32 @iam_lfix_rec_eq(%struct.iam_leaf* %0, %struct.iam_rec* %1) {
%3 = tail call i32 @iam_leaf_container(%struct.iam_leaf* %0)
%4 = tail call i32 @iam_lfix_rec(%struct.iam_leaf* %0)
%5 = tail call i32 @lfix_reccmp(i32 %3, i32 %4, %struct.iam_rec* %1)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ iterate_char_array();
int /*<<< orphan*/ iterate_null_terminated_string();
int main() {
  iterate_null_terminated_string();
  iterate_char_array();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <iterate_null_terminated_string@plt>
mov    $0x0,%al
call   1030 <iterate_char_array@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @iterate_null_terminated_string()
%2 = call i32 (...) @iterate_char_array()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @iterate_null_terminated_string()
%2 = tail call i32 (...) @iterate_char_array()
ret i32 0
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ stat(char *, struct stat *);
int pyi_path_exists(char *path) {
  struct stat result;
  return stat(path, &result) == 0;
}


x86 assembly (clang, -O0):
<pyi_path_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pyi_path_exists>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @pyi_path_exists(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @stat(i8* %4, %struct.stat* %3)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @pyi_path_exists(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
unsigned twoxsai_generic_input_fmts() { return (1 << 0) | (1 << 1); }


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

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

LLVM IR (-O0):
define i32 @twoxsai_generic_input_fmts() {
ret i32 3
}

LLVM IR (-O2):
define i32 @twoxsai_generic_input_fmts() {
ret i32 3
}
/* Variables and functions */
int /*<<< orphan*/ leds_off();
int /*<<< orphan*/ leds_on();
int /*<<< orphan*/ sleep(int);
int main(int argc, char *argv[]) {
  while (1) {
    leds_on();
    sleep(100);
    leds_off();
    sleep(100);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <leds_on@plt>
mov    $0x64,%edi
call   1050 <sleep@plt>
mov    $0x0,%al
call   1040 <leds_off@plt>
mov    $0x64,%edi
call   1050 <sleep@plt>
jmp    1146 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <leds_on@plt>
mov    $0x64,%edi
call   1050 <sleep@plt>
xor    %eax,%eax
call   1040 <leds_off@plt>
mov    $0x64,%edi
call   1050 <sleep@plt>
jmp    1140 <main+0x10>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %6
6: ; preds = %2, %6
%7 = call i32 (...) @leds_on()
%8 = call i32 @sleep(i32 100)
%9 = call i32 (...) @leds_off()
%10 = call i32 @sleep(i32 100)
br label %6
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %3
%4 = tail call i32 (...) @leds_on()
%5 = tail call i32 @sleep(i32 100)
%6 = tail call i32 (...) @leds_off()
%7 = tail call i32 @sleep(i32 100)
br label %3
}
int hash_function(char *word) {
  int i = 0;
  int hash_value = 0;
  while (word[i] != '\0') {
    hash_value += (word[i] - 'A');
    i++;
  }
  return hash_value % 8;
}


x86 assembly (clang, -O0):
<hash_function>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     114e <hash_function+0x4e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
sub    $0x41,%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <hash_function+0x16>
mov    -0x10(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_function>:
mov    (%rdi),%cl
test   %cl,%cl
je     1131 <hash_function+0x31>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
add    %ecx,%eax
add    $0xffffffbf,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash_function+0x10>
lea    0x7(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xfffffff8,%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hash_function(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %17, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %11, %4 ], [ 0, %1 ]
%6 = phi i8 [ %13, %4 ], [ %2, %1 ]
%7 = phi i32 [ %10, %4 ], [ 0, %1 ]
%8 = sext i8 %6 to i32
%9 = add i32 %7, -65
%10 = add i32 %9, %8
%11 = add nuw nsw i64 %5, 1
%12 = getelementptr inbounds i8, i8* %0, i64 %11
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4
%16 = srem i32 %10, 8
br label %17
17: ; preds = %15, %1
%18 = phi i32 [ 0, %1 ], [ %16, %15 ]
ret i32 %18
}
void xnarch_exit(void) {}


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

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

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

LLVM IR (-O2):
define void @xnarch_exit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_bad_code_data_allocations();
int /*<<< orphan*/ test_code_data_allocations();
int main(void) {
  test_code_data_allocations();
  test_bad_code_data_allocations();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_code_data_allocations()
%2 = tail call i32 (...) @test_bad_code_data_allocations()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ nums;

/* Variables and functions */
int LinearArraySearch(int *, int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int index;
  int nums[] = {3, 5, 1, 8, 4, 66, 12, 90, 2, 1, 5, 7, 9, 3, 5, 5, 3, 2};
  int length = sizeof(nums) / sizeof(nums[0]);
  int value = 5;
  index = LinearArraySearch(nums, length, value);
  printf("%d\n", index);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x48,%edx
call   1050 <memcpy@plt>
movl   $0x12,-0x54(%rbp)
movl   $0x5,-0x58(%rbp)
lea    -0x50(%rbp),%rdi
mov    -0x54(%rbp),%esi
mov    -0x58(%rbp),%edx
call   1040 <LinearArraySearch@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
mov    0xf15(%rip),%rax
mov    %rax,0x40(%rsp)
movaps 0xef9(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xedd(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x12,%esi
mov    $0x5,%edx
call   1040 <LinearArraySearch@plt>
lea    0xed0(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

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

LLVM IR (-O2):
@__const.main.nums = [18 x i32] [i32 3, i32 5, i32 1, i32 8, i32 4, i32 66, i32 12, i32 90, i32 2, i32 1, i32 5, i32 7, i32 9, i32 3, i32 5, i32 5, i32 3, i32 2]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [18 x i32]
%2 = bitcast [18 x i32]* %1 to i8*
%3 = getelementptr inbounds [18 x i32], [18 x i32]* %1, i64 0, i64 0
%4 = call i32 @LinearArraySearch(i32* %3, i32 18, i32 5)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int standard_Newton_step(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(199, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<standard_Newton_step>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xc7,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<standard_Newton_step>:
mov    $0xc7,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @standard_Newton_step() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 199, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @standard_Newton_step() {
%1 = tail call i32 @_ada_use_c2phc(i32 199, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
int fun863() { return 863; }


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

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

LLVM IR (-O0):
define i32 @fun863() {
ret i32 863
}

LLVM IR (-O2):
define i32 @fun863() {
ret i32 863
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void GPIO_setOutputEnableDio(uint32_t dioNumber, uint32_t outputEnableValue) {
  ;

  ;
  (*((volatile unsigned long
          *)(((unsigned long)(0x40022000 + 0x000000D0) & 0xF0000000) |
             0x02000000 |
             (((unsigned long)(0x40022000 + 0x000000D0) & 0x000FFFFF) << 5) |
             ((dioNumber) << 2)))) = outputEnableValue;
}


x86 assembly (clang, -O0):
<GPIO_setOutputEnableDio>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movslq -0x8(%rbp),%rcx
mov    -0x4(%rbp),%eax
shl    $0x2,%eax
cltq
or     $0x42441a00,%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPIO_setOutputEnableDio>:
movslq %esi,%rax
shl    $0x2,%edi
movslq %edi,%rcx
or     $0x42441a00,%rcx
mov    %rax,(%rcx)
ret

LLVM IR (-O0):
define void @GPIO_setOutputEnableDio(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = sext i32 %5 to i64
%7 = load i32, i32* %3
%8 = shl i32 %7, 2
%9 = sext i32 %8 to i64
%10 = or i64 1111759360, %9
%11 = inttoptr i64 %10 to i64*
store volatile i64 %6, i64* %11
ret void
}

LLVM IR (-O2):
define void @GPIO_setOutputEnableDio(i32 %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = shl i32 %0, 2
%5 = or i32 %4, 1111759360
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i64*
store volatile i64 %3, i64* %7
ret void
}
/* Variables and functions */
int read(int, char *, int);
int /*<<< orphan*/ write(int, char *, int);
void print_file(int file_descriptor) {
  char buf[1024];
  int buflen;
  while (0 < (buflen = read(file_descriptor, buf, 1024))) {
    write(1, buf, buflen);
  }
}


x86 assembly (clang, -O0):
<print_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x410(%rbp),%rsi
mov    $0x400,%edx
call   1040 <read@plt>
mov    %eax,%ecx
mov    %ecx,-0x414(%rbp)
xor    %eax,%eax
cmp    %ecx,%eax
jge    1170 <print_file+0x50>
lea    -0x410(%rbp),%rsi
mov    -0x414(%rbp),%edx
mov    $0x1,%edi
call   1030 <write@plt>
jmp    112e <print_file+0xe>
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_file>:
push   %rbp
push   %rbx
sub    $0x408,%rsp
mov    %edi,%ebp
mov    %rsp,%rsi
mov    $0x400,%edx
call   1040 <read@plt>
test   %eax,%eax
jle    1162 <print_file+0x42>
mov    %rsp,%rbx
nop
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x400,%edx
call   1040 <read@plt>
test   %eax,%eax
jg     1140 <print_file+0x20>
add    $0x408,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @print_file(i32 %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @read(i32 %0, i8* %3, i32 1024)
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1, %6
%7 = phi i32 [ %9, %6 ], [ %4, %1 ]
%8 = call i32 @write(i32 1, i8* %3, i32 %7)
%9 = call i32 @read(i32 %0, i8* %3, i32 1024)
%10 = icmp sgt i32 %9, 0
br i1 %10, label %6, label %11
11: ; preds = %6, %1
ret void
}
float vectorDot(const float a[3], const float b[3]) {
  float res = 0;
  int i;
  for (i = 0; i < 3; i++) {
    res += a[i] * b[i];
  }
  return res;
}


x86 assembly (clang, -O0):
<vectorDot>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x3,-0x18(%rbp)
jge    115f <vectorDot+0x5f>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm2
movss  -0x14(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    111b <vectorDot+0x1b>
movss  -0x14(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<vectorDot>:
movss  (%rdi),%xmm0
movss  0x4(%rdi),%xmm1
mulss  (%rsi),%xmm0
xorps  %xmm2,%xmm2
addss  %xmm0,%xmm2
mulss  0x4(%rsi),%xmm1
addss  %xmm2,%xmm1
movss  0x8(%rdi),%xmm0
mulss  0x8(%rsi),%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @vectorDot(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca float
%6 = alloca i32
store float* %0, float** %3
store float* %1, float** %4
store float 0.000000e+00, float* %5
store i32 0, i32* %6
br label %7
7: ; preds = %23, %2
%8 = load i32, i32* %6
%9 = icmp slt i32 %8, 3
br i1 %9, label %10, label %26
10: ; preds = %7
%11 = load float*, float** %3
%12 = load i32, i32* %6
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds float, float* %11, i64 %13
%15 = load float, float* %14
%16 = load float*, float** %4
%17 = load i32, i32* %6
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds float, float* %16, i64 %18
%20 = load float, float* %19
%21 = load float, float* %5
%22 = call float @llvm.fmuladd.f32(float %15, float %20, float %21)
store float %22, float* %5
br label %23
23: ; preds = %10
%24 = load i32, i32* %6
%25 = add nsw i32 %24, 1
store i32 %25, i32* %6
br label %7
26: ; preds = %7
%27 = load float, float* %5
ret float %27
}

LLVM IR (-O2):
define float @vectorDot(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = tail call float @llvm.fmuladd.f32(float %3, float %4, float 0.000000e+00)
%6 = getelementptr inbounds float, float* %0, i64 1
%7 = load float, float* %6
%8 = getelementptr inbounds float, float* %1, i64 1
%9 = load float, float* %8
%10 = tail call float @llvm.fmuladd.f32(float %7, float %9, float %5)
%11 = getelementptr inbounds float, float* %0, i64 2
%12 = load float, float* %11
%13 = getelementptr inbounds float, float* %1, i64 2
%14 = load float, float* %13
%15 = tail call float @llvm.fmuladd.f32(float %12, float %14, float %10)
ret float %15
}