xunge/DecIR huggingface dataset:
void no_error_handler(const char *reason, const char *file, int line,
                      int gsl_errno) {
  (void)reason;
  (void)file;
  (void)line;
  (void)gsl_errno;
  return;
}


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

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

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

LLVM IR (-O2):
define void @no_error_handler(i8* nocapture %0, i8* nocapture %1, i32 %2, i32 %3) {
ret void
}
void foo(void) {
  unsigned int a;
  unsigned int b;
  unsigned int c;
  unsigned int d;
#pragma acc kernels copyin(a) create(b) copyout(c) copy(d)
  {
    a = 0;
    b = 0;
    c = 0;
    d = 0;
  }
}


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

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

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

LLVM IR (-O2):
define void @foo() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
__attribute__((noreturn)) int die(const char *tag) {
  perror(tag);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
call   1030 <perror@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define i32 @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define i32 @die(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
int tc_space(char c) {
  switch (c) {
  case ' ':
  case '\t':
  case '\r':
  case '\n':
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<tc_space>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xfffffff7,%eax
sub    $0x2,%eax
jb     1144 <tc_space+0x44>
jmp    1122 <tc_space+0x22>
mov    -0xc(%rbp),%eax
sub    $0xd,%eax
je     1144 <tc_space+0x44>
jmp    1133 <tc_space+0x33>
mov    -0xc(%rbp),%eax
sub    $0x20,%eax
jne    1150 <tc_space+0x50>
jmp    1144 <tc_space+0x44>
movl   $0x1,-0x4(%rbp)
jmp    1157 <tc_space+0x57>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tc_space>:
cmp    $0x20,%edi
ja     111d <tc_space+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100002600,%rdx
bt     %rcx,%rdx
jae    111d <tc_space+0x1d>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @tc_space(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %7 [
i32 32, label %6
i32 9, label %6
i32 13, label %6
i32 10, label %6
]
6: ; preds = %1, %1, %1, %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @tc_space(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %3 [
i32 32, label %4
i32 9, label %4
i32 13, label %4
i32 10, label %4
]
3: ; preds = %1
br label %4
4: ; preds = %1, %1, %1, %1, %3
%5 = phi i32 [ 0, %3 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %5
}
int cal(double a) {
  double b = 3.2;
  double c = 2.2;
  if ((a + b) != c)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<cal>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  0xef7(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xee2(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jne    1143 <cal+0x43>
jp     1143 <cal+0x43>
jmp    114f <cal+0x4f>
movl   $0x0,-0x4(%rbp)
jmp    1156 <cal+0x56>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cal>:
addsd  0xef8(%rip),%xmm0
cmpeqsd 0xef7(%rip),%xmm0
movq   %xmm0,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @cal(double %0) {
%2 = alloca i32
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double 3.200000e+00, double* %4
store double 2.200000e+00, double* %5
%6 = load double, double* %3
%7 = load double, double* %4
%8 = fadd double %6, %7
%9 = load double, double* %5
%10 = fcmp une double %8, %9
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 0, i32* %2
br label %13
12: ; preds = %1
store i32 1, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @cal(double %0) {
%2 = fadd double %0, 3.200000e+00
%3 = fcmp oeq double %2, 2.200000e+00
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int testeHexa(char hex[10]) {
  if (strcmp("0xDEADC0DE", hex) == 0) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<testeHexa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1142 <testeHexa+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1149 <testeHexa+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testeHexa>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"0xDEADC0DE\00"
define i32 @testeHexa(i8* %0) {
%2 = tail call i64 @strcmp(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
void f3(void) {
  short a;
  short b = 1;
  long long int c = 3;
#pragma omp atomic capture
  a = b = c + b;
  if (b != 4 || a != 4)
    __builtin_abort();
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movw   $0x1,-0x4(%rbp)
movq   $0x3,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movswq -0x4(%rbp),%rcx
add    %rcx,%rax
mov    %ax,-0x4(%rbp)
mov    %ax,-0x2(%rbp)
movswl -0x4(%rbp),%eax
cmp    $0x4,%eax
jne    1154 <f3+0x44>
movswl -0x2(%rbp),%eax
cmp    $0x4,%eax
je     1159 <f3+0x49>
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f3() {
%1 = alloca i16
%2 = alloca i16
%3 = alloca i64
store i16 1, i16* %2
store i64 3, i64* %3
%4 = load i64, i64* %3
%5 = load i16, i16* %2
%6 = sext i16 %5 to i64
%7 = add nsw i64 %4, %6
%8 = trunc i64 %7 to i16
store i16 %8, i16* %2
store i16 %8, i16* %1
%9 = load i16, i16* %2
%10 = sext i16 %9 to i32
%11 = icmp ne i32 %10, 4
br i1 %11, label %16, label %12
12: ; preds = %0
%13 = load i16, i16* %1
%14 = sext i16 %13 to i32
%15 = icmp ne i32 %14, 4
br i1 %15, label %16, label %17
16: ; preds = %12, %0
unreachable
17: ; preds = %12
ret void
}

LLVM IR (-O2):
define void @f3() {
ret void
}
void addReply(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               17, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<addReply>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x11,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<addReply>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x11,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.addReply = [9 x i8] c"addReply\00"
define void @addReply() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 17, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.addReply, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.addReply = [9 x i8] c"addReply\00"
define void @addReply() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 17, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.addReply, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fgetc(int /*<<< orphan*/ *);
int stl_get_little_int(FILE *fp) {
  int value;
  value = fgetc(fp) & 0xFF;
  value |= (fgetc(fp) & 0xFF) << 0x08;
  value |= (fgetc(fp) & 0xFF) << 0x10;
  value |= (fgetc(fp) & 0xFF) << 0x18;
  return (value);
}


x86 assembly (clang, -O0):
<stl_get_little_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
and    $0xff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
and    $0xff,%eax
shl    $0x8,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
and    $0xff,%eax
shl    $0x10,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
and    $0xff,%eax
shl    $0x18,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stl_get_little_int>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r15
call   1030 <fgetc@plt>
movzbl %al,%r14d
mov    %r15,%rdi
call   1030 <fgetc@plt>
shl    $0x8,%eax
movzwl %ax,%ebp
or     %r14d,%ebp
mov    %r15,%rdi
call   1030 <fgetc@plt>
movzbl %al,%ebx
shl    $0x10,%ebx
or     %ebp,%ebx
mov    %r15,%rdi
call   1030 <fgetc@plt>
shl    $0x18,%eax
or     %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @stl_get_little_int(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @fgetc(i32* %4)
%6 = and i32 %5, 255
store i32 %6, i32* %3
%7 = load i32*, i32** %2
%8 = call i32 @fgetc(i32* %7)
%9 = and i32 %8, 255
%10 = shl i32 %9, 8
%11 = load i32, i32* %3
%12 = or i32 %11, %10
store i32 %12, i32* %3
%13 = load i32*, i32** %2
%14 = call i32 @fgetc(i32* %13)
%15 = and i32 %14, 255
%16 = shl i32 %15, 16
%17 = load i32, i32* %3
%18 = or i32 %17, %16
store i32 %18, i32* %3
%19 = load i32*, i32** %2
%20 = call i32 @fgetc(i32* %19)
%21 = and i32 %20, 255
%22 = shl i32 %21, 24
%23 = load i32, i32* %3
%24 = or i32 %23, %22
store i32 %24, i32* %3
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @stl_get_little_int(i32* nocapture %0) {
%2 = tail call i32 @fgetc(i32* %0)
%3 = and i32 %2, 255
%4 = tail call i32 @fgetc(i32* %0)
%5 = shl i32 %4, 8
%6 = and i32 %5, 65280
%7 = or i32 %6, %3
%8 = tail call i32 @fgetc(i32* %0)
%9 = shl i32 %8, 16
%10 = and i32 %9, 16711680
%11 = or i32 %7, %10
%12 = tail call i32 @fgetc(i32* %0)
%13 = shl i32 %12, 24
%14 = or i32 %11, %13
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *malloc(scalar_t__);
int /*<<< orphan*/ printf(char *, char *);
scalar_t__ strlen(char *);
char *voltea_string(char *);
int main(void) {
  char *s = "Campos Verdes";
  char *p;
  p = malloc(strlen(s) + 1);
  p = s;
  char *s_duplicado;
  s_duplicado = voltea_string(s);
  printf("%s\n", s_duplicado);
  free(s_duplicado);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1060 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1070 <voltea_string@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xe6b(%rip),%rdi
call   1050 <printf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1050 <voltea_string@plt>
mov    %rax,%rbx
lea    0xec7(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Campos Verdes\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strlen(i8* %5)
%7 = add nsw i64 %6, 1
%8 = call i8* @malloc(i64 %7)
store i8* %8, i8** %3
%9 = load i8*, i8** %2
store i8* %9, i8** %3
%10 = load i8*, i8** %2
%11 = call i8* @voltea_string(i8* %10)
store i8* %11, i8** %4
%12 = load i8*, i8** %4
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %12)
%14 = load i8*, i8** %4
%15 = call i32 @free(i8* %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Campos Verdes\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call i8* @voltea_string(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%3 = tail call i32 @free(i8* %1)
ret i32 0
}
int base2int(char b) {
  if (b > 'T')
    b = b - ('T' - 't');
  switch (b) {
  case 'A':
    return 0;
  case 'C':
    return 1;
  case 'G':
    return 2;
  case 'T':
    return 3;
    return 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<base2int>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x54,%eax
jle    1121 <base2int+0x21>
movsbl -0x5(%rbp),%eax
sub    $0xffffffe0,%eax
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
add    $0xffffffbf,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x13,%eax
ja     117b <base2int+0x7b>
mov    -0x10(%rbp),%rax
lea    0xebe(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x4(%rbp)
jmp    1182 <base2int+0x82>
movl   $0x1,-0x4(%rbp)
jmp    1182 <base2int+0x82>
movl   $0x2,-0x4(%rbp)
jmp    1182 <base2int+0x82>
movl   $0x3,-0x4(%rbp)
jmp    1182 <base2int+0x82>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<base2int>:
lea    0x20(%rdi),%eax
cmp    $0x55,%dil
movzbl %al,%eax
cmovl  %edi,%eax
movsbl %al,%ecx
cmp    $0x54,%ecx
je     1127 <base2int+0x27>
cmp    $0x47,%ecx
je     112d <base2int+0x2d>
xor    %eax,%eax
cmp    $0x43,%ecx
jne    112c <base2int+0x2c>
mov    $0x1,%eax
ret
mov    $0x3,%eax
ret
mov    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @base2int(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sgt i32 %5, 84
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = sub nsw i32 %9, -32
%11 = trunc i32 %10 to i8
store i8 %11, i8* %3
br label %12
12: ; preds = %7, %1
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
switch i32 %14, label %19 [
i32 65, label %15
i32 67, label %16
i32 71, label %17
i32 84, label %18
]
15: ; preds = %12
store i32 0, i32* %2
br label %20
16: ; preds = %12
store i32 1, i32* %2
br label %20
17: ; preds = %12
store i32 2, i32* %2
br label %20
18: ; preds = %12
store i32 3, i32* %2
br label %20
19: ; preds = %12
store i32 0, i32* %2
br label %20
20: ; preds = %19, %18, %17, %16, %15
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @base2int(i8 signext %0) {
%2 = icmp sgt i8 %0, 84
%3 = add i8 %0, 32
%4 = select i1 %2, i8 %3, i8 %0
%5 = sext i8 %4 to i32
switch i32 %5, label %9 [
i32 84, label %8
i32 67, label %6
i32 71, label %7
]
6: ; preds = %1
br label %9
7: ; preds = %1
br label %9
8: ; preds = %1
br label %9
9: ; preds = %1, %8, %7, %6
%10 = phi i32 [ 3, %8 ], [ 2, %7 ], [ 1, %6 ], [ 0, %1 ]
ret i32 %10
}
int sp_ienv(int ispec) {
  switch (ispec) {
  case 1:
    return (3);
  case 2:
    return (2);
  case 3:
    return (10);
  case 4:
    return (20);
  case 5:
    return (10);
  case 6:
    return (2);
  }
  return (-1);
}


x86 assembly (clang, -O0):
<sp_ienv>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x5,%eax
ja     1178 <sp_ienv+0x78>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x3,-0x4(%rbp)
jmp    117f <sp_ienv+0x7f>
movl   $0x2,-0x4(%rbp)
jmp    117f <sp_ienv+0x7f>
movl   $0xa,-0x4(%rbp)
jmp    117f <sp_ienv+0x7f>
movl   $0x14,-0x4(%rbp)
jmp    117f <sp_ienv+0x7f>
movl   $0xa,-0x4(%rbp)
jmp    117f <sp_ienv+0x7f>
movl   $0x2,-0x4(%rbp)
jmp    117f <sp_ienv+0x7f>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sp_ienv>:
add    $0xffffffff,%edi
mov    $0xffffffff,%eax
cmp    $0x5,%edi
ja     111a <sp_ienv+0x1a>
movslq %edi,%rax
lea    0xee9(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @sp_ienv(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %11 [
i32 1, label %5
i32 2, label %6
i32 3, label %7
i32 4, label %8
i32 5, label %9
i32 6, label %10
]
5: ; preds = %1
store i32 3, i32* %2
br label %12
6: ; preds = %1
store i32 2, i32* %2
br label %12
7: ; preds = %1
store i32 10, i32* %2
br label %12
8: ; preds = %1
store i32 20, i32* %2
br label %12
9: ; preds = %1
store i32 10, i32* %2
br label %12
10: ; preds = %1
store i32 2, i32* %2
br label %12
11: ; preds = %1
store i32 -1, i32* %2
br label %12
12: ; preds = %11, %10, %9, %8, %7, %6, %5
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@switch.table.sp_ienv = [6 x i32] [i32 3, i32 2, i32 10, i32 20, i32 10, i32 2]
define i32 @sp_ienv(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 6
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [6 x i32], [6 x i32]* @switch.table.sp_ienv, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ -1, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ GL_LINES;
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glVertex2f(double, double);
void drawLine(void) {
  glBegin(GL_LINES);
  glVertex2f(0.0, 0.5);
  glVertex2f(15.0, 0.5);
  glEnd();
}


x86 assembly (clang, -O0):
<drawLine>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
call   1050 <glBegin@plt>
xorps  %xmm0,%xmm0
movsd  0xebb(%rip),%xmm1
call   1040 <glVertex2f@plt>
movsd  0xea6(%rip),%xmm0
movsd  0xea6(%rip),%xmm1
call   1040 <glVertex2f@plt>
mov    $0x0,%al
call   1030 <glEnd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawLine>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
call   1050 <glBegin@plt>
movsd  0xeb9(%rip),%xmm1
xorps  %xmm0,%xmm0
call   1040 <glVertex2f@plt>
movsd  0xeb1(%rip),%xmm0
movsd  0xea1(%rip),%xmm1
call   1040 <glVertex2f@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <glEnd@plt>

LLVM IR (-O0):
@GL_LINES = global i32 0
define void @drawLine() {
%1 = load i32, i32* @GL_LINES
%2 = call i32 @glBegin(i32 %1)
%3 = call i32 @glVertex2f(double 0.000000e+00, double 5.000000e-01)
%4 = call i32 @glVertex2f(double 1.500000e+01, double 5.000000e-01)
%5 = call i32 (...) @glEnd()
ret void
}

LLVM IR (-O2):
@GL_LINES = global i32 0
define void @drawLine() {
%1 = load i32, i32* @GL_LINES
%2 = tail call i32 @glBegin(i32 %1)
%3 = tail call i32 @glVertex2f(double 0.000000e+00, double 5.000000e-01)
%4 = tail call i32 @glVertex2f(double 1.500000e+01, double 5.000000e-01)
%5 = tail call i32 (...) @glEnd()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, unsigned int,
                           unsigned int, unsigned int, unsigned int);
void PrintExtent(FILE *out, unsigned begin_line, unsigned begin_column,
                 unsigned end_line, unsigned end_column) {
  fprintf(out, "[%d:%d - %d:%d]", begin_line, begin_column, end_line,
          end_column);
}


x86 assembly (clang, -O0):
<PrintExtent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
lea    0xebe(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintExtent>:
mov    %r8d,%r9d
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%edx
lea    0xedf(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@.str = [16 x i8] c"[%d:%d - %d:%d]\00"
define void @PrintExtent(i32* nocapture %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2, i32 %3, i32 %4)
ret void
}
void XkbSetServerInternalMods() {}


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

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

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

LLVM IR (-O2):
define void @XkbSetServerInternalMods() {
ret void
}
void _op(char const **mode) { (*mode)++; }


x86 assembly (clang, -O0):
<_op>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_op>:
addq   $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @_op(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i32 1
store i8* %5, i8** %3
ret void
}

LLVM IR (-O2):
define void @_op(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = getelementptr inbounds i8, i8* %2, i64 1
store i8* %3, i8** %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
scalar_t__ malloc(int);
int /*<<< orphan*/ strftime(char *, int, char const *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *time2String(const char *template) {
  time_t now;
  struct tm *tmNow;
  int timeString_size = 26 * sizeof(char) * 8;
  char *timeString = (char *)malloc(timeString_size);
  time(&now);
  tmNow = localtime(&now);
  strftime(timeString, 80, template, tmNow);
  return (timeString);
}


x86 assembly (clang, -O0):
<time2String>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0xd0,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1050 <malloc@plt>
mov    %rax,-0x28(%rbp)
lea    -0xc(%rbp),%rdi
call   1040 <time@plt>
lea    -0xc(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x50,%esi
call   1060 <strftime@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time2String>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%r14
mov    $0xd0,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
lea    0xc(%rsp),%r15
mov    %r15,%rdi
call   1040 <time@plt>
mov    %r15,%rdi
call   1030 <localtime@plt>
mov    %rbx,%rdi
mov    $0x50,%esi
mov    %r14,%rdx
mov    %rax,%rcx
call   1060 <strftime@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define i8* @time2String(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca %struct.tm*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %2
store i32 208, i32* %5
%7 = load i32, i32* %5
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %6
%10 = call i32 @time(i32* %3)
%11 = call %struct.tm* @localtime(i32* %3)
store %struct.tm* %11, %struct.tm** %4
%12 = load i8*, i8** %6
%13 = load i8*, i8** %2
%14 = load %struct.tm*, %struct.tm** %4
%15 = call i32 @strftime(i8* %12, i32 80, i8* %13, %struct.tm* %14)
%16 = load i8*, i8** %6
ret i8* %16
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i8* @time2String(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i64 @malloc(i32 208)
%5 = inttoptr i64 %4 to i8*
%6 = call i32 @time(i32* %2)
%7 = call %struct.tm* @localtime(i32* %2)
%8 = call i32 @strftime(i8* %5, i32 80, i8* %0, %struct.tm* %7)
ret i8* %5
}
/* Variables and functions */
float remainderf(float, float);
float __ocl_remainder_float(float src1, float src2) {
  return remainderf(src1, src2);
}


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

x86 assembly (clang, -O2):
<__ocl_remainder_float>:
jmp    1030 <remainderf@plt>

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

LLVM IR (-O2):
define float @__ocl_remainder_float(float %0, float %1) {
%3 = tail call float @remainderf(float %0, float %1)
ret float %3
}
int is_trim(char c, char trim) {
  if (c == trim)
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<is_trim>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
movsbl -0x5(%rbp),%eax
movsbl -0x6(%rbp),%ecx
cmp    %ecx,%eax
jne    112c <is_trim+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    1133 <is_trim+0x33>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_trim>:
xor    %eax,%eax
cmp    %sil,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_trim(i8 signext %0, i8 signext %1) {
%3 = icmp eq i8 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
int h(int i) { return (i + (-2)) <= i; }


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xfffffffe,%eax
cmp    -0x4(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @h(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, -2
%5 = load i32, i32* %2
%6 = icmp sle i32 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @h(i32 %0) {
ret i32 1
}
double abs_dbl(double a) { return a >= 0 ? a : -a; }


x86 assembly (clang, -O0):
<abs_dbl>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     112a <abs_dbl+0x2a>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    114b <abs_dbl+0x4b>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs_dbl>:
movapd 0xef8(%rip),%xmm1
xorpd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
cmplesd %xmm0,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm2,%xmm0
ret

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

LLVM IR (-O2):
define double @abs_dbl(double %0) {
%2 = fcmp oge double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %0, double %3
ret double %4
}
/* Variables and functions */
void *f2(float, double);
int f2_Skel(int *argTypes, void **args) {
  *args = f2(*((float *)(*(args + 1))), *((double *)(*(args + 2))));
  return 0;
}


x86 assembly (clang, -O0):
<f2_Skel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
movsd  (%rax),%xmm1
call   1030 <f2@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2_Skel>:
push   %rbx
mov    %rsi,%rbx
mov    0x8(%rsi),%rax
mov    0x10(%rsi),%rcx
movss  (%rax),%xmm0
movsd  (%rcx),%xmm1
call   1030 <f2@plt>
mov    %rax,(%rbx)
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @f2_Skel(i32* %0, i8** %1) {
%3 = alloca i32*
%4 = alloca i8**
store i32* %0, i32** %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = getelementptr inbounds i8*, i8** %5, i64 1
%7 = load i8*, i8** %6
%8 = bitcast i8* %7 to float*
%9 = load float, float* %8
%10 = load i8**, i8*** %4
%11 = getelementptr inbounds i8*, i8** %10, i64 2
%12 = load i8*, i8** %11
%13 = bitcast i8* %12 to double*
%14 = load double, double* %13
%15 = call i8* @f2(float %9, double %14)
%16 = load i8**, i8*** %4
store i8* %15, i8** %16
ret i32 0
}

LLVM IR (-O2):
define i32 @f2_Skel(i32* nocapture readnone %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = bitcast i8** %3 to float**
%5 = load float*, float** %4
%6 = load float, float* %5
%7 = getelementptr inbounds i8*, i8** %1, i64 2
%8 = bitcast i8** %7 to double**
%9 = load double*, double** %8
%10 = load double, double* %9
%11 = tail call i8* @f2(float %6, double %10)
store i8* %11, i8** %1
ret i32 0
}
void swap_char(char *x, char *y) {
  char temp;
  temp = *x;
  *x = *y;
  *y = temp;
}


x86 assembly (clang, -O0):
<swap_char>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x11(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_char>:
mov    (%rdi),%al
mov    (%rsi),%cl
mov    %cl,(%rdi)
mov    %al,(%rsi)
ret

LLVM IR (-O0):
define void @swap_char(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
%7 = load i8, i8* %6
store i8 %7, i8* %5
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = load i8*, i8** %3
store i8 %9, i8* %10
%11 = load i8, i8* %5
%12 = load i8*, i8** %4
store i8 %11, i8* %12
ret void
}

LLVM IR (-O2):
define void @swap_char(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
store i8 %4, i8* %0
store i8 %3, i8* %1
ret void
}
int test_imm_67uint16_mem(unsigned short *val) {
  return ((*val) & (0x67 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_67uint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, 103
%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_67uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 103
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void SHA256_Transform(void) {}


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

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

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

LLVM IR (-O2):
define void @SHA256_Transform() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ loglike_posterior_theta_initialize();
void fitfun_initialize() { loglike_posterior_theta_initialize(); }


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

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

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

LLVM IR (-O2):
define void @fitfun_initialize() {
%1 = tail call i32 (...) @loglike_posterior_theta_initialize()
ret void
}
/* Variables and functions */
float rintf(float);
float _mesa_roundevenf(float x) { return rintf(x); }


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

x86 assembly (clang, -O2):
<_mesa_roundevenf>:
jmp    1030 <rintf@plt>

LLVM IR (-O0):
define float @_mesa_roundevenf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @llvm.rint.f32(float %3)
ret float %4
}

LLVM IR (-O2):
define float @_mesa_roundevenf(float %0) {
%2 = tail call float @llvm.rint.f32(float %0)
ret float %2
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
int strlen(char const *);
char *strdup(const char *s) {
  size_t length;
  char *d;
  length = strlen(s) + 1;
  d = malloc(sizeof(char) * length);
  if (!d)
    return NULL;
  memcpy(d, s, length);
  return d;
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1179 <strdup+0x49>
movq   $0x0,-0x8(%rbp)
jmp    1192 <strdup+0x62>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
mov    %eax,%ebp
add    $0x1,%ebp
mov    %ebp,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     115e <strdup+0x2e>
movslq %ebp,%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* %6)
%8 = add nsw i32 %7, 1
%9 = sext i32 %8 to i64
store i64 %9, i64* %4
%10 = load i64, i64* %4
%11 = mul i64 1, %10
%12 = trunc i64 %11 to i32
%13 = call i8* @malloc(i32 %12)
store i8* %13, i8** %5
%14 = load i8*, i8** %5
%15 = icmp ne i8* %14, null
br i1 %15, label %17, label %16
16: ; preds = %1
store i8* null, i8** %2
br label %23
17: ; preds = %1
%18 = load i8*, i8** %5
%19 = load i8*, i8** %3
%20 = load i64, i64* %4
%21 = call i32 @memcpy(i8* %18, i8* %19, i64 %20)
%22 = load i8*, i8** %5
store i8* %22, i8** %2
br label %23
23: ; preds = %17, %16
%24 = load i8*, i8** %2
ret i8* %24
}

LLVM IR (-O2):
define i8* @strdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i8* @malloc(i32 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = sext i32 %3 to i64
%8 = tail call i32 @memcpy(i8* %4, i8* %0, i64 %7)
br label %9
9: ; preds = %1, %6
ret i8* %4
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned long property;
};
struct TYPE_4__ {
  TYPE_1__ xselection;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xselection_property(void *_p, unsigned long _v) {
  ((XEvent *)_p)->xselection.property = (unsigned long)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XEvent_xselection_property(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
scalar_t__ ixp2000_has_flash();
scalar_t__ ixp2000_is_pcimaster();
unsigned int ixdp2x00_master_npu(void) {
  return ((ixp2000_has_flash()) && (ixp2000_is_pcimaster()));
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <ixp2000_has_flash@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
je     1152 <ixdp2x00_master_npu+0x32>
mov    $0x0,%al
call   1040 <ixp2000_is_pcimaster@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <ixp2000_has_flash@plt>
test   %rax,%rax
je     113e <ixdp2x00_master_npu+0x1e>
xor    %eax,%eax
call   1040 <ixp2000_is_pcimaster@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ixdp2x00_master_npu() {
%1 = call i64 (...) @ixp2000_has_flash()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = call i64 (...) @ixp2000_is_pcimaster()
%5 = icmp ne i64 %4, 0
br label %6
6: ; preds = %3, %0
%7 = phi i1 [ false, %0 ], [ %5, %3 ]
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ixdp2x00_master_npu() {
%1 = tail call i64 (...) @ixp2000_has_flash()
%2 = icmp eq i64 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i64 (...) @ixp2000_is_pcimaster()
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 0, %0 ], [ %6, %3 ]
ret i32 %8
}
int foo(float x, float y) { return (_Complex float)x == (_Complex float)y; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
cmpeqss %xmm1,%xmm0
movd   %xmm0,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @foo(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp oeq float %5, %6
%8 = and i1 %7, true
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @foo(float %0, float %1) {
%3 = fcmp oeq float %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct imgdst {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct imgdst *);
void memdst_free(struct imgdst *img) {
  if (!img) {
    return;
  }
  free(img);
}


x86 assembly (clang, -O0):
<memdst_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <memdst_free+0x1c>
jmp    1135 <memdst_free+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memdst_free>:
test   %rdi,%rdi
je     111a <memdst_free+0xa>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
%struct.imgdst = type { i32 }
define void @memdst_free(%struct.imgdst* %0) {
%2 = icmp eq %struct.imgdst* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(%struct.imgdst* %0)
br label %5
5: ; preds = %1, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ iscntrl(unsigned char);
int main(void) {
  for (unsigned char x = 0; x < 255; x++) {
    if (iscntrl(x)) {
      assert(x < 0x20 || x == 0x7F);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x0,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0xff,%eax
jge    1193 <main+0x73>
movzbl -0x5(%rbp),%edi
call   1030 <iscntrl@plt>
cmp    $0x0,%rax
je     1181 <main+0x61>
movzbl -0x5(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x6(%rbp)
jl     1174 <main+0x54>
movzbl -0x5(%rbp),%eax
cmp    $0x7f,%eax
sete   %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
jmp    1186 <main+0x66>
mov    -0x5(%rbp),%al
add    $0x1,%al
mov    %al,-0x5(%rbp)
jmp    1133 <main+0x13>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
jmp    1138 <main+0x18>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%bl
cmp    $0xff,%bl
je     115d <main+0x3d>
movzbl %bl,%edi
call   1030 <iscntrl@plt>
test   %rax,%rax
je     1130 <main+0x10>
cmp    $0x20,%bl
setb   %al
cmp    $0x7f,%bl
sete   %cl
or     %al,%cl
movzbl %cl,%edi
call   1040 <assert@plt>
jmp    1130 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 0, i8* %2
br label %3
3: ; preds = %24, %0
%4 = load i8, i8* %2
%5 = zext i8 %4 to i32
%6 = icmp slt i32 %5, 255
br i1 %6, label %7, label %27
7: ; preds = %3
%8 = load i8, i8* %2
%9 = call i64 @iscntrl(i8 zeroext %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %23
11: ; preds = %7
%12 = load i8, i8* %2
%13 = zext i8 %12 to i32
%14 = icmp slt i32 %13, 32
br i1 %14, label %19, label %15
15: ; preds = %11
%16 = load i8, i8* %2
%17 = zext i8 %16 to i32
%18 = icmp eq i32 %17, 127
br label %19
19: ; preds = %15, %11
%20 = phi i1 [ true, %11 ], [ %18, %15 ]
%21 = zext i1 %20 to i32
%22 = call i32 @assert(i32 %21)
br label %23
23: ; preds = %19, %7
br label %24
24: ; preds = %23
%25 = load i8, i8* %2
%26 = add i8 %25, 1
store i8 %26, i8* %2
br label %3
27: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %2
1: ; preds = %12
ret i32 0
2: ; preds = %0, %12
%3 = phi i8 [ 0, %0 ], [ %13, %12 ]
%4 = tail call i64 @iscntrl(i8 zeroext %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %2
%7 = icmp ult i8 %3, 32
%8 = icmp eq i8 %3, 127
%9 = or i1 %7, %8
%10 = zext i1 %9 to i32
%11 = tail call i32 @assert(i32 %10)
br label %12
12: ; preds = %2, %6
%13 = add nuw i8 %3, 1
%14 = icmp eq i8 %13, -1
br i1 %14, label %1, label %2
}
__attribute__((weak)) int _link(char *oldname, char *newname) {
  if (oldname == newname)
    return -1;
  else
    return -2;
}


x86 assembly (clang, -O0):
<_link>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    1126 <_link+0x26>
movl   $0xffffffff,-0x4(%rbp)
jmp    112d <_link+0x2d>
movl   $0xfffffffe,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_link>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
or     $0xfffffffe,%eax
ret

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

LLVM IR (-O2):
define weak i32 @_link(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, %1
%4 = select i1 %3, i32 -1, i32 -2
ret i32 %4
}