xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ rm_rf_physical_and_free(char *);
void rm_rf_physical_and_freep(char **p) {
  if (*p)
    rm_rf_physical_and_free(*p);
}


x86 assembly (clang, -O0):
<rm_rf_physical_and_freep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1136 <rm_rf_physical_and_freep+0x26>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <rm_rf_physical_and_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rm_rf_physical_and_freep>:
mov    (%rdi),%rdi
test   %rdi,%rdi
je     111d <rm_rf_physical_and_freep+0xd>
jmp    1030 <rm_rf_physical_and_free@plt>
ret

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

LLVM IR (-O2):
define void @rm_rf_physical_and_freep(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @rm_rf_physical_and_free(i8* %2)
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
unsigned short isdigit(char c) { return (c >= '0' && c <= '9'); }


x86 assembly (clang, -O0):
<isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <isdigit+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdigit>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define zeroext i16 @isdigit(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 57
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
%13 = trunc i32 %12 to i16
ret i16 %13
}

LLVM IR (-O2):
define zeroext i16 @isdigit(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i16
ret i16 %4
}
int __attribute__((no)) foo() {
  int i, res = 0;
  for (i = 0; i < 50; i++) {
    if (i >= 25)
      res += i;
  }
  return res;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x32,-0x4(%rbp)
jge    1142 <foo+0x42>
cmpl   $0x19,-0x4(%rbp)
jl     112f <foo+0x2f>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1134 <foo+0x34>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1112 <foo+0x12>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @foo() {
ret i32 925
}
/* Variables and functions */
int /*<<< orphan*/ FD_CLOEXEC;
int /*<<< orphan*/ F_SETFD;
int /*<<< orphan*/ fcntl(int, int /*<<< orphan*/, int /*<<< orphan*/);
int system(char const *);
int safe_system(const char *command) {
  int fd;
  for (fd = 3; fd < 256; fd++)
    fcntl(fd, F_SETFD, FD_CLOEXEC);
  return system(command);
}


x86 assembly (clang, -O0):
<safe_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
cmpl   $0x100,-0xc(%rbp)
jge    1168 <safe_system+0x48>
mov    -0xc(%rbp),%edi
mov    0x2e96(%rip),%rax
mov    (%rax),%esi
mov    0x2e85(%rip),%rax
mov    (%rax),%edx
call   1030 <fcntl@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <safe_system+0x13>
mov    -0x8(%rbp),%rdi
call   1040 <system@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_system>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x3,%ebp
mov    0x2eaa(%rip),%r15
mov    0x2e9b(%rip),%rbx
nopl   (%rax)
mov    (%r15),%esi
mov    (%rbx),%edx
mov    %ebp,%edi
call   1030 <fcntl@plt>
add    $0x1,%ebp
cmp    $0x100,%ebp
jne    1140 <safe_system+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <system@plt>

LLVM IR (-O0):
@F_SETFD = global i32 0
@FD_CLOEXEC = global i32 0
define i32 @safe_system(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 3, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 256
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i32, i32* %3
%9 = load i32, i32* @F_SETFD
%10 = load i32, i32* @FD_CLOEXEC
%11 = call i32 @fcntl(i32 %8, i32 %9, i32 %10)
br label %12
12: ; preds = %7
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
%16 = load i8*, i8** %2
%17 = call i32 @system(i8* %16)
ret i32 %17
}

LLVM IR (-O2):
@F_SETFD = global i32 0
@FD_CLOEXEC = global i32 0
define i32 @safe_system(i8* nocapture %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ 3, %1 ], [ %7, %2 ]
%4 = load i32, i32* @F_SETFD
%5 = load i32, i32* @FD_CLOEXEC
%6 = tail call i32 @fcntl(i32 %3, i32 %4, i32 %5)
%7 = add nuw nsw i32 %3, 1
%8 = icmp eq i32 %7, 256
br i1 %8, label %9, label %2
9: ; preds = %2
%10 = tail call i32 @system(i8* %0)
ret i32 %10
}
main() {
  char *s;
  char c;
  s = (char *)0;
  c = *s;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3_vfs;

/* Variables and functions */
void *wrap_DlOpen(sqlite3_vfs *pVfs, const char *zPath) { return 0; }


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

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

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

LLVM IR (-O2):
define noalias i8* @wrap_DlOpen(i32* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* null
}
void rsn_preauth_finished(struct hostapd_data *hapd, struct sta_info *sta,
                          int success) {}


x86 assembly (clang, -O0):
<rsn_preauth_finished>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.hostapd_data = type opaque
%struct.sta_info = type opaque
define void @rsn_preauth_finished(%struct.hostapd_data* %0, %struct.sta_info* %1, i32 %2) {
%4 = alloca %struct.hostapd_data*
%5 = alloca %struct.sta_info*
%6 = alloca i32
store %struct.hostapd_data* %0, %struct.hostapd_data** %4
store %struct.sta_info* %1, %struct.sta_info** %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
%struct.hostapd_data = type opaque
%struct.sta_info = type opaque
define void @rsn_preauth_finished(%struct.hostapd_data* nocapture %0, %struct.sta_info* nocapture %1, i32 %2) {
ret void
}
/* Variables and functions */
char *des_fcrypt(char const *, char const *, char *);
char *des_crypt(const char *buf, const char *salt) {
  static char buff[14];
  return (des_fcrypt(buf, salt, buff));
}


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

x86 assembly (clang, -O2):
<des_crypt>:
lea    0x2f12(%rip),%rdx
jmp    1030 <des_fcrypt@plt>

LLVM IR (-O0):
@des_crypt.buff = internal global [14 x i8] zeroinitializer
define i8* @des_crypt(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i8* @des_fcrypt(i8* %5, i8* %6, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @des_crypt.buff, i64 0, i64 0))
ret i8* %7
}

LLVM IR (-O2):
@des_crypt.buff = internal global [14 x i8] zeroinitializer
define i8* @des_crypt(i8* %0, i8* %1) {
%3 = tail call i8* @des_fcrypt(i8* %0, i8* %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @des_crypt.buff, i64 0, i64 0))
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ tst_case1();
int /*<<< orphan*/ tst_case2();
int /*<<< orphan*/ tst_case3();
int /*<<< orphan*/ tst_case4();
int /*<<< orphan*/ tst_case5();
void run_tests() {
  tst_case1();
  tst_case2();
  tst_case3();
  tst_case4();
  tst_case5();
}


x86 assembly (clang, -O0):
<run_tests>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <tst_case1@plt>
mov    $0x0,%al
call   1030 <tst_case2@plt>
mov    $0x0,%al
call   1070 <tst_case3@plt>
mov    $0x0,%al
call   1040 <tst_case4@plt>
mov    $0x0,%al
call   1050 <tst_case5@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_tests>:
push   %rax
xor    %eax,%eax
call   1060 <tst_case1@plt>
xor    %eax,%eax
call   1030 <tst_case2@plt>
xor    %eax,%eax
call   1070 <tst_case3@plt>
xor    %eax,%eax
call   1040 <tst_case4@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <tst_case5@plt>

LLVM IR (-O0):
define void @run_tests() {
%1 = call i32 (...) @tst_case1()
%2 = call i32 (...) @tst_case2()
%3 = call i32 (...) @tst_case3()
%4 = call i32 (...) @tst_case4()
%5 = call i32 (...) @tst_case5()
ret void
}

LLVM IR (-O2):
define void @run_tests() {
%1 = tail call i32 (...) @tst_case1()
%2 = tail call i32 (...) @tst_case2()
%3 = tail call i32 (...) @tst_case3()
%4 = tail call i32 (...) @tst_case4()
%5 = tail call i32 (...) @tst_case5()
ret void
}
void RTLockValidatorClassFindForSrcPos(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLockValidatorClassFindForSrcPos() {
ret void
}
/* Variables and functions */
int bitcount(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", bitcount(6));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @bitcount(i32 6)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *, char);
void stringPushBackChar(char *str, char c) { sprintf(str, "%s %c", str, c); }


x86 assembly (clang, -O0):
<stringPushBackChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xecf(%rip),%rsi
movsbl -0x9(%rbp),%ecx
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stringPushBackChar>:
mov    %esi,%ecx
lea    0xee7(%rip),%rsi
mov    %rdi,%rdx
jmp    1030 <sprintf@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"%s %c\00"
define void @stringPushBackChar(i8* %0, i8 signext %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0, i8 signext %1)
ret void
}
int get_utf8_len(const unsigned char *s) {
  int i = 0, j = 0;
  while (s[i]) {
    if ((s[i] & 0xc0) != 0x80)
      j++;
    i++;
  }
  return j;
}


x86 assembly (clang, -O0):
<get_utf8_len>:
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
cmpb   $0x0,(%rax,%rcx,1)
je     115b <get_utf8_len+0x5b>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
and    $0xc0,%eax
cmp    $0x80,%eax
je     114d <get_utf8_len+0x4d>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <get_utf8_len+0x16>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_utf8_len>:
mov    (%rdi),%cl
test   %cl,%cl
je     1129 <get_utf8_len+0x29>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
and    $0xc0,%cl
xor    %edx,%edx
cmp    $0x80,%cl
setne  %dl
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <get_utf8_len+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @get_utf8_len(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 = %24, %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 = icmp ne i8 %10, 0
br i1 %11, label %12, label %27
12: ; preds = %5
%13 = load i8*, i8** %2
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = and i32 %18, 192
%20 = icmp ne i32 %19, 128
br i1 %20, label %21, label %24
21: ; preds = %12
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %24
24: ; preds = %21, %12
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 1
store i32 %26, i32* %3
br label %5
27: ; preds = %5
%28 = load i32, i32* %4
ret i32 %28
}

LLVM IR (-O2):
define i32 @get_utf8_len(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %12, %4 ], [ 0, %1 ]
%6 = phi i8 [ %14, %4 ], [ %2, %1 ]
%7 = phi i32 [ %11, %4 ], [ 0, %1 ]
%8 = and i8 %6, -64
%9 = icmp ne i8 %8, -128
%10 = zext i1 %9 to i32
%11 = add nuw nsw i32 %7, %10
%12 = add nuw nsw i64 %5, 1
%13 = getelementptr inbounds i8, i8* %0, i64 %12
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %4
16: ; preds = %4, %1
%17 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %17
}
/* Variables and functions */
double pow(double, double);
double math__Float__pow(double self, double p0) {
  double var;
  double var1;
  var1 = pow(self, p0);
  var = var1;
  goto RET_LABEL;
RET_LABEL:;
  return var;
}


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

x86 assembly (clang, -O2):
<math__Float__pow>:
jmp    1030 <pow@plt>

LLVM IR (-O0):
define double @math__Float__pow(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* %4
%9 = call double @pow(double %7, double %8)
store double %9, double* %6
%10 = load double, double* %6
store double %10, double* %5
br label %11
11: ; preds = %2
%12 = load double, double* %5
ret double %12
}

LLVM IR (-O2):
define double @math__Float__pow(double %0, double %1) {
%3 = tail call double @pow(double %0, double %1)
ret double %3
}
int found_in_mod1(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @found_in_mod1() {
ret i32 1
}
/* Variables and functions */
char *getenv(char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char *cmd = "ls";
  printf("USER: %s\n", getenv("USER"));
}


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

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

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

LLVM IR (-O2):
@.str.1 = [10 x i8] c"USER: %s\0A\00"
@.str.2 = [5 x i8] c"USER\00"
define i32 @main() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* %1)
ret i32 0
}
int gettimeofday(struct timeval *tv, struct timezone *tz) {
  puts("# ");
  puts(__FUNCTION__);
  puts("()\n");
  delay(100000000);
  (void)(tv);
  (void)(tz);
  return -1;
}


x86 assembly (clang, -O0):
<gettimeofday>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
mov    $0x0,%al
call   1040 <delay@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettimeofday>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
xor    %eax,%eax
call   1040 <delay@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type opaque
%struct.timezone = type opaque
@.str = [3 x i8] c"# \00"
@__FUNCTION__.gettimeofday = [13 x i8] c"gettimeofday\00"
@.str.1 = [4 x i8] c"()\0A\00"
define i32 @gettimeofday(%struct.timeval* %0, %struct.timezone* %1) {
%3 = alloca %struct.timeval*
%4 = alloca %struct.timezone*
store %struct.timeval* %0, %struct.timeval** %3
store %struct.timezone* %1, %struct.timezone** %4
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.gettimeofday, i64 0, i64 0))
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
%9 = load %struct.timeval*, %struct.timeval** %3
%10 = load %struct.timezone*, %struct.timezone** %4
ret i32 -1
}

