xunge/DecIR huggingface dataset:
/* Variables and functions */
int system(char *);
__attribute__((__weak__, __always___)) int softboundmpx_system(char *ptr) {
  return system(ptr);
}


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

x86 assembly (clang, -O2):
<softboundmpx_system>:
jmp    1030 <system@plt>

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

LLVM IR (-O2):
define weak i32 @softboundmpx_system(i8* %0) {
%2 = tail call i32 @system(i8* %0)
ret i32 %2
}
int absval(int x) {
  if (x < 0) {
    return -1 * x;
  }
  return x;
}


x86 assembly (clang, -O0):
<absval>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1120 <absval+0x20>
imul   $0xffffffff,-0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1126 <absval+0x26>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @absval(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
void checkf(int a, _Bool b) {
  _Bool c = f(a, b);
  char d;
  __builtin_memcpy(&d, &c, 1);
  if (d != (a == 0) ^ b)
    __builtin_abort();
}


x86 assembly (clang, -O0):
<checkf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
and    $0x1,%al
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%esi
mov    $0x0,%al
call   1040 <f@plt>
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x7(%rbp)
movsbl -0x7(%rbp),%eax
cmpl   $0x0,-0x4(%rbp)
sete   %cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x5(%rbp),%cl
and    $0x1,%cl
movzbl %cl,%ecx
xor    %ecx,%eax
cmp    $0x0,%eax
je     118a <checkf+0x6a>
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkf>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <f@plt>
test   %eax,%eax
setne  %al
test   %ebp,%ebp
sete   %cl
xor    %al,%cl
cmp    %bl,%cl
jne    1145 <checkf+0x25>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
call   1030 <abort@plt>

LLVM IR (-O0):
define void @checkf(i32 %0, i1 zeroext %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
store i32 %0, i32* %3
%7 = zext i1 %1 to i8
store i8 %7, i8* %4
%8 = load i32, i32* %3
%9 = load i8, i8* %4
%10 = trunc i8 %9 to i1
%11 = zext i1 %10 to i32
%12 = call i32 (i32, i32, ...) bitcast (i32 (...)* @f to i32 (i32, i32, ...)*)(i32 %8, i32 %11)
%13 = icmp ne i32 %12, 0
%14 = zext i1 %13 to i8
store i8 %14, i8* %5
%15 = load i8, i8* %6
%16 = sext i8 %15 to i32
%17 = load i32, i32* %3
%18 = icmp eq i32 %17, 0
%19 = zext i1 %18 to i32
%20 = icmp ne i32 %16, %19
%21 = zext i1 %20 to i32
%22 = load i8, i8* %4
%23 = trunc i8 %22 to i1
%24 = zext i1 %23 to i32
%25 = xor i32 %21, %24
%26 = icmp ne i32 %25, 0
br i1 %26, label %27, label %28
27: ; preds = %2
unreachable
28: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @checkf(i32 %0, i1 zeroext %1) {
%3 = zext i1 %1 to i32
%4 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @f to i32 (i32, i32, ...)*)(i32 %0, i32 %3)
%5 = icmp ne i32 %4, 0
%6 = icmp eq i32 %0, 0
%7 = xor i1 %6, %5
%8 = xor i1 %7, %1
br i1 %8, label %9, label %10
9: ; preds = %2
tail call void @abort()
unreachable
10: ; preds = %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int64_t;

/* Variables and functions */
scalar_t__ EINTR;
scalar_t__ errno;
int read(int, int /*<<< orphan*/ *, int);
int gettimerexp(int fd, u_int64_t *exp) {
  int ret;
  while (1) {
    ret = read(fd, exp, sizeof(u_int64_t));
    if (ret != -1)
      break;
    else if (errno != EINTR)
      break;
  }
  return ret;
}


x86 assembly (clang, -O0):
<gettimerexp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x4,%edx
call   1030 <read@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
je     1142 <gettimerexp+0x32>
jmp    116b <gettimerexp+0x5b>
mov    0x2e97(%rip),%rax
mov    (%rax),%rax
mov    0x2e85(%rip),%rcx
cmp    (%rcx),%rax
je     1161 <gettimerexp+0x51>
jmp    116b <gettimerexp+0x5b>
jmp    1166 <gettimerexp+0x56>
jmp    111f <gettimerexp+0xf>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettimerexp>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2ebd(%rip),%r14
mov    0x2eae(%rip),%r15
nopw   0x0(%rax,%rax,1)
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x4,%edx
call   1030 <read@plt>
cmp    $0xffffffff,%eax
jne    114c <gettimerexp+0x3c>
mov    (%r14),%rcx
cmp    (%r15),%rcx
je     1130 <gettimerexp+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
define i32 @gettimerexp(i32 %0, i32* nocapture %1) {
br label %3
3: ; preds = %6, %2
%4 = tail call i32 @read(i32 %0, i32* %1, i32 4)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = load i64, i64* @errno
%8 = load i64, i64* @EINTR
%9 = icmp eq i64 %7, %8
br i1 %9, label %3, label %10
10: ; preds = %6, %3
ret i32 %4
}
/* Variables and functions */
float exp(float);
float log(float);
float db2lin_alt2(float db) {
  if (db <= -200.0f)
    return 0.0f;
  else
    return exp(db / 20 * log(10.0f));
}


x86 assembly (clang, -O0):
<db2lin_alt2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  0xecb(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     114c <db2lin_alt2+0x2c>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1185 <db2lin_alt2+0x65>
movss  -0x8(%rbp),%xmm0
movss  0xeaf(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xe9a(%rip),%xmm0
call   1040 <log@plt>
movaps %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
mulss  %xmm1,%xmm0
call   1030 <exp@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<db2lin_alt2>:
movss  0xee8(%rip),%xmm1
ucomiss %xmm0,%xmm1
jae    1132 <db2lin_alt2+0x22>
divss  0xedf(%rip),%xmm0
mulss  0xedb(%rip),%xmm0
jmp    1030 <exp@plt>
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @db2lin_alt2(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp ole float %4, -2.000000e+02
br i1 %5, label %6, label %7
6: ; preds = %1
store float 0.000000e+00, float* %2
br label %13
7: ; preds = %1
%8 = load float, float* %3
%9 = fdiv float %8, 2.000000e+01
%10 = call float @log(float 1.000000e+01)
%11 = fmul float %9, %10
%12 = call float @exp(float %11)
store float %12, float* %2
br label %13
13: ; preds = %7, %6
%14 = load float, float* %2
ret float %14
}

LLVM IR (-O2):
define float @db2lin_alt2(float %0) {
%2 = fcmp ugt float %0, -2.000000e+02
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = fdiv float %0, 2.000000e+01
%5 = fmul float %4, 0x40026BB1C0000000
%6 = tail call float @exp(float %5)
br label %7
7: ; preds = %1, %3
%8 = phi float [ %6, %3 ], [ 0.000000e+00, %1 ]
ret float %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void sync(void) { printf("sync\n"); }


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

x86 assembly (clang, -O2):
<sync>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

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

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
FILE *open_log_file(char *file_name) {
  FILE *fp;
  fp = fopen(file_name, "a+");
  return fp;
}


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"a+\00"
define i32* @open_log_file(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %5, i32** %3
%6 = load i32*, i32** %3
ret i32* %6
}

LLVM IR (-O2):
@.str = [3 x i8] c"a+\00"
define noalias i32* @open_log_file(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ padding(int);
int /*<<< orphan*/ rm(char *);
int /*<<< orphan*/ sm(char *);
void decscnm(int flag) {
  if (flag)
    sm("?5");
  else
    rm("?5");
  padding(200);
}


x86 assembly (clang, -O0):
<decscnm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1156 <decscnm+0x26>
lea    0xeb4(%rip),%rdi
call   1050 <sm@plt>
jmp    1162 <decscnm+0x32>
lea    0xea3(%rip),%rdi
call   1030 <rm@plt>
mov    $0xc8,%edi
call   1040 <padding@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decscnm>:
push   %rax
test   %edi,%edi
je     1143 <decscnm+0x13>
lea    0xec4(%rip),%rdi
call   1050 <sm@plt>
jmp    114f <decscnm+0x1f>
lea    0xeb6(%rip),%rdi
call   1030 <rm@plt>
mov    $0xc8,%edi
pop    %rax
jmp    1040 <padding@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"?5\00"
define void @decscnm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @sm(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %1
%8 = call i32 @rm(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
%10 = call i32 @padding(i32 200)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"?5\00"
define void @decscnm(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @sm(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %1
%6 = tail call i32 @rm(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
%8 = tail call i32 @padding(i32 200)
ret void
}
/* Type definitions */
struct libkeccak_hmac_state {
  int dummy;
};

/* Variables and functions */
size_t libkeccak_hmac_marshal(struct libkeccak_hmac_state const *,
                              int /*<<< orphan*/ *);
__attribute__((__deprecated__("Use libkeccak_hmac_marshal(state, NULL) instead "
                              "of libkeccak_hmac_marshal_size(state)"))) size_t
libkeccak_hmac_marshal_size(const struct libkeccak_hmac_state *restrict state) {
  return libkeccak_hmac_marshal(state, NULL);
}


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

x86 assembly (clang, -O2):
<libkeccak_hmac_marshal_size>:
xor    %esi,%esi
jmp    1030 <libkeccak_hmac_marshal@plt>

LLVM IR (-O0):
%struct.libkeccak_hmac_state = type { i32 }
define i64 @libkeccak_hmac_marshal_size(%struct.libkeccak_hmac_state* noalias %0) {
%2 = alloca %struct.libkeccak_hmac_state*
store %struct.libkeccak_hmac_state* %0, %struct.libkeccak_hmac_state** %2
%3 = load %struct.libkeccak_hmac_state*, %struct.libkeccak_hmac_state** %2
%4 = call i64 @libkeccak_hmac_marshal(%struct.libkeccak_hmac_state* %3, i32* null)
ret i64 %4
}

LLVM IR (-O2):
%struct.libkeccak_hmac_state = type { i32 }
define i64 @libkeccak_hmac_marshal_size(%struct.libkeccak_hmac_state* noalias %0) {
%2 = tail call i64 @libkeccak_hmac_marshal(%struct.libkeccak_hmac_state* %0, i32* null)
ret i64 %2
}
floorFunction(float x) { return (int)x; }


x86 assembly (clang, -O0):
<floorFunction>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
cvttss2si -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<floorFunction>:
cvttss2si %xmm0,%eax
ret

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

LLVM IR (-O2):
define i32 @floorFunction(float %0) {
%2 = fptosi float %0 to i32
ret i32 %2
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ memcpy(char *, char *, int);
int main() {
  char *foo;
  char *bar;
  foo = (char *)malloc(10);
  bar = (char *)malloc(10);
  bar[2] = 'z';
  memcpy(foo + 1, bar + 1, 9);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xa,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    $0xa,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movb   $0x7a,0x2(%rax)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    -0x18(%rbp),%rsi
add    $0x1,%rsi
mov    $0x9,%edx
call   1030 <memcpy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xa,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    $0xa,%edi
call   1040 <malloc@plt>
movb   $0x7a,0x2(%rax)
add    $0x1,%rbx
lea    0x1(%rax),%rsi
mov    %rbx,%rdi
mov    $0x9,%edx
call   1030 <memcpy@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i32 0, i32* %1
%4 = call i64 @malloc(i32 10)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %2
%6 = call i64 @malloc(i32 10)
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 2
store i8 122, i8* %9
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i64 1
%14 = call i32 @memcpy(i8* %11, i8* %13, i32 9)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 10)
%2 = inttoptr i64 %1 to i8*
%3 = tail call i64 @malloc(i32 10)
%4 = inttoptr i64 %3 to i8*
%5 = getelementptr inbounds i8, i8* %4, i64 2
store i8 122, i8* %5
%6 = getelementptr inbounds i8, i8* %2, i64 1
%7 = getelementptr inbounds i8, i8* %4, i64 1
%8 = tail call i32 @memcpy(i8* %6, i8* %7, i32 9)
ret i32 0
}
void decode_path(name) char *name;
{
  for (; *name; name++) {
    if (*name == '/')
      *name = '/';
  }
}


x86 assembly (clang, -O0):
<decode_path>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1142 <decode_path+0x42>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    112c <decode_path+0x2c>
mov    -0x8(%rbp),%rax
movb   $0x2f,(%rax)
jmp    1131 <decode_path+0x31>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <decode_path+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_path>:
jmp    1117 <decode_path+0x17>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movb   $0x2f,(%rdi)
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0x2f,%al
je     1110 <decode_path+0x10>
test   %al,%al
jne    1113 <decode_path+0x13>
ret

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

LLVM IR (-O2):
define void @decode_path(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
switch i8 %4, label %6 [
i8 0, label %8
i8 47, label %5
]
5: ; preds = %2
store i8 47, i8* %3
br label %6
6: ; preds = %2, %5
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
8: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memmove(char *, char *, unsigned int);
void f2(int size) {
  char src[12] = "helloworld";
  char dest[12];
  memmove(dest, src, (unsigned)size);
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xedc(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x1c(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    -0x4(%rbp),%edx
call   1030 <memmove@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
sub    $0x18,%rsp
mov    %edi,%edx
movabs $0x726f776f6c6c6568,%rax
77 6f 72
mov    %rax,(%rsp)
movl   $0x646c,0x8(%rsp)
lea    0xc(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <memmove@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.f2.src = [12 x i8] c"helloworld\00\00"
define void @f2(i32 %0) {
%2 = alloca i32
%3 = alloca [12 x i8]
%4 = alloca [12 x i8]
store i32 %0, i32* %2
%5 = bitcast [12 x i8]* %3 to i8*
%6 = getelementptr inbounds [12 x i8], [12 x i8]* %4, i64 0, i64 0
%7 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%8 = load i32, i32* %2
%9 = call i32 @memmove(i8* %6, i8* %7, i32 %8)
ret void
}

LLVM IR (-O2):
@__const.f2.src = [12 x i8] c"helloworld\00\00"
define void @f2(i32 %0) {
%2 = alloca [12 x i8]
%3 = alloca [12 x i8]
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%6 = call i32 @memmove(i8* %5, i8* %4, i32 %0)
ret void
}
/* Type definitions */
struct string_expr {
  int dummy;
};
struct object {
  int dummy;
};
struct expr {
  int dummy;
};

/* Variables and functions */
struct object *object_new(int /*<<< orphan*/);
int /*<<< orphan*/ string_expr_class_get();
int /*<<< orphan*/ string_expr_init(struct string_expr *, char const *);
struct expr *string_expr_new(const char *value) {
  struct object *expr = object_new(string_expr_class_get());
  string_expr_init(((struct string_expr *)(expr)), value);
  return ((struct expr *)(expr));
}


x86 assembly (clang, -O0):
<string_expr_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <string_expr_class_get@plt>
mov    %eax,%edi
call   1040 <object_new@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <string_expr_init@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_expr_new>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %eax,%eax
call   1030 <string_expr_class_get@plt>
mov    %eax,%edi
call   1040 <object_new@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1050 <string_expr_init@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.expr = type { i32 }
%struct.object = type { i32 }
%struct.string_expr = type { i32 }
define %struct.expr* @string_expr_new(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.object*
store i8* %0, i8** %2
%4 = call i32 (...) @string_expr_class_get()
%5 = call %struct.object* @object_new(i32 %4)
store %struct.object* %5, %struct.object** %3
%6 = load %struct.object*, %struct.object** %3
%7 = bitcast %struct.object* %6 to %struct.string_expr*
%8 = load i8*, i8** %2
%9 = call i32 @string_expr_init(%struct.string_expr* %7, i8* %8)
%10 = load %struct.object*, %struct.object** %3
%11 = bitcast %struct.object* %10 to %struct.expr*
ret %struct.expr* %11
}

LLVM IR (-O2):
%struct.expr = type { i32 }
%struct.object = type { i32 }
%struct.string_expr = type { i32 }
define %struct.expr* @string_expr_new(i8* %0) {
%2 = tail call i32 (...) @string_expr_class_get()
%3 = tail call %struct.object* @object_new(i32 %2)
%4 = bitcast %struct.object* %3 to %struct.string_expr*
%5 = tail call i32 @string_expr_init(%struct.string_expr* %4, i8* %0)
%6 = bitcast %struct.object* %3 to %struct.expr*
ret %struct.expr* %6
}
/* Variables and functions */
int /*<<< orphan*/ htoi(char *, int);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main(void) {
  char test[12] = "ffffffffffff";
  printf("%ld", htoi(test, 12));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x6666666666666666,%rax
66 66 66
mov    %rax,0x8(%rsp)
movl   $0x66666666,0x10(%rsp)
66
lea    0x8(%rsp),%rdi
mov    $0xc,%esi
call   1040 <htoi@plt>
lea    0xeaf(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.test = [12 x i8] c"ffffffffffff"
@.str = [4 x i8] c"%ld\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [12 x i8]
store i32 0, i32* %1
%3 = bitcast [12 x i8]* %2 to i8*
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%5 = call i32 @htoi(i8* %4, i32 12)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
define i32 @main() {
%1 = alloca [12 x i8]
%2 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%3 = call i32 @htoi(i8* %2, i32 12)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ SIGWINCH;
int _resize_error(char *, int);
int /*<<< orphan*/ getppid();
scalar_t__ kill(int /*<<< orphan*/, int /*<<< orphan*/);
int _resize(void) {
  pid_t pid;
  pid = getppid();
  if (kill(pid, SIGWINCH) != 0)
    return -_resize_error("kill", 1);
  return 0;
}


x86 assembly (clang, -O0):
<_resize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <getppid@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2e9c(%rip),%rax
mov    (%rax),%esi
call   1030 <kill@plt>
cmp    $0x0,%rax
je     117c <_resize+0x4c>
lea    0xe9c(%rip),%rdi
mov    $0x1,%esi
call   1040 <_resize_error@plt>
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1183 <_resize+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_resize>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <getppid@plt>
mov    0x2ea7(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
call   1030 <kill@plt>
test   %rax,%rax
je     1164 <_resize+0x34>
lea    0xeaa(%rip),%rdi
mov    $0x1,%esi
call   1040 <_resize_error@plt>
mov    %eax,%ebx
neg    %ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@SIGWINCH = global i32 0
@.str = [5 x i8] c"kill\00"
define i32 @_resize() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @getppid()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @SIGWINCH
%6 = call i64 @kill(i32 %4, i32 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %0
%9 = call i32 @_resize_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 1)
%10 = sub nsw i32 0, %9
store i32 %10, i32* %1
br label %12
11: ; preds = %0
store i32 0, i32* %1
br label %12
12: ; preds = %11, %8
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@SIGWINCH = global i32 0
@.str = [5 x i8] c"kill\00"
define i32 @_resize() {
%1 = tail call i32 (...) @getppid()
%2 = load i32, i32* @SIGWINCH
%3 = tail call i64 @kill(i32 %1, i32 %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = tail call i32 @_resize_error(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 1)
%7 = sub nsw i32 0, %6
br label %8
8: ; preds = %0, %5
%9 = phi i32 [ %7, %5 ], [ 0, %0 ]
ret i32 %9
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ microtime(struct timeval *);
void do_gettimeofday(struct timeval *tv) { microtime(tv); }


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

x86 assembly (clang, -O2):
<do_gettimeofday>:
jmp    1030 <microtime@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
define void @do_gettimeofday(%struct.timeval* %0) {
%2 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %2
%3 = load %struct.timeval*, %struct.timeval** %2
%4 = call i32 @microtime(%struct.timeval* %3)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define void @do_gettimeofday(%struct.timeval* %0) {
%2 = tail call i32 @microtime(%struct.timeval* %0)
ret void
}
int compf(const void *fp1, const void *fp2) {
  double a = *((double *)fp1);
  double b = *((double *)fp2);
  double diff = a - b;
  if (diff < 0)
    return -1;
  else if (diff > 0)
    return +1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<compf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    114f <compf+0x4f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1174 <compf+0x74>
movsd  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    116d <compf+0x6d>
movl   $0x1,-0x4(%rbp)
jmp    1174 <compf+0x74>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compf>:
movsd  (%rdi),%xmm0
subsd  (%rsi),%xmm0
xorpd  %xmm1,%xmm1
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
seta   %cl
ucomisd %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @compf(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double
%7 = alloca double
%8 = alloca double
store i8* %0, i8** %4
store i8* %1, i8** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to double*
%11 = load double, double* %10
store double %11, double* %6
%12 = load i8*, i8** %5
%13 = bitcast i8* %12 to double*
%14 = load double, double* %13
store double %14, double* %7
%15 = load double, double* %6
%16 = load double, double* %7
%17 = fsub double %15, %16
store double %17, double* %8
%18 = load double, double* %8
%19 = fcmp olt double %18, 0.000000e+00
br i1 %19, label %20, label %21
20: ; preds = %2
store i32 -1, i32* %3
br label %26
21: ; preds = %2
%22 = load double, double* %8
%23 = fcmp ogt double %22, 0.000000e+00
br i1 %23, label %24, label %25
24: ; preds = %21
store i32 1, i32* %3
br label %26
25: ; preds = %21
store i32 0, i32* %3
br label %26
26: ; preds = %25, %24, %20
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @compf(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fsub double %4, %6
%8 = fcmp olt double %7, 0.000000e+00
%9 = fcmp ogt double %7, 0.000000e+00
%10 = zext i1 %9 to i32
%11 = select i1 %8, i32 -1, i32 %10
ret i32 %11
}
/* Variables and functions */
int test_eval2(int /*<<< orphan*/);
int lisp_test3() { return test_eval2(0); }


x86 assembly (clang, -O0):
<lisp_test3>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <test_eval2@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lisp_test3>:
xor    %edi,%edi
jmp    1030 <test_eval2@plt>

LLVM IR (-O0):
define i32 @lisp_test3() {
%1 = call i32 @test_eval2(i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @lisp_test3() {
%1 = tail call i32 @test_eval2(i32 0)
ret i32 %1
}
feq(int x, int y) {
  if (x == y)
    return 13;
  else
    return 140;
}


x86 assembly (clang, -O0):
<feq>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1122 <feq+0x22>
movl   $0xd,-0x4(%rbp)
jmp    1129 <feq+0x29>
movl   $0x8c,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<feq>:
cmp    %esi,%edi
mov    $0xd,%ecx
mov    $0x8c,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @feq(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = select i1 %3, i32 13, i32 140
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ G_Printf(char *);
void G_PrintSpaces(int spaces) {
  int i;
  for (i = 0; i < spaces; i++)
    G_Printf(" ");
}


x86 assembly (clang, -O0):
<G_PrintSpaces>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1148 <G_PrintSpaces+0x38>
lea    0xecb(%rip),%rdi
call   1030 <G_Printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <G_PrintSpaces+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<G_PrintSpaces>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
jle    113d <G_PrintSpaces+0x2d>
mov    %edi,%ebx
lea    0xedf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <G_Printf@plt>
add    $0xffffffff,%ebx
jne    1130 <G_PrintSpaces+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
define void @G_PrintSpaces(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %10, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = call i32 @G_Printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
br label %4
13: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
define void @G_PrintSpaces(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @G_Printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _printpkt(char *, int, int);
int /*<<< orphan*/ monLock();
int /*<<< orphan*/ monUnlock();
void mon_printpkt(char *buf, int size, int incoming) {
  monLock();
  _printpkt(buf, size, incoming);
  monUnlock();
}


x86 assembly (clang, -O0):
<mon_printpkt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    $0x0,%al
call   1030 <monLock@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1050 <_printpkt@plt>
mov    $0x0,%al
call   1040 <monUnlock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mon_printpkt>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <monLock@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1050 <_printpkt@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <monUnlock@plt>

LLVM IR (-O0):
define void @mon_printpkt(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = call i32 (...) @monLock()
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @_printpkt(i8* %8, i32 %9, i32 %10)
%12 = call i32 (...) @monUnlock()
ret void
}

LLVM IR (-O2):
define void @mon_printpkt(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 (...) @monLock()
%5 = tail call i32 @_printpkt(i8* %0, i32 %1, i32 %2)
%6 = tail call i32 (...) @monUnlock()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
void *tfn3(void *arg) {
  printf("the third, sleep 10 secconds\n");
  sleep(5);
  return NULL;
}


x86 assembly (clang, -O0):
<tfn3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    $0x5,%edi
call   1040 <sleep@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tfn3>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x5,%edi
call   1040 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"the third, sleep 10 secconds\0A\00"
define i8* @tfn3(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @sleep(i32 5)
ret i8* null
}

LLVM IR (-O2):
@str = [29 x i8] c"the third, sleep 10 secconds\00"
define noalias i8* @tfn3(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @sleep(i32 5)
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ IsValid();
char *GetTitle() {
  if (!IsValid())
    return "IsValid failed.";
}


x86 assembly (clang, -O0):
<GetTitle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <IsValid@plt>
cmp    $0x0,%eax
jne    1133 <GetTitle+0x23>
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetTitle>:
push   %rax
xor    %eax,%eax
call   1030 <IsValid@plt>
lea    0xee1(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"IsValid failed.\00"
define i8* @GetTitle() {
%1 = alloca i8*
%2 = call i32 (...) @IsValid()
%3 = icmp ne i32 %2, 0
br i1 %3, label %5, label %4
4: ; preds = %0
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8** %1
br label %5
5: ; preds = %4, %0
%6 = load i8*, i8** %1
ret i8* %6
}

LLVM IR (-O2):
@.str = [16 x i8] c"IsValid failed.\00"
define i8* @GetTitle() {
%1 = tail call i32 (...) @IsValid()
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int uint16_t;
struct p4_set_default_action {
  int dummy;
};

/* Variables and functions */
struct p4_set_default_action *unpack_p4_set_default_action(char *buffer,
                                                           uint16_t offset) {
  return (struct p4_set_default_action *)(buffer + offset);
}


x86 assembly (clang, -O0):
<unpack_p4_set_default_action>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpack_p4_set_default_action>:
movslq %esi,%rax
add    %rdi,%rax
ret

LLVM IR (-O0):
%struct.p4_set_default_action = type { i32 }
define %struct.p4_set_default_action* @unpack_p4_set_default_action(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = bitcast i8* %8 to %struct.p4_set_default_action*
ret %struct.p4_set_default_action* %9
}

LLVM IR (-O2):
%struct.p4_set_default_action = type { i32 }
define %struct.p4_set_default_action* @unpack_p4_set_default_action(i8* readnone %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = bitcast i8* %4 to %struct.p4_set_default_action*
ret %struct.p4_set_default_action* %5
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int solve_Laurent_system(int *root_count, int silent, int nbtasks) {
  int fail;
  int b[2];
  double *c;
  b[0] = silent;
  b[1] = nbtasks;
  fail = _ada_use_c2phc(75, root_count, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<solve_Laurent_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    $0x4b,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solve_Laurent_system>:
push   %rax
mov    %rdi,%rax
mov    %esi,(%rsp)
mov    %edx,0x4(%rsp)
mov    %rsp,%rdx
mov    $0x4b,%edi
mov    %rax,%rsi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @solve_Laurent_system(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca [2 x i32]
%9 = alloca double*
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%10 = load i32, i32* %5
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 0
store i32 %10, i32* %11
%12 = load i32, i32* %6
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 1
store i32 %12, i32* %13
%14 = load i32*, i32** %4
%15 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 0
%16 = load double*, double** %9
%17 = call i32 @_ada_use_c2phc(i32 75, i32* %14, i32* %15, double* %16)
store i32 %17, i32* %7
%18 = load i32, i32* %7
ret i32 %18
}

LLVM IR (-O2):
define i32 @solve_Laurent_system(i32* %0, i32 %1, i32 %2) {
%4 = alloca [2 x i32]
%5 = bitcast [2 x i32]* %4 to i8*
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
store i32 %1, i32* %6
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
store i32 %2, i32* %7
%8 = call i32 @_ada_use_c2phc(i32 75, i32* %0, i32* %6, double* undef)
ret i32 %8
}
/* Variables and functions */
scalar_t__ ENOENT;
scalar_t__ errno;
int rmdir(char const *);
int resctrl_mon_rmdir(const char *path) {
  ;
  if (rmdir(path) == -1 && errno != ENOENT)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<resctrl_mon_rmdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <rmdir@plt>
cmp    $0xffffffff,%eax
jne    1154 <resctrl_mon_rmdir+0x44>
mov    0x2eab(%rip),%rax
mov    (%rax),%rax
mov    0x2e91(%rip),%rcx
cmp    (%rcx),%rax
je     1154 <resctrl_mon_rmdir+0x44>
movl   $0x1,-0x4(%rbp)
jmp    115b <resctrl_mon_rmdir+0x4b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<resctrl_mon_rmdir>:
push   %rax
call   1030 <rmdir@plt>
cmp    $0xffffffff,%eax
jne    1136 <resctrl_mon_rmdir+0x26>
mov    0x2ebe(%rip),%rax
mov    (%rax),%rcx
mov    0x2ea4(%rip),%rdx
mov    $0x1,%eax
cmp    (%rdx),%rcx
jne    1138 <resctrl_mon_rmdir+0x28>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@errno = global i64 0
@ENOENT = global i64 0
define i32 @resctrl_mon_rmdir(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @rmdir(i8* %4)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i64, i64* @errno
%9 = load i64, i64* @ENOENT
%10 = icmp ne i64 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %13
12: ; preds = %7, %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@errno = global i64 0
@ENOENT = global i64 0
define i32 @resctrl_mon_rmdir(i8* nocapture %0) {
%2 = tail call i32 @rmdir(i8* %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i64, i64* @errno
%6 = load i64, i64* @ENOENT
%7 = icmp eq i64 %5, %6
br i1 %7, label %8, label %9
8: ; preds = %4, %1
br label %9
9: ; preds = %4, %8
%10 = phi i32 [ 0, %8 ], [ 1, %4 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ external_func(int **);
int const_local_no_abduce(int *p) {
  external_func(&p);
  return p ? *p : 0;
}


x86 assembly (clang, -O0):
<const_local_no_abduce>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <external_func@plt>
cmpq   $0x0,-0x8(%rbp)
je     113e <const_local_no_abduce+0x2e>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
jmp    1148 <const_local_no_abduce+0x38>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    1148 <const_local_no_abduce+0x38>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<const_local_no_abduce>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rdi
call   1030 <external_func@plt>
mov    (%rsp),%rax
test   %rax,%rax
je     112a <const_local_no_abduce+0x1a>
mov    (%rax),%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @const_local_no_abduce(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 @external_func(i32** %2)
%4 = load i32*, i32** %2
%5 = icmp eq i32* %4, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = load i32, i32* %4
br label %8
8: ; preds = %1, %6
%9 = phi i32 [ %7, %6 ], [ 0, %1 ]
ret i32 %9
}
/* Variables and functions */
float noise1(float);
int f_inoiseF(void *initdata, int argc, void **argv) {
  float *result = (float *)argv[0];
  float *x = (float *)argv[1];
  *result = (1.0f + noise1(*x)) * 0.5f;
  return 0;
}


x86 assembly (clang, -O0):
<f_inoiseF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm0
call   1030 <noise1@plt>
movaps %xmm0,%xmm1
movss  0xeb2(%rip),%xmm0
addss  %xmm1,%xmm0
movss  0xea2(%rip),%xmm1
mulss  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_inoiseF>:
push   %rbx
mov    (%rdx),%rbx
mov    0x8(%rdx),%rax
movss  (%rax),%xmm0
call   1030 <noise1@plt>
addss  0xed7(%rip),%xmm0
mulss  0xed3(%rip),%xmm0
movss  %xmm0,(%rbx)
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @f_inoiseF(i8* %0, i32 %1, i8** %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8**
%7 = alloca float*
%8 = alloca float*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
%9 = load i8**, i8*** %6
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = bitcast i8* %11 to float*
store float* %12, float** %7
%13 = load i8**, i8*** %6
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = bitcast i8* %15 to float*
store float* %16, float** %8
%17 = load float*, float** %8
%18 = load float, float* %17
%19 = call float @noise1(float %18)
%20 = fadd float 1.000000e+00, %19
%21 = fmul float %20, 5.000000e-01
%22 = load float*, float** %7
store float %21, float* %22
ret i32 0
}

LLVM IR (-O2):
define i32 @f_inoiseF(i8* nocapture readnone %0, i32 %1, i8** nocapture %2) {
%4 = bitcast i8** %2 to float**
%5 = load float*, float** %4
%6 = getelementptr inbounds i8*, i8** %2, i64 1
%7 = bitcast i8** %6 to float**
%8 = load float*, float** %7
%9 = load float, float* %8
%10 = tail call float @noise1(float %9)
%11 = fadd float %10, 1.000000e+00
%12 = fmul float %11, 5.000000e-01
store float %12, float* %5
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
scalar_t__ strncmp(char *, char const *, int /*<<< orphan*/);
int string_matches_value(char *str, const char *value) {
  if (str == NULL || value == NULL)
    return 0;
  return strncmp(str, value, strlen(value)) == 0;
}


x86 assembly (clang, -O0):
<string_matches_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1146 <string_matches_value+0x26>
cmpq   $0x0,-0x18(%rbp)
jne    1152 <string_matches_value+0x32>
movl   $0x0,-0x4(%rbp)
jmp    1189 <string_matches_value+0x69>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_matches_value>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
test   %rdi,%rdi
je     1156 <string_matches_value+0x36>
mov    %rsi,%rbx
test   %rsi,%rsi
je     1156 <string_matches_value+0x36>
mov    %rdi,%r14
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @string_matches_value(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = icmp eq i8* %6, null
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i8*, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %12
11: ; preds = %8, %2
store i32 0, i32* %3
br label %20
12: ; preds = %8
%13 = load i8*, i8** %4
%14 = load i8*, i8** %5
%15 = load i8*, i8** %5
%16 = call i32 @strlen(i8* %15)
%17 = call i64 @strncmp(i8* %13, i8* %14, i32 %16)
%18 = icmp eq i64 %17, 0
%19 = zext i1 %18 to i32
store i32 %19, i32* %3
br label %20
20: ; preds = %12, %11
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @string_matches_value(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
%4 = icmp eq i8* %1, null
%5 = or i1 %3, %4
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = tail call i32 @strlen(i8* %1)
%8 = tail call i64 @strncmp(i8* %0, i8* %1, i32 %7)
%9 = icmp eq i64 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %2, %6
%12 = phi i32 [ %10, %6 ], [ 0, %2 ]
ret i32 %12
}