xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *, char *);
int /*<<< orphan*/ stdout;
void out_color(char *buf, char *color, char *reset) {
  fprintf(stdout, "%s%s%s", color, buf, reset);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<out_color>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    -0x18(%rbp),%r8
lea    0xeb0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<out_color>:
push   %rbx
mov    %rdx,%r8
mov    %rsi,%rdx
mov    %rdi,%rcx
mov    0x2eaf(%rip),%rbx
mov    (%rbx),%edi
lea    0xec6(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
pop    %rbx
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [7 x i8] c"%s%s%s\00"
define void @out_color(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* @stdout
%8 = load i8*, i8** %5
%9 = load i8*, i8** %4
%10 = load i8*, i8** %6
%11 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9, i8* %10)
%12 = load i32, i32* @stdout
%13 = call i32 @fflush(i32 %12)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [7 x i8] c"%s%s%s\00"
define void @out_color(i8* %0, i8* %1, i8* %2) {
%4 = load i32, i32* @stdout
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %0, i8* %2)
%6 = load i32, i32* @stdout
%7 = tail call i32 @fflush(i32 %6)
ret void
}
void pm_debug_clr(void) {}


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

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

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

LLVM IR (-O2):
define void @pm_debug_clr() {
ret void
}
int test_imm_2Dint8_mem(signed char *val) {
  return ((*val) & (0x2D << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_2Dint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 45
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct tms {
  int dummy;
};
typedef int clock_t;

/* Variables and functions */
int /*<<< orphan*/ memset(struct tms *, int /*<<< orphan*/, int);
clock_t times(struct tms *buf) {
  ;
  memset(buf, 0, sizeof(struct tms));
  return -1;
}


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

x86 assembly (clang, -O2):
<times>:
push   %rax
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.tms = type { i32 }
define i32 @times(%struct.tms* %0) {
%2 = tail call i32 @memset(%struct.tms* %0, i32 0, i32 4)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ wprintf(char *, double);
int main() {
  double angle_alpha = 90.0 / 3;
  wprintf(L"Angle \u03b1 measures %lf degrees.\n", angle_alpha);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  0xee0(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    0xed7(%rip),%rdi
call   1030 <wprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [31 x i32] [i32 65, i32 110, i32 103, i32 108, i32 101, i32 32, i32 945, i32 32, i32 109, i32 101, i32 97, i32 115, i32 117, i32 114, i32 101, i32 115, i32 32, i32 37, i32 108, i32 102, i32 32, i32 100, i32 101, i32 103, i32 114, i32 101, i32 101, i32 115, i32 46, i32 10, i32 0]
define i32 @main() {
%1 = alloca double
store double 3.000000e+01, double* %1
%2 = load double, double* %1
%3 = call i32 @wprintf(i8* bitcast ([31 x i32]* @.str to i8*), double %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i32] [i32 65, i32 110, i32 103, i32 108, i32 101, i32 32, i32 945, i32 32, i32 109, i32 101, i32 97, i32 115, i32 117, i32 114, i32 101, i32 115, i32 32, i32 37, i32 108, i32 102, i32 32, i32 100, i32 101, i32 103, i32 114, i32 101, i32 101, i32 115, i32 46, i32 10, i32 0]
define i32 @main() {
%1 = tail call i32 @wprintf(i8* bitcast ([31 x i32]* @.str to i8*), double 3.000000e+01)
ret i32 0
}
/* Variables and functions */
char tolower(char);
char *strlow(char *string) {
  char *s;
  if (string) {
    for (s = string; *s; ++s)
      *s = tolower(*s);
  }
  return string;
}


x86 assembly (clang, -O0):
<strlow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1166 <strlow+0x56>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1161 <strlow+0x51>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    112f <strlow+0x1f>
jmp    1166 <strlow+0x56>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlow>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
test   %rdi,%rdi
je     1146 <strlow+0x36>
mov    (%r14),%al
test   %al,%al
je     1146 <strlow+0x36>
lea    0x1(%r14),%rbx
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <tolower@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <strlow+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @strlow(i8* returned %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i8 [ %11, %6 ], [ %4, %3 ]
%8 = phi i8* [ %10, %6 ], [ %0, %3 ]
%9 = tail call signext i8 @tolower(i8 signext %7)
store i8 %9, i8* %8
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %3, %1
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, double *);
double double_input(void) {
  double temp_number = 0.0;
  scanf("%lf", &temp_number);
  return temp_number;
}


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

x86 assembly (clang, -O2):
<double_input>:
push   %rax
movq   $0x0,(%rsp)
lea    0xee0(%rip),%rdi
mov    %rsp,%rsi
call   1030 <scanf@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
define double @double_input() {
%1 = alloca double
store double 0.000000e+00, double* %1
%2 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%3 = load double, double* %1
ret double %3
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
define double @double_input() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
store double 0.000000e+00, double* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = load double, double* %1
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ EIO;
int /*<<< orphan*/ errno;
size_t getentropy_sysctl(void *, size_t);
int getentropy(void *buf, size_t len) {
  if (len <= 256 && getentropy_sysctl(buf, len) == len) {
    return (0);
  }
  errno = EIO;
  return (-1);
}


x86 assembly (clang, -O0):
<getentropy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x100,-0x18(%rbp)
ja     1151 <getentropy+0x41>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <getentropy_sysctl@plt>
cmp    -0x18(%rbp),%rax
jne    1151 <getentropy+0x41>
movl   $0x0,-0x4(%rbp)
jmp    116a <getentropy+0x5a>
mov    0x2e88(%rip),%rax
mov    (%rax),%ecx
mov    0x2e77(%rip),%rax
mov    %ecx,(%rax)
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getentropy>:
push   %rbx
cmp    $0x100,%rsi
ja     112c <getentropy+0x1c>
mov    %rsi,%rbx
call   1030 <getentropy_sysctl@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rbx,%rcx
je     1143 <getentropy+0x33>
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    0x2e9c(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EIO = global i32 0
@errno = global i32 0
define i32 @getentropy(i8* %0, i64 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
%6 = load i64, i64* %5
%7 = icmp ule i64 %6, 256
br i1 %7, label %8, label %15
8: ; preds = %2
%9 = load i8*, i8** %4
%10 = load i64, i64* %5
%11 = call i64 @getentropy_sysctl(i8* %9, i64 %10)
%12 = load i64, i64* %5
%13 = icmp eq i64 %11, %12
br i1 %13, label %14, label %15
14: ; preds = %8
store i32 0, i32* %3
br label %17
15: ; preds = %8, %2
%16 = load i32, i32* @EIO
store i32 %16, i32* @errno
store i32 -1, i32* %3
br label %17
17: ; preds = %15, %14
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@EIO = global i32 0
@errno = global i32 0
define i32 @getentropy(i8* %0, i64 %1) {
%3 = icmp ult i64 %1, 257
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i64 @getentropy_sysctl(i8* %0, i64 %1)
%6 = icmp eq i64 %5, %1
br i1 %6, label %9, label %7
7: ; preds = %4, %2
%8 = load i32, i32* @EIO
store i32 %8, i32* @errno
br label %9
9: ; preds = %4, %7
%10 = phi i32 [ -1, %7 ], [ 0, %4 ]
ret i32 %10
}
void lockSPI() {}


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

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

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

LLVM IR (-O2):
define void @lockSPI() {
ret void
}
int main(void) {
  int result = 0;
  return result;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ compare_strings(char *, char *);
char *replace_KMG(char *);
char *perform_KMG(char buffer[]) {
  char *string = buffer;
  do {
    buffer = string;
    string = replace_KMG(buffer);
  } while (!compare_strings(buffer, string));
  return string;
}


x86 assembly (clang, -O0):
<perform_KMG>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <replace_KMG@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <compare_strings@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1134 <perform_KMG+0x14>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<perform_KMG>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
nopw   0x0(%rax,%rax,1)
mov    %rbx,%r14
mov    %rbx,%rdi
call   1040 <replace_KMG@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
call   1030 <compare_strings@plt>
test   %eax,%eax
je     1130 <perform_KMG+0x10>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @perform_KMG(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 = %9, %1
%6 = load i8*, i8** %3
store i8* %6, i8** %2
%7 = load i8*, i8** %2
%8 = call i8* @replace_KMG(i8* %7)
store i8* %8, i8** %3
br label %9
9: ; preds = %5
%10 = load i8*, i8** %2
%11 = load i8*, i8** %3
%12 = call i32 @compare_strings(i8* %10, i8* %11)
%13 = icmp ne i32 %12, 0
%14 = xor i1 %13, true
br i1 %14, label %5, label %15
15: ; preds = %9
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
define i8* @perform_KMG(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %4, %2 ]
%4 = tail call i8* @replace_KMG(i8* %3)
%5 = tail call i32 @compare_strings(i8* %3, i8* %4)
%6 = icmp eq i32 %5, 0
br i1 %6, label %2, label %7
7: ; preds = %2
ret i8* %4
}
/* Variables and functions */
char *strchr(char *, char);
void parse_work_name(char *str, const char **name, const char **path) {
  char *split = strchr(str, ':');
  if (split == NULL)
    *name = *path = str;
  else {
    *split = '\0';
    *name = str;
    *path = split + 1;
  }
}


x86 assembly (clang, -O0):
<parse_work_name>:
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    $0x3a,%esi
call   1030 <strchr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1158 <parse_work_name+0x48>
mov    -0x8(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
jmp    1179 <parse_work_name+0x69>
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rcx
add    $0x1,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_work_name>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
mov    $0x3a,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     113c <parse_work_name+0x2c>
movb   $0x0,(%rax)
mov    %rbx,(%r15)
add    $0x1,%rax
mov    %rax,(%r14)
jmp    1142 <parse_work_name+0x32>
mov    %rbx,(%r14)
mov    %rbx,(%r15)
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @parse_work_name(i8* %0, i8** nocapture writeonly %1, i8** nocapture writeonly %2) {
%4 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 58)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %7
6: ; preds = %3
store i8* %0, i8** %2
store i8* %0, i8** %1
br label %9
7: ; preds = %3
store i8 0, i8* %4
store i8* %0, i8** %1
%8 = getelementptr inbounds i8, i8* %4, i64 1
store i8* %8, i8** %2
br label %9
9: ; preds = %7, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log_error(char *);
void *realloc(void *, int);
int inflate(void **inflatable, int new_size, size_t ptrsize) {
  void *new_inflatable;
  new_inflatable = realloc(*inflatable, new_size * ptrsize);
  if (new_inflatable == NULL) {
    log_error("inflate");
    return (-1);
  }
  (*inflatable) = new_inflatable;
  return 0;
}


x86 assembly (clang, -O0):
<inflate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
movslq -0x14(%rbp),%rax
imul   -0x20(%rbp),%rax
mov    %eax,%esi
call   1040 <realloc@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    1171 <inflate+0x51>
lea    0xea0(%rip),%rdi
call   1030 <log_error@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1183 <inflate+0x63>
mov    -0x28(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inflate>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
imul   %edx,%esi
call   1040 <realloc@plt>
test   %rax,%rax
je     113b <inflate+0x1b>
mov    %rax,(%rbx)
xor    %eax,%eax
pop    %rbx
ret
lea    0xebe(%rip),%rdi
call   1030 <log_error@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"inflate\00"
define i32 @inflate(i8** %0, i32 %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i64
%8 = alloca i8*
store i8** %0, i8*** %5
store i32 %1, i32* %6
store i64 %2, i64* %7
%9 = load i8**, i8*** %5
%10 = load i8*, i8** %9
%11 = load i32, i32* %6
%12 = sext i32 %11 to i64
%13 = load i64, i64* %7
%14 = mul i64 %12, %13
%15 = trunc i64 %14 to i32
%16 = call i8* @realloc(i8* %10, i32 %15)
store i8* %16, i8** %8
%17 = load i8*, i8** %8
%18 = icmp eq i8* %17, null
br i1 %18, label %19, label %21
19: ; preds = %3
%20 = call i32 @log_error(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %4
br label %24
21: ; preds = %3
%22 = load i8*, i8** %8
%23 = load i8**, i8*** %5
store i8* %22, i8** %23
store i32 0, i32* %4
br label %24
24: ; preds = %21, %19
%25 = load i32, i32* %4
ret i32 %25
}

LLVM IR (-O2):
@.str = [8 x i8] c"inflate\00"
define i32 @inflate(i8** nocapture %0, i32 %1, i64 %2) {
%4 = load i8*, i8** %0
%5 = trunc i64 %2 to i32
%6 = mul i32 %5, %1
%7 = tail call i8* @realloc(i8* %4, i32 %6)
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %3
%10 = tail call i32 @log_error(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %12
11: ; preds = %3
store i8* %7, i8** %0
br label %12
12: ; preds = %11, %9
%13 = phi i32 [ -1, %9 ], [ 0, %11 ]
ret i32 %13
}
void UI_set_default_method(void) {}


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

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

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

LLVM IR (-O2):
define void @UI_set_default_method() {
ret void
}
/* Variables and functions */
unsigned int rand();
unsigned int randr(unsigned int min, unsigned int max) {
  return min + rand() % (max + 1 - min);
}


x86 assembly (clang, -O0):
<randr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
sub    -0x4(%rbp),%ecx
xor    %edx,%edx
div    %ecx
mov    -0xc(%rbp),%eax
add    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randr>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
sub    %ebp,%ebx
add    $0x1,%ebx
xor    %edx,%edx
div    %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @randr(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 = call i32 (...) @rand()
%7 = load i32, i32* %4
%8 = add i32 %7, 1
%9 = load i32, i32* %3
%10 = sub i32 %8, %9
%11 = urem i32 %6, %10
%12 = add i32 %5, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @randr(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = sub i32 1, %0
%5 = add i32 %4, %1
%6 = urem i32 %3, %5
%7 = add i32 %6, %0
ret i32 %7
}
doecho(v) char **v;
{ echo(' ', v); }


x86 assembly (clang, -O0):
<doecho>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0x20,%edi
mov    $0x0,%al
call   1030 <echo@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doecho>:
mov    %rdi,%rsi
mov    $0x20,%edi
xor    %eax,%eax
jmp    1030 <echo@plt>

LLVM IR (-O0):
define i32 @doecho(i8** %0) {
%2 = alloca i32
%3 = alloca i8**
store i8** %0, i8*** %3
%4 = load i8**, i8*** %3
%5 = call i32 (i32, i8**, ...) bitcast (i32 (...)* @echo to i32 (i32, i8**, ...)*)(i32 32, i8** %4)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @doecho(i8** %0) {
%2 = tail call i32 (i32, i8**, ...) bitcast (i32 (...)* @echo to i32 (i32, i8**, ...)*)(i32 32, i8** %0)
ret i32 undef
}
double hmean(double a, double b) { return 1 / ((1 / a + 1 / b) / 2); }


x86 assembly (clang, -O0):
<hmean>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xeea(%rip),%xmm1
divsd  -0x8(%rbp),%xmm1
movsd  0xedd(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
addsd  %xmm0,%xmm1
movsd  0xed4(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xec0(%rip),%xmm0
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<hmean>:
unpcklpd %xmm1,%xmm0
movapd 0xef4(%rip),%xmm1
divpd  %xmm0,%xmm1
movapd %xmm1,%xmm2
unpckhpd %xmm1,%xmm2
addsd  %xmm1,%xmm2
mulsd  0xeec(%rip),%xmm2
movsd  0xeec(%rip),%xmm0
divsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @hmean(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 = fdiv double 1.000000e+00, %5
%7 = load double, double* %4
%8 = fdiv double 1.000000e+00, %7
%9 = fadd double %6, %8
%10 = fdiv double %9, 2.000000e+00
%11 = fdiv double 1.000000e+00, %10
ret double %11
}

LLVM IR (-O2):
define double @hmean(double %0, double %1) {
%3 = insertelement <2 x double> poison, double %0, i64 0
%4 = insertelement <2 x double> %3, double %1, i64 1
%5 = fdiv <2 x double> <double 1.000000e+00, double 1.000000e+00>, %4
%6 = shufflevector <2 x double> %5, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%7 = fadd <2 x double> %5, %6
%8 = extractelement <2 x double> %7, i64 0
%9 = fmul double %8, 5.000000e-01
%10 = fdiv double 1.000000e+00, %9
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ kprint(char *);
int /*<<< orphan*/ puts(char *);
void guess_command(char *arg) {
  kprint("Did you really think it would be: ");
  puts(arg);
}


x86 assembly (clang, -O0):
<guess_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1040 <kprint@plt>
mov    -0x8(%rbp),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<guess_command>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1040 <kprint@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"Did you really think it would be: \00"
define void @guess_command(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @kprint(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @puts(i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"Did you really think it would be: \00"
define void @guess_command(i8* nocapture %0) {
%2 = tail call i32 @kprint(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) %0)
ret void
}
/* Variables and functions */
int isfinite(float);
int chpl_macro_float_isfinite(float x) { return isfinite(x); }


x86 assembly (clang, -O0):
<chpl_macro_float_isfinite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <isfinite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chpl_macro_float_isfinite>:
jmp    1030 <isfinite@plt>

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

LLVM IR (-O2):
define i32 @chpl_macro_float_isfinite(float %0) {
%2 = tail call i32 @isfinite(float %0)
ret i32 %2
}
void debugpins_isr_clr() {}


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

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

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

LLVM IR (-O2):
define void @debugpins_isr_clr() {
ret void
}
/* Variables and functions */
unsigned long RGB2HSV94(unsigned long);
unsigned long rgb2hsv(unsigned long rgb) { return RGB2HSV94(rgb); }


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

x86 assembly (clang, -O2):
<rgb2hsv>:
jmp    1030 <RGB2HSV94@plt>

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

LLVM IR (-O2):
define i64 @rgb2hsv(i64 %0) {
%2 = tail call i64 @RGB2HSV94(i64 %0)
ret i64 %2
}
/* Variables and functions */
int mvscanw(int, int, char *, int *, int *);
int ii_mvscanw(int y, int x, char *fmt, int *i, int *j) {
  return (mvscanw(y, x, fmt, i, j));
}


x86 assembly (clang, -O0):
<ii_mvscanw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
call   1030 <mvscanw@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ii_mvscanw>:
jmp    1030 <mvscanw@plt>

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

LLVM IR (-O2):
define i32 @ii_mvscanw(i32 %0, i32 %1, i8* %2, i32* %3, i32* %4) {
%6 = tail call i32 @mvscanw(i32 %0, i32 %1, i8* %2, i32* %3, i32* %4)
ret i32 %6
}
/* Variables and functions */
int quick_pow2(int);
unsigned int get_next_stamp(unsigned int stamp) {
  unsigned int max_stamp = quick_pow2(15) - 1;
  if (stamp >= max_stamp) {
    return 0;
  } else {
    return (stamp + 1);
  }
}


x86 assembly (clang, -O0):
<get_next_stamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0xf,%edi
call   1030 <quick_pow2@plt>
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jb     1143 <get_next_stamp+0x33>
movl   $0x0,-0x4(%rbp)
jmp    114c <get_next_stamp+0x3c>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_next_stamp>:
push   %rbx
mov    %edi,%ebx
mov    $0xf,%edi
call   1030 <quick_pow2@plt>
add    $0xffffffff,%eax
lea    0x1(%rbx),%edx
xor    %ecx,%ecx
cmp    %ebx,%eax
cmova  %edx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @get_next_stamp(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = call i32 @quick_pow2(i32 15)
%6 = sub nsw i32 %5, 1
store i32 %6, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = icmp uge i32 %7, %8
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 0, i32* %2
br label %14
11: ; preds = %1
%12 = load i32, i32* %3
%13 = add i32 %12, 1
store i32 %13, i32* %2
br label %14
14: ; preds = %11, %10
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @get_next_stamp(i32 %0) {
%2 = tail call i32 @quick_pow2(i32 15)
%3 = add nsw i32 %2, -1
%4 = icmp ugt i32 %3, %0
%5 = add i32 %0, 1
%6 = select i1 %4, i32 %5, i32 0
ret i32 %6
}
int test_imm_83uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x83 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_83uint64_lowword_reg>:
test   $0x83,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_83uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 131
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef size_t ssize_t;

/* Variables and functions */
char *dirname(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
size_t readlink(char *, char *, int);
char *strndup(char *, int);
char *curdir(void) {
  char buf[4096];
  char *dir;
  ssize_t len;
  len = readlink("/proc/self/exe", buf, 4096);
  if (len < 0) {
    perror("readlink");
    exit(1);
  }
  buf[len] = 0;
  dir = dirname(buf);
  return strndup(dir, 4096);
}


x86 assembly (clang, -O0):
<curdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1010,%rsp
lea    -0x1000(%rbp),%rsi
lea    0xe97(%rip),%rdi
mov    $0x1000,%edx
call   1030 <readlink@plt>
mov    %rax,-0x1010(%rbp)
cmpq   $0x0,-0x1010(%rbp)
jae    119e <curdir+0x4e>
lea    0xe80(%rip),%rdi
call   1060 <perror@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    -0x1010(%rbp),%rax
movb   $0x0,-0x1000(%rbp,%rax,1)
lea    -0x1000(%rbp),%rdi
call   1040 <dirname@plt>
mov    %rax,-0x1008(%rbp)
mov    -0x1008(%rbp),%rdi
mov    $0x1000,%esi
call   1050 <strndup@plt>
add    $0x1010,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<curdir>:
push   %rbx
sub    $0x1000,%rsp
lea    0xec1(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
mov    $0x1000,%edx
call   1030 <readlink@plt>
movb   $0x0,(%rsp,%rax,1)
mov    %rbx,%rdi
call   1040 <dirname@plt>
mov    %rax,%rdi
mov    $0x1000,%esi
call   1050 <strndup@plt>
add    $0x1000,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"/proc/self/exe\00"
@.str.1 = [9 x i8] c"readlink\00"
define i8* @curdir() {
%1 = alloca [4096 x i8]
%2 = alloca i8*
%3 = alloca i64
%4 = getelementptr inbounds [4096 x i8], [4096 x i8]* %1, i64 0, i64 0
%5 = call i64 @readlink(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %4, i32 4096)
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = icmp ult i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %0
%9 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %0
%12 = load i64, i64* %3
%13 = getelementptr inbounds [4096 x i8], [4096 x i8]* %1, i64 0, i64 %12
store i8 0, i8* %13
%14 = getelementptr inbounds [4096 x i8], [4096 x i8]* %1, i64 0, i64 0
%15 = call i8* @dirname(i8* %14)
store i8* %15, i8** %2
%16 = load i8*, i8** %2
%17 = call i8* @strndup(i8* %16, i32 4096)
ret i8* %17
}

LLVM IR (-O2):
@.str = [15 x i8] c"/proc/self/exe\00"
define noalias i8* @curdir() {
%1 = alloca [4096 x i8]
%2 = getelementptr inbounds [4096 x i8], [4096 x i8]* %1, i64 0, i64 0
%3 = call i64 @readlink(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %2, i32 4096)
%4 = getelementptr inbounds [4096 x i8], [4096 x i8]* %1, i64 0, i64 %3
store i8 0, i8* %4
%5 = call i8* @dirname(i8* %2)
%6 = call i8* @strndup(i8* %5, i32 4096)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ emit_sarimm(int, int, int);
int /*<<< orphan*/ emit_shlimm(int, int, int);
void emit_movsbl_reg(int rs, int rt) {
  emit_shlimm(rs, 24, rt);
  emit_sarimm(rt, 24, rt);
}


x86 assembly (clang, -O0):
<emit_movsbl_reg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    $0x18,%esi
call   1040 <emit_shlimm@plt>
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    $0x18,%esi
call   1030 <emit_sarimm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_movsbl_reg>:
push   %rbx
mov    %esi,%ebx
mov    $0x18,%esi
mov    %ebx,%edx
call   1040 <emit_shlimm@plt>
mov    %ebx,%edi
mov    $0x18,%esi
mov    %ebx,%edx
pop    %rbx
jmp    1030 <emit_sarimm@plt>

LLVM IR (-O0):
define void @emit_movsbl_reg(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 @emit_shlimm(i32 %5, i32 24, i32 %6)
%8 = load i32, i32* %4
%9 = load i32, i32* %4
%10 = call i32 @emit_sarimm(i32 %8, i32 24, i32 %9)
ret void
}

LLVM IR (-O2):
define void @emit_movsbl_reg(i32 %0, i32 %1) {
%3 = tail call i32 @emit_shlimm(i32 %0, i32 24, i32 %1)
%4 = tail call i32 @emit_sarimm(i32 %1, i32 24, i32 %1)
ret void
}
float raw_relu_derivative(float x) { return x > 0.0 ? 1.0 : 0.0; }


x86 assembly (clang, -O0):
<raw_relu_derivative>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xee6(%rip),%xmm3
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm0
cmpltsd %xmm1,%xmm0
movaps %xmm0,%xmm1
andpd  %xmm3,%xmm1
andnpd %xmm2,%xmm0
orpd   %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<raw_relu_derivative>:
xorps  %xmm1,%xmm1
cmpltss %xmm0,%xmm1
movss  0xef0(%rip),%xmm0
andps  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @raw_relu_derivative(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fcmp ogt double %4, 0.000000e+00
%6 = zext i1 %5 to i64
%7 = select i1 %5, double 1.000000e+00, double 0.000000e+00
%8 = fptrunc double %7 to float
ret float %8
}

LLVM IR (-O2):
define float @raw_relu_derivative(float %0) {
%2 = fcmp ogt float %0, 0.000000e+00
%3 = select i1 %2, float 1.000000e+00, float 0.000000e+00
ret float %3
}
double midpoint(double const x, double const y) { return x + (y - x) / 2; }


x86 assembly (clang, -O0):
<midpoint>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
subsd  -0x8(%rbp),%xmm1
movsd  0xedb(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<midpoint>:
subsd  %xmm0,%xmm1
mulsd  0xef4(%rip),%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @midpoint(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* %3
%8 = fsub double %6, %7
%9 = fdiv double %8, 2.000000e+00
%10 = fadd double %5, %9
ret double %10
}

LLVM IR (-O2):
define double @midpoint(double %0, double %1) {
%3 = fsub double %1, %0
%4 = fmul double %3, 5.000000e-01
%5 = fadd double %4, %0
ret double %5
}
/* Type definitions */
struct point {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct point *);
void point_destroy(struct point *p) { free(p); }


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

x86 assembly (clang, -O2):
<point_destroy>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.point = type { i32 }
define void @point_destroy(%struct.point* nocapture %0) {
%2 = tail call i32 @free(%struct.point* %0)
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ fileBiggest(int /*<<< orphan*/ *);
uint32_t fileMissing(FILE *fp) { return (fileBiggest(fp) + 1); }


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

x86 assembly (clang, -O2):
<fileMissing>:
push   %rax
call   1030 <fileBiggest@plt>
add    $0x1,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @fileMissing(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i64 @fileBiggest(i32* %3)
%5 = add nsw i64 %4, 1
ret i64 %5
}

LLVM IR (-O2):
define i64 @fileMissing(i32* %0) {
%2 = tail call i64 @fileBiggest(i32* %0)
%3 = add nsw i64 %2, 1
ret i64 %3
}
int test_imm_C7uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0xC7 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_C7uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 854698491904
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ SIGTERM;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ chdir(char *);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ signal(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ sync();
main() {
  int fd, buf[2];
  signal(SIGTERM, SIG_IGN);
  close(0);
  close(1);
  close(2);
  chdir("/");
  while (1) {
    sync();
    sleep(30);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
mov    0x2e71(%rip),%rax
mov    (%rax),%esi
call   1050 <signal@plt>
xor    %edi,%edi
call   1040 <close@plt>
mov    $0x1,%edi
call   1040 <close@plt>
mov    $0x2,%edi
call   1040 <close@plt>
lea    0xe68(%rip),%rdi
call   1030 <chdir@plt>
mov    $0x0,%al
call   1060 <sync@plt>
mov    $0x1e,%edi
call   1070 <sleep@plt>
jmp    119d <main+0x4d>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
mov    0x2e7f(%rip),%rax
mov    (%rax),%esi
call   1050 <signal@plt>
xor    %edi,%edi
call   1040 <close@plt>
mov    $0x1,%edi
call   1040 <close@plt>
mov    $0x2,%edi
call   1040 <close@plt>
lea    0xe76(%rip),%rdi
call   1030 <chdir@plt>
nop
xor    %eax,%eax
call   1060 <sync@plt>
mov    $0x1e,%edi
call   1070 <sleep@plt>
jmp    1190 <main+0x40>

LLVM IR (-O0):
@SIGTERM = global i32 0
@SIG_IGN = global i32 0
@.str = [2 x i8] c"/\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [2 x i32]
store i32 0, i32* %1
%4 = load i32, i32* @SIGTERM
%5 = load i32, i32* @SIG_IGN
%6 = call i32 @signal(i32 %4, i32 %5)
%7 = call i32 @close(i32 0)
%8 = call i32 @close(i32 1)
%9 = call i32 @close(i32 2)
%10 = call i32 @chdir(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %0, %11
%12 = call i32 (...) @sync()
%13 = call i32 @sleep(i32 30)
br label %11
}

LLVM IR (-O2):
@SIGTERM = global i32 0
@SIG_IGN = global i32 0
@.str = [2 x i8] c"/\00"
define i32 @main() {
%1 = load i32, i32* @SIGTERM
%2 = load i32, i32* @SIG_IGN
%3 = tail call i32 @signal(i32 %1, i32 %2)
%4 = tail call i32 @close(i32 0)
%5 = tail call i32 @close(i32 1)
%6 = tail call i32 @close(i32 2)
%7 = tail call i32 @chdir(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %8, %0
%9 = tail call i32 (...) @sync()
%10 = tail call i32 @sleep(i32 30)
br label %8
}
void sched_autogroup_create_attach(struct task_struct *p) {}


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

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

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

LLVM IR (-O2):
%struct.task_struct = type opaque
define void @sched_autogroup_create_attach(%struct.task_struct* nocapture %0) {
ret void
}
/* Type definitions */
struct stack_st_OPENSSL_STRING {
  int dummy;
};
typedef int /*<<< orphan*/ OPENSSL_STACK;

/* Variables and functions */
scalar_t__ OPENSSL_sk_delete_ptr(int /*<<< orphan*/ *, void const *);
char *sk_OPENSSL_STRING_delete_ptr(struct stack_st_OPENSSL_STRING *sk,
                                   char *ptr) {
  return (char *)OPENSSL_sk_delete_ptr((OPENSSL_STACK *)sk, (const void *)ptr);
}


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

x86 assembly (clang, -O2):
<sk_OPENSSL_STRING_delete_ptr>:
jmp    1030 <OPENSSL_sk_delete_ptr@plt>

LLVM IR (-O0):
%struct.stack_st_OPENSSL_STRING = type { i32 }
define i8* @sk_OPENSSL_STRING_delete_ptr(%struct.stack_st_OPENSSL_STRING* %0, i8* %1) {
%3 = alloca %struct.stack_st_OPENSSL_STRING*
%4 = alloca i8*
store %struct.stack_st_OPENSSL_STRING* %0, %struct.stack_st_OPENSSL_STRING** %3
store i8* %1, i8** %4
%5 = load %struct.stack_st_OPENSSL_STRING*, %struct.stack_st_OPENSSL_STRING** %3
%6 = bitcast %struct.stack_st_OPENSSL_STRING* %5 to i32*
%7 = load i8*, i8** %4
%8 = call i64 @OPENSSL_sk_delete_ptr(i32* %6, i8* %7)
%9 = inttoptr i64 %8 to i8*
ret i8* %9
}

LLVM IR (-O2):
%struct.stack_st_OPENSSL_STRING = type { i32 }
define i8* @sk_OPENSSL_STRING_delete_ptr(%struct.stack_st_OPENSSL_STRING* %0, i8* %1) {
%3 = getelementptr %struct.stack_st_OPENSSL_STRING, %struct.stack_st_OPENSSL_STRING* %0, i64 0, i32 0
%4 = tail call i64 @OPENSSL_sk_delete_ptr(i32* %3, i8* %1)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void MostraTodos(char memoria[][30]) {
  for (int i = 0; i < 3; i++)
    printf("%s\n", memoria[i]);
}


x86 assembly (clang, -O0):
<MostraTodos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    1156 <MostraTodos+0x46>
mov    -0x8(%rbp),%rsi
movslq -0xc(%rbp),%rax
imul   $0x1e,%rax,%rax
add    %rax,%rsi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <MostraTodos+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MostraTodos>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xee2(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0x1e(%rbx),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x3c,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @MostraTodos([30 x i8]* %0) {
%2 = getelementptr inbounds [30 x i8], [30 x i8]* %0, i64 0, i64 0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = getelementptr inbounds [30 x i8], [30 x i8]* %0, i64 1, i64 0
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [30 x i8], [30 x i8]* %0, i64 2, i64 0
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}
/* Type definitions */
typedef scalar_t__ wchar_t;

/* Variables and functions */
size_t wcslen(const wchar_t *s) {
  register size_t n = 0;
  while (*s) {
    n++;
    s++;
  }
  return n;
}


x86 assembly (clang, -O0):
<wcslen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     113b <wcslen+0x3b>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
jmp    1110 <wcslen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcslen>:
cmpq   $0x0,(%rdi)
je     1120 <wcslen+0x20>
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
lea    0x1(%rcx),%rax
cmpq   $0x0,0x8(%rdi,%rcx,8)
mov    %rax,%rcx
jne    1110 <wcslen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @wcslen(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = icmp eq i64 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %7, %4 ], [ 0, %1 ]
%6 = phi i64* [ %8, %4 ], [ %0, %1 ]
%7 = add i64 %5, 1
%8 = getelementptr inbounds i64, i64* %6, i64 1
%9 = load i64, i64* %8
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i64 [ 0, %1 ], [ %7, %4 ]
ret i64 %12
}
void ff_hevc_put_hevc_uni_epel_hv16_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_hv16_10_sse4() {
ret void
}