xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ arm_arith_add(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ t16_data_imm7sp_op();
void t16_add_sp7() { arm_arith_add(t16_data_imm7sp_op(), 0); }


x86 assembly (clang, -O0):
<t16_add_sp7>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <t16_data_imm7sp_op@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1030 <arm_arith_add@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t16_add_sp7>:
push   %rax
xor    %eax,%eax
call   1040 <t16_data_imm7sp_op@plt>
mov    %eax,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <arm_arith_add@plt>

LLVM IR (-O0):
define void @t16_add_sp7() {
%1 = call i32 (...) @t16_data_imm7sp_op()
%2 = call i32 @arm_arith_add(i32 %1, i32 0)
ret void
}

LLVM IR (-O2):
define void @t16_add_sp7() {
%1 = tail call i32 (...) @t16_data_imm7sp_op()
%2 = tail call i32 @arm_arith_add(i32 %1, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fread(int *, int, int, int /*<<< orphan*/ *);
int deserializerInt(FILE *f, int *n) {
  fread(n, sizeof(*n), 1, f);
  return sizeof(*n);
}


x86 assembly (clang, -O0):
<deserializerInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    $0x4,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deserializerInt>:
push   %rax
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    $0x4,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @deserializerInt(i32* nocapture %0, i32* nocapture %1) {
%3 = tail call i32 @fread(i32* %1, i32 4, i32 1, i32* %0)
ret i32 4
}
int iscoperator(const char c) {
  return '+' == c || '-' == c || '*' == c || '/' == c;
}


x86 assembly (clang, -O0):
<iscoperator>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
mov    $0x1,%al
mov    $0x2b,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
je     115d <iscoperator+0x5d>
movsbl -0x1(%rbp),%edx
mov    $0x1,%al
mov    $0x2d,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
je     115d <iscoperator+0x5d>
movsbl -0x1(%rbp),%edx
mov    $0x1,%al
mov    $0x2a,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
je     115d <iscoperator+0x5d>
movsbl -0x1(%rbp),%ecx
mov    $0x2f,%eax
cmp    %ecx,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iscoperator>:
cmp    $0x2d,%dil
ja     1120 <iscoperator+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x2c0000000000,%rdx
bt     %rcx,%rdx
jae    1120 <iscoperator+0x20>
ret
xor    %eax,%eax
cmp    $0x2f,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @iscoperator(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 43, %4
br i1 %5, label %18, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 45, %8
br i1 %9, label %18, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 42, %12
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 47, %16
br label %18
18: ; preds = %14, %10, %6, %1
%19 = phi i1 [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %17, %14 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @iscoperator(i8 signext %0) {
switch i8 %0, label %2 [
i8 45, label %5
i8 43, label %5
i8 42, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 47
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ boardCoordsOperationResults(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ createBoardCoord(int, int);
void boardCoordGetsCoordinates(void) {
  boardCoordsOperationResults(createBoardCoord(5, 6), 5, 6);
}


x86 assembly (clang, -O0):
<boardCoordGetsCoordinates>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
mov    $0x6,%esi
call   1030 <createBoardCoord@plt>
mov    %eax,%edi
mov    $0x5,%esi
mov    $0x6,%edx
call   1040 <boardCoordsOperationResults@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<boardCoordGetsCoordinates>:
push   %rax
mov    $0x5,%edi
mov    $0x6,%esi
call   1030 <createBoardCoord@plt>
mov    %eax,%edi
mov    $0x5,%esi
mov    $0x6,%edx
pop    %rax
jmp    1040 <boardCoordsOperationResults@plt>

LLVM IR (-O0):
define void @boardCoordGetsCoordinates() {
%1 = call i32 @createBoardCoord(i32 5, i32 6)
%2 = call i32 @boardCoordsOperationResults(i32 %1, i32 5, i32 6)
ret void
}

LLVM IR (-O2):
define void @boardCoordGetsCoordinates() {
%1 = tail call i32 @createBoardCoord(i32 5, i32 6)
%2 = tail call i32 @boardCoordsOperationResults(i32 %1, i32 5, i32 6)
ret void
}
/* Type definitions */
typedef int uint64_t;
typedef scalar_t__ uint32_t;

/* Variables and functions */
int a_ctz_l(unsigned long);
int a_ctz_64(uint64_t x) {
  uint32_t lo = (uint32_t)x;
  if (lo == 0)
    return a_ctz_l((unsigned long)(x >> 32)) + 32;
  else
    return a_ctz_l((unsigned long)lo);
}


x86 assembly (clang, -O0):
<a_ctz_64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movslq -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114b <a_ctz_64+0x3b>
mov    -0x8(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
movslq %eax,%rdi
call   1030 <a_ctz_l@plt>
add    $0x20,%eax
mov    %eax,-0x4(%rbp)
jmp    1157 <a_ctz_64+0x47>
mov    -0x10(%rbp),%rdi
call   1030 <a_ctz_l@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_ctz_64>:
test   %edi,%edi
je     111c <a_ctz_64+0xc>
movslq %edi,%rdi
jmp    1030 <a_ctz_l@plt>
push   %rax
call   1030 <a_ctz_l@plt>
add    $0x20,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @a_ctz_64(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = sext i32 %5 to i64
store i64 %6, i64* %4
%7 = load i64, i64* %4
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %1
%10 = load i32, i32* %3
%11 = ashr i32 %10, 32
%12 = sext i32 %11 to i64
%13 = call i32 @a_ctz_l(i64 %12)
%14 = add nsw i32 %13, 32
store i32 %14, i32* %2
br label %18
15: ; preds = %1
%16 = load i64, i64* %4
%17 = call i32 @a_ctz_l(i64 %16)
store i32 %17, i32* %2
br label %18
18: ; preds = %15, %9
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @a_ctz_64(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 @a_ctz_l(i64 poison)
%5 = add nsw i32 %4, 32
br label %9
6: ; preds = %1
%7 = sext i32 %0 to i64
%8 = tail call i32 @a_ctz_l(i64 %7)
br label %9
9: ; preds = %6, %3
%10 = phi i32 [ %5, %3 ], [ %8, %6 ]
ret i32 %10
}
/* Variables and functions */
long atoi(char *);
int /*<<< orphan*/ repeated_conditionals();
int main(int argc, char *argv[]) {
  long i, n;
  n = atoi(argv[1]);
  for (i = 0; i < n; i++)
    repeated_conditionals();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jge    1175 <main+0x55>
mov    $0x0,%al
call   1030 <repeated_conditionals@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    114f <main+0x2f>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
test   %rax,%rax
jle    114d <main+0x2d>
mov    %rax,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <repeated_conditionals@plt>
add    $0xffffffffffffffff,%rbx
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i64 @atoi(i8* %4)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %2, %7
%8 = phi i64 [ %10, %7 ], [ 0, %2 ]
%9 = tail call i32 (...) @repeated_conditionals()
%10 = add nuw nsw i64 %8, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %7
12: ; preds = %7, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
char *strstr(char *, char *);
int main(int argc, char **argv) {
  char *tmp;
  char *tmps;
  tmp = strstr(argv[1], argv[2]);
  tmps = tmp;
  if (tmps != NULL)
    printf("%s\n", tmps);
  else
    printf("NULL\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1040 <strstr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1179 <main+0x59>
mov    -0x20(%rbp),%rsi
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1187 <main+0x67>
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rsi
call   1040 <strstr@plt>
test   %rax,%rax
je     1138 <main+0x18>
mov    %rax,%rdi
jmp    113f <main+0x1f>
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [6 x i8] c"NULL\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 2
%13 = load i8*, i8** %12
%14 = call i8* @strstr(i8* %10, i8* %13)
store i8* %14, i8** %6
%15 = load i8*, i8** %6
store i8* %15, i8** %7
%16 = load i8*, i8** %7
%17 = icmp ne i8* %16, null
br i1 %17, label %18, label %21
18: ; preds = %2
%19 = load i8*, i8** %7
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %19)
br label %23
21: ; preds = %2
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %23
23: ; preds = %21, %18
ret i32 0
}

LLVM IR (-O2):
@str = [5 x i8] c"NULL\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8*, i8** %1, i64 2
%6 = load i8*, i8** %5
%7 = tail call i8* @strstr(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
%8 = icmp eq i8* %7, null
br i1 %8, label %11, label %9
9: ; preds = %2
%10 = tail call i32 @puts(i8* %7)
br label %13
11: ; preds = %2
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
br label %13
13: ; preds = %11, %9
ret i32 0
}
int is_any(unsigned char c) { return 1; }


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

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

LLVM IR (-O0):
define i32 @is_any(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
ret i32 1
}

LLVM IR (-O2):
define i32 @is_any(i8 zeroext %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalnum(int);
void t_isalnum_0x45() {
  Assert_real((isalnum(69)),
              "/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_isalnum.c",
              350, ("isalnum should be 1 for E"));
}


x86 assembly (clang, -O0):
<t_isalnum_0x45>:
push   %rbp
mov    %rsp,%rbp
mov    $0x45,%edi
call   1030 <isalnum@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x15e,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalnum_0x45>:
push   %rax
mov    $0x45,%edi
call   1030 <isalnum@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x15e,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for E\00"
define void @t_isalnum_0x45() {
%1 = call i32 @isalnum(i32 69)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 350, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for E\00"
define void @t_isalnum_0x45() {
%1 = tail call i32 @isalnum(i32 69)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 350, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timeval {
  int dummy;
};
struct timespec {
  int tv_sec;
  int tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ nanosleep(struct timespec *, int /*<<< orphan*/ *);
int main(void) {
  struct timeval tv;
  struct timespec tim;
  tim.tv_sec = 1;
  tim.tv_nsec = 1000;
  nanosleep(&tim, NULL);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0x3e8,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movabs $0x3e800000001,%rax
mov    %rax,(%rsp)
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
%struct.timespec = type { i32, i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.timeval
%3 = alloca %struct.timespec
store i32 0, i32* %1
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
store i32 1, i32* %4
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
store i32 1000, i32* %5
%6 = call i32 @nanosleep(%struct.timespec* %3, i32* null)
ret i32 0
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
define i32 @main() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
store i32 1, i32* %3
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
store i32 1000, i32* %4
%5 = call i32 @nanosleep(%struct.timespec* %1, i32* null)
ret i32 0
}
/* Variables and functions */
long long PAPI_get_real_nsec();
void papif_get_real_nsec_(long long *time) { *time = PAPI_get_real_nsec(); }


x86 assembly (clang, -O0):
<papif_get_real_nsec_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <PAPI_get_real_nsec@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<papif_get_real_nsec_>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <PAPI_get_real_nsec@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @papif_get_real_nsec_(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = call i64 (...) @PAPI_get_real_nsec()
%4 = load i64*, i64** %2
store i64 %3, i64* %4
ret void
}

LLVM IR (-O2):
define void @papif_get_real_nsec_(i64* nocapture writeonly %0) {
%2 = tail call i64 (...) @PAPI_get_real_nsec()
store i64 %2, i64* %0
ret void
}
void RTRandAdvU32Ex(void) {}


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

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

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

LLVM IR (-O2):
define void @RTRandAdvU32Ex() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ difft(int /*<<< orphan*/, char, char);
int /*<<< orphan*/ timenewest(char const *);
void diff(const char *stime, char noctime, char sha) {
  difft(timenewest(stime), noctime, sha);
}


x86 assembly (clang, -O0):
<diff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <timenewest@plt>
mov    %eax,%edi
mov    -0x9(%rbp),%al
movsbl %al,%esi
movsbl -0xa(%rbp),%edx
call   1040 <difft@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<diff>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
call   1030 <timenewest@plt>
mov    %eax,%edi
mov    %ebp,%esi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <difft@plt>

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

LLVM IR (-O2):
define void @diff(i8* %0, i8 signext %1, i8 signext %2) {
%4 = tail call i32 @timenewest(i8* %0)
%5 = tail call i32 @difft(i32 %4, i8 signext %1, i8 signext %2)
ret void
}
int d_le_rm2(double a1, double *a2) { return !(((a1) <= (*a2))); }


x86 assembly (clang, -O0):
<d_le_rm2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_le_rm2>:
movsd  (%rdi),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
setb   %al
ret

LLVM IR (-O0):
define i32 @d_le_rm2(double %0, double* %1) {
%3 = alloca double
%4 = alloca double*
store double %0, double* %3
store double* %1, double** %4
%5 = load double, double* %3
%6 = load double*, double** %4
%7 = load double, double* %6
%8 = fcmp ole double %5, %7
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @d_le_rm2(double %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = fcmp ult double %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
int __attribute__((no, noclone)) bar(int a) { return a + 2; }


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

x86 assembly (clang, -O2):
<bar>:
lea    0x2(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @bar(i32 %0) {
%2 = add nsw i32 %0, 2
ret i32 %2
}
void EMR3QueryExecutionPolicy(void) {}


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

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

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

LLVM IR (-O2):
define void @EMR3QueryExecutionPolicy() {
ret void
}
long decode2(long x, long y, long z) {
  y -= z;
  x *= y;
  long result = y;
  result = (result << 63) >> 63;
  result ^= x;
  return result;
}


x86 assembly (clang, -O0):
<decode2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
imul   -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
shl    $0x3f,%rax
sar    $0x3f,%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
xor    -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode2>:
mov    %rsi,%rax
sub    %rdx,%rax
imul   %rax,%rdi
and    $0x1,%eax
neg    %rax
xor    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @decode2(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%8 = load i64, i64* %6
%9 = load i64, i64* %5
%10 = sub nsw i64 %9, %8
store i64 %10, i64* %5
%11 = load i64, i64* %5
%12 = load i64, i64* %4
%13 = mul nsw i64 %12, %11
store i64 %13, i64* %4
%14 = load i64, i64* %5
store i64 %14, i64* %7
%15 = load i64, i64* %7
%16 = shl i64 %15, 63
%17 = ashr i64 %16, 63
store i64 %17, i64* %7
%18 = load i64, i64* %4
%19 = load i64, i64* %7
%20 = xor i64 %19, %18
store i64 %20, i64* %7
%21 = load i64, i64* %7
ret i64 %21
}

LLVM IR (-O2):
define i64 @decode2(i64 %0, i64 %1, i64 %2) {
%4 = sub nsw i64 %1, %2
%5 = mul nsw i64 %4, %0
%6 = and i64 %4, 1
%7 = sub nsw i64 0, %6
%8 = xor i64 %5, %7
ret i64 %8
}
/* Variables and functions */
float ceil(float);
float floor(float);
float fa_truncf(float x) { return (x > 0) ? floor(x) : ceil(x); }


x86 assembly (clang, -O0):
<fa_truncf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1152 <fa_truncf+0x32>
movss  -0x4(%rbp),%xmm0
call   1040 <floor@plt>
movss  %xmm0,-0x8(%rbp)
jmp    1161 <fa_truncf+0x41>
movss  -0x4(%rbp),%xmm0
call   1030 <ceil@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fa_truncf>:
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    112d <fa_truncf+0xd>
jmp    1030 <floorf@plt>
jmp    1040 <ceilf@plt>

LLVM IR (-O0):
define float @fa_truncf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp ogt float %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load float, float* %2
%7 = call float @floor(float %6)
br label %11
8: ; preds = %1
%9 = load float, float* %2
%10 = call float @ceil(float %9)
br label %11
11: ; preds = %8, %5
%12 = phi float [ %7, %5 ], [ %10, %8 ]
ret float %12
}

LLVM IR (-O2):
define float @fa_truncf(float %0) {
%2 = fcmp ogt float %0, 0.000000e+00
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call float @llvm.floor.f32(float %0)
br label %7
5: ; preds = %1
%6 = tail call float @llvm.ceil.f32(float %0)
br label %7
7: ; preds = %5, %3
%8 = phi float [ %4, %3 ], [ %6, %5 ]
ret float %8
}
void i2d_ASN1_BIT_STRING(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_ASN1_BIT_STRING() {
ret void
}
int test_imm_DDuint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0xDD << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_DDuint64_lowword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
and    $0xdd,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_DDuint64_lowword_mem>:
testb  $0xdd,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_DDuint64_lowword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = and i64 %4, 221
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_DDuint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 221
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void InvalidateFlags(void) {}


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

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

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

LLVM IR (-O2):
define void @InvalidateFlags() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tolower(char const);
char *mystrlwr(char *to, const char *from) {
  char *s;
  for (s = to; *from; from++) {
    *s++ = tolower(*from);
  }
  *s = '\0';
  return to;
}


x86 assembly (clang, -O0):
<mystrlwr>:
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),%rax
cmpb   $0x0,(%rax)
je     1165 <mystrlwr+0x55>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1128 <mystrlwr+0x18>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrlwr>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
mov    (%rsi),%al
mov    %rdi,%rbx
test   %al,%al
je     114a <mystrlwr+0x3a>
mov    %rsi,%r15
add    $0x1,%r15
mov    %r14,%rbx
nopl   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <tolower@plt>
mov    %al,(%rbx)
add    $0x1,%rbx
movzbl (%r15),%eax
add    $0x1,%r15
test   %al,%al
jne    1130 <mystrlwr+0x20>
movb   $0x0,(%rbx)
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @mystrlwr(i8* returned writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i8* [ %11, %5 ], [ %0, %2 ]
%8 = phi i8* [ %12, %5 ], [ %1, %2 ]
%9 = tail call i32 @tolower(i8 signext %6)
%10 = trunc i32 %9 to i8
%11 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %10, i8* %7
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i8* [ %0, %2 ], [ %11, %5 ]
store i8 0, i8* %16
ret i8* %0
}
/* Variables and functions */
int yahoo_M1ObfuscatedTableCommon(int, int, unsigned char *);
int yahoo_f01_4f(int Salt, int Parameter) {
  static unsigned char LUT[32] = {
      0x00, 0x08, 0x15, 0x1D, 0x05, 0x18, 0x06, 0x07, 0x1F, 0x01, 0x0B,
      0x03, 0x19, 0x13, 0x02, 0x1C, 0x17, 0x11, 0x0E, 0x1E, 0x0C, 0x0F,
      0x09, 0x1A, 0x1B, 0x16, 0x10, 0x0D, 0x0A, 0x14, 0x12, 0x04,
  };
  return yahoo_M1ObfuscatedTableCommon(Salt, Parameter, LUT);
}


x86 assembly (clang, -O0):
<yahoo_f01_4f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
lea    0x2f05(%rip),%rdx
call   1030 <yahoo_M1ObfuscatedTableCommon@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yahoo_f01_4f>:
lea    0x2f19(%rip),%rdx
jmp    1030 <yahoo_M1ObfuscatedTableCommon@plt>

LLVM IR (-O0):
@yahoo_f01_4f.LUT = internal global [32 x i8] c"\00\08\15\1D\05\18\06\07\1F\01\0B\03\19\13\02\1C\17\11\0E\1E\0C\0F\09\1A\1B\16\10\0D\0A\14\12\04"
define i32 @yahoo_f01_4f(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @yahoo_M1ObfuscatedTableCommon(i32 %5, i32 %6, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @yahoo_f01_4f.LUT, i64 0, i64 0))
ret i32 %7
}

LLVM IR (-O2):
@yahoo_f01_4f.LUT = internal global [32 x i8] c"\00\08\15\1D\05\18\06\07\1F\01\0B\03\19\13\02\1C\17\11\0E\1E\0C\0F\09\1A\1B\16\10\0D\0A\14\12\04"
define i32 @yahoo_f01_4f(i32 %0, i32 %1) {
%3 = tail call i32 @yahoo_M1ObfuscatedTableCommon(i32 %0, i32 %1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @yahoo_f01_4f.LUT, i64 0, i64 0))
ret i32 %3
}
const char *grisu3_parse_hex_fp(const char *buf, const char *end, int sign,
                                double *result) {
  (void)buf;
  (void)end;
  (void)sign;
  *result = 0.0;
  return buf;
}


x86 assembly (clang, -O0):
<grisu3_parse_hex_fp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<grisu3_parse_hex_fp>:
mov    %rdi,%rax
movq   $0x0,(%rcx)
ret

LLVM IR (-O0):
define i8* @grisu3_parse_hex_fp(i8* %0, i8* %1, i32 %2, double* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca double*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store double* %3, double** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load double*, double** %8
store double 0.000000e+00, double* %12
%13 = load i8*, i8** %5
ret i8* %13
}

LLVM IR (-O2):
define i8* @grisu3_parse_hex_fp(i8* readnone returned %0, i8* nocapture readnone %1, i32 %2, double* nocapture writeonly %3) {
store double 0.000000e+00, double* %3
ret i8* %0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t endian_swap32(uint32_t value) {
  return ((value & 0x000000ff) << 24) | ((value & 0x0000ff00) << 8) |
         ((value & 0x00ff0000) >> 8) | ((value & 0xff000000) >> 24);
}


x86 assembly (clang, -O0):
<endian_swap32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
shl    $0x18,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff0000,%ecx
sar    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff000000,%ecx
shr    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @endian_swap32(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ useconds_t;

/* Variables and functions */
int /*<<< orphan*/ _exit(int);
int _usleep(useconds_t usec) {
  _exit(-1);
  return -1;
}


x86 assembly (clang, -O0):
<_usleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<_usleep>:
push   %rax
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define i32 @_usleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_exit(i32 -1)
unreachable
}

LLVM IR (-O2):
define i32 @_usleep(i32 %0) {
%2 = tail call i32 @_exit(i32 -1)
unreachable
}
int owSpeed(int portnum, int new_speed) { return 0x00; }


x86 assembly (clang, -O0):
<owSpeed>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @owSpeed(i32 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_cvolume_set_fade() {
  printf("NOT IMPLEMENTED:"
         "pa_cvolume_set_fade"
         "\n");
}


x86 assembly (clang, -O0):
<pa_cvolume_set_fade>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [37 x i8] c"NOT IMPLEMENTED:pa_cvolume_set_fade\0A\00"
define i32 @pa_cvolume_set_fade() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [36 x i8] c"NOT IMPLEMENTED:pa_cvolume_set_fade\00"
define i32 @pa_cvolume_set_fade() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ x54x_in(int, void *);
uint8_t x54x_readb(uint32_t port, void *priv) {
  return (x54x_in(port & 3, priv));
}


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

x86 assembly (clang, -O2):
<x54x_readb>:
and    $0x3,%edi
jmp    1030 <x54x_in@plt>

LLVM IR (-O0):
define i32 @x54x_readb(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = and i32 %5, 3
%7 = load i8*, i8** %4
%8 = call i32 @x54x_in(i32 %6, i8* %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @x54x_readb(i32 %0, i8* %1) {
%3 = and i32 %0, 3
%4 = tail call i32 @x54x_in(i32 %3, i8* %1)
ret i32 %4
}
void doy2dt(year, doy, date, time) int year;
double doy;
double *date;
double *time;
{
  double dj;
  double dj0;
  double date0;
  date0 = year + 0.0101;
  dj0 = dt2jd(date0, 0.0);
  dj = dj0 + doy - 1.0;
  jd2dt(dj, date, time);
  return;
}


x86 assembly (clang, -O0):
<doy2dt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xec3(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
xorps  %xmm1,%xmm1
mov    $0x2,%al
call   1030 <dt2jd@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  0xe88(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    $0x1,%al
call   1040 <jd2dt@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doy2dt>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
movsd  %xmm0,(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %edi,%xmm0
addsd  0xec2(%rip),%xmm0
xorps  %xmm1,%xmm1
mov    $0x2,%al
call   1030 <dt2jd@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  (%rsp),%xmm0
addsd  0xeac(%rip),%xmm0
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x1,%al
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <jd2dt@plt>

LLVM IR (-O0):
define void @doy2dt(i32 %0, double %1, double* %2, double* %3) {
%5 = alloca i32
%6 = alloca double
%7 = alloca double*
%8 = alloca double*
%9 = alloca double
%10 = alloca double
%11 = alloca double
store i32 %0, i32* %5
store double %1, double* %6
store double* %2, double** %7
store double* %3, double** %8
%12 = load i32, i32* %5
%13 = sitofp i32 %12 to double
%14 = fadd double %13, 1.010000e-02
store double %14, double* %11
%15 = load double, double* %11
%16 = call i32 (double, double, ...) bitcast (i32 (...)* @dt2jd to i32 (double, double, ...)*)(double %15, double 0.000000e+00)
%17 = sitofp i32 %16 to double
store double %17, double* %10
%18 = load double, double* %10
%19 = load double, double* %6
%20 = fadd double %18, %19
%21 = fsub double %20, 1.000000e+00
store double %21, double* %9
%22 = load double, double* %9
%23 = load double*, double** %7
%24 = load double*, double** %8
%25 = call i32 (double, double*, double*, ...) bitcast (i32 (...)* @jd2dt to i32 (double, double*, double*, ...)*)(double %22, double* %23, double* %24)
ret void
}

LLVM IR (-O2):
define void @doy2dt(i32 %0, double %1, double* %2, double* %3) {
%5 = sitofp i32 %0 to double
%6 = fadd double %5, 1.010000e-02
%7 = tail call i32 (double, double, ...) bitcast (i32 (...)* @dt2jd to i32 (double, double, ...)*)(double %6, double 0.000000e+00)
%8 = sitofp i32 %7 to double
%9 = fadd double %8, %1
%10 = fadd double %9, -1.000000e+00
%11 = tail call i32 (double, double*, double*, ...) bitcast (i32 (...)* @jd2dt to i32 (double, double*, double*, ...)*)(double %10, double* %2, double* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void sub2() { printf("\n%s\n\n", " second function"); }


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

x86 assembly (clang, -O2):
<sub2>:
lea    0xee9(%rip),%rdi
lea    0xee8(%rip),%rsi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"\0A%s\0A\0A\00"
@.str.1 = [17 x i8] c" second function\00"
define void @sub2() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ permute(char *, int /*<<< orphan*/, int);
int strlen(char *);
void main() {
  char str[] = "abcd";
  int len = strlen(str);
  permute(str, 0, len - 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed2(%rip),%eax
mov    %eax,-0x5(%rbp)
mov    0xecd(%rip),%al
mov    %al,-0x1(%rbp)
lea    -0x5(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0xc(%rbp)
lea    -0x5(%rbp),%rdi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   1030 <permute@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movb   $0x0,0xc(%rsp)
movl   $0x64636261,0x8(%rsp)
64
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    -0x1(%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <permute@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.str = [5 x i8] c"abcd\00"
define void @main() {
%1 = alloca [5 x i8]
%2 = alloca i32
%3 = bitcast [5 x i8]* %1 to i8*
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%5 = call i32 @strlen(i8* %4)
store i32 %5, i32* %2
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%7 = load i32, i32* %2
%8 = sub nsw i32 %7, 1
%9 = call i32 @permute(i8* %6, i32 0, i32 %8)
ret void
}

LLVM IR (-O2):
@__const.main.str = [5 x i8] c"abcd\00"
define void @main() {
%1 = alloca [5 x i8]
%2 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%3 = call i32 @strlen(i8* %2)
%4 = add nsw i32 %3, -1
%5 = call i32 @permute(i8* %2, i32 0, i32 %4)
ret void
}
float _float32_max(float x, float y) {
  float result = y;
  if (x > y) {
    result = x;
  }
  return result;
}


x86 assembly (clang, -O0):
<_float32_max>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1131 <_float32_max+0x31>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<_float32_max>:
maxss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @_float32_max(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int vasprintf(char **, char const *, int /*<<< orphan*/);
int __vasprintf_chk(char **restrict s, int flag, const char *restrict fmt,
                    va_list ap) {
  return vasprintf(s, fmt, ap);
}


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

x86 assembly (clang, -O2):
<__vasprintf_chk>:
mov    %rdx,%rsi
mov    %ecx,%edx
jmp    1030 <vasprintf@plt>

LLVM IR (-O0):
define i32 @__vasprintf_chk(i8** noalias %0, i32 %1, i8* noalias %2, i32 %3) {
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i8** %0, i8*** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8**, i8*** %5
%10 = load i8*, i8** %7
%11 = load i32, i32* %8
%12 = call i32 @vasprintf(i8** %9, i8* %10, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @__vasprintf_chk(i8** noalias %0, i32 %1, i8* noalias %2, i32 %3) {
%5 = tail call i32 @vasprintf(i8** %0, i8* %2, i32 %3)
ret i32 %5
}
int is_arp_resp(const unsigned char *buf) {
  return buf[12] == 0x08 && buf[13] == 0x06 && buf[21] == 0x02;
}


x86 assembly (clang, -O0):
<is_arp_resp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0xc(%rax),%ecx
xor    %eax,%eax
cmp    $0x8,%ecx
mov    %al,-0x9(%rbp)
jne    1145 <is_arp_resp+0x45>
mov    -0x8(%rbp),%rax
movzbl 0xd(%rax),%ecx
xor    %eax,%eax
cmp    $0x6,%ecx
mov    %al,-0x9(%rbp)
jne    1145 <is_arp_resp+0x45>
mov    -0x8(%rbp),%rax
movzbl 0x15(%rax),%eax
cmp    $0x2,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_arp_resp>:
xor    %eax,%eax
cmpb   $0x8,0xc(%rdi)
jne    1117 <is_arp_resp+0x17>
cmpb   $0x6,0xd(%rdi)
jne    1117 <is_arp_resp+0x17>
xor    %eax,%eax
cmpb   $0x2,0x15(%rdi)
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_arp_resp(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 12
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 8
br i1 %4, label %5, label %14
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %0, i64 13
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 6
br i1 %8, label %9, label %14
9: ; preds = %5
%10 = getelementptr inbounds i8, i8* %0, i64 21
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 2
%13 = zext i1 %12 to i32
br label %14
14: ; preds = %9, %5, %1
%15 = phi i32 [ 0, %5 ], [ 0, %1 ], [ %13, %9 ]
ret i32 %15
}
void ff_hevc_put_hevc_qpel_v64_10_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_qpel_v64_10_avx2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ smd(char const *, size_t, size_t, double *);
void ssmd(const char *description, size_t order, double *M) {
  smd(description, order, order, M);
}


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

x86 assembly (clang, -O2):
<ssmd>:
mov    %rdx,%rcx
mov    %rsi,%rdx
jmp    1030 <smd@plt>

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

LLVM IR (-O2):
define void @ssmd(i8* %0, i64 %1, double* %2) {
%4 = tail call i32 @smd(i8* %0, i64 %1, i64 %1, double* %2)
ret void
}
/* Type definitions */
struct SETTINGS {
  int dummy;
};

/* Variables and functions */
int pkt_card_channel_range(struct SETTINGS *);
int channel_range(struct SETTINGS *myset) {
  return pkt_card_channel_range(myset);
}


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

x86 assembly (clang, -O2):
<channel_range>:
jmp    1030 <pkt_card_channel_range@plt>

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

LLVM IR (-O2):
%struct.SETTINGS = type { i32 }
define i32 @channel_range(%struct.SETTINGS* %0) {
%2 = tail call i32 @pkt_card_channel_range(%struct.SETTINGS* %0)
ret i32 %2
}