xunge/DecIR huggingface dataset:
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ strcpy(char *, char const *);
int strlen(char const *);
char *copystring(const char *s) {
  if (s) {
    char *ret = malloc((strlen(s) + 1) * sizeof(char));
    strcpy(ret, s);
    return (ret);
  }
  return (NULL);
}


x86 assembly (clang, -O0):
<copystring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     117e <copystring+0x4e>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1186 <copystring+0x56>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copystring>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     1159 <copystring+0x29>
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
call   1050 <malloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
jmp    115c <copystring+0x2c>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @copystring(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = add nsw i32 %4, 1
%6 = tail call i8* @malloc(i32 %5)
%7 = tail call i32 @strcpy(i8* %6, i8* %0)
br label %8
8: ; preds = %1, %3
%9 = phi i8* [ %6, %3 ], [ null, %1 ]
ret i8* %9
}
int test_imm_D6int64_lowword_reg(long long val) {
  return ((val) & (0xD6 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_D6int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 214
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
double RAND_MAX;
scalar_t__ rand();
double getRand(void) { return (double)rand() / RAND_MAX; }


x86 assembly (clang, -O0):
<getRand>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec1(%rip),%rax
divsd  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<getRand>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec4(%rip),%rax
divsd  (%rax),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define double @getRand() {
%1 = call i64 (...) @rand()
%2 = sitofp i64 %1 to double
%3 = load double, double* @RAND_MAX
%4 = fdiv double %2, %3
ret double %4
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define double @getRand() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to double
%3 = load double, double* @RAND_MAX
%4 = fdiv double %2, %3
ret double %4
}
/* Variables and functions */
char *malloc(size_t);
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
char *strexndup(const char *s, size_t len) {
  char *p;
  if ((p = malloc(len + 1)) == NULL)
    return NULL;
  memcpy(p, s, len);
  p[len] = '\0';
  return p;
}


x86 assembly (clang, -O0):
<strexndup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    1158 <strexndup+0x38>
movq   $0x0,-0x8(%rbp)
jmp    117d <strexndup+0x5d>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strexndup>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
lea    0x1(%rsi),%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     114f <strexndup+0x2f>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <memcpy@plt>
movb   $0x0,(%rbx,%r14,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @strexndup(i8* %0, i64 %1) {
%3 = add i64 %1, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = tail call i32 @memcpy(i8* %4, i8* %0, i64 %1)
%8 = getelementptr inbounds i8, i8* %4, i64 %1
store i8 0, i8* %8
br label %9
9: ; preds = %2, %6
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr,
          "Usage: ip neigh { add | del | change | replace } { ADDR [ lladdr "
          "LLADDR ]\n"
          "          [ nud { permanent | noarp | stale | reachable } ]\n"
          "          | proxy ADDR } [ dev DEV ]\n");
  fprintf(
      stderr,
      "       ip neigh {show|flush} [ to PREFIX ] [ dev DEV ] [ nud STATE ]\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
lea    0xf63(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf6d(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [172 x i8] c"Usage: ip neigh { add | del | change | replace } { ADDR [ lladdr LLADDR ]\0A [ nud { permanent | noarp | stale | reachable } ]\0A | proxy ADDR } [ dev DEV ]\0A\00"
@.str.1 = [70 x i8] c" ip neigh {show|flush} [ to PREFIX ] [ dev DEV ] [ nud STATE ]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([172 x i8], [172 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [172 x i8] c"Usage: ip neigh { add | del | change | replace } { ADDR [ lladdr LLADDR ]\0A [ nud { permanent | noarp | stale | reachable } ]\0A | proxy ADDR } [ dev DEV ]\0A\00"
@.str.1 = [70 x i8] c" ip neigh {show|flush} [ to PREFIX ] [ dev DEV ] [ nud STATE ]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([172 x i8], [172 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @exit(i32 -1)
unreachable
}
int fun571() { return 571; }


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

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

LLVM IR (-O0):
define i32 @fun571() {
ret i32 571
}

LLVM IR (-O2):
define i32 @fun571() {
ret i32 571
}
void INT_Excep_MTU8_TGIU8(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_MTU8_TGIU8() {
ret void
}
/* Type definitions */
typedef int uint64_t;
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
uint64_t now_microseconds(void) {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return (uint64_t)tv.tv_sec * 1000000 + (uint64_t)tv.tv_usec;
}


x86 assembly (clang, -O0):
<now_microseconds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    -0x8(%rbp),%rax
imul   $0xf4240,%eax,%eax
mov    -0x10(%rbp),%rcx
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<now_microseconds>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,0x10(%rsp),%eax
add    0x8(%rsp),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i32 @now_microseconds() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = trunc i64 %4 to i32
%6 = mul nsw i32 %5, 1000000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%8 = load i64, i64* %7
%9 = trunc i64 %8 to i32
%10 = add nsw i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i32 @now_microseconds() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = mul nsw i32 %6, 1000000
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%9 = load i64, i64* %8
%10 = trunc i64 %9 to i32
%11 = add nsw i32 %7, %10
ret i32 %11
}
int alwaysTrue(struct link_map *candidate __attribute__((unused))) { return 1; }


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

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

LLVM IR (-O0):
%struct.link_map = type opaque
define i32 @alwaysTrue(%struct.link_map* %0) {
%2 = alloca %struct.link_map*
store %struct.link_map* %0, %struct.link_map** %2
ret i32 1
}

LLVM IR (-O2):
%struct.link_map = type opaque
define i32 @alwaysTrue(%struct.link_map* nocapture readnone %0) {
ret i32 1
}
/* Type definitions */
struct tms {
  int dummy;
};
typedef int clock_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
clock_t __attribute__((section("libgloss_epiphany"))) _times(struct tms *buf) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<_times>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ed9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec0(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_times>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
%struct.tms = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @_times(%struct.tms* %0) section "libgloss_epiphany" {
%2 = alloca %struct.tms*
store %struct.tms* %0, %struct.tms** %2
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
%struct.tms = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @_times(%struct.tms* nocapture readnone %0) section "libgloss_epiphany" {
%2 = load i32, i32* @ENOSYS
store i32 %2, i32* @errno
ret i32 -1
}
void FinalizePosition(void) {}


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

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

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

LLVM IR (-O2):
define void @FinalizePosition() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(unsigned char *, int, unsigned int);
int cust_hash(unsigned char *data_buf, unsigned int data_len,
              unsigned char *hash_buf, unsigned int hash_len) {
  memset(hash_buf, 0x00, hash_len);
  if ((20) == hash_len) {
    return 0;
  } else if ((32) == hash_len) {
    return 0;
  } else {
    return -1;
  }
}


x86 assembly (clang, -O0):
<cust_hash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    $0x14,%eax
cmp    -0x24(%rbp),%eax
jne    114e <cust_hash+0x3e>
movl   $0x0,-0x4(%rbp)
jmp    116f <cust_hash+0x5f>
mov    $0x20,%eax
cmp    -0x24(%rbp),%eax
jne    1168 <cust_hash+0x58>
movl   $0x0,-0x4(%rbp)
jmp    116f <cust_hash+0x5f>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cust_hash>:
push   %rbx
mov    %ecx,%ebx
mov    %rdx,%rdi
xor    %esi,%esi
mov    %ecx,%edx
call   1030 <memset@plt>
cmp    $0x14,%ebx
setne  %al
cmp    $0x20,%ebx
setne  %cl
and    %al,%cl
movzbl %cl,%eax
neg    %eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @cust_hash(i8* nocapture readnone %0, i32 %1, i8* %2, i32 %3) {
%5 = tail call i32 @memset(i8* %2, i32 0, i32 %3)
%6 = icmp ne i32 %3, 20
%7 = icmp ne i32 %3, 32
%8 = and i1 %6, %7
%9 = sext i1 %8 to i32
ret i32 %9
}
int __attribute__((target("arch=sandybridge"))) redecl2(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @redecl2() {
ret i32 2
}

LLVM IR (-O2):
define i32 @redecl2() {
ret i32 2
}
float factoriel(float a) {
  if (a > 0)
    return a * factoriel(a - 1);
  return 1;
}


x86 assembly (clang, -O0):
<factoriel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1164 <factoriel+0x54>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xebb(%rip),%xmm1
subss  %xmm1,%xmm0
call   1030 <factoriel@plt>
movaps %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1171 <factoriel+0x61>
movss  0xe94(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<factoriel>:
push   %rax
movaps %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm1
jbe    113b <factoriel+0x2b>
movss  0xee0(%rip),%xmm0
addss  %xmm1,%xmm0
movss  %xmm1,0x4(%rsp)
call   1030 <factoriel@plt>
mulss  0x4(%rsp),%xmm0
pop    %rax
ret
movss  0xebd(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @factoriel(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp ogt float %4, 0.000000e+00
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load float, float* %3
%8 = load float, float* %3
%9 = fsub float %8, 1.000000e+00
%10 = call float @factoriel(float %9)
%11 = fmul float %7, %10
store float %11, float* %2
br label %13
12: ; preds = %1
store float 1.000000e+00, float* %2
br label %13
13: ; preds = %12, %6
%14 = load float, float* %2
ret float %14
}

LLVM IR (-O2):
define float @factoriel(float %0) {
%2 = fcmp ogt float %0, 0.000000e+00
br i1 %2, label %5, label %3
3: ; preds = %1, %5
%4 = phi float [ %8, %5 ], [ 1.000000e+00, %1 ]
ret float %4
5: ; preds = %1
%6 = fadd float %0, -1.000000e+00
%7 = tail call float @factoriel(float %6)
%8 = fmul float %7, %0
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ Delay_ms(int);
int /*<<< orphan*/ Lcd_Out(int, int, char *);
int /*<<< orphan*/ UART1_Init(int);
int /*<<< orphan*/ UART1_Write(int);
int /*<<< orphan*/ UART1_Write_Text(char *);
int /*<<< orphan*/ delay_ms(int);
void Config_UART1(void) {
  UART1_Init(9600);
  Delay_ms(100);
  UART1_Write_Text("Inicio");
  UART1_Write(13);
  UART1_Write(10);
  Lcd_Out(1, 1, "Inicia UART1");
  delay_ms(2000);
}


x86 assembly (clang, -O0):
<Config_UART1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2580,%edi
call   1050 <UART1_Init@plt>
mov    $0x64,%edi
call   1080 <Delay_ms@plt>
lea    0xe81(%rip),%rdi
call   1060 <UART1_Write_Text@plt>
mov    $0xd,%edi
call   1040 <UART1_Write@plt>
mov    $0xa,%edi
call   1040 <UART1_Write@plt>
mov    $0x1,%esi
lea    0xe63(%rip),%rdx
mov    %esi,%edi
call   1030 <Lcd_Out@plt>
mov    $0x7d0,%edi
call   1070 <delay_ms@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Config_UART1>:
push   %rax
mov    $0x2580,%edi
call   1050 <UART1_Init@plt>
mov    $0x64,%edi
call   1080 <Delay_ms@plt>
lea    0xe84(%rip),%rdi
call   1060 <UART1_Write_Text@plt>
mov    $0xd,%edi
call   1040 <UART1_Write@plt>
mov    $0xa,%edi
call   1040 <UART1_Write@plt>
lea    0xe6b(%rip),%rdx
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <Lcd_Out@plt>
mov    $0x7d0,%edi
pop    %rax
jmp    1070 <delay_ms@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"Inicio\00"
@.str.1 = [13 x i8] c"Inicia UART1\00"
define void @Config_UART1() {
%1 = call i32 @UART1_Init(i32 9600)
%2 = call i32 @Delay_ms(i32 100)
%3 = call i32 @UART1_Write_Text(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @UART1_Write(i32 13)
%5 = call i32 @UART1_Write(i32 10)
%6 = call i32 @Lcd_Out(i32 1, i32 1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @delay_ms(i32 2000)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"Inicio\00"
@.str.1 = [13 x i8] c"Inicia UART1\00"
define void @Config_UART1() {
%1 = tail call i32 @UART1_Init(i32 9600)
%2 = tail call i32 @Delay_ms(i32 100)
%3 = tail call i32 @UART1_Write_Text(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @UART1_Write(i32 13)
%5 = tail call i32 @UART1_Write(i32 10)
%6 = tail call i32 @Lcd_Out(i32 1, i32 1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @delay_ms(i32 2000)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errx(int, char *);
void nomem() { errx(1, "not enough memory."); }


x86 assembly (clang, -O0):
<nomem>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
call   1030 <errx@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<nomem>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
jmp    1030 <errx@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"not enough memory.\00"
define void @nomem() {
%1 = call i32 @errx(i32 1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"not enough memory.\00"
define void @nomem() {
%1 = tail call i32 @errx(i32 1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ block();
int /*<<< orphan*/ emitln(char *);
int /*<<< orphan*/ match(char);
char *new_label();
int /*<<< orphan*/ post_label(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, char *);
void do_loop(void) {
  char *label;
  char brastr[32];
  match('p');
  label = new_label();
  post_label(label);
  block();
  match('e');
  snprintf(brastr, 32, "BRA %s", label);
  emitln(brastr);
}


x86 assembly (clang, -O0):
<do_loop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    $0x70,%edi
call   1060 <match@plt>
mov    $0x0,%al
call   1040 <new_label@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1080 <post_label@plt>
mov    $0x0,%al
call   1070 <block@plt>
mov    $0x65,%edi
call   1060 <match@plt>
lea    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x20,%esi
lea    0xe55(%rip),%rdx
call   1050 <snprintf@plt>
lea    -0x30(%rbp),%rdi
call   1030 <emitln@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_loop>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    $0x70,%edi
call   1060 <match@plt>
xor    %eax,%eax
call   1040 <new_label@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1080 <post_label@plt>
xor    %eax,%eax
call   1070 <block@plt>
mov    $0x65,%edi
call   1060 <match@plt>
lea    0xe65(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x20,%esi
mov    %rbx,%rcx
call   1050 <snprintf@plt>
mov    %r14,%rdi
call   1030 <emitln@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [7 x i8] c"BRA %s\00"
define void @do_loop() {
%1 = alloca i8*
%2 = alloca [32 x i8]
%3 = call i32 @match(i8 signext 112)
%4 = call i8* (...) @new_label()
store i8* %4, i8** %1
%5 = load i8*, i8** %1
%6 = call i32 @post_label(i8* %5)
%7 = call i32 (...) @block()
%8 = call i32 @match(i8 signext 101)
%9 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%10 = load i8*, i8** %1
%11 = call i32 @snprintf(i8* %9, i32 32, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%13 = call i32 @emitln(i8* %12)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"BRA %s\00"
define void @do_loop() {
%1 = alloca [32 x i8]
%2 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @match(i8 signext 112)
%4 = tail call i8* (...) @new_label()
%5 = tail call i32 @post_label(i8* %4)
%6 = tail call i32 (...) @block()
%7 = tail call i32 @match(i8 signext 101)
%8 = call i32 @snprintf(i8* %2, i32 32, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4)
%9 = call i32 @emitln(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ UpnpResponse_RemoteIOClient_RemoteIO_ForceReset(void *);
int /*<<< orphan*/ printf(char *);
void UpnpRemoteIOClient_RemoteIO_ForceReset(void *upnptoken) {
  printf("Invoke: UpnpRemoteIOClient_RemoteIO_ForceReset();\r\n");
  UpnpResponse_RemoteIOClient_RemoteIO_ForceReset(upnptoken);
}


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

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

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

LLVM IR (-O2):
@str = [51 x i8] c"Invoke: UpnpRemoteIOClient_RemoteIO_ForceReset();\0D\00"
define void @UpnpRemoteIOClient_RemoteIO_ForceReset(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @UpnpResponse_RemoteIOClient_RemoteIO_ForceReset(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HplAtm128SpiP__SPI__initMaster();
void Atm128SpiP__Spi__initMaster(void) { HplAtm128SpiP__SPI__initMaster(); }


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

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

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

LLVM IR (-O2):
define void @Atm128SpiP__Spi__initMaster() {
%1 = tail call i32 (...) @HplAtm128SpiP__SPI__initMaster()
ret void
}
/* Variables and functions */
double exp(double);
double rq_pricing_discount(double tau_d, double r_dom) {
  return exp(-r_dom * tau_d);
}


x86 assembly (clang, -O0):
<rq_pricing_discount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rq_pricing_discount>:
xorpd  0xee8(%rip),%xmm1
mulsd  %xmm1,%xmm0
jmp    1030 <exp@plt>

LLVM IR (-O0):
define double @rq_pricing_discount(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = fneg double %5
%7 = load double, double* %3
%8 = fmul double %6, %7
%9 = call double @exp(double %8)
ret double %9
}

LLVM IR (-O2):
define double @rq_pricing_discount(double %0, double %1) {
%3 = fneg double %1
%4 = fmul double %3, %0
%5 = tail call double @exp(double %4)
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
int opt_err_msg(char thisopt, int lineno) {
  fprintf(stderr, "------------------------------------------------------------"
                  "-------------------\n");
  fprintf(stderr,
          "BPF file setopt failure. Problems parsing the argument to \"%c\" on "
          "line %d.\n",
          thisopt, lineno);
  return (-1);
}


x86 assembly (clang, -O0):
<opt_err_msg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
movsbl -0x1(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xf02(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opt_err_msg>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %edi,%ebp
mov    0x2ec1(%rip),%r14
mov    (%r14),%edi
lea    0xed7(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xf17(%rip),%rsi
mov    %ebp,%edx
mov    %ebx,%ecx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [81 x i8] c"-------------------------------------------------------------------------------\0A\00"
@.str.1 = [76 x i8] c"BPF file setopt failure. Problems parsing the argument to \22%c\22 on line %d.\0A\00"
define i32 @opt_err_msg(i8 signext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = load i32, i32* %4
%11 = call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0), i32 %9, i32 %10)
ret i32 -1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [81 x i8] c"-------------------------------------------------------------------------------\0A\00"
@.str.1 = [76 x i8] c"BPF file setopt failure. Problems parsing the argument to \22%c\22 on line %d.\0A\00"
define i32 @opt_err_msg(i8 signext %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = sext i8 %0 to i32
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0), i32 %6, i32 %1)
ret i32 -1
}
/* Variables and functions */
scalar_t__ merge_possible(int const, int const);
int merge_result(const int v1, const int v2) {
  return merge_possible(v1, v2) ? v1 + 1 : -1;
}


x86 assembly (clang, -O0):
<merge_result>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <merge_possible@plt>
cmp    $0x0,%rax
je     1141 <merge_result+0x31>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    114e <merge_result+0x3e>
mov    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    114e <merge_result+0x3e>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<merge_result>:
push   %rbx
mov    %edi,%ebx
call   1030 <merge_possible@plt>
add    $0x1,%ebx
cmp    $0x1,%rax
sbb    %eax,%eax
or     %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @merge_result(i32 %0, i32 %1) {
%3 = tail call i64 @merge_possible(i32 %0, i32 %1)
%4 = icmp eq i64 %3, 0
%5 = add nsw i32 %0, 1
%6 = select i1 %4, i32 -1, i32 %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ ArgItem();
int /*<<< orphan*/ Cmd_Exits(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ Me();
void Act_Exits(void) { Cmd_Exits(Me(), ArgItem()); }


x86 assembly (clang, -O0):
<Act_Exits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <Me@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <ArgItem@plt>
mov    -0x4(%rbp),%edi
mov    %eax,%esi
call   1030 <Cmd_Exits@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Act_Exits>:
push   %rbx
xor    %eax,%eax
call   1050 <Me@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <ArgItem@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1030 <Cmd_Exits@plt>

LLVM IR (-O0):
define void @Act_Exits() {
%1 = call i32 (...) @Me()
%2 = call i32 (...) @ArgItem()
%3 = call i32 @Cmd_Exits(i32 %1, i32 %2)
ret void
}

LLVM IR (-O2):
define void @Act_Exits() {
%1 = tail call i32 (...) @Me()
%2 = tail call i32 (...) @ArgItem()
%3 = tail call i32 @Cmd_Exits(i32 %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stdout;
void bench(void (*bm)(), char *label) {
  printf(" %18s", label);
  fflush(stdout);
  bm();
}


x86 assembly (clang, -O0):
<bench>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    $0x0,%al
call   *-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bench>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
xor    %eax,%eax
mov    %rbx,%rcx
pop    %rbx
jmp    *%rcx

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

LLVM IR (-O2):
@.str = [6 x i8] c" %18s\00"
@stdout = global i32 0
define void @bench(void (...)* nocapture %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = load i32, i32* @stdout
%5 = tail call i32 @fflush(i32 %4)
tail call void (...) %0()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
char *binary_to_string(int /*<<< orphan*/ const *, size_t);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ printf(char *, char const *, int, char *);
void dump_binary(const char *prompt, const uint8_t *data, size_t size) {
  char *buffer = binary_to_string(data, size);
  printf("%s (%d bytes): \"%s\"\n", prompt, (int)size, buffer);
  free(buffer);
}


x86 assembly (clang, -O0):
<dump_binary>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <binary_to_string@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    %eax,%edx
mov    -0x20(%rbp),%rcx
lea    0xe96(%rip),%rdi
call   1040 <printf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_binary>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r15
mov    %rdi,%r14
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1050 <binary_to_string@plt>
mov    %rax,%rbx
lea    0xeb0(%rip),%rdi
mov    %r14,%rsi
mov    %r15d,%edx
mov    %rax,%rcx
call   1040 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"%s (%d bytes): \22%s\22\0A\00"
define void @dump_binary(i8* %0, i32* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i64
%7 = alloca i8*
store i8* %0, i8** %4
store i32* %1, i32** %5
store i64 %2, i64* %6
%8 = load i32*, i32** %5
%9 = load i64, i64* %6
%10 = call i8* @binary_to_string(i32* %8, i64 %9)
store i8* %10, i8** %7
%11 = load i8*, i8** %4
%12 = load i64, i64* %6
%13 = trunc i64 %12 to i32
%14 = load i8*, i8** %7
%15 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %11, i32 %13, i8* %14)
%16 = load i8*, i8** %7
%17 = call i32 @free(i8* %16)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"%s (%d bytes): \22%s\22\0A\00"
define void @dump_binary(i8* %0, i32* %1, i64 %2) {
%4 = tail call i8* @binary_to_string(i32* %1, i64 %2)
%5 = trunc i64 %2 to i32
%6 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %5, i8* %4)
%7 = tail call i32 @free(i8* %4)
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int celcon_dimension_of_points(int *dimension) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(83, dimension, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<celcon_dimension_of_points>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x53,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<celcon_dimension_of_points>:
mov    %rdi,%rsi
mov    $0x53,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @celcon_dimension_of_points(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32* %0, i32** %2
%6 = load i32*, i32** %2
%7 = load i32*, i32** %3
%8 = load double*, double** %5
%9 = call i32 @_ada_use_c2phc4c(i32 83, i32* %6, i32* %7, double* %8, i32 0)
store i32 %9, i32* %4
%10 = load i32, i32* %4
ret i32 %10
}

LLVM IR (-O2):
define i32 @celcon_dimension_of_points(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc4c(i32 83, i32* %0, i32* undef, double* undef, i32 0)
ret i32 %2
}
/* Variables and functions */
int create_dlink();
int create_dlink_stack() { return create_dlink(); }


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

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

LLVM IR (-O0):
define i32 @create_dlink_stack() {
%1 = call i32 (...) @create_dlink()
ret i32 %1
}

LLVM IR (-O2):
define i32 @create_dlink_stack() {
%1 = tail call i32 (...) @create_dlink()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x6f() {
  Assert_real((isspace(111) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              560, ("isspace should be 0 for o"));
}


x86 assembly (clang, -O0):
<t_isspace_0x6f>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6f,%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x230,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isspace_0x6f>:
push   %rax
mov    $0x6f,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x230,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for o\00"
define void @t_isspace_0x6f() {
%1 = call i64 @isspace(i32 111)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 560, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for o\00"
define void @t_isspace_0x6f() {
%1 = tail call i64 @isspace(i32 111)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 560, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int is_little_endian(void) {
  unsigned int word = 0x1;
  unsigned char *byte = (unsigned char *)&word;
  return (byte[0] ? 1 : 0);
}


x86 assembly (clang, -O0):
<is_little_endian>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @is_little_endian() {
%1 = alloca i32
%2 = alloca i8*
store i32 1, i32* %1
%3 = bitcast i32* %1 to i8*
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 1, i32 0
ret i32 %10
}

LLVM IR (-O2):
define i32 @is_little_endian() {
ret i32 1
}
int sock_cleanup() { return 0; }


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

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

LLVM IR (-O0):
define i32 @sock_cleanup() {
ret i32 0
}

LLVM IR (-O2):
define i32 @sock_cleanup() {
ret i32 0
}
int rt_sendrecvscanline_get_totalrows(void *voidhandle) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @rt_sendrecvscanline_get_totalrows(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ AGDUPSTR(char *, char const *, char *);
char *ao_xstrdup(char const *pz) {
  char *str;
  AGDUPSTR(str, pz, "time val str");
  return str;
}


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

x86 assembly (clang, -O2):
<ao_xstrdup>:
lea    0xee9(%rip),%rdx
mov    %rdi,%rsi
jmp    1030 <AGDUPSTR@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"time val str\00"
define i8* @ao_xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %3
%5 = load i8*, i8** %2
%6 = call i32 @AGDUPSTR(i8* %4, i8* %5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%7 = load i8*, i8** %3
ret i8* %7
}

LLVM IR (-O2):
@.str = [13 x i8] c"time val str\00"
define noalias i8* @ao_xstrdup(i8* %0) {
%2 = tail call i32 @AGDUPSTR(i8* undef, i8* %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i8* undef
}
int vrniDolzino(long long st) {
  int d = 0;
  while (st > 0) {
    st /= 10;
    d++;
  }
  return d;
}


x86 assembly (clang, -O0):
<vrniDolzino>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
jle    113a <vrniDolzino+0x3a>
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <vrniDolzino+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vrniDolzino>:
xor    %ecx,%ecx
test   %rdi,%rdi
jle    1136 <vrniDolzino+0x36>
movabs $0xcccccccccccccccd,%rsi
cc cc cc
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rdi,%rax
mul    %rsi
shr    $0x3,%rdx
add    $0x1,%ecx
cmp    $0x9,%rdi
mov    %rdx,%rdi
ja     1120 <vrniDolzino+0x20>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @vrniDolzino(i64 %0) {
%2 = icmp sgt i64 %0, 0
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i64 [ %6, %3 ], [ %0, %1 ]
%6 = udiv i64 %5, 10
%7 = add nuw nsw i32 %4, 1
%8 = icmp ult i64 %5, 10
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
void foo262(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo262(i32 %0) {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t fnv_hash(uint32_t const x, uint32_t const y) {
  return x * 0x01000193 ^ y;
}


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

x86 assembly (clang, -O2):
<fnv_hash>:
imul   $0x1000193,%edi,%eax
xor    %esi,%eax
ret

LLVM IR (-O0):
define i32 @fnv_hash(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 = mul nsw i32 %5, 16777619
%7 = load i32, i32* %4
%8 = xor i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @fnv_hash(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, 16777619
%4 = xor i32 %3, %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ ssyev_(char *, char *, int *, float *, int *, float *,
                          float *, int *, int *, int, int);
void clapack_ssyev(char jobz, char uplo, int n, float *a, int lda, float *w,
                   float *work, int lwork, int *info) {
  ssyev_(&jobz, &uplo, &n, a, &lda, w, work, &lwork, info, 1, 1);
}


x86 assembly (clang, -O0):
<clapack_ssyev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %sil,%al
mov    %dil,%sil
mov    0x20(%rbp),%rdi
mov    0x18(%rbp),%edi
mov    0x10(%rbp),%rdi
mov    %sil,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    %edx,-0x8(%rbp)
mov    %rcx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x20(%rbp),%r9
mov    0x10(%rbp),%r11
mov    0x20(%rbp),%rax
lea    -0x1(%rbp),%rdi
lea    -0x2(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0x14(%rbp),%r8
lea    0x18(%rbp),%r10
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
movl   $0x1,0x18(%rsp)
movl   $0x1,0x20(%rsp)
call   1030 <ssyev_@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clapack_ssyev>:
sub    $0x18,%rsp
mov    0x20(%rsp),%r10
mov    0x30(%rsp),%r11
mov    %dil,0xf(%rsp)
mov    %sil,0xe(%rsp)
mov    %edx,0x14(%rsp)
mov    %r8d,0x10(%rsp)
sub    $0x8,%rsp
lea    0x30(%rsp),%rax
lea    0x17(%rsp),%rdi
lea    0x16(%rsp),%rsi
lea    0x1c(%rsp),%rdx
lea    0x18(%rsp),%r8
push   $0x1
push   $0x1
push   %r11
push   %rax
push   %r10
call   1030 <ssyev_@plt>
add    $0x48,%rsp
ret

LLVM IR (-O0):
define void @clapack_ssyev(i8 signext %0, i8 signext %1, i32 %2, float* %3, i32 %4, float* %5, float* %6, i32 %7, i32* %8) {
%10 = alloca i8
%11 = alloca i8
%12 = alloca i32
%13 = alloca float*
%14 = alloca i32
%15 = alloca float*
%16 = alloca float*
%17 = alloca i32
%18 = alloca i32*
store i8 %0, i8* %10
store i8 %1, i8* %11
store i32 %2, i32* %12
store float* %3, float** %13
store i32 %4, i32* %14
store float* %5, float** %15
store float* %6, float** %16
store i32 %7, i32* %17
store i32* %8, i32** %18
%19 = load float*, float** %13
%20 = load float*, float** %15
%21 = load float*, float** %16
%22 = load i32*, i32** %18
%23 = call i32 @ssyev_(i8* %10, i8* %11, i32* %12, float* %19, i32* %14, float* %20, float* %21, i32* %17, i32* %22, i32 1, i32 1)
ret void
}

LLVM IR (-O2):
define void @clapack_ssyev(i8 signext %0, i8 signext %1, i32 %2, float* %3, i32 %4, float* %5, float* %6, i32 %7, i32* %8) {
%10 = alloca i8
%11 = alloca i8
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i8 %0, i8* %10
store i8 %1, i8* %11
store i32 %2, i32* %12
store i32 %4, i32* %13
store i32 %7, i32* %14
%15 = call i32 @ssyev_(i8* %10, i8* %11, i32* %12, float* %3, i32* %13, float* %5, float* %6, i32* %14, i32* %8, i32 1, i32 1)
ret void
}