xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ X509_EXTENSION;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int ASN1_item_i2d(int /*<<< orphan*/ *, unsigned char **, int /*<<< orphan*/ *);
int /*<<< orphan*/ X509_EXTENSION_it;
int i2d_X509_EXTENSION(X509_EXTENSION *a, unsigned char **out) {
  return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_EXTENSION_it);
}


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

x86 assembly (clang, -O2):
<i2d_X509_EXTENSION>:
mov    0x2ec9(%rip),%rdx
jmp    1030 <ASN1_item_i2d@plt>

LLVM IR (-O0):
@X509_EXTENSION_it = global i32 0
define i32 @i2d_X509_EXTENSION(i32* %0, i8** %1) {
%3 = alloca i32*
%4 = alloca i8**
store i32* %0, i32** %3
store i8** %1, i8*** %4
%5 = load i32*, i32** %3
%6 = load i8**, i8*** %4
%7 = call i32 @ASN1_item_i2d(i32* %5, i8** %6, i32* @X509_EXTENSION_it)
ret i32 %7
}

LLVM IR (-O2):
@X509_EXTENSION_it = global i32 0
define i32 @i2d_X509_EXTENSION(i32* %0, i8** %1) {
%3 = tail call i32 @ASN1_item_i2d(i32* %0, i8** %1, i32* @X509_EXTENSION_it)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ ENOMEM;
int /*<<< orphan*/ errno;
__attribute__((weak)) int _execve(char *name, char **argv, char **env) {
  do {
    (void)(name);
  } while (0);
  do {
    (void)(argv);
  } while (0);
  do {
    (void)(env);
  } while (0);
  errno = ENOMEM;
  return -1;
}


x86 assembly (clang, -O0):
<_execve>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
jmp    1115 <_execve+0x15>
jmp    111a <_execve+0x1a>
mov    0x2ebf(%rip),%rax
mov    (%rax),%ecx
mov    0x2eae(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@ENOMEM = global i32 0
@errno = global i32 0
define weak i32 @_execve(i8* %0, i8** %1, i8** %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i8**
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i8** %2, i8*** %6
br label %7
7: ; preds = %3
%8 = load i8*, i8** %4
br label %9
9: ; preds = %7
br label %10
10: ; preds = %9
%11 = load i8**, i8*** %5
br label %12
12: ; preds = %10
br label %13
13: ; preds = %12
%14 = load i8**, i8*** %6
br label %15
15: ; preds = %13
%16 = load i32, i32* @ENOMEM
store i32 %16, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOMEM = global i32 0
@errno = global i32 0
define weak i32 @_execve(i8* %0, i8** %1, i8** %2) {
%4 = load i32, i32* @ENOMEM
store i32 %4, i32* @errno
ret i32 -1
}
double clip(double x, double lo, double hi) {
  if (x < lo)
    return lo;
  if (x > hi)
    return hi;
  return x;
}


x86 assembly (clang, -O0):
<clip>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1136 <clip+0x36>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    115f <clip+0x5f>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    1155 <clip+0x55>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    115f <clip+0x5f>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<clip>:
minsd  %xmm0,%xmm2
cmpltsd %xmm1,%xmm0
movapd %xmm0,%xmm3
andnpd %xmm2,%xmm3
andpd  %xmm1,%xmm0
orpd   %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @clip(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
%8 = load double, double* %5
%9 = load double, double* %6
%10 = fcmp olt double %8, %9
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load double, double* %6
store double %12, double* %4
br label %21
13: ; preds = %3
%14 = load double, double* %5
%15 = load double, double* %7
%16 = fcmp ogt double %14, %15
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = load double, double* %7
store double %18, double* %4
br label %21
19: ; preds = %13
%20 = load double, double* %5
store double %20, double* %4
br label %21
21: ; preds = %19, %17, %11
%22 = load double, double* %4
ret double %22
}

LLVM IR (-O2):
define double @clip(double %0, double %1, double %2) {
%4 = fcmp olt double %0, %1
%5 = fcmp ogt double %0, %2
%6 = select i1 %5, double %2, double %0
%7 = select i1 %4, double %1, double %6
ret double %7
}
/* Variables and functions */
size_t strlen(char const *);
scalar_t__ strncasecmp(char const *, char const *, size_t);
int tokencmp(const char *token, const char *string, unsigned int stringlen) {
  size_t tlen = strlen(token);
  if (tlen != stringlen) {
    return 0;
  }
  return strncasecmp(token, string, tlen) == 0;
}


x86 assembly (clang, -O0):
<tokencmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x1c(%rbp),%ecx
cmp    %rcx,%rax
je     115c <tokencmp+0x3c>
movl   $0x0,-0x4(%rbp)
jmp    117c <tokencmp+0x5c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1040 <strncasecmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tokencmp>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %ebp,%edx
xor    %ecx,%ecx
cmp    %rdx,%rax
jne    1150 <tokencmp+0x30>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rax,%rdx
call   1040 <strncasecmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @tokencmp(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%5 = zext i32 %2 to i64
%6 = icmp eq i64 %4, %5
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = tail call i64 @strncasecmp(i8* %0, i8* %1, i64 %4)
%9 = icmp eq i64 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %3, %7
%12 = phi i32 [ %10, %7 ], [ 0, %3 ]
ret i32 %12
}
void can_relocate_call(void) {
  int ok = 0;
  asm("    .global "
      "set_point0"
      "\n"
      "  jmp "
      "set_point0"
      "\n"
      "0:\n"
      "  mov $1, %[ok]\n"
      "  jmp 1f\n"
      "set_point0"
      ":\n"
      "  call 0b\n"
      "1:\n"
      : [ok] "=r"(ok));
  if (ok == 1)
    pass();
  else
    fail();
}


x86 assembly (clang, -O0):
<can_relocate_call>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
jmp    1050 <set_point0@plt>
mov    $0x1,%eax
jmp    1153 <set_point0+0x5>

x86 assembly (clang, -O2):
<can_relocate_call>:
jmp    1050 <set_point0@plt>
mov    $0x1,%eax
jmp    1141 <set_point0+0x5>

LLVM IR (-O0):
define void @can_relocate_call() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 asm " .global set_point0\0A jmp set_point0\0A0:\0A mov $$1, $0\0A jmp 1f\0Aset_point0:\0A call 0b\0A1:\0A", "=r,~{dirflag},~{fpsr},~{flags}"()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @pass()
br label %9
7: ; preds = %0
%8 = call i32 (...) @fail()
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
define void @can_relocate_call() {
%1 = tail call i32 asm " .global set_point0\0A jmp set_point0\0A0:\0A mov $$1, $0\0A jmp 1f\0Aset_point0:\0A call 0b\0A1:\0A", "=r,~{dirflag},~{fpsr},~{flags}"()
%2 = icmp eq i32 %1, 1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @pass()
br label %7
5: ; preds = %0
%6 = tail call i32 (...) @fail()
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errx(int, char *);
char *strdup(char const *);
char *Strdup(const char *s) {
  char *ret;
  ret = strdup(s);
  if (ret == NULL) {
    errx(1, "Ran out of memory.");
  }
  return ret;
}


x86 assembly (clang, -O0):
<Strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1155 <Strdup+0x35>
mov    $0x1,%edi
lea    0xeb0(%rip),%rsi
call   1030 <errx@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Strdup>:
push   %rbx
call   1040 <strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113f <Strdup+0x1f>
lea    0xecb(%rip),%rsi
mov    $0x1,%edi
call   1030 <errx@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [19 x i8] c"Ran out of memory.\00"
define noalias i8* @Strdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @errx(i32 1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
void bytestream_put_le16(uint8_t **b, const unsigned int value) {
  do {
    uint16_t d = (value);
    ((uint8_t *)(*b))[0] = (d);
    ((uint8_t *)(*b))[1] = (d) >> 8;
  } while (0);
  (*b) += 2;
}


x86 assembly (clang, -O0):
<bytestream_put_le16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%ecx
sar    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %ecx,0x4(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x8,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bytestream_put_le16>:
mov    (%rdi),%rax
mov    %esi,(%rax)
sar    $0x8,%esi
mov    %esi,0x4(%rax)
add    $0x8,%rax
mov    %rax,(%rdi)
ret

LLVM IR (-O0):
define void @bytestream_put_le16(i32** %0, i32 %1) {
%3 = alloca i32**
%4 = alloca i32
%5 = alloca i32
store i32** %0, i32*** %3
store i32 %1, i32* %4
br label %6
6: ; preds = %2
%7 = load i32, i32* %4
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = load i32**, i32*** %3
%10 = load i32*, i32** %9
%11 = getelementptr inbounds i32, i32* %10, i64 0
store i32 %8, i32* %11
%12 = load i32, i32* %5
%13 = ashr i32 %12, 8
%14 = load i32**, i32*** %3
%15 = load i32*, i32** %14
%16 = getelementptr inbounds i32, i32* %15, i64 1
store i32 %13, i32* %16
br label %17
17: ; preds = %6
%18 = load i32**, i32*** %3
%19 = load i32*, i32** %18
%20 = getelementptr inbounds i32, i32* %19, i64 2
store i32* %20, i32** %18
ret void
}

LLVM IR (-O2):
define void @bytestream_put_le16(i32** nocapture %0, i32 %1) {
%3 = load i32*, i32** %0
store i32 %1, i32* %3
%4 = ashr i32 %1, 8
%5 = getelementptr inbounds i32, i32* %3, i64 1
store i32 %4, i32* %5
%6 = getelementptr inbounds i32, i32* %3, i64 2
store i32* %6, i32** %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ dvd_authinfo;
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int main(void) {
  dvd_authinfo a;
  (void)a;
  return sizeof(a);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 4
}
int isxdigit(int c) {
  return ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') ||
          (c >= 'a' && c <= 'f'));
}


x86 assembly (clang, -O0):
<isxdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x30,-0x4(%rbp)
jl     1120 <isxdigit+0x20>
mov    $0x1,%al
cmpl   $0x39,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1158 <isxdigit+0x58>
cmpl   $0x41,-0x4(%rbp)
jl     1139 <isxdigit+0x39>
mov    $0x1,%al
cmpl   $0x46,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1158 <isxdigit+0x58>
xor    %eax,%eax
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     1152 <isxdigit+0x52>
cmpl   $0x66,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isxdigit>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%eax
setb   %al
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
cmp    $0x6,%edi
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isxdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 48
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 57
br i1 %7, label %22, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 65
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 70
br i1 %13, label %22, label %14
14: ; preds = %11, %8
%15 = load i32, i32* %2
%16 = icmp sge i32 %15, 97
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp sle i32 %18, 102
br label %20
20: ; preds = %17, %14
%21 = phi i1 [ false, %14 ], [ %19, %17 ]
br label %22
22: ; preds = %20, %11, %5
%23 = phi i1 [ true, %11 ], [ true, %5 ], [ %21, %20 ]
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @isxdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = and i32 %0, -33
%5 = add i32 %4, -65
%6 = icmp ult i32 %5, 6
%7 = or i1 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
void ton(int x) {}


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

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

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

LLVM IR (-O2):
define void @ton(i32 %0) {
ret void
}
void not_annotated_c_1_1() {}


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

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

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

LLVM IR (-O2):
define void @not_annotated_c_1_1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ywidGetMainWid();
int /*<<< orphan*/ ywidRend(int /*<<< orphan*/);
void ywidRendMainWid(void) { ywidRend(ywidGetMainWid()); }


x86 assembly (clang, -O0):
<ywidRendMainWid>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <ywidGetMainWid@plt>
mov    %eax,%edi
call   1040 <ywidRend@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ywidRendMainWid>:
push   %rax
xor    %eax,%eax
call   1030 <ywidGetMainWid@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <ywidRend@plt>

LLVM IR (-O0):
define void @ywidRendMainWid() {
%1 = call i32 (...) @ywidGetMainWid()
%2 = call i32 @ywidRend(i32 %1)
ret void
}

LLVM IR (-O2):
define void @ywidRendMainWid() {
%1 = tail call i32 (...) @ywidGetMainWid()
%2 = tail call i32 @ywidRend(i32 %1)
ret void
}
/* Variables and functions */
char rand();
signed char range_schar(signed char min, signed char max) {
  signed char val = rand();
  return val < min || max < val ? min : val;
}


x86 assembly (clang, -O0):
<range_schar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %al,-0x3(%rbp)
movsbl -0x3(%rbp),%eax
movsbl -0x1(%rbp),%ecx
cmp    %ecx,%eax
jl     114e <range_schar+0x3e>
movsbl -0x2(%rbp),%eax
movsbl -0x3(%rbp),%ecx
cmp    %ecx,%eax
jge    115a <range_schar+0x4a>
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1161 <range_schar+0x51>
movsbl -0x3(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<range_schar>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
cmp    %bl,%al
movzbl %al,%ecx
mov    %ecx,%eax
cmovg  %ebp,%eax
cmp    %bpl,%cl
cmovl  %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define signext i8 @range_schar(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%6 = call signext i8 (...) @rand()
store i8 %6, i8* %5
%7 = load i8, i8* %5
%8 = sext i8 %7 to i32
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp slt i32 %8, %10
br i1 %11, label %18, label %12
12: ; preds = %2
%13 = load i8, i8* %4
%14 = sext i8 %13 to i32
%15 = load i8, i8* %5
%16 = sext i8 %15 to i32
%17 = icmp slt i32 %14, %16
br i1 %17, label %18, label %21
18: ; preds = %12, %2
%19 = load i8, i8* %3
%20 = sext i8 %19 to i32
br label %24
21: ; preds = %12
%22 = load i8, i8* %5
%23 = sext i8 %22 to i32
br label %24
24: ; preds = %21, %18
%25 = phi i32 [ %20, %18 ], [ %23, %21 ]
%26 = trunc i32 %25 to i8
ret i8 %26
}

LLVM IR (-O2):
define signext i8 @range_schar(i8 signext %0, i8 signext %1) {
%3 = tail call signext i8 (...) @rand()
%4 = icmp slt i8 %3, %0
%5 = icmp sgt i8 %3, %1
%6 = or i1 %4, %5
%7 = select i1 %6, i8 %0, i8 %3
ret i8 %7
}
char *freewrl_get_version() { return "freeWRL version 1.22.12"; }


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"freeWRL version 1.22.12\00"
define i8* @freewrl_get_version() {
ret i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [24 x i8] c"freeWRL version 1.22.12\00"
define i8* @freewrl_get_version() {
ret i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char **argv) {
  int total_number_of_arguments = argc;
  if (total_number_of_arguments <= 1) {
    printf("No input arguments passed\n");
    return -1;
  }
  printf("Total number of arguments passed to main is %d\n",
         total_number_of_arguments - 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jg     1150 <main+0x40>
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    116b <main+0x5b>
mov    -0x14(%rbp),%esi
sub    $0x1,%esi
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x1,%edi
jg     1139 <main+0x19>
lea    0xf03(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%ebx
jmp    114e <main+0x2e>
mov    %edi,%esi
add    $0xffffffff,%esi
lea    0xebb(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"No input arguments passed\0A\00"
@.str.1 = [48 x i8] c"Total number of arguments passed to main is %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = icmp sle i32 %8, 1
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %16
12: ; preds = %2
%13 = load i32, i32* %6
%14 = sub nsw i32 %13, 1
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), i32 %14)
store i32 0, i32* %3
br label %16
16: ; preds = %12, %10
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@.str.1 = [48 x i8] c"Total number of arguments passed to main is %d\0A\00"
@str = [26 x i8] c"No input arguments passed\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
br label %9
6: ; preds = %2
%7 = add nsw i32 %0, -1
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %6, %4
%10 = phi i32 [ -1, %4 ], [ 0, %6 ]
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ z_streamp;

/* Variables and functions */
int inflateEnd(int /*<<< orphan*/);
__attribute__((__visibility__("default"))) int kz_inflate_end(z_streamp strm) {
  return inflateEnd(strm);
}


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

x86 assembly (clang, -O2):
<kz_inflate_end>:
jmp    1030 <inflateEnd@plt>

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

LLVM IR (-O2):
define i32 @kz_inflate_end(i32 %0) {
%2 = tail call i32 @inflateEnd(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ displayMenu();
int /*<<< orphan*/ getChoice();
int /*<<< orphan*/ launchAction(int /*<<< orphan*/);
int main() {
  do {
    displayMenu();
    launchAction(getChoice());
  } while (1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <displayMenu@plt>
mov    $0x0,%al
call   1040 <getChoice@plt>
mov    %eax,%edi
call   1050 <launchAction@plt>
mov    $0x1,%al
test   $0x1,%al
jne    113f <main+0xf>
jmp    1163 <main+0x33>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <displayMenu@plt>
xor    %eax,%eax
call   1040 <getChoice@plt>
mov    %eax,%edi
call   1050 <launchAction@plt>
jmp    1140 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %6, %0
%3 = call i32 (...) @displayMenu()
%4 = call i32 (...) @getChoice()
%5 = call i32 @launchAction(i32 %4)
br label %6
6: ; preds = %2
br i1 true, label %2, label %7
7: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @displayMenu()
%3 = tail call i32 (...) @getChoice()
%4 = tail call i32 @launchAction(i32 %3)
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ assert(void *);
void *realloc(void *, size_t);
void *safeMalloc(void *p, size_t size) {
  p = realloc(p, size);
  assert(p);
  return p;
}


x86 assembly (clang, -O0):
<safeMalloc>:
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   1040 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safeMalloc>:
push   %rbx
call   1040 <realloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @safeMalloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i8* @realloc(i8* %5, i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = call i32 @assert(i8* %8)
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
define i8* @safeMalloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = tail call i32 @assert(i8* %3)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void FreeSquareIntegerMatrix(int **m) {
  free((char *)(m[0]));
  free((char *)(m));
}


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

x86 assembly (clang, -O2):
<FreeSquareIntegerMatrix>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @FreeSquareIntegerMatrix(i32** %0) {
%2 = alloca i32**
store i32** %0, i32*** %2
%3 = load i32**, i32*** %2
%4 = getelementptr inbounds i32*, i32** %3, i64 0
%5 = load i32*, i32** %4
%6 = bitcast i32* %5 to i8*
%7 = call i32 @free(i8* %6)
%8 = load i32**, i32*** %2
%9 = bitcast i32** %8 to i8*
%10 = call i32 @free(i8* %9)
ret void
}

LLVM IR (-O2):
define void @FreeSquareIntegerMatrix(i32** nocapture %0) {
%2 = bitcast i32** %0 to i8**
%3 = load i8*, i8** %2
%4 = tail call i32 @free(i8* %3)
%5 = bitcast i32** %0 to i8*
%6 = tail call i32 @free(i8* %5)
ret void
}
int fct2(a, b) {}


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

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

LLVM IR (-O0):
define i32 @fct2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @fct2(i32 %0, i32 %1) {
ret i32 undef
}
void PAGE_TrimEvent() {}


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

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

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

LLVM IR (-O2):
define void @PAGE_TrimEvent() {
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint64_t;

/* Variables and functions */
uint64_t load_6(const uint8_t *in) {
  uint64_t result;
  result = in[0];
  result |= ((uint64_t)in[1]) << 8;
  result |= ((uint64_t)in[2]) << 16;
  result |= ((uint64_t)in[3]) << 24;
  result |= ((uint64_t)in[4]) << 32;
  result |= ((uint64_t)in[5]) << 40;
  return result;
}


x86 assembly (clang, -O0):
<load_6>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
shl    $0x8,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
shl    $0x10,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
shl    $0x18,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%eax
mov    $0x20,%ecx
shl    %cl,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%eax
mov    $0x28,%ecx
shl    %cl,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @load_6(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 0
%6 = load i32, i32* %5
store i32 %6, i32* %3
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load i32, i32* %8
%10 = shl i32 %9, 8
%11 = load i32, i32* %3
%12 = or i32 %11, %10
store i32 %12, i32* %3
%13 = load i32*, i32** %2
%14 = getelementptr inbounds i32, i32* %13, i64 2
%15 = load i32, i32* %14
%16 = shl i32 %15, 16
%17 = load i32, i32* %3
%18 = or i32 %17, %16
store i32 %18, i32* %3
%19 = load i32*, i32** %2
%20 = getelementptr inbounds i32, i32* %19, i64 3
%21 = load i32, i32* %20
%22 = shl i32 %21, 24
%23 = load i32, i32* %3
%24 = or i32 %23, %22
store i32 %24, i32* %3
%25 = load i32*, i32** %2
%26 = getelementptr inbounds i32, i32* %25, i64 4
%27 = load i32, i32* %26
%28 = shl i32 %27, 32
%29 = load i32, i32* %3
%30 = or i32 %29, %28
store i32 %30, i32* %3
%31 = load i32*, i32** %2
%32 = getelementptr inbounds i32, i32* %31, i64 5
%33 = load i32, i32* %32
%34 = shl i32 %33, 40
%35 = load i32, i32* %3
%36 = or i32 %35, %34
store i32 %36, i32* %3
%37 = load i32, i32* %3
ret i32 %37
}

LLVM IR (-O2):
define i32 @load_6(i32* nocapture readnone %0) {
ret i32 poison
}
/* Variables and functions */
int /*<<< orphan*/ lr_output_message(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, float);
ConvertFloatToString() {
  char String[500];
  float FloatVariable = 1234.5678;
  sprintf(String, "%f", FloatVariable);
  lr_output_message("New string is [%s]", String);
  return 0;
}


x86 assembly (clang, -O0):
<ConvertFloatToString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
movss  0xecd(%rip),%xmm0
movss  %xmm0,-0x204(%rbp)
ff
lea    -0x200(%rbp),%rdi
movss  -0x204(%rbp),%xmm0
ff
lea    0xeb3(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x200(%rbp),%rsi
lea    0xea3(%rip),%rdi
call   1030 <lr_output_message@plt>
xor    %eax,%eax
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ConvertFloatToString>:
push   %rbx
sub    $0x200,%rsp
lea    0xed5(%rip),%rsi
mov    %rsp,%rbx
movss  0xec6(%rip),%xmm0
mov    %rbx,%rdi
call   1040 <sprintf@plt>
lea    0xebe(%rip),%rdi
mov    %rbx,%rsi
call   1030 <lr_output_message@plt>
xor    %eax,%eax
add    $0x200,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@.str.1 = [19 x i8] c"New string is [%s]\00"
define i32 @ConvertFloatToString() {
%1 = alloca [500 x i8]
%2 = alloca float
store float 0x40934A4560000000, float* %2
%3 = getelementptr inbounds [500 x i8], [500 x i8]* %1, i64 0, i64 0
%4 = load float, float* %2
%5 = call i32 @sprintf(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %4)
%6 = getelementptr inbounds [500 x i8], [500 x i8]* %1, i64 0, i64 0
%7 = call i32 @lr_output_message(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@.str.1 = [19 x i8] c"New string is [%s]\00"
define i32 @ConvertFloatToString() {
%1 = alloca [500 x i8]
%2 = getelementptr inbounds [500 x i8], [500 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float 0x40934A4560000000)
%4 = call i32 @lr_output_message(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
float intBitsToFloat(int32_t i) {
  union {
    float f;
    int32_t i;
  } tmp;
  tmp.i = i;
  return tmp.f;
}


x86 assembly (clang, -O0):
<intBitsToFloat>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<intBitsToFloat>:
movd   %edi,%xmm0
ret

LLVM IR (-O0):
%union.anon = type { float }
define float @intBitsToFloat(i32 %0) {
%2 = alloca i32
%3 = alloca %union.anon
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = bitcast %union.anon* %3 to i32*
store i32 %4, i32* %5
%6 = bitcast %union.anon* %3 to float*
%7 = load float, float* %6
ret float %7
}

LLVM IR (-O2):
define float @intBitsToFloat(i32 %0) {
%2 = bitcast i32 %0 to float
ret float %2
}
int find_colon(char c) { return (c == ':') ? 1 : 0; }


x86 assembly (clang, -O0):
<find_colon>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x3a,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_colon>:
xor    %eax,%eax
cmp    $0x3a,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @find_colon(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 58
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 1, i32 0
ret i32 %7
}

LLVM IR (-O2):
define i32 @find_colon(i8 signext %0) {
%2 = icmp eq i8 %0, 58
%3 = zext i1 %2 to i32
ret i32 %3
}
void XtConvert() {}


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

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

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

LLVM IR (-O2):
define void @XtConvert() {
ret void
}
double test_lgamma(double x) { return __builtin_lgamma(x); }


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

x86 assembly (clang, -O2):
<test_lgamma>:
jmp    1030 <lgamma@plt>

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

LLVM IR (-O2):
define double @test_lgamma(double %0) {
%2 = tail call double @lgamma(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ func();
void f2a() { func(); }


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

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

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

LLVM IR (-O2):
define void @f2a() {
%1 = tail call i32 (...) @func()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void c(void) { printf("c() called\n"); }


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

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

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

LLVM IR (-O2):
@str = [11 x i8] c"c() called\00"
define void @c() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret void
}
unsigned int d2u(double d) { return (unsigned)d; }


x86 assembly (clang, -O0):
<d2u>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d2u>:
cvttsd2si %xmm0,%rax
ret

LLVM IR (-O0):
define i32 @d2u(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fptoui double %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @d2u(double %0) {
%2 = fptoui double %0 to i32
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() {
  int a = 0;
  if (a == 0) {
    printf("Hello, world!");
  } else {
    printf("Problem Encountered.");
  }
  printf("This prints anyway.");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1141 <main+0x31>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
jmp    114d <main+0x3d>
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello, world!\00"
@.str.1 = [21 x i8] c"Problem Encountered.\00"
@.str.2 = [20 x i8] c"This prints anyway.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
%10 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello, world!\00"
@.str.2 = [20 x i8] c"This prints anyway.\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x06() {
  Assert_real((isxdigit(6) == 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_isxdigit.c",
              35, ("isxdigit should be 0 for 0x06"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0x06>:
push   %rax
mov    $0x6,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x23,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x06\00"
define void @t_isxdigit_0x06() {
%1 = call i64 @isxdigit(i32 6)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 35, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x06\00"
define void @t_isxdigit_0x06() {
%1 = tail call i64 @isxdigit(i32 6)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 35, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *malloc(int);
int snprintf(char *, int, char *, int);
char *convert_int_to_string(int integer) {
  int length = snprintf(NULL, 0, "%d", integer);
  char *string_to_return = malloc(length + 1);
  snprintf(string_to_return, length + 1, "%d", integer);
  return string_to_return;
}


x86 assembly (clang, -O0):
<convert_int_to_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
lea    0xec5(%rip),%rdx
call   1030 <snprintf@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
add    $0x1,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
add    $0x1,%esi
mov    -0x4(%rbp),%ecx
lea    0xe9a(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_int_to_string>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edi,%r15d
lea    0xecf(%rip),%r14
xor    %edi,%edi
xor    %esi,%esi
mov    %r14,%rdx
mov    %r15d,%ecx
call   1030 <snprintf@plt>
lea    0x1(%rax),%ebp
mov    %ebp,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
mov    %r15d,%ecx
call   1030 <snprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i8* @convert_int_to_string(i32 %0) {
%2 = tail call i32 @snprintf(i8* null, i32 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = add nsw i32 %2, 1
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 @snprintf(i8* %4, i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ UPnPResponse_AVTransport_Play(void *);
int /*<<< orphan*/ printf(char *, unsigned int, char *);
void UPnPAVTransport_Play(void *upnptoken, unsigned int InstanceID,
                          char *Speed) {
  printf("Invoke: UPnPAVTransport_Play(%u,%s);\r\n", InstanceID, Speed);
  UPnPResponse_AVTransport_Play(upnptoken);
}


x86 assembly (clang, -O0):
<UPnPAVTransport_Play>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <UPnPResponse_AVTransport_Play@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [39 x i8] c"Invoke: UPnPAVTransport_Play(%u,%s);\0D\0A\00"
define void @UPnPAVTransport_Play(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %5
%8 = load i8*, i8** %6
%9 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %7, i8* %8)
%10 = load i8*, i8** %4
%11 = call i32 @UPnPResponse_AVTransport_Play(i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"Invoke: UPnPAVTransport_Play(%u,%s);\0D\0A\00"
define void @UPnPAVTransport_Play(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %2)
%5 = tail call i32 @UPnPResponse_AVTransport_Play(i8* %0)
ret void
}
const char *mock_cache_id(void) { return "mock"; }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"mock\00"
define i8* @mock_cache_id() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
char *fpp_config_get_plugin_path(void) { return NULL; }


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

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

LLVM IR (-O0):
define i8* @fpp_config_get_plugin_path() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @fpp_config_get_plugin_path() {
ret i8* null
}
unsigned xrop3_11_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~D;
  stk2 = S & stk3;
  stk1 = T | stk2;
  stk1 = ~stk1;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


x86 assembly (clang, -O0):
<xrop3_11_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
and    -0x8(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_11_0_1>:
mov    %edi,%ecx
shl    $0x8,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
or     %ecx,%eax
not    %eax
not    %edi
and    %esi,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_11_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %5
%24 = xor i32 %23, -1
store i32 %24, i32* %10
%25 = load i32, i32* %6
%26 = load i32, i32* %10
%27 = and i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %7
%29 = load i32, i32* %9
%30 = or i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = xor i32 %31, -1
store i32 %32, i32* %8
%33 = load i32, i32* %8
%34 = load i32, i32* %6
%35 = and i32 %33, %34
%36 = load i32, i32* %8
%37 = load i32, i32* %7
%38 = xor i32 %37, -1
%39 = and i32 %36, %38
%40 = or i32 %35, %39
%41 = load i32, i32* %7
%42 = load i32, i32* %6
%43 = xor i32 %42, -1
%44 = and i32 %41, %43
%45 = load i32, i32* %5
%46 = and i32 %44, %45
%47 = or i32 %40, %46
ret i32 %47
}

LLVM IR (-O2):
define i32 @xrop3_11_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i32 %6, %4
%8 = xor i32 %7, -1
%9 = xor i32 %3, -1
%10 = and i32 %9, %5
%11 = or i32 %10, %8
ret i32 %11
}