xunge/DecIR huggingface dataset:
int Vec_StrSortCompare1(char *pp1, char *pp2) {
  if (*pp1 < *pp2)
    return -1;
  if (*pp1 > *pp2)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<Vec_StrSortCompare1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jge    112e <Vec_StrSortCompare1+0x2e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1157 <Vec_StrSortCompare1+0x57>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jle    1150 <Vec_StrSortCompare1+0x50>
movl   $0x1,-0x4(%rbp)
jmp    1157 <Vec_StrSortCompare1+0x57>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Vec_StrSortCompare1>:
mov    (%rdi),%al
xor    %ecx,%ecx
cmp    (%rsi),%al
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @Vec_StrSortCompare1(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* %6
%8 = sext i8 %7 to i32
%9 = load i8*, i8** %5
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp slt i32 %8, %11
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 -1, i32* %3
br label %24
14: ; preds = %2
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = load i8*, i8** %5
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp sgt i32 %17, %20
br i1 %21, label %22, label %23
22: ; preds = %14
store i32 1, i32* %3
br label %24
23: ; preds = %14
store i32 0, i32* %3
br label %24
24: ; preds = %23, %22, %13
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @Vec_StrSortCompare1(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = icmp slt i8 %3, %4
%6 = icmp sgt i8 %3, %4
%7 = zext i1 %6 to i32
%8 = select i1 %5, i32 -1, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ pit_version();
int /*<<< orphan*/ puts(char *);
void help_version() {
  puts("No kidding :-)");
  pit_version();
}


x86 assembly (clang, -O0):
<help_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   1040 <pit_version@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<help_version>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <pit_version@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"No kidding :-)\00"
define void @help_version() {
%1 = call i32 @puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @pit_version()
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"No kidding :-)\00"
define void @help_version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @pit_version()
ret void
}
void ISRMemManage(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<ISRMemManage>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <ISRMemManage+0x9>
jmp    1109 <ISRMemManage+0x9>

x86 assembly (clang, -O2):
<ISRMemManage>:
jmp    1100 <ISRMemManage>

LLVM IR (-O0):
define void @ISRMemManage() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @ISRMemManage() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;
typedef int /*<<< orphan*/ mbstate_t;

/* Variables and functions */
size_t __infer_nondet_int();
size_t mbrtowc(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) {
  return __infer_nondet_int();
}


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

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

LLVM IR (-O0):
define i64 @mbrtowc(i32* %0, i8* %1, i64 %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32*
store i32* %0, i32** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i32* %3, i32** %8
%9 = call i64 (...) @__infer_nondet_int()
ret i64 %9
}

LLVM IR (-O2):
define i64 @mbrtowc(i32* nocapture readnone %0, i8* nocapture readnone %1, i64 %2, i32* nocapture readnone %3) {
%5 = tail call i64 (...) @__infer_nondet_int()
ret i64 %5
}
long CRYPTO_get_mem_debug_options(void) { return 0; }


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

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

LLVM IR (-O0):
define i64 @CRYPTO_get_mem_debug_options() {
ret i64 0
}

LLVM IR (-O2):
define i64 @CRYPTO_get_mem_debug_options() {
ret i64 0
}
void ARGBMirrorRow_Any_SSE2() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @g_string_truncate() {
ret void
}
/* Type definitions */
struct benchmark_args {
  int dummy;
};
struct benchmark {
  int dummy;
};

/* Variables and functions */
int obj_init(struct benchmark *, struct benchmark_args *);
int pmalloc_init(struct benchmark *bench, struct benchmark_args *args) {
  return obj_init(bench, args);
}


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

x86 assembly (clang, -O2):
<pmalloc_init>:
jmp    1030 <obj_init@plt>

LLVM IR (-O0):
%struct.benchmark = type { i32 }
%struct.benchmark_args = type { i32 }
define i32 @pmalloc_init(%struct.benchmark* %0, %struct.benchmark_args* %1) {
%3 = alloca %struct.benchmark*
%4 = alloca %struct.benchmark_args*
store %struct.benchmark* %0, %struct.benchmark** %3
store %struct.benchmark_args* %1, %struct.benchmark_args** %4
%5 = load %struct.benchmark*, %struct.benchmark** %3
%6 = load %struct.benchmark_args*, %struct.benchmark_args** %4
%7 = call i32 @obj_init(%struct.benchmark* %5, %struct.benchmark_args* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.benchmark = type { i32 }
%struct.benchmark_args = type { i32 }
define i32 @pmalloc_init(%struct.benchmark* %0, %struct.benchmark_args* %1) {
%3 = tail call i32 @obj_init(%struct.benchmark* %0, %struct.benchmark_args* %1)
ret i32 %3
}
/* Type definitions */
struct comp {
  int dummy;
};
struct BrzFetch_ {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SEND_ACKDOWN_DELAYED(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ SEND_ACKUP(int /*<<< orphan*/);
int /*<<< orphan*/ SEND_DATAOFF_DELAYED(int, int);
void BrzFetch_ackdown_broad(struct comp *comp, int port) {
  struct BrzFetch_ *c = (struct BrzFetch_ *)comp;
  switch (port) {
  case 1:
    SEND_ACKDOWN_DELAYED(0, 0);
    break;
  case 2:
    SEND_ACKUP(0);
    SEND_DATAOFF_DELAYED(2, 1);
    break;
  }
}


x86 assembly (clang, -O0):
<BrzFetch_ackdown_broad>:
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    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
sub    $0x1,%eax
je     116c <BrzFetch_ackdown_broad+0x3c>
jmp    115b <BrzFetch_ackdown_broad+0x2b>
mov    -0x1c(%rbp),%eax
sub    $0x2,%eax
je     117a <BrzFetch_ackdown_broad+0x4a>
jmp    1190 <BrzFetch_ackdown_broad+0x60>
xor    %esi,%esi
mov    %esi,%edi
call   1040 <SEND_ACKDOWN_DELAYED@plt>
jmp    1190 <BrzFetch_ackdown_broad+0x60>
xor    %edi,%edi
call   1030 <SEND_ACKUP@plt>
mov    $0x2,%edi
mov    $0x1,%esi
call   1050 <SEND_DATAOFF_DELAYED@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BrzFetch_ackdown_broad>:
cmp    $0x2,%esi
je     1143 <BrzFetch_ackdown_broad+0x13>
cmp    $0x1,%esi
jne    115b <BrzFetch_ackdown_broad+0x2b>
xor    %edi,%edi
xor    %esi,%esi
jmp    1040 <SEND_ACKDOWN_DELAYED@plt>
push   %rax
xor    %edi,%edi
call   1030 <SEND_ACKUP@plt>
mov    $0x2,%edi
mov    $0x1,%esi
pop    %rax
jmp    1050 <SEND_DATAOFF_DELAYED@plt>
ret

LLVM IR (-O0):
%struct.comp = type { i32 }
%struct.BrzFetch_ = type { i32 }
define void @BrzFetch_ackdown_broad(%struct.comp* %0, i32 %1) {
%3 = alloca %struct.comp*
%4 = alloca i32
%5 = alloca %struct.BrzFetch_*
store %struct.comp* %0, %struct.comp** %3
store i32 %1, i32* %4
%6 = load %struct.comp*, %struct.comp** %3
%7 = bitcast %struct.comp* %6 to %struct.BrzFetch_*
store %struct.BrzFetch_* %7, %struct.BrzFetch_** %5
%8 = load i32, i32* %4
switch i32 %8, label %14 [
i32 1, label %9
i32 2, label %11
]
9: ; preds = %2
%10 = call i32 @SEND_ACKDOWN_DELAYED(i32 0, i32 0)
br label %14
11: ; preds = %2
%12 = call i32 @SEND_ACKUP(i32 0)
%13 = call i32 @SEND_DATAOFF_DELAYED(i32 2, i32 1)
br label %14
14: ; preds = %2, %11, %9
ret void
}

LLVM IR (-O2):
%struct.comp = type { i32 }
define void @BrzFetch_ackdown_broad(%struct.comp* nocapture readnone %0, i32 %1) {
switch i32 %1, label %8 [
i32 1, label %3
i32 2, label %5
]
3: ; preds = %2
%4 = tail call i32 @SEND_ACKDOWN_DELAYED(i32 0, i32 0)
br label %8
5: ; preds = %2
%6 = tail call i32 @SEND_ACKUP(i32 0)
%7 = tail call i32 @SEND_DATAOFF_DELAYED(i32 2, i32 1)
br label %8
8: ; preds = %2, %5, %3
ret void
}
/* Variables and functions */
scalar_t__ len(char *);
scalar_t__ malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
char *makeCopy(char *s) {
  char *buff = (char *)malloc(len(s) + 1);
  strcpy(buff, s);
  return buff;
}


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

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

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

LLVM IR (-O2):
define i8* @makeCopy(i8* %0) {
%2 = tail call i64 @len(i8* %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
/* Variables and functions */
double pow(double, double);
double kx_pow2(register double _y_) { return pow(2.0, _y_); }


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

x86 assembly (clang, -O2):
<kx_pow2>:
jmp    1030 <exp2@plt>

LLVM IR (-O0):
define double @kx_pow2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @pow(double 2.000000e+00, double %3)
ret double %4
}

LLVM IR (-O2):
define double @kx_pow2(double %0) {
%2 = tail call double @exp2(double %0)
ret double %2
}
int ab_strcmp(const char *a, const char *b) {
  while (*b)
    if (*a++ != *b++)
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<ab_strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1156 <ab_strcmp+0x56>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1151 <ab_strcmp+0x51>
movl   $0x0,-0x4(%rbp)
jmp    115d <ab_strcmp+0x5d>
jmp    110c <ab_strcmp+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ab_strcmp>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rax,1),%ecx
test   %cl,%cl
je     1127 <ab_strcmp+0x27>
lea    0x1(%rax),%rdx
cmp    %cl,(%rdi,%rax,1)
mov    %rdx,%rax
je     1110 <ab_strcmp+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @ab_strcmp(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %8, %2
%4 = phi i8* [ %0, %2 ], [ %9, %8 ]
%5 = phi i8* [ %1, %2 ], [ %11, %8 ]
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %3
%9 = getelementptr inbounds i8, i8* %4, i64 1
%10 = load i8, i8* %4
%11 = getelementptr inbounds i8, i8* %5, i64 1
%12 = icmp eq i8 %10, %6
br i1 %12, label %3, label %13
13: ; preds = %3, %8
%14 = phi i32 [ 0, %8 ], [ 1, %3 ]
ret i32 %14
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t AONRTCCurrentCompareValueGet(void) {
  return ((*((volatile unsigned long *)(0x40092000 + 0x00000030))));
}


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

x86 assembly (clang, -O2):
<AONRTCCurrentCompareValueGet>:
mov    0x40092030,%rax
40
ret

LLVM IR (-O0):
define i64 @AONRTCCurrentCompareValueGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074339888 to i64*)
ret i64 %1
}

LLVM IR (-O2):
define i64 @AONRTCCurrentCompareValueGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074339888 to i64*)
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a = 0;
  a++;
  printf("%d", a);
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int syscon_dobldobl_Laurent_size_limit(int k, int *szl) {
  int fail;
  double *c;
  fail = _ada_use_c2phc(605, &k, szl, c);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_dobldobl_Laurent_size_limit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x25d,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_dobldobl_Laurent_size_limit>:
push   %rax
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x25d,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @syscon_dobldobl_Laurent_size_limit(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca double*
store i32 %0, i32* %3
store i32* %1, i32** %4
%7 = load i32*, i32** %4
%8 = load double*, double** %6
%9 = call i32 @_ada_use_c2phc(i32 605, i32* %3, i32* %7, double* %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @syscon_dobldobl_Laurent_size_limit(i32 %0, i32* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc(i32 605, i32* %3, i32* %1, double* undef)
ret i32 %4
}
int ft_islower(int c) {
  if (c >= 90 && c <= 122)
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<ft_islower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x5a,-0x8(%rbp)
jl     1127 <ft_islower+0x27>
cmpl   $0x7a,-0x8(%rbp)
jg     1127 <ft_islower+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <ft_islower+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_islower>:
add    $0xffffffa6,%edi
xor    %eax,%eax
cmp    $0x21,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @ft_islower(i32 %0) {
%2 = add i32 %0, -90
%3 = icmp ult i32 %2, 33
%4 = zext i1 %3 to i32
ret i32 %4
}
int isiraf(filename)
char *filename;
{
  if (strchr(filename, '='))
    return (0);
  else if (strsrch(filename, ".imh"))
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<isiraf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x3d,%esi
call   1040 <strchr@plt>
cmp    $0x0,%rax
je     1150 <isiraf+0x30>
movl   $0x0,-0x4(%rbp)
jmp    117e <isiraf+0x5e>
mov    -0x10(%rbp),%rdi
lea    0xea5(%rip),%rsi
mov    $0x0,%al
call   1030 <strsrch@plt>
cmp    $0x0,%eax
je     1177 <isiraf+0x57>
movl   $0x1,-0x4(%rbp)
jmp    117e <isiraf+0x5e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isiraf>:
push   %rbx
mov    %rdi,%rbx
mov    $0x3d,%esi
call   1040 <strchr@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     113a <isiraf+0x1a>
pop    %rbx
ret
lea    0xebf(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <strsrch@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c".imh\00"
define i32 @isiraf(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i8* @strchr(i8* %4, i32 61)
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %14
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @strsrch to i32 (i8*, i8*, ...)*)(i8* %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 1, i32* %2
br label %14
13: ; preds = %8
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12, %7
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@.str = [5 x i8] c".imh\00"
define i32 @isiraf(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 61)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @strsrch to i32 (i8*, i8*, ...)*)(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ buf_ch(char);
int strlen(char *);
void buf_str(char *s) {
  for (int i = 0; i < strlen(s); i++) {
    buf_ch(s[i]);
  }
}


x86 assembly (clang, -O0):
<buf_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jge    116e <buf_str+0x4e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <buf_ch@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <buf_str+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buf_str>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
test   %eax,%eax
jle    115d <buf_str+0x3d>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%r14,%rbx,1),%edi
call   1040 <buf_ch@plt>
add    $0x1,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1140 <buf_str+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @buf_str(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %5, label %4
4: ; preds = %5, %1
ret void
5: ; preds = %1, %5
%6 = phi i64 [ %10, %5 ], [ 0, %1 ]
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = tail call i32 @buf_ch(i8 signext %8)
%10 = add nuw nsw i64 %6, 1
%11 = tail call i32 @strlen(i8* %0)
%12 = sext i32 %11 to i64
%13 = icmp slt i64 %10, %12
br i1 %13, label %5, label %4
}
/* Variables and functions */
double fmod(float, int);
float rad2deg(float t) {
  return fmod(t, 2 * (3.14159265358979323846)) * 180.0 /
         (3.14159265358979323846);
}


x86 assembly (clang, -O0):
<rad2deg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mov    $0x6,%edi
call   1030 <fmod@plt>
movsd  0xed4(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xec0(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rad2deg>:
push   %rax
mov    $0x6,%edi
call   1030 <fmod@plt>
mulsd  0xedd(%rip),%xmm0
divsd  0xedd(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @rad2deg(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call double @fmod(float %3, i32 6)
%5 = fmul double %4, 1.800000e+02
%6 = fdiv double %5, 0x400921FB54442D18
%7 = fptrunc double %6 to float
ret float %7
}

LLVM IR (-O2):
define float @rad2deg(float %0) {
%2 = tail call double @fmod(float %0, i32 6)
%3 = fmul double %2, 1.800000e+02
%4 = fdiv double %3, 0x400921FB54442D18
%5 = fptrunc double %4 to float
ret float %5
}
void CG_DrawScreenFade(void) {}


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

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

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

LLVM IR (-O2):
define void @CG_DrawScreenFade() {
ret void
}
void name_destroy(void *a) { ; }


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

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

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

LLVM IR (-O2):
define void @name_destroy(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwrite(double *, int, int, int /*<<< orphan*/ *);
void FileWrite(FILE *fout, double *ptr, int t) {
  fwrite(ptr, sizeof(double), t, fout);
  return;
}


x86 assembly (clang, -O0):
<FileWrite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rcx
mov    $0x8,%esi
call   1030 <fwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FileWrite>:
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    $0x8,%esi
jmp    1030 <fwrite@plt>

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

LLVM IR (-O2):
define void @FileWrite(i32* nocapture %0, double* nocapture %1, i32 %2) {
%4 = tail call i32 @fwrite(double* %1, i32 8, i32 %2, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ k_error(char *);
void bt_no_mem() { k_error("Insufficient memory for BTree element or data"); }


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

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

LLVM IR (-O0):
@.str = [46 x i8] c"Insufficient memory for BTree element or data\00"
define void @bt_no_mem() {
%1 = call i32 @k_error(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [46 x i8] c"Insufficient memory for BTree element or data\00"
define void @bt_no_mem() {
%1 = tail call i32 @k_error(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int strlen(char *);
void ocultar(char secreta[100], char oculta[100]) {
  int i;
  int longitud = strlen(secreta);
  for (i = 0; i < longitud; ++i)
    oculta[i] = '*';
  oculta[longitud] = '\0';
}


x86 assembly (clang, -O0):
<ocultar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1159 <ocultar+0x49>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x2a,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1133 <ocultar+0x23>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ocultar>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1030 <strlen@plt>
mov    %eax,%ebp
test   %eax,%eax
jle    1140 <ocultar+0x20>
mov    %ebp,%edx
mov    %rbx,%rdi
mov    $0x2a,%esi
call   1040 <memset@plt>
movslq %ebp,%rax
movb   $0x0,(%rbx,%rax,1)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @ocultar(i8* %0, i8* nocapture writeonly %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = zext i32 %3 to i64
br label %7
7: ; preds = %5, %2
%8 = sext i32 %3 to i64
%9 = getelementptr inbounds i8, i8* %1, i64 %8
store i8 0, i8* %9
ret void
}
/* Variables and functions */
int *calloc(int, int);
int /*<<< orphan*/ error_and_exit();
int *calloc_int_line(int dim1) {
  int *line;
  line = calloc(sizeof(int), dim1);
  if (line == NULL)
    error_and_exit();
  return line;
}


x86 assembly (clang, -O0):
<calloc_int_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x4,%edi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114e <calloc_int_line+0x2e>
mov    $0x0,%al
call   1040 <error_and_exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calloc_int_line>:
push   %rbx
mov    %edi,%esi
mov    $0x4,%edi
call   1030 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113c <calloc_int_line+0x1c>
xor    %eax,%eax
call   1040 <error_and_exit@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i32* @calloc_int_line(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32* @calloc(i32 4, i32 %4)
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @error_and_exit()
br label %10
10: ; preds = %8, %1
%11 = load i32*, i32** %3
ret i32* %11
}

LLVM IR (-O2):
define noalias i32* @calloc_int_line(i32 %0) {
%2 = tail call i32* @calloc(i32 4, i32 %0)
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @error_and_exit()
br label %6
6: ; preds = %4, %1
ret i32* %2
}
/* Variables and functions */
int fprintactionnameIPC(int /*<<< orphan*/, int);
int /*<<< orphan*/ stdout;
int printactionnameIPC(int i) { return fprintactionnameIPC(stdout, i); }


x86 assembly (clang, -O0):
<printactionnameIPC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
call   1030 <fprintactionnameIPC@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printactionnameIPC>:
mov    %edi,%esi
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
jmp    1030 <fprintactionnameIPC@plt>

LLVM IR (-O0):
@stdout = global i32 0
define i32 @printactionnameIPC(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stdout
%4 = load i32, i32* %2
%5 = call i32 @fprintactionnameIPC(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @printactionnameIPC(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintactionnameIPC(i32 %2, i32 %0)
ret i32 %3
}
int bfloat_comp(const void *a, const void *b) {
  if (*(double *)a > *(double *)b)
    return 1;
  if (*(double *)a == *(double *)b)
    return 0;
  if (*(double *)a < *(double *)b)
    return -1;
}


x86 assembly (clang, -O0):
<bfloat_comp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomisd (%rax),%xmm0
jbe    112e <bfloat_comp+0x2e>
movl   $0x1,-0x4(%rbp)
jmp    1177 <bfloat_comp+0x77>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomisd (%rax),%xmm0
jne    1156 <bfloat_comp+0x56>
jp     1156 <bfloat_comp+0x56>
movl   $0x0,-0x4(%rbp)
jmp    1177 <bfloat_comp+0x77>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    1177 <bfloat_comp+0x77>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bfloat_comp>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
mov    $0x1,%eax
ucomisd %xmm1,%xmm0
ja     111d <bfloat_comp+0x1d>
xor    %eax,%eax
ucomisd %xmm1,%xmm0
jne    111e <bfloat_comp+0x1e>
jp     111e <bfloat_comp+0x1e>
ret
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @bfloat_comp(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 = bitcast i8* %6 to double*
%8 = load double, double* %7
%9 = load i8*, i8** %5
%10 = bitcast i8* %9 to double*
%11 = load double, double* %10
%12 = fcmp ogt double %8, %11
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 1, i32* %3
br label %32
14: ; preds = %2
%15 = load i8*, i8** %4
%16 = bitcast i8* %15 to double*
%17 = load double, double* %16
%18 = load i8*, i8** %5
%19 = bitcast i8* %18 to double*
%20 = load double, double* %19
%21 = fcmp oeq double %17, %20
br i1 %21, label %22, label %23
22: ; preds = %14
store i32 0, i32* %3
br label %32
23: ; preds = %14
%24 = load i8*, i8** %4
%25 = bitcast i8* %24 to double*
%26 = load double, double* %25
%27 = load i8*, i8** %5
%28 = bitcast i8* %27 to double*
%29 = load double, double* %28
%30 = fcmp olt double %26, %29
br i1 %30, label %31, label %32
31: ; preds = %23
store i32 -1, i32* %3
br label %32
32: ; preds = %13, %22, %31, %23
%33 = load i32, i32* %3
ret i32 %33
}

LLVM IR (-O2):
define i32 @bfloat_comp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp ogt double %4, %6
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = fcmp oeq double %4, %6
br i1 %9, label %11, label %10
10: ; preds = %8
br label %11
11: ; preds = %10, %8, %2
%12 = phi i32 [ 1, %2 ], [ 0, %8 ], [ -1, %10 ]
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
__attribute__((always_)) void __set_FPSCR(uint32_t fpscr) { (void)fpscr; }


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

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

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

LLVM IR (-O2):
define void @__set_FPSCR(i32 %0) {
ret void
}
/* Type definitions */
struct String {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct String *);
void deleteString(struct String *string) {
  if (string != NULL)
    free(string);
  return;
}


x86 assembly (clang, -O0):
<deleteString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <deleteString+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.String = type { i32 }
define void @deleteString(%struct.String* %0) {
%2 = icmp eq %struct.String* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(%struct.String* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, double);
int native_test(unsigned int count, char *fmt, double val) {
  static char buf[(1024)];
  unsigned int i;
  for (i = 0; i < count; i++)
    sprintf(buf, fmt, val);
  return 0;
}


x86 assembly (clang, -O0):
<native_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    115a <native_test+0x4a>
mov    -0x10(%rbp),%rsi
movsd  -0x18(%rbp),%xmm0
lea    0x2ef9(%rip),%rdi
call   1030 <sprintf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    112b <native_test+0x1b>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<native_test>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
test   %edi,%edi
je     1146 <native_test+0x36>
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0x2f18(%rip),%r14
movsd  %xmm0,0x8(%rsp)
xchg   %ax,%ax
mov    %r14,%rdi
mov    %rbx,%rsi
movsd  0x8(%rsp),%xmm0
call   1030 <sprintf@plt>
add    $0xffffffff,%ebp
jne    1130 <native_test+0x20>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@native_test.buf = internal global [1024 x i8] zeroinitializer
define i32 @native_test(i32 %0, i8* %1, double %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca double
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store double %2, double* %6
store i32 0, i32* %7
br label %8
8: ; preds = %16, %3
%9 = load i32, i32* %7
%10 = load i32, i32* %4
%11 = icmp ult i32 %9, %10
br i1 %11, label %12, label %19
12: ; preds = %8
%13 = load i8*, i8** %5
%14 = load double, double* %6
%15 = call i32 @sprintf(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @native_test.buf, i64 0, i64 0), i8* %13, double %14)
br label %16
16: ; preds = %12
%17 = load i32, i32* %7
%18 = add i32 %17, 1
store i32 %18, i32* %7
br label %8
19: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@native_test.buf = internal global [1024 x i8] zeroinitializer
define i32 @native_test(i32 %0, i8* nocapture %1, double %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %10, label %5
5: ; preds = %3, %5
%6 = phi i32 [ %8, %5 ], [ 0, %3 ]
%7 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([1024 x i8], [1024 x i8]* @native_test.buf, i64 0, i64 0), i8* dereferenceable(1) %1, double %2)
%8 = add nuw i32 %6, 1
%9 = icmp eq i32 %8, %0
br i1 %9, label %10, label %5
10: ; preds = %5, %3
ret i32 0
}
/* Type definitions */
struct Cyc_List_List {
  int dummy;
};

/* Variables and functions */
struct Cyc_List_List *
Cyc_RemoveLabels_remove_unused_labels(struct Cyc_List_List *);
struct Cyc_List_List *Cyc_do_removelabs(int ignore, struct Cyc_List_List *tds) {
  struct Cyc_List_List *_T0;
  _T0 = Cyc_RemoveLabels_remove_unused_labels(tds);
  return _T0;
}


x86 assembly (clang, -O0):
<Cyc_do_removelabs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <Cyc_RemoveLabels_remove_unused_labels@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_do_removelabs>:
mov    %rsi,%rdi
jmp    1030 <Cyc_RemoveLabels_remove_unused_labels@plt>

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

LLVM IR (-O2):
%struct.Cyc_List_List = type { i32 }
define %struct.Cyc_List_List* @Cyc_do_removelabs(i32 %0, %struct.Cyc_List_List* %1) {
%3 = tail call %struct.Cyc_List_List* @Cyc_RemoveLabels_remove_unused_labels(%struct.Cyc_List_List* %1)
ret %struct.Cyc_List_List* %3
}
void GPMCPrefetchCycleOptValSet(unsigned int baseAddr, unsigned int cleOptVal) {
  (*((volatile unsigned int *)(baseAddr + (0x1E0 + ((1 - 1) * (0x4)))))) &=
      ~(0x70000000u);
  (*((volatile unsigned int *)(baseAddr + (0x1E0 + ((1 - 1) * (0x4)))))) |=
      ((cleOptVal << (0x0000001Cu)) & (0x70000000u));
}


x86 assembly (clang, -O0):
<GPMCPrefetchCycleOptValSet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1e0,%eax
mov    %eax,%eax
mov    (%rax),%ecx
and    $0x8fffffff,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%edx
shl    $0x1c,%edx
and    $0x70000000,%edx
mov    -0x4(%rbp),%eax
add    $0x1e0,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPMCPrefetchCycleOptValSet>:
add    $0x1e0,%edi
andl   $0x8fffffff,(%rdi)
and    $0x7,%esi
shl    $0x1c,%esi
or     %esi,(%rdi)
ret

LLVM IR (-O0):
define void @GPMCPrefetchCycleOptValSet(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 = add i32 %5, 480
%7 = zext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = and i32 %9, -1879048193
store volatile i32 %10, i32* %8
%11 = load i32, i32* %4
%12 = shl i32 %11, 28
%13 = and i32 %12, 1879048192
%14 = load i32, i32* %3
%15 = add i32 %14, 480
%16 = zext i32 %15 to i64
%17 = inttoptr i64 %16 to i32*
%18 = load volatile i32, i32* %17
%19 = or i32 %18, %13
store volatile i32 %19, i32* %17
ret void
}

LLVM IR (-O2):
define void @GPMCPrefetchCycleOptValSet(i32 %0, i32 %1) {
%3 = add i32 %0, 480
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = and i32 %6, -1879048193
store volatile i32 %7, i32* %5
%8 = shl i32 %1, 28
%9 = and i32 %8, 1879048192
%10 = load volatile i32, i32* %5
%11 = or i32 %10, %9
store volatile i32 %11, i32* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned int);
int /*<<< orphan*/ put8(int);
void mov_preg32pimm32_reg8(int reg32, unsigned int imm32, int reg8) {
  put8(0x88);
  put8(0x80 | reg32 | (reg8 << 3));
  put32(imm32);
}


x86 assembly (clang, -O0):
<mov_preg32pimm32_reg8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0x88,%edi
call   1030 <put8@plt>
mov    -0x4(%rbp),%edi
or     $0x80,%edi
mov    -0xc(%rbp),%eax
shl    $0x3,%eax
or     %eax,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%edi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mov_preg32pimm32_reg8>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%r14d
mov    %edi,%ebp
mov    $0x88,%edi
call   1030 <put8@plt>
shl    $0x3,%ebx
or     %ebp,%ebx
or     $0x80,%ebx
mov    %ebx,%edi
call   1030 <put8@plt>
mov    %r14d,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @mov_preg32pimm32_reg8(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = call i32 @put8(i32 136)
%8 = load i32, i32* %4
%9 = or i32 128, %8
%10 = load i32, i32* %6
%11 = shl i32 %10, 3
%12 = or i32 %9, %11
%13 = call i32 @put8(i32 %12)
%14 = load i32, i32* %5
%15 = call i32 @put32(i32 %14)
ret void
}

LLVM IR (-O2):
define void @mov_preg32pimm32_reg8(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @put8(i32 136)
%5 = shl i32 %2, 3
%6 = or i32 %5, %0
%7 = or i32 %6, 128
%8 = tail call i32 @put8(i32 %7)
%9 = tail call i32 @put32(i32 %1)
ret void
}
void MergeOperatorDestroy(void *arg) {}


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

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

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

LLVM IR (-O2):
define void @MergeOperatorDestroy(i8* nocapture %0) {
ret void
}
double PairwiseCombs(int nsam) {
  double combs = (nsam - 1) * (nsam / 2);
  return combs;
}


x86 assembly (clang, -O0):
<PairwiseCombs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<PairwiseCombs>:
lea    -0x1(%rdi),%eax
mov    %edi,%ecx
shr    $0x1f,%ecx
add    %edi,%ecx
sar    %ecx
imul   %eax,%ecx
cvtsi2sd %ecx,%xmm0
ret

LLVM IR (-O0):
define double @PairwiseCombs(i32 %0) {
%2 = alloca i32
%3 = alloca double
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sub nsw i32 %4, 1
%6 = load i32, i32* %2
%7 = sdiv i32 %6, 2
%8 = mul nsw i32 %5, %7
%9 = sitofp i32 %8 to double
store double %9, double* %3
%10 = load double, double* %3
ret double %10
}

LLVM IR (-O2):
define double @PairwiseCombs(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = sdiv i32 %0, 2
%4 = mul nsw i32 %2, %3
%5 = sitofp i32 %4 to double
ret double %5
}
/* Variables and functions */
double log(float);
double cbuiltin_ln(double x) {
  return log(x) / log(2.7182818284590452353602874713526624977572f);
}


x86 assembly (clang, -O0):
<cbuiltin_ln>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1030 <log@plt>
movsd  %xmm0,-0x10(%rbp)
movss  0xec8(%rip),%xmm0
call   1030 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbuiltin_ln>:
push   %rax
cvtsd2ss %xmm0,%xmm0
call   1030 <log@plt>
movsd  %xmm0,(%rsp)
movss  0xed9(%rip),%xmm0
call   1030 <log@plt>
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @cbuiltin_ln(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fptrunc double %3 to float
%5 = call double @log(float %4)
%6 = call double @log(float 0x4005BF0A80000000)
%7 = fdiv double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @cbuiltin_ln(double %0) {
%2 = fptrunc double %0 to float
%3 = tail call double @log(float %2)
%4 = tail call double @log(float 0x4005BF0A80000000)
%5 = fdiv double %3, %4
ret double %5
}
const char *Concat_Name(void) { return "Concat"; }


x86 assembly (clang, -O0):
<Concat_Name>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Concat_Name>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [7 x i8] c"Concat\00"
define i8* @Concat_Name() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [7 x i8] c"Concat\00"
define i8* @Concat_Name() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int video_get_type();
int video_is_mda(void) { return (video_get_type() == 1); }


x86 assembly (clang, -O0):
<video_is_mda>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <video_get_type@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<video_is_mda>:
push   %rax
xor    %eax,%eax
call   1030 <video_get_type@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @video_is_mda() {
%1 = call i32 (...) @video_get_type()
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @video_is_mda() {
%1 = tail call i32 (...) @video_get_type()
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
ret i32 %3
}