LLVM IR (-O2):
%struct.timeval = type opaque
%struct.timezone = type opaque
@.str = [3 x i8] c"# \00"
@__FUNCTION__.gettimeofday = [13 x i8] c"gettimeofday\00"
@.str.1 = [4 x i8] c"()\0A\00"
define i32 @gettimeofday(%struct.timeval* nocapture readnone %0, %struct.timezone* nocapture readnone %1) {
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.gettimeofday, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
FILE *open_fastq(char *filename) {
  FILE *fd1 = fopen(filename, "r");
  if (fd1 == NULL) {
    fprintf(stderr, "Unable to open %s\n", filename);
    exit(1);
  }
  return (fd1);
}


x86 assembly (clang, -O0):
<open_fastq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    117e <open_fastq+0x4e>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe93(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_fastq>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1147 <open_fastq+0x17>
pop    %rbx
ret
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
lea    0xeab(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.1 = [19 x i8] c"Unable to open %s\0A\00"
define i32* @open_fastq(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %2
%11 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %10)
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %1
%14 = load i32*, i32** %3
ret i32* %14
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.1 = [19 x i8] c"Unable to open %s\0A\00"
define noalias i32* @open_fastq(i8* %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret i32* %2
}
int nfs_inode_return_delegation(struct inode *inode) { return 0; }


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

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

LLVM IR (-O0):
%struct.inode = type opaque
define i32 @nfs_inode_return_delegation(%struct.inode* %0) {
%2 = alloca %struct.inode*
store %struct.inode* %0, %struct.inode** %2
ret i32 0
}

LLVM IR (-O2):
%struct.inode = type opaque
define i32 @nfs_inode_return_delegation(%struct.inode* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
long double scalblnl(long double, long);
long double test8l(long double x, long exp) { return scalblnl(x, exp); }


x86 assembly (clang, -O0):
<test8l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %rdi,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    -0x18(%rbp),%rdi
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <scalblnl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test8l>:
jmp    1030 <scalblnl@plt>

LLVM IR (-O0):
define x86_fp80 @test8l(x86_fp80 %0, i64 %1) {
%3 = alloca x86_fp80
%4 = alloca i64
store x86_fp80 %0, x86_fp80* %3
store i64 %1, i64* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load i64, i64* %4
%7 = call x86_fp80 @scalblnl(x86_fp80 %5, i64 %6)
ret x86_fp80 %7
}

LLVM IR (-O2):
define x86_fp80 @test8l(x86_fp80 %0, i64 %1) {
%3 = tail call x86_fp80 @scalblnl(x86_fp80 %0, i64 %1)
ret x86_fp80 %3
}
void rop3_39_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = T ^ S;
  stk3 = ~stk3;
  stk2 = *D | stk3;
  stk1 = S ^ stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_39_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0xd(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_39_1_0>:
xor    %esi,%edx
not    %dl
mov    (%rdi),%al
or     %al,%dl
xor    %dl,%al
and    %sil,%al
xor    %dl,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_39_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %6
%11 = zext i8 %10 to i32
%12 = load i8, i8* %5
%13 = zext i8 %12 to i32
%14 = xor i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %9
%16 = load i8, i8* %9
%17 = zext i8 %16 to i32
%18 = xor i32 %17, -1
%19 = trunc i32 %18 to i8
store i8 %19, i8* %9
%20 = load i8*, i8** %4
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = load i8, i8* %9
%24 = zext i8 %23 to i32
%25 = or i32 %22, %24
%26 = trunc i32 %25 to i8
store i8 %26, i8* %8
%27 = load i8, i8* %5
%28 = zext i8 %27 to i32
%29 = load i8, i8* %8
%30 = zext i8 %29 to i32
%31 = xor i32 %28, %30
%32 = trunc i32 %31 to i8
store i8 %32, i8* %7
%33 = load i8, i8* %7
%34 = zext i8 %33 to i32
%35 = load i8, i8* %5
%36 = zext i8 %35 to i32
%37 = xor i32 %36, -1
%38 = and i32 %34, %37
%39 = load i8*, i8** %4
%40 = load i8, i8* %39
%41 = zext i8 %40 to i32
%42 = load i8, i8* %5
%43 = zext i8 %42 to i32
%44 = and i32 %41, %43
%45 = or i32 %38, %44
%46 = trunc i32 %45 to i8
%47 = load i8*, i8** %4
store i8 %46, i8* %47
ret void
}

LLVM IR (-O2):
define void @rop3_39_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %1, %2
%5 = xor i8 %4, -1
%6 = load i8, i8* %0
%7 = or i8 %6, %5
%8 = xor i8 %1, -1
%9 = and i8 %7, %8
%10 = and i8 %6, %1
%11 = or i8 %9, %10
store i8 %11, i8* %0
ret void
}
/* Type definitions */
struct expression {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ expression_error(struct expression *, char *, char const *);
void verify_output_constraint(struct expression *expr, const char *constraint) {
  switch (*constraint) {
  case '=':
  case '+':
    break;
  default:
    expression_error(
        expr, "output constraint is not an assignment constraint (\"%s\")",
        constraint);
  }
}


x86 assembly (clang, -O0):
<verify_output_constraint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
sub    $0x2b,%eax
je     1149 <verify_output_constraint+0x39>
jmp    1138 <verify_output_constraint+0x28>
mov    -0x14(%rbp),%eax
sub    $0x3d,%eax
jne    114e <verify_output_constraint+0x3e>
jmp    1149 <verify_output_constraint+0x39>
jmp    1162 <verify_output_constraint+0x52>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xea3(%rip),%rsi
call   1030 <expression_error@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verify_output_constraint>:
movsbl (%rsi),%eax
cmp    $0x2b,%eax
je     111d <verify_output_constraint+0xd>
cmp    $0x3d,%eax
jne    111e <verify_output_constraint+0xe>
ret
mov    %rsi,%rdx
lea    0xed8(%rip),%rsi
jmp    1030 <expression_error@plt>

LLVM IR (-O0):
%struct.expression = type { i32 }
@.str = [57 x i8] c"output constraint is not an assignment constraint (\22%s\22)\00"
define void @verify_output_constraint(%struct.expression* %0, i8* %1) {
%3 = alloca %struct.expression*
%4 = alloca i8*
store %struct.expression* %0, %struct.expression** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
switch i32 %7, label %9 [
i32 61, label %8
i32 43, label %8
]
8: ; preds = %2, %2
br label %13
9: ; preds = %2
%10 = load %struct.expression*, %struct.expression** %3
%11 = load i8*, i8** %4
%12 = call i32 @expression_error(%struct.expression* %10, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i8* %11)
br label %13
13: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
%struct.expression = type { i32 }
@.str = [57 x i8] c"output constraint is not an assignment constraint (\22%s\22)\00"
define void @verify_output_constraint(%struct.expression* %0, i8* %1) {
%3 = load i8, i8* %1
%4 = sext i8 %3 to i32
switch i32 %4, label %5 [
i32 61, label %7
i32 43, label %7
]
5: ; preds = %2
%6 = tail call i32 @expression_error(%struct.expression* %0, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %7
7: ; preds = %2, %2, %5
ret void
}
unsigned short from64to16(unsigned long x) {
  union {
    unsigned long ul;
    unsigned int ui[2];
    unsigned short us[4];
  } in_v, tmp_v, out_v;
  in_v.ul = x;
  tmp_v.ul = (unsigned long)in_v.ui[0] + (unsigned long)in_v.ui[1];
  out_v.ul = (unsigned long)tmp_v.us[0] + (unsigned long)tmp_v.us[1] +
             (unsigned long)tmp_v.us[2];
  return out_v.us[0] + out_v.us[1];
}


x86 assembly (clang, -O0):
<from64to16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
movzwl -0x18(%rbp),%eax
movzwl -0x16(%rbp),%ecx
add    %rcx,%rax
movzwl -0x14(%rbp),%ecx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
movzwl -0x20(%rbp),%eax
movzwl -0x1e(%rbp),%ecx
add    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<from64to16>:
mov    %edi,%eax
shr    $0x20,%rdi
add    %rdi,%rax
mov    %rax,%rcx
movzwl %ax,%edx
shr    $0x10,%eax
shr    $0x20,%rcx
add    %rcx,%rdx
add    %rax,%rdx
mov    %rdx,%rax
shr    $0x10,%rax
add    %edx,%eax
ret

LLVM IR (-O0):
%union.anon = type { i64 }
define zeroext i16 @from64to16(i64 %0) {
%2 = alloca i64
%3 = alloca %union.anon
%4 = alloca %union.anon
%5 = alloca %union.anon
store i64 %0, i64* %2
%6 = load i64, i64* %2
%7 = bitcast %union.anon* %3 to i64*
store i64 %6, i64* %7
%8 = bitcast %union.anon* %3 to [2 x i32]*
%9 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 0
%10 = load i32, i32* %9
%11 = zext i32 %10 to i64
%12 = bitcast %union.anon* %3 to [2 x i32]*
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %12, i64 0, i64 1
%14 = load i32, i32* %13
%15 = zext i32 %14 to i64
%16 = add i64 %11, %15
%17 = bitcast %union.anon* %4 to i64*
store i64 %16, i64* %17
%18 = bitcast %union.anon* %4 to [4 x i16]*
%19 = getelementptr inbounds [4 x i16], [4 x i16]* %18, i64 0, i64 0
%20 = load i16, i16* %19
%21 = zext i16 %20 to i64
%22 = bitcast %union.anon* %4 to [4 x i16]*
%23 = getelementptr inbounds [4 x i16], [4 x i16]* %22, i64 0, i64 1
%24 = load i16, i16* %23
%25 = zext i16 %24 to i64
%26 = add i64 %21, %25
%27 = bitcast %union.anon* %4 to [4 x i16]*
%28 = getelementptr inbounds [4 x i16], [4 x i16]* %27, i64 0, i64 2
%29 = load i16, i16* %28
%30 = zext i16 %29 to i64
%31 = add i64 %26, %30
%32 = bitcast %union.anon* %5 to i64*
store i64 %31, i64* %32
%33 = bitcast %union.anon* %5 to [4 x i16]*
%34 = getelementptr inbounds [4 x i16], [4 x i16]* %33, i64 0, i64 0
%35 = load i16, i16* %34
%36 = zext i16 %35 to i32
%37 = bitcast %union.anon* %5 to [4 x i16]*
%38 = getelementptr inbounds [4 x i16], [4 x i16]* %37, i64 0, i64 1
%39 = load i16, i16* %38
%40 = zext i16 %39 to i32
%41 = add nsw i32 %36, %40
%42 = trunc i32 %41 to i16
ret i16 %42
}

LLVM IR (-O2):
define zeroext i16 @from64to16(i64 %0) {
%2 = lshr i64 %0, 32
%3 = and i64 %0, 4294967295
%4 = add nuw nsw i64 %3, %2
%5 = lshr i64 %4, 16
%6 = lshr i64 %4, 32
%7 = and i64 %4, 65535
%8 = and i64 %5, 65535
%9 = add nuw nsw i64 %6, %7
%10 = add nuw nsw i64 %9, %8
%11 = trunc i64 %10 to i16
%12 = lshr i64 %10, 16
%13 = trunc i64 %12 to i16
%14 = add i16 %13, %11
ret i16 %14
}
/* Variables and functions */
int /*<<< orphan*/ Init_Crypto();
void Init_RubyCrypto(void) { Init_Crypto(); }


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

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

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

LLVM IR (-O2):
define void @Init_RubyCrypto() {
%1 = tail call i32 (...) @Init_Crypto()
ret void
}
/* Variables and functions */
int foo(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i;
  i = foo(2);
  printf("Bitte Welt, %n", i);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"Bitte Welt, %n\00"
define i32 @main() {
%1 = tail call i32 @foo(i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ e_abs();
int /*<<< orphan*/ e_ora();
void e_ora_abs() {
  e_abs();
  e_ora();
}


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

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

LLVM IR (-O0):
define void @e_ora_abs() {
%1 = call i32 (...) @e_abs()
%2 = call i32 (...) @e_ora()
ret void
}

LLVM IR (-O2):
define void @e_ora_abs() {
%1 = tail call i32 (...) @e_abs()
%2 = tail call i32 (...) @e_ora()
ret void
}
/* Variables and functions */
char *strdup(char *);
char *ad_get_name(void) { return strdup("Active Directory"); }


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"Active Directory\00"
define i8* @ad_get_name() {
%1 = call i8* @strdup(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [17 x i8] c"Active Directory\00"
define noalias i8* @ad_get_name() {
%1 = tail call dereferenceable_or_null(17) i8* @strdup(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Type definitions */
struct json {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ create_reference(struct json *);
int /*<<< orphan*/ json_add_item_to_array(struct json *, int /*<<< orphan*/);
void json_add_item_reference_to_array(struct json *array, struct json *item) {
  json_add_item_to_array(array, create_reference(item));
}


x86 assembly (clang, -O0):
<json_add_item_reference_to_array>:
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    -0x10(%rbp),%rdi
call   1040 <create_reference@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1030 <json_add_item_to_array@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<json_add_item_reference_to_array>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <create_reference@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <json_add_item_to_array@plt>

LLVM IR (-O0):
%struct.json = type { i32 }
define void @json_add_item_reference_to_array(%struct.json* %0, %struct.json* %1) {
%3 = alloca %struct.json*
%4 = alloca %struct.json*
store %struct.json* %0, %struct.json** %3
store %struct.json* %1, %struct.json** %4
%5 = load %struct.json*, %struct.json** %3
%6 = load %struct.json*, %struct.json** %4
%7 = call i32 @create_reference(%struct.json* %6)
%8 = call i32 @json_add_item_to_array(%struct.json* %5, i32 %7)
ret void
}

LLVM IR (-O2):
%struct.json = type { i32 }
define void @json_add_item_reference_to_array(%struct.json* %0, %struct.json* %1) {
%3 = tail call i32 @create_reference(%struct.json* %1)
%4 = tail call i32 @json_add_item_to_array(%struct.json* %0, i32 %3)
ret void
}
int main() {
  signed short int si;
  si = 0x5555;
  si = 0xAAAA;
  si = 0x0000;
  si = 0xFFFF;
  si = 0x8000;
  si = 0x0001;
  si = 0x7FFF;
  si = 0xFFFE;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movw   $0x5555,-0x6(%rbp)
movw   $0xaaaa,-0x6(%rbp)
movw   $0x0,-0x6(%rbp)
movw   $0xffff,-0x6(%rbp)
movw   $0x8000,-0x6(%rbp)
movw   $0x1,-0x6(%rbp)
movw   $0x7fff,-0x6(%rbp)
movw   $0xfffe,-0x6(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i16
store i32 0, i32* %1
store i16 21845, i16* %2
store i16 -21846, i16* %2
store i16 0, i16* %2
store i16 -1, i16* %2
store i16 -32768, i16* %2
store i16 1, i16* %2
store i16 32767, i16* %2
store i16 -2, i16* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ get_partner_status();
int /*<<< orphan*/ sniffer_trace(char *);
void wait_for_mam() {
  if (1) {
    sniffer_trace("ENTERING: wait_for_mam");
  }
  while (!get_partner_status()) {
    ;
  }
  if (1) {
    sniffer_trace("LEAVING: wait_for_mam");
  }
}


x86 assembly (clang, -O0):
<wait_for_mam>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <sniffer_trace@plt>
mov    $0x0,%al
call   1040 <get_partner_status@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    114c <wait_for_mam+0x2c>
jmp    1151 <wait_for_mam+0x31>
jmp    1130 <wait_for_mam+0x10>
lea    0xebf(%rip),%rdi
call   1030 <sniffer_trace@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_for_mam>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <sniffer_trace@plt>
nopl   (%rax)
xor    %eax,%eax
call   1040 <get_partner_status@plt>
test   %eax,%eax
je     1130 <wait_for_mam+0x10>
lea    0xed5(%rip),%rdi
pop    %rax
jmp    1030 <sniffer_trace@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"ENTERING: wait_for_mam\00"
@.str.1 = [22 x i8] c"LEAVING: wait_for_mam\00"
define void @wait_for_mam() {
%1 = call i32 @sniffer_trace(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %6, %0
%3 = call i32 (...) @get_partner_status()
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
br i1 %5, label %6, label %7
6: ; preds = %2
br label %2
7: ; preds = %2
%8 = call i32 @sniffer_trace(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"ENTERING: wait_for_mam\00"
@.str.1 = [22 x i8] c"LEAVING: wait_for_mam\00"
define void @wait_for_mam() {
%1 = tail call i32 @sniffer_trace(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
%3 = tail call i32 (...) @get_partner_status()
%4 = icmp eq i32 %3, 0
br i1 %4, label %2, label %5
5: ; preds = %2
%6 = tail call i32 @sniffer_trace(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int strlen(const char *s) {
  const char *sc;
  for (sc = s; *sc != '\0'; ++sc) {
  }
  return sc - s;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1136 <strlen+0x36>
jmp    1125 <strlen+0x25>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @strlen(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %3 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
%11 = trunc i64 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ GDB_protocol();
int /*<<< orphan*/ tty_init();
int /*<<< orphan*/ tty_puts(int /*<<< orphan*/, char *);
int main(void) {
  tty_init();
  *(volatile short *)0x4010100C |= (1 << 9);
  tty_puts(0, "Ready to download >>");
  GDB_protocol();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <tty_init@plt>
mov    $0x4010100c,%eax
mov    (%rax),%ax
cwtl
or     $0x200,%eax
mov    %ax,%cx
mov    $0x4010100c,%eax
mov    %cx,(%rax)
xor    %edi,%edi
lea    0xe98(%rip),%rsi
call   1050 <tty_puts@plt>
mov    $0x0,%al
call   1040 <GDB_protocol@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <tty_init@plt>
orw    $0x200,0x4010100c
lea    0xeb7(%rip),%rsi
xor    %edi,%edi
call   1050 <tty_puts@plt>
xor    %eax,%eax
call   1040 <GDB_protocol@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Ready to download >>\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @tty_init()
%3 = load volatile i16, i16* inttoptr (i64 1074794508 to i16*)
%4 = sext i16 %3 to i32
%5 = or i32 %4, 512
%6 = trunc i32 %5 to i16
store volatile i16 %6, i16* inttoptr (i64 1074794508 to i16*)
%7 = call i32 @tty_puts(i32 0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (...) @GDB_protocol()
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"Ready to download >>\00"
define i32 @main() {
%1 = tail call i32 (...) @tty_init()
%2 = load volatile i16, i16* inttoptr (i64 1074794508 to i16*)
%3 = or i16 %2, 512
store volatile i16 %3, i16* inttoptr (i64 1074794508 to i16*)
%4 = tail call i32 @tty_puts(i32 0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (...) @GDB_protocol()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x50() {
  Assert_real((isodigit(80) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              405, ("isodigit should be 0 for P"));
}


x86 assembly (clang, -O0):
<t_isodigit_0x50>:
push   %rbp
mov    %rsp,%rbp
mov    $0x50,%edi
call   1040 <isodigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x195,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isodigit_0x50>:
push   %rax
mov    $0x50,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x195,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for P\00"
define void @t_isodigit_0x50() {
%1 = call i64 @isodigit(i32 80)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 405, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for P\00"
define void @t_isodigit_0x50() {
%1 = tail call i64 @isodigit(i32 80)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 405, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}