xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exitFatal(char *, int);
scalar_t__ readStringExpanded(char *, size_t, int);
void readFileName(char buffer[], size_t len) {
  if (readStringExpanded(buffer, len, 0x800u) == 0)
    exitFatal("Invalid filename", sizeof("Invalid filename") - 1);
}


x86 assembly (clang, -O0):
<readFileName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x800,%edx
call   1040 <readStringExpanded@plt>
cmp    $0x0,%rax
jne    115d <readFileName+0x3d>
lea    0xead(%rip),%rdi
mov    $0x10,%esi
call   1030 <exitFatal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readFileName>:
push   %rax
mov    $0x800,%edx
call   1040 <readStringExpanded@plt>
test   %rax,%rax
je     1132 <readFileName+0x12>
pop    %rax
ret
lea    0xec7(%rip),%rdi
mov    $0x10,%esi
pop    %rax
jmp    1030 <exitFatal@plt>

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

LLVM IR (-O2):
@.str = [17 x i8] c"Invalid filename\00"
define void @readFileName(i8* %0, i64 %1) {
%3 = tail call i64 @readStringExpanded(i8* %0, i64 %1, i32 2048)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @exitFatal(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 16)
br label %7
7: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void quit(void) {
  printf("\n==================================================================="
         "=============\n");
  printf("================== Thanks for using Car Fleet Database v0.1! "
         "===================\n");
  printf("====================================================================="
         "===========");
}


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

x86 assembly (clang, -O2):
<quit>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1e(%rip),%rdi
call   1030 <puts@plt>
lea    0xec1(%rip),%rdi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [83 x i8] c"\0A================================================================================\0A\00"
@.str.1 = [82 x i8] c"================== Thanks for using Car Fleet Database v0.1! ===================\0A\00"
@.str.2 = [81 x i8] c"================================================================================\00"
define void @quit() {
%1 = call i32 @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.2 = [81 x i8] c"================================================================================\00"
@str = [82 x i8] c"\0A================================================================================\00"
@str.3 = [81 x i8] c"================== Thanks for using Car Fleet Database v0.1! ===================\00"
define void @quit() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([82 x i8], [82 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @.str.2, i64 0, i64 0))
ret void
}
void threegpplte_rsc_termination(unsigned char *x, unsigned char *z,
                                 unsigned char *state) {
  *z = ((*state >> 2) ^ (*state)) & 1;
  *x = ((*state) ^ (*state >> 1)) & 1;
  *state = (*state) >> 1;
}


x86 assembly (clang, -O0):
<threegpplte_rsc_termination>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
sar    $0x2,%eax
mov    -0x18(%rbp),%rcx
movzbl (%rcx),%ecx
xor    %ecx,%eax
and    $0x1,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movzbl (%rcx),%ecx
sar    $0x1,%ecx
xor    %ecx,%eax
and    $0x1,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
sar    $0x1,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<threegpplte_rsc_termination>:
mov    (%rdx),%al
mov    %eax,%ecx
shr    $0x2,%cl
xor    %al,%cl
and    $0x1,%cl
mov    %cl,(%rsi)
mov    (%rdx),%al
mov    %eax,%ecx
shr    %cl
xor    %al,%cl
and    $0x1,%cl
mov    %cl,(%rdi)
shrb   (%rdx)
ret

LLVM IR (-O0):
define void @threegpplte_rsc_termination(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 i8*, i8** %6
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = ashr i32 %9, 2
%11 = load i8*, i8** %6
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = xor i32 %10, %13
%15 = and i32 %14, 1
%16 = trunc i32 %15 to i8
%17 = load i8*, i8** %5
store i8 %16, i8* %17
%18 = load i8*, i8** %6
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = load i8*, i8** %6
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = ashr i32 %23, 1
%25 = xor i32 %20, %24
%26 = and i32 %25, 1
%27 = trunc i32 %26 to i8
%28 = load i8*, i8** %4
store i8 %27, i8* %28
%29 = load i8*, i8** %6
%30 = load i8, i8* %29
%31 = zext i8 %30 to i32
%32 = ashr i32 %31, 1
%33 = trunc i32 %32 to i8
%34 = load i8*, i8** %6
store i8 %33, i8* %34
ret void
}

LLVM IR (-O2):
define void @threegpplte_rsc_termination(i8* nocapture writeonly %0, i8* nocapture writeonly %1, i8* nocapture %2) {
%4 = load i8, i8* %2
%5 = lshr i8 %4, 2
%6 = xor i8 %5, %4
%7 = and i8 %6, 1
store i8 %7, i8* %1
%8 = load i8, i8* %2
%9 = lshr i8 %8, 1
%10 = xor i8 %9, %8
%11 = and i8 %10, 1
store i8 %11, i8* %0
%12 = load i8, i8* %2
%13 = lshr i8 %12, 1
store i8 %13, i8* %2
ret void
}
/* Variables and functions */
scalar_t__ isspace(char const);
char *skip_whitespace(const char *str) {
  while (isspace(*str))
    str++;
  return (char *)str;
}


x86 assembly (clang, -O0):
<skip_whitespace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1143 <skip_whitespace+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <skip_whitespace+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_whitespace>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <skip_whitespace+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @skip_whitespace(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
/* Variables and functions */
double trunc(double);
double double_truncate(double val) { return trunc(val); }


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

x86 assembly (clang, -O2):
<double_truncate>:
jmp    1030 <trunc@plt>

LLVM IR (-O0):
define double @double_truncate(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.trunc.f64(double %3)
ret double %4
}

LLVM IR (-O2):
define double @double_truncate(double %0) {
%2 = tail call double @llvm.trunc.f64(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  if (n > 0)
    printf("YES");
  else
    printf("NO");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jle    115a <main+0x3a>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
jmp    1166 <main+0x46>
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
lea    0xec5(%rip),%rax
lea    0xec2(%rip),%rdi
cmovg  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"YES\00"
@.str.2 = [3 x i8] c"NO\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp sgt i32 %4, 0
%6 = select i1 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0)
%7 = call i32 @printf(i8* dereferenceable(1) %6)
ret i32 0
}
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *copy_string(const char *s) {
  char *ns = malloc(strlen(s) + 1);
  strcpy(ns, s);
  return ns;
}


x86 assembly (clang, -O0):
<copy_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_string>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @copy_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @copy_string(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
/* Variables and functions */
void *malloc(int);
void *cmsMem_alloc(int size, int flag) { return malloc(size); }


x86 assembly (clang, -O0):
<cmsMem_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <malloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmsMem_alloc>:
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @cmsMem_alloc(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 i8* @malloc(i32 %5)
ret i8* %6
}

LLVM IR (-O2):
define noalias i8* @cmsMem_alloc(i32 %0, i32 %1) {
%3 = tail call i8* @malloc(i32 %0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ fatalf(char *, char const *);
void fatal(const char *msg) { fatalf("%s", msg); }


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

x86 assembly (clang, -O2):
<fatal>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <fatalf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @fatal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @fatalf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @fatal(i8* %0) {
%2 = tail call i32 @fatalf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
struct servent *getservent(void) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.servent = type opaque
define %struct.servent* @getservent() {
ret %struct.servent* null
}

LLVM IR (-O2):
%struct.servent = type opaque
define noalias %struct.servent* @getservent() {
ret %struct.servent* null
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main(void) {
  float height;
  printf("Input your height (cm):");
  scanf("%f", &height);
  printf("Your height in inches is %f!\n", height / 2.54);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea2(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xeba(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeea(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
divsd  0xeae(%rip),%xmm0
lea    0xeca(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Input your height (cm):\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [30 x i8] c"Your height in inches is %f!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%5 = load float, float* %2
%6 = fpext float %5 to double
%7 = fdiv double %6, 2.540000e+00
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), double %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"Input your height (cm):\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [30 x i8] c"Your height in inches is %f!\0A\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = fpext float %5 to double
%7 = fdiv double %6, 2.540000e+00
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), double %7)
ret i32 0
}
int q_isgraph(int c) { return (c > 0x20 && c <= 0x7e); }


x86 assembly (clang, -O0):
<q_isgraph>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1120 <q_isgraph+0x20>
cmpl   $0x7e,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<q_isgraph>:
add    $0xffffffdf,%edi
xor    %eax,%eax
cmp    $0x5e,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @q_isgraph(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 32
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 126
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @q_isgraph(i32 %0) {
%2 = add i32 %0, -33
%3 = icmp ult i32 %2, 94
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct test {
  int dummy;
};

/* Variables and functions */
int test_run_path(struct test *, char *);
int test_run(struct test *tg) { return test_run_path(tg, ""); }


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

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

LLVM IR (-O0):
%struct.test = type { i32 }
@.str = [1 x i8] zeroinitializer
define i32 @test_run(%struct.test* %0) {
%2 = alloca %struct.test*
store %struct.test* %0, %struct.test** %2
%3 = load %struct.test*, %struct.test** %2
%4 = call i32 @test_run_path(%struct.test* %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
%struct.test = type { i32 }
@.str = [1 x i8] zeroinitializer
define i32 @test_run(%struct.test* %0) {
%2 = tail call i32 @test_run_path(%struct.test* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
/* Variables and functions */
unsigned long PRCMHIBRegRead(int);
unsigned long RTCU32SecRegRead(void) {
  return (PRCMHIBRegRead((0x4402F800 + 0x00000424)));
}


x86 assembly (clang, -O0):
<RTCU32SecRegRead>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4402fc24,%edi
call   1030 <PRCMHIBRegRead@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<RTCU32SecRegRead>:
mov    $0x4402fc24,%edi
jmp    1030 <PRCMHIBRegRead@plt>

LLVM IR (-O0):
define i64 @RTCU32SecRegRead() {
%1 = call i64 @PRCMHIBRegRead(i32 1141046308)
ret i64 %1
}

LLVM IR (-O2):
define i64 @RTCU32SecRegRead() {
%1 = tail call i64 @PRCMHIBRegRead(i32 1141046308)
ret i64 %1
}
/* Variables and functions */
unsigned short big2littleus(unsigned short);
scalar_t__ isLittleEndian();
unsigned short big2hostus(unsigned short num) {
  if (isLittleEndian())
    return big2littleus(num);
  return num;
}


x86 assembly (clang, -O0):
<big2hostus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <isLittleEndian@plt>
cmp    $0x0,%rax
je     1152 <big2hostus+0x32>
movzwl -0x4(%rbp),%edi
call   1040 <big2littleus@plt>
mov    %ax,-0x2(%rbp)
jmp    115a <big2hostus+0x3a>
mov    -0x4(%rbp),%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<big2hostus>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <isLittleEndian@plt>
test   %rax,%rax
je     1138 <big2hostus+0x18>
movzwl %bx,%edi
pop    %rbx
jmp    1040 <big2littleus@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i16 @big2hostus(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i16
store i16 %0, i16* %3
%4 = call i64 (...) @isLittleEndian()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i16, i16* %3
%8 = call zeroext i16 @big2littleus(i16 zeroext %7)
store i16 %8, i16* %2
br label %11
9: ; preds = %1
%10 = load i16, i16* %3
store i16 %10, i16* %2
br label %11
11: ; preds = %9, %6
%12 = load i16, i16* %2
ret i16 %12
}

LLVM IR (-O2):
define zeroext i16 @big2hostus(i16 zeroext %0) {
%2 = tail call i64 (...) @isLittleEndian()
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call zeroext i16 @big2littleus(i16 zeroext %0)
br label %6
6: ; preds = %1, %4
%7 = phi i16 [ %5, %4 ], [ %0, %1 ]
ret i16 %7
}
int mrp(int motor, int speed, long delta_pos) {}


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

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

LLVM IR (-O0):
define i32 @mrp(i32 %0, i32 %1, i64 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i64
store i32 %0, i32* %5
store i32 %1, i32* %6
store i64 %2, i64* %7
%8 = load i32, i32* %4
ret i32 %8
}

LLVM IR (-O2):
define i32 @mrp(i32 %0, i32 %1, i64 %2) {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ Mem_FwriteSize_t(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ Mem_FwriteStr(char const *, int /*<<< orphan*/ *);
int /*<<< orphan*/ strlen(char const *);
void Mem_FputStr(const char *str, FILE *fp) {
  Mem_FwriteSize_t(strlen(str), fp);
  Mem_FwriteStr(str, fp);
  return;
}


x86 assembly (clang, -O0):
<Mem_FputStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1040 <Mem_FwriteSize_t@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <Mem_FwriteStr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mem_FputStr>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%edi
mov    %r14,%rsi
call   1040 <Mem_FwriteSize_t@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <Mem_FwriteStr@plt>

LLVM IR (-O0):
define void @Mem_FputStr(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = call i32 @strlen(i8* %5)
%7 = load i32*, i32** %4
%8 = call i32 @Mem_FwriteSize_t(i32 %6, i32* %7)
%9 = load i8*, i8** %3
%10 = load i32*, i32** %4
%11 = call i32 @Mem_FwriteStr(i8* %9, i32* %10)
ret void
}

LLVM IR (-O2):
define void @Mem_FputStr(i8* %0, i32* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @Mem_FwriteSize_t(i32 %3, i32* %1)
%5 = tail call i32 @Mem_FwriteStr(i8* %0, i32* %1)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint8_t clamp8(const uint16_t in_VALUE) {
  return (in_VALUE > 0xFF) ? 0xFF : in_VALUE;
}


x86 assembly (clang, -O0):
<clamp8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0xff,-0x4(%rbp)
jle    1121 <clamp8+0x21>
mov    $0xff,%eax
mov    %eax,-0x8(%rbp)
jmp    1127 <clamp8+0x27>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp8>:
cmp    $0xff,%edi
mov    $0xff,%eax
cmovl  %edi,%eax
ret

LLVM IR (-O0):
define i32 @clamp8(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 255
br i1 %4, label %5, label %6
5: ; preds = %1
br label %8
6: ; preds = %1
%7 = load i32, i32* %2
br label %8
8: ; preds = %6, %5
%9 = phi i32 [ 255, %5 ], [ %7, %6 ]
ret i32 %9
}

LLVM IR (-O2):
define i32 @clamp8(i32 %0) {
%2 = icmp slt i32 %0, 255
%3 = select i1 %2, i32 %0, i32 255
ret i32 %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int same_screen;
};
typedef TYPE_1__ XKeyEvent;

/* Variables and functions */
void set_XKeyEvent_same_screen(void *_p, int _v) {
  ((XKeyEvent *)_p)->same_screen = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XKeyEvent_same_screen>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XKeyEvent_same_screen(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
scalar_t__ en_AU_islower(int);
int en_AU_toupper(int c) {
  { return en_AU_islower(c) ? (c - 'a' + 'A') : c; }
}


x86 assembly (clang, -O0):
<en_AU_toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <en_AU_islower@plt>
cmp    $0x0,%rax
je     113e <en_AU_toupper+0x2e>
mov    -0x4(%rbp),%eax
sub    $0x61,%eax
add    $0x41,%eax
mov    %eax,-0x8(%rbp)
jmp    1144 <en_AU_toupper+0x34>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<en_AU_toupper>:
push   %rbx
mov    %edi,%ebx
call   1030 <en_AU_islower@plt>
lea    -0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @en_AU_toupper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @en_AU_islower(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = sub nsw i32 %7, 97
%9 = add nsw i32 %8, 65
br label %12
10: ; preds = %1
%11 = load i32, i32* %2
br label %12
12: ; preds = %10, %6
%13 = phi i32 [ %9, %6 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @en_AU_toupper(i32 %0) {
%2 = tail call i64 @en_AU_islower(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
void fizzbuzz(int N) {}


x86 assembly (clang, -O0):
<fizzbuzz>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @fizzbuzz(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printErrorBanner() { printf("FLK Error: "); }


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

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"FLK Error: \00"
define void @printErrorBanner() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
float stdlib_strided_svariancepn(int /*<<< orphan*/ const, float const,
                                 float const *, int /*<<< orphan*/ const);
float stdlib_strided_svariance(const int64_t N, const float correction,
                               const float *X, const int64_t stride) {
  return stdlib_strided_svariancepn(N, correction, X, stride);
}


x86 assembly (clang, -O0):
<stdlib_strided_svariance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
movss  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <stdlib_strided_svariancepn@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdlib_strided_svariance>:
jmp    1030 <stdlib_strided_svariancepn@plt>

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

LLVM IR (-O2):
define float @stdlib_strided_svariance(i32 %0, float %1, float* %2, i32 %3) {
%5 = tail call float @stdlib_strided_svariancepn(i32 %0, float %1, float* %2, i32 %3)
ret float %5
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int bpf_rand_mask(int);
uint64_t bpf_rand_u64(int shift) {
  return bpf_rand_mask((0xffffffffffffffffULL)) << shift;
}


x86 assembly (clang, -O0):
<bpf_rand_u64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xffffffff,%edi
call   1030 <bpf_rand_mask@plt>
mov    -0x4(%rbp),%ecx
shl    %cl,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bpf_rand_u64>:
push   %rbx
mov    %edi,%ebx
mov    $0xffffffff,%edi
call   1030 <bpf_rand_mask@plt>
mov    %ebx,%ecx
shl    %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @bpf_rand_u64(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @bpf_rand_mask(i32 -1)
%4 = load i32, i32* %2
%5 = shl i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @bpf_rand_u64(i32 %0) {
%2 = tail call i32 @bpf_rand_mask(i32 -1)
%3 = shl i32 %2, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void __tiger__printi(int i) { printf("%d", i); }


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

x86 assembly (clang, -O2):
<__tiger__printi>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @__tiger__printi(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init(int *, int);
int /*<<< orphan*/ insort(int *, int);
int /*<<< orphan*/ print(int *, int);
int /*<<< orphan*/ qsort(int *, int /*<<< orphan*/, int);
int main(void) {
  int x[1024];
  init(x, 1024);
  qsort(x, 0, 1024 - 1);
  insort(x, 1024);
  print(x, 1024);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1010,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x1010(%rbp),%rdi
mov    $0x400,%esi
call   1050 <init@plt>
lea    -0x1010(%rbp),%rdi
xor    %esi,%esi
mov    $0x3ff,%edx
call   1030 <qsort@plt>
lea    -0x1010(%rbp),%rdi
mov    $0x400,%esi
call   1060 <insort@plt>
lea    -0x1010(%rbp),%rdi
mov    $0x400,%esi
call   1040 <print@plt>
xor    %eax,%eax
add    $0x1010,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x1000,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x400,%esi
call   1050 <init@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x3ff,%edx
call   1030 <qsort@plt>
mov    %rbx,%rdi
mov    $0x400,%esi
call   1060 <insort@plt>
mov    %rbx,%rdi
mov    $0x400,%esi
call   1040 <print@plt>
xor    %eax,%eax
add    $0x1000,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [1024 x i32]
store i32 0, i32* %1
%3 = getelementptr inbounds [1024 x i32], [1024 x i32]* %2, i64 0, i64 0
%4 = call i32 @init(i32* %3, i32 1024)
%5 = getelementptr inbounds [1024 x i32], [1024 x i32]* %2, i64 0, i64 0
%6 = call i32 @qsort(i32* %5, i32 0, i32 1023)
%7 = getelementptr inbounds [1024 x i32], [1024 x i32]* %2, i64 0, i64 0
%8 = call i32 @insort(i32* %7, i32 1024)
%9 = getelementptr inbounds [1024 x i32], [1024 x i32]* %2, i64 0, i64 0
%10 = call i32 @print(i32* %9, i32 1024)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [1024 x i32]
%2 = bitcast [1024 x i32]* %1 to i8*
%3 = getelementptr inbounds [1024 x i32], [1024 x i32]* %1, i64 0, i64 0
%4 = call i32 @init(i32* %3, i32 1024)
%5 = call i32 @qsort(i32* %3, i32 0, i32 1023)
%6 = call i32 @insort(i32* %3, i32 1024)
%7 = call i32 @print(i32* %3, i32 1024)
ret i32 0
}
int ld_lt_cr2(long double a1) { return !(((100) < (a1))); }


x86 assembly (clang, -O0):
<ld_lt_cr2>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
flds   0xeed(%rip)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_lt_cr2>:
fldt   0x8(%rsp)
flds   0xef6(%rip)
xor    %eax,%eax
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setbe  %al
ret

LLVM IR (-O0):
define i32 @ld_lt_cr2(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fcmp olt x86_fp80 0xK4005C800000000000000, %3
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @ld_lt_cr2(x86_fp80 %0) {
%2 = fcmp ule x86_fp80 %0, 0xK4005C800000000000000
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(char *);
void test03_head() {
  do {
    printf("test03");
    puts("");
  } while (0);
}


x86 assembly (clang, -O0):
<test03_head>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <test03_head+0x9>
lea    0xed0(%rip),%rdi
call   1040 <printf@plt>
lea    0xeca(%rip),%rdi
call   1030 <puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test03_head>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"test03\00"
@.str.1 = [1 x i8] zeroinitializer
define void @test03_head() {
br label %1
1: ; preds = %0
%2 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %4
4: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"test03\00"
define void @test03_head() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @putchar(i32 10)
ret void
}
double s45f(double f) {
  int i = f * 1000;
  int r = (i % 10) / 5;
  i /= 10;
  i += r;
  return (double)i / 100;
}


x86 assembly (clang, -O0):
<s45f>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xef7(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  0xea7(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<s45f>:
mulsd  0xef8(%rip),%xmm0
cvttsd2si %xmm0,%eax
movslq %eax,%rcx
imul   $0x66666667,%rcx,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rax
add    %edx,%eax
lea    (%rax,%rax,1),%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%ecx
movsbl %cl,%ecx
imul   $0x67,%ecx,%ecx
movzwl %cx,%ecx
movswl %cx,%edx
shr    $0xf,%ecx
shr    $0x9,%edx
add    %cl,%dl
movsbl %dl,%ecx
add    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
divsd  0xeb5(%rip),%xmm0
ret

LLVM IR (-O0):
define double @s45f(double %0) {
%2 = alloca double
%3 = alloca i32
%4 = alloca i32
store double %0, double* %2
%5 = load double, double* %2
%6 = fmul double %5, 1.000000e+03
%7 = fptosi double %6 to i32
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = srem i32 %8, 10
%10 = sdiv i32 %9, 5
store i32 %10, i32* %4
%11 = load i32, i32* %3
%12 = sdiv i32 %11, 10
store i32 %12, i32* %3
%13 = load i32, i32* %4
%14 = load i32, i32* %3
%15 = add nsw i32 %14, %13
store i32 %15, i32* %3
%16 = load i32, i32* %3
%17 = sitofp i32 %16 to double
%18 = fdiv double %17, 1.000000e+02
ret double %18
}

LLVM IR (-O2):
define double @s45f(double %0) {
%2 = fmul double %0, 1.000000e+03
%3 = fptosi double %2 to i32
%4 = srem i32 %3, 10
%5 = trunc i32 %4 to i8
%6 = sdiv i8 %5, 5
%7 = sext i8 %6 to i32
%8 = sdiv i32 %3, 10
%9 = add nsw i32 %8, %7
%10 = sitofp i32 %9 to double
%11 = fdiv double %10, 1.000000e+02
ret double %11
}
long GetTwo(x)
register unsigned short *x;
{ return (x[1] + 65536L * x[0]); }


x86 assembly (clang, -O0):
<GetTwo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl 0x2(%rax),%eax
mov    -0x8(%rbp),%rcx
movzwl (%rcx),%ecx
shl    $0x10,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetTwo>:
movzwl 0x2(%rdi),%ecx
movzwl (%rdi),%eax
shl    $0x10,%rax
or     %rcx,%rax
ret

LLVM IR (-O0):
define i64 @GetTwo(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = getelementptr inbounds i16, i16* %3, i64 1
%5 = load i16, i16* %4
%6 = zext i16 %5 to i64
%7 = load i16*, i16** %2
%8 = getelementptr inbounds i16, i16* %7, i64 0
%9 = load i16, i16* %8
%10 = zext i16 %9 to i64
%11 = mul nsw i64 65536, %10
%12 = add nsw i64 %6, %11
ret i64 %12
}

LLVM IR (-O2):
define i64 @GetTwo(i16* nocapture %0) {
%2 = getelementptr inbounds i16, i16* %0, i64 1
%3 = load i16, i16* %2
%4 = zext i16 %3 to i64
%5 = load i16, i16* %0
%6 = zext i16 %5 to i64
%7 = shl nuw nsw i64 %6, 16
%8 = or i64 %7, %4
ret i64 %8
}
int simple_for_loop() {
  int j = 0;
  for (int i = 0; i < 10; i++) {
    j += j;
  }
  return 0;
}


x86 assembly (clang, -O0):
<simple_for_loop>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1133 <simple_for_loop+0x33>
mov    -0x4(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <simple_for_loop+0x12>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @simple_for_loop() {
ret i32 0
}
void mdp4_mddi_base_swap(int cndx, struct mdp4_overlay_pipe *pipe) {}


x86 assembly (clang, -O0):
<mdp4_mddi_base_swap>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.mdp4_overlay_pipe = type opaque
define void @mdp4_mddi_base_swap(i32 %0, %struct.mdp4_overlay_pipe* %1) {
%3 = alloca i32
%4 = alloca %struct.mdp4_overlay_pipe*
store i32 %0, i32* %3
store %struct.mdp4_overlay_pipe* %1, %struct.mdp4_overlay_pipe** %4
ret void
}

LLVM IR (-O2):
%struct.mdp4_overlay_pipe = type opaque
define void @mdp4_mddi_base_swap(i32 %0, %struct.mdp4_overlay_pipe* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *ft_itoa_base_unsigned(unsigned long, int, char *);
int /*<<< orphan*/ ft_putstr_fd(char *, int);
void ft_putaddress_fd(void *ptr, int fd) {
  unsigned long nbr;
  char *address;
  nbr = (unsigned long)ptr;
  address = ft_itoa_base_unsigned(nbr, 16, "0123456789abcdef");
  ft_putstr_fd("0x", fd);
  ft_putstr_fd(address, fd);
  free(address);
}


x86 assembly (clang, -O0):
<ft_putaddress_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x10,%esi
lea    0xea9(%rip),%rdx
call   1050 <ft_itoa_base_unsigned@plt>
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%esi
lea    0xea7(%rip),%rdi
call   1040 <ft_putstr_fd@plt>
mov    -0x20(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <ft_putstr_fd@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putaddress_fd>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
lea    0xec4(%rip),%rdx
mov    $0x10,%esi
call   1050 <ft_itoa_base_unsigned@plt>
mov    %rax,%rbx
lea    0xec1(%rip),%rdi
mov    %ebp,%esi
call   1040 <ft_putstr_fd@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <ft_putstr_fd@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"0123456789abcdef\00"
@.str.1 = [3 x i8] c"0x\00"
define void @ft_putaddress_fd(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = load i8*, i8** %3
%8 = ptrtoint i8* %7 to i64
store i64 %8, i64* %5
%9 = load i64, i64* %5
%10 = call i8* @ft_itoa_base_unsigned(i64 %9, i32 16, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
store i8* %10, i8** %6
%11 = load i32, i32* %4
%12 = call i32 @ft_putstr_fd(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = load i8*, i8** %6
%14 = load i32, i32* %4
%15 = call i32 @ft_putstr_fd(i8* %13, i32 %14)
%16 = load i8*, i8** %6
%17 = call i32 @free(i8* %16)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"0123456789abcdef\00"
@.str.1 = [3 x i8] c"0x\00"
define void @ft_putaddress_fd(i8* %0, i32 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = tail call i8* @ft_itoa_base_unsigned(i64 %3, i32 16, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @ft_putstr_fd(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %1)
%6 = tail call i32 @ft_putstr_fd(i8* %4, i32 %1)
%7 = tail call i32 @free(i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main() {
  int valor = 0;
  switch (valor) {
  case 0:
  case 1:
    printf("es igual a 0 o 1\n");
    break;
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
ja     1141 <main+0x31>
jmp    1130 <main+0x20>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
jmp    1146 <main+0x36>
jmp    1146 <main+0x36>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [18 x i8] c"es igual a 0 o 1\0A\00"
define void @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* %1
switch i32 %2, label %5 [
i32 0, label %3
i32 1, label %3
]
3: ; preds = %0, %0
%4 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
br label %6
5: ; preds = %0
br label %6
6: ; preds = %5, %3
ret void
}

LLVM IR (-O2):
@str = [17 x i8] c"es igual a 0 o 1\00"
define void @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ strlen(char const *);
int ModelicaStrings_length(const char *string) { return (int)strlen(string); }


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

x86 assembly (clang, -O2):
<ModelicaStrings_length>:
jmp    1030 <strlen@plt>

LLVM IR (-O0):
define i32 @ModelicaStrings_length(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strlen(i8* %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @ModelicaStrings_length(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
int test_imm_8Fuint8_mem(unsigned char *val) {
  return ((*val) & (-0x8F << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_8Fuint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, -143
%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_8Fuint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 113
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int symbols_symbolCompare(void *data, void *key) { return data == key; }


x86 assembly (clang, -O0):
<symbols_symbolCompare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<symbols_symbolCompare>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @symbols_symbolCompare(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = icmp eq i8* %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @symbols_symbolCompare(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int _getopt_(int, char *const *, char const *, int /*<<< orphan*/,
             int /*<<< orphan*/);
int getopt(int argc, char *const argv[], const char *optstring) {
  return _getopt_(argc, argv, optstring, 0, 0);
}


x86 assembly (clang, -O0):
<getopt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %r8d,%r8d
mov    %r8d,%ecx
call   1030 <_getopt_@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getopt>:
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <_getopt_@plt>

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

LLVM IR (-O2):
define i32 @getopt(i32 %0, i8** %1, i8* %2) {
%4 = tail call i32 @_getopt_(i32 %0, i8** %1, i8* %2, i32 0, i32 0)
ret i32 %4
}