xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char const *, unsigned int);
char *xmalloc(unsigned int);
char *xstrndup(const char *str, unsigned len) {
  char *p = xmalloc(len + 1);
  strncpy(p, str, len);
  p[len] = '\0';
  return p;
}


x86 assembly (clang, -O0):
<xstrndup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   1040 <xmalloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrndup>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%r15d
mov    %rdi,%r14
lea    0x1(%r15),%edi
call   1040 <xmalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
call   1030 <strncpy@plt>
mov    %r15d,%eax
movb   $0x0,(%rbx,%rax,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @xstrndup(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = add i32 %6, 1
%8 = call i8* @xmalloc(i32 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = load i8*, i8** %3
%11 = load i32, i32* %4
%12 = call i32 @strncpy(i8* %9, i8* %10, i32 %11)
%13 = load i8*, i8** %5
%14 = load i32, i32* %4
%15 = zext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
store i8 0, i8* %16
%17 = load i8*, i8** %5
ret i8* %17
}

LLVM IR (-O2):
define i8* @xstrndup(i8* %0, i32 %1) {
%3 = add i32 %1, 1
%4 = tail call i8* @xmalloc(i32 %3)
%5 = tail call i32 @strncpy(i8* %4, i8* %0, i32 %1)
%6 = zext i32 %1 to i64
%7 = getelementptr inbounds i8, i8* %4, i64 %6
store i8 0, i8* %7
ret i8* %4
}
int exact_square(int numeral) {
  int numeration;
  for (numeration = 0; numeral > numeration; numeration++) {
    if (numeration * numeration == numeral) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<exact_square>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1149 <exact_square+0x49>
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1136 <exact_square+0x36>
movl   $0x1,-0x4(%rbp)
jmp    1150 <exact_square+0x50>
jmp    113b <exact_square+0x3b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <exact_square+0xe>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<exact_square>:
xor    %eax,%eax
test   %edi,%edi
jle    1128 <exact_square+0x28>
cs nopw 0x0(%rax,%rax,1)
mov    %eax,%ecx
imul   %eax,%ecx
cmp    %edi,%ecx
je     1123 <exact_square+0x23>
add    $0x1,%eax
cmp    %eax,%edi
jne    1110 <exact_square+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @exact_square(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %5, label %10
3: ; preds = %5
%4 = icmp eq i32 %9, %0
br i1 %4, label %10, label %5
5: ; preds = %1, %3
%6 = phi i32 [ %9, %3 ], [ 0, %1 ]
%7 = mul nsw i32 %6, %6
%8 = icmp eq i32 %7, %0
%9 = add nuw nsw i32 %6, 1
br i1 %8, label %10, label %3
10: ; preds = %5, %3, %1
%11 = phi i32 [ 0, %1 ], [ 0, %3 ], [ 1, %5 ]
ret i32 %11
}
void INT_Excep_RIIC1_TXI1(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_RIIC1_TXI1() {
ret void
}
/* Variables and functions */
int id2(int);
int id(int x) {
  if (x == 0)
    return 0;
  int ret = id2(x - 1) + 1;
  if (ret > 5)
    return 5;
  return ret;
}


x86 assembly (clang, -O0):
<id>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <id+0x21>
movl   $0x0,-0x4(%rbp)
jmp    115e <id+0x4e>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <id2@plt>
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jle    1158 <id+0x48>
movl   $0x5,-0x4(%rbp)
jmp    115e <id+0x4e>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<id>:
test   %edi,%edi
je     1130 <id+0x20>
push   %rax
add    $0xffffffff,%edi
call   1030 <id2@plt>
lea    0x1(%rax),%ecx
cmp    $0x5,%eax
mov    $0x5,%eax
cmovl  %ecx,%eax
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @id(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %18
8: ; preds = %1
%9 = load i32, i32* %3
%10 = sub nsw i32 %9, 1
%11 = call i32 @id2(i32 %10)
%12 = add nsw i32 %11, 1
store i32 %12, i32* %4
%13 = load i32, i32* %4
%14 = icmp sgt i32 %13, 5
br i1 %14, label %15, label %16
15: ; preds = %8
store i32 5, i32* %2
br label %18
16: ; preds = %8
%17 = load i32, i32* %4
store i32 %17, i32* %2
br label %18
18: ; preds = %16, %15, %7
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @id(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = tail call i32 @id2(i32 %4)
%6 = add nsw i32 %5, 1
%7 = icmp slt i32 %5, 5
%8 = select i1 %7, i32 %6, i32 5
br label %9
9: ; preds = %1, %3
%10 = phi i32 [ %8, %3 ], [ 0, %1 ]
ret i32 %10
}
/* Variables and functions */
size_t str_hash(const char *s) {
  size_t h = 0;
  while (*s) {
    h = h * 31 + *s;
    s++;
  }
  return h;
}


x86 assembly (clang, -O0):
<str_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1142 <str_hash+0x42>
imul   $0x1f,-0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
movsbq (%rcx),%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1110 <str_hash+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112d <str_hash+0x2d>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
mov    %rax,%rdx
shl    $0x5,%rdx
sub    %rax,%rdx
movsbq %cl,%rax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <str_hash+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @str_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i64 [ %10, %4 ], [ 0, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
%8 = mul i64 %6, 31
%9 = sext i8 %5 to i64
%10 = add i64 %8, %9
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 0, %1 ], [ %10, %4 ]
ret i64 %15
}
/* Variables and functions */
scalar_t__ malloc(int);
char *memset(char *, char, int);
int /*<<< orphan*/ sprintf(char *, char *, double);
char *dtos(double input) {
  char *temp2 = (char *)malloc(30);
  temp2 = memset(temp2, '\0', 30);
  sprintf(temp2, "%f", input);
  return temp2;
}


x86 assembly (clang, -O0):
<dtos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x1e,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x1e,%edx
call   1030 <memset@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
movsd  -0x8(%rbp),%xmm0
lea    0xe91(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dtos>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mov    $0x1e,%edi
call   1040 <malloc@plt>
mov    %rax,%rdi
xor    %esi,%esi
mov    $0x1e,%edx
call   1030 <memset@plt>
mov    %rax,%rbx
lea    0xea2(%rip),%rsi
mov    %rax,%rdi
movsd  0x8(%rsp),%xmm0
call   1050 <sprintf@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
define i8* @dtos(double %0) {
%2 = alloca double
%3 = alloca i8*
store double %0, double* %2
%4 = call i64 @malloc(i32 30)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i8* @memset(i8* %6, i8 signext 0, i32 30)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load double, double* %2
%10 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define i8* @dtos(double %0) {
%2 = tail call i64 @malloc(i32 30)
%3 = inttoptr i64 %2 to i8*
%4 = tail call i8* @memset(i8* %3, i8 signext 0, i32 30)
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %4, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %0)
ret i8* %4
}
/* Type definitions */
struct mxt_platform_data {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ disable_irq_wake(unsigned int);
void board_disable_irq_wake(const struct mxt_platform_data *pdata,
                            unsigned int irq) {
  disable_irq_wake(irq);
}


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

x86 assembly (clang, -O2):
<board_disable_irq_wake>:
mov    %esi,%edi
jmp    1030 <disable_irq_wake@plt>

LLVM IR (-O0):
%struct.mxt_platform_data = type { i32 }
define void @board_disable_irq_wake(%struct.mxt_platform_data* %0, i32 %1) {
%3 = alloca %struct.mxt_platform_data*
%4 = alloca i32
store %struct.mxt_platform_data* %0, %struct.mxt_platform_data** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @disable_irq_wake(i32 %5)
ret void
}

LLVM IR (-O2):
%struct.mxt_platform_data = type { i32 }
define void @board_disable_irq_wake(%struct.mxt_platform_data* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @disable_irq_wake(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
int /*<<< orphan*/ print_node(int /*<<< orphan*/);
int main(int argc, char **argv) { print_node(f(4)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x4,%edi
call   1030 <f@plt>
mov    %eax,%edi
call   1040 <print_node@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
call   1030 <f@plt>
mov    %eax,%edi
call   1040 <print_node@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @f(i32 4)
%6 = call i32 @print_node(i32 %5)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @f(i32 4)
%4 = tail call i32 @print_node(i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ asin(int /*<<< orphan*/);
int /*<<< orphan*/ popNumber();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basASin() { pushNumber(asin(popNumber())); }


x86 assembly (clang, -O0):
<basASin>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,%edi
call   1030 <asin@plt>
mov    %eax,%edi
call   1040 <pushNumber@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<basASin>:
push   %rax
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%edi
call   1030 <asin@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <pushNumber@plt>

LLVM IR (-O0):
define void @basASin() {
%1 = call i32 (...) @popNumber()
%2 = call i32 @asin(i32 %1)
%3 = call i32 @pushNumber(i32 %2)
ret void
}

LLVM IR (-O2):
define void @basASin() {
%1 = tail call i32 (...) @popNumber()
%2 = tail call i32 @asin(i32 %1)
%3 = tail call i32 @pushNumber(i32 %2)
ret void
}
/* Type definitions */
struct btree_t {
  int dummy;
};
struct btree_node_t {
  int dummy;
};

/* Variables and functions */
int btree_insert(struct btree_t *, struct btree_node_t *, void const *, int);
int btree_ins_right(struct btree_t *tree, struct btree_node_t *node,
                    const void *key) {
  return btree_insert(tree, node, key, 2);
}


x86 assembly (clang, -O0):
<btree_ins_right>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x2,%ecx
call   1030 <btree_insert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<btree_ins_right>:
mov    $0x2,%ecx
jmp    1030 <btree_insert@plt>

LLVM IR (-O0):
%struct.btree_t = type { i32 }
%struct.btree_node_t = type { i32 }
define i32 @btree_ins_right(%struct.btree_t* %0, %struct.btree_node_t* %1, i8* %2) {
%4 = alloca %struct.btree_t*
%5 = alloca %struct.btree_node_t*
%6 = alloca i8*
store %struct.btree_t* %0, %struct.btree_t** %4
store %struct.btree_node_t* %1, %struct.btree_node_t** %5
store i8* %2, i8** %6
%7 = load %struct.btree_t*, %struct.btree_t** %4
%8 = load %struct.btree_node_t*, %struct.btree_node_t** %5
%9 = load i8*, i8** %6
%10 = call i32 @btree_insert(%struct.btree_t* %7, %struct.btree_node_t* %8, i8* %9, i32 2)
ret i32 %10
}

LLVM IR (-O2):
%struct.btree_t = type { i32 }
%struct.btree_node_t = type { i32 }
define i32 @btree_ins_right(%struct.btree_t* %0, %struct.btree_node_t* %1, i8* %2) {
%4 = tail call i32 @btree_insert(%struct.btree_t* %0, %struct.btree_node_t* %1, i8* %2, i32 2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0xfd() {
  Assert_real((islower(253) == 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_islower.c",
              1270, ("islower should be 0 for 0xfd"));
}


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

x86 assembly (clang, -O2):
<t_islower_0xfd>:
push   %rax
mov    $0xfd,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4f6,%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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xfd\00"
define void @t_islower_0xfd() {
%1 = call i64 @islower(i32 253)
%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 1270, i8* getelementptr inbounds ([29 x i8], [29 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xfd\00"
define void @t_islower_0xfd() {
%1 = tail call i64 @islower(i32 253)
%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 1270, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log_f(char *);
unsigned mouseb_none_button_count_get(unsigned mouse) {
  log_f("mouseb:none: mouseb_none_button_count_get()\n");
  return 0;
}


x86 assembly (clang, -O0):
<mouseb_none_button_count_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <log_f@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [45 x i8] c"mouseb:none: mouseb_none_button_count_get()\0A\00"
define i32 @mouseb_none_button_count_get(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @log_f(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [45 x i8] c"mouseb:none: mouseb_none_button_count_get()\0A\00"
define i32 @mouseb_none_button_count_get(i32 %0) {
%2 = tail call i32 @log_f(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t ld_u8_le(const void *x) { return ((uint8_t *)x)[0]; }


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

x86 assembly (clang, -O2):
<ld_u8_le>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @ld_u8_le(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = getelementptr inbounds i32, i32* %4, i64 0
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @ld_u8_le(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
void XtInitialize() {}


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

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

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

LLVM IR (-O2):
define void @XtInitialize() {
ret void
}
/* Variables and functions */
char *CM_EntityString();
char *BotImport_BSPEntityData(void) { return CM_EntityString(); }


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

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

LLVM IR (-O0):
define i8* @BotImport_BSPEntityData() {
%1 = call i8* (...) @CM_EntityString()
ret i8* %1
}

LLVM IR (-O2):
define i8* @BotImport_BSPEntityData() {
%1 = tail call i8* (...) @CM_EntityString()
ret i8* %1
}
/* Type definitions */
typedef int /*<<< orphan*/ __u8;

/* Variables and functions */
int /*<<< orphan*/ __put_unaligned_4_be(unsigned long long const,
                                        int /*<<< orphan*/ *);
void __put_unaligned_8_be(const unsigned long long __v, register __u8 *__p) {
  __put_unaligned_4_be(__v >> 32, __p);
  __put_unaligned_4_be(__v, __p + 4);
}


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

x86 assembly (clang, -O2):
<__put_unaligned_8_be>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
shr    $0x20,%rdi
call   1030 <__put_unaligned_4_be@plt>
add    $0x10,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <__put_unaligned_4_be@plt>

LLVM IR (-O0):
define void @__put_unaligned_8_be(i64 %0, i32* %1) {
%3 = alloca i64
%4 = alloca i32*
store i64 %0, i64* %3
store i32* %1, i32** %4
%5 = load i64, i64* %3
%6 = lshr i64 %5, 32
%7 = load i32*, i32** %4
%8 = call i32 @__put_unaligned_4_be(i64 %6, i32* %7)
%9 = load i64, i64* %3
%10 = load i32*, i32** %4
%11 = getelementptr inbounds i32, i32* %10, i64 4
%12 = call i32 @__put_unaligned_4_be(i64 %9, i32* %11)
ret void
}

LLVM IR (-O2):
define void @__put_unaligned_8_be(i64 %0, i32* %1) {
%3 = lshr i64 %0, 32
%4 = tail call i32 @__put_unaligned_4_be(i64 %3, i32* %1)
%5 = getelementptr inbounds i32, i32* %1, i64 4
%6 = tail call i32 @__put_unaligned_4_be(i64 %0, i32* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void fistp_preg64_dword(int reg64) {
  put8(0xDB);
  put8(0x18 + reg64);
}


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

x86 assembly (clang, -O2):
<fistp_preg64_dword>:
push   %rbx
mov    %edi,%ebx
mov    $0xdb,%edi
call   1030 <put8@plt>
add    $0x18,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @fistp_preg64_dword(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @put8(i32 219)
%4 = load i32, i32* %2
%5 = add nsw i32 24, %4
%6 = call i32 @put8(i32 %5)
ret void
}

LLVM IR (-O2):
define void @fistp_preg64_dword(i32 %0) {
%2 = tail call i32 @put8(i32 219)
%3 = add nsw i32 %0, 24
%4 = tail call i32 @put8(i32 %3)
ret void
}
void lowmem_reserve_ratio_sysctl_handler(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<lowmem_reserve_ratio_sysctl_handler>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lowmem_reserve_ratio_sysctl_handler>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.lowmem_reserve_ratio_sysctl_handler = [36 x i8] c"lowmem_reserve_ratio_sysctl_handler\00"
define void @lowmem_reserve_ratio_sysctl_handler() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @__func__.lowmem_reserve_ratio_sysctl_handler, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.lowmem_reserve_ratio_sysctl_handler = [36 x i8] c"lowmem_reserve_ratio_sysctl_handler\00"
define void @lowmem_reserve_ratio_sysctl_handler() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @__func__.lowmem_reserve_ratio_sysctl_handler, i64 0, i64 0))
ret void
}
int hputr8(hstring, keyword, dval)
char *hstring;
const char *keyword;
const double dval;
{
  char value[30];
  sprintf(value, "%g", dval);
  fixnegzero(value);
  return (hputc(hstring, keyword, value));
}


x86 assembly (clang, -O0):
<hputr8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
lea    -0x40(%rbp),%rdi
movsd  -0x18(%rbp),%xmm0
lea    0xeab(%rip),%rsi
mov    $0x1,%al
call   1050 <sprintf@plt>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1040 <fixnegzero@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x40(%rbp),%rdx
mov    $0x0,%al
call   1030 <hputc@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hputr8>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %rsi,%r14
mov    %rdi,%r15
lea    0xeba(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <sprintf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <fixnegzero@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <hputc@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%g\00"
define i32 @hputr8(i8* %0, i8* %1, double %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double
%7 = alloca [30 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store double %2, double* %6
%8 = getelementptr inbounds [30 x i8], [30 x i8]* %7, i64 0, i64 0
%9 = load double, double* %6
%10 = call i32 (i8*, i8*, ...) @sprintf(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %9)
%11 = getelementptr inbounds [30 x i8], [30 x i8]* %7, i64 0, i64 0
%12 = call i32 (i8*, ...) bitcast (i32 (...)* @fixnegzero to i32 (i8*, ...)*)(i8* %11)
%13 = load i8*, i8** %4
%14 = load i8*, i8** %5
%15 = getelementptr inbounds [30 x i8], [30 x i8]* %7, i64 0, i64 0
%16 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @hputc to i32 (i8*, i8*, i8*, ...)*)(i8* %13, i8* %14, i8* %15)
ret i32 %16
}

LLVM IR (-O2):
@.str = [3 x i8] c"%g\00"
define i32 @hputr8(i8* %0, i8* %1, double %2) {
%4 = alloca [30 x i8]
%5 = getelementptr inbounds [30 x i8], [30 x i8]* %4, i64 0, i64 0
%6 = call i32 (i8*, i8*, ...) @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %2)
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @fixnegzero to i32 (i8*, ...)*)(i8* %5)
%8 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @hputc to i32 (i8*, i8*, i8*, ...)*)(i8* %0, i8* %1, i8* %5)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main(int argc, char **argv) {
  int i = 32;
  int j = 32;
  int n_1 = 0, n_2 = 1;
  int temp;
  while (i > 0) {
    temp = n_1;
    n_1 = n_1 + n_2;
    n_2 = temp;
    i--;
  }
  printf("F(%d) = %d\n", j, n_1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x20,-0x14(%rbp)
movl   $0x20,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x1,-0x20(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    116f <main+0x5f>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x1c(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    1142 <main+0x32>
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"F(%d) = %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 32, i32* %6
store i32 32, i32* %7
store i32 0, i32* %8
store i32 1, i32* %9
br label %11
11: ; preds = %14, %2
%12 = load i32, i32* %6
%13 = icmp sgt i32 %12, 0
br i1 %13, label %14, label %22
14: ; preds = %11
%15 = load i32, i32* %8
store i32 %15, i32* %10
%16 = load i32, i32* %8
%17 = load i32, i32* %9
%18 = add nsw i32 %16, %17
store i32 %18, i32* %8
%19 = load i32, i32* %10
store i32 %19, i32* %9
%20 = load i32, i32* %6
%21 = add nsw i32 %20, -1
store i32 %21, i32* %6
br label %11
22: ; preds = %11
%23 = load i32, i32* %7
%24 = load i32, i32* %8
%25 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %23, i32 %24)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"F(%d) = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 32, i32 2178309)
ret i32 0
}
double pathconN_nm5_twice(double x) { return x + x; }


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

x86 assembly (clang, -O2):
<pathconN_nm5_twice>:
addsd  %xmm0,%xmm0
ret

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

LLVM IR (-O2):
define double @pathconN_nm5_twice(double %0) {
%2 = fadd double %0, %0
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char const *, size_t);
char *substr(const char *inpStr, char *outStr, size_t startPos, size_t strLen) {
  strncpy(outStr, inpStr + startPos, strLen);
  outStr[strLen] = '\0';
  return outStr;
}


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

x86 assembly (clang, -O2):
<substr>:
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rsi,%rbx
lea    (%rdi,%rdx,1),%rsi
mov    %rbx,%rdi
mov    %rcx,%rdx
call   1030 <strncpy@plt>
movb   $0x0,(%rbx,%r14,1)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @substr(i8* %0, i8* %1, i64 %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
store i8* %0, i8** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i8*, i8** %6
%10 = load i8*, i8** %5
%11 = load i64, i64* %7
%12 = getelementptr inbounds i8, i8* %10, i64 %11
%13 = load i64, i64* %8
%14 = call i32 @strncpy(i8* %9, i8* %12, i64 %13)
%15 = load i8*, i8** %6
%16 = load i64, i64* %8
%17 = getelementptr inbounds i8, i8* %15, i64 %16
store i8 0, i8* %17
%18 = load i8*, i8** %6
ret i8* %18
}

LLVM IR (-O2):
define i8* @substr(i8* %0, i8* returned %1, i64 %2, i64 %3) {
%5 = getelementptr inbounds i8, i8* %0, i64 %2
%6 = tail call i32 @strncpy(i8* %1, i8* %5, i64 %3)
%7 = getelementptr inbounds i8, i8* %1, i64 %3
store i8 0, i8* %7
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ lt_fatal(char *, int, char *);
scalar_t__ malloc(size_t);
void *xmalloc(size_t num) {
  void *p = (void *)malloc(num);
  if (!p)
    lt_fatal("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/paulcdejean/AeonTick/refs/heads/master/"
             "libtermkey-0.17/.libs/lt-demo-async.c",
             311, "memory exhausted");
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115c <xmalloc+0x3c>
lea    0xeb5(%rip),%rdi
mov    $0x137,%esi
lea    0xf50(%rip),%rdx
call   1030 <lt_fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1146 <xmalloc+0x26>
lea    0xecb(%rip),%rdi
lea    0xf6b(%rip),%rdx
mov    $0x137,%esi
call   1030 <lt_fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [167 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/paulcdejean/AeonTick/refs/heads/master/libtermkey-0.17/.libs/lt-demo-async.c\00"
@.str.1 = [17 x i8] c"memory exhausted\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @malloc(i64 %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp ne i8* %7, null
br i1 %8, label %11, label %9
9: ; preds = %1
%10 = call i32 @lt_fatal(i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str, i64 0, i64 0), i32 311, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [167 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/paulcdejean/AeonTick/refs/heads/master/libtermkey-0.17/.libs/lt-demo-async.c\00"
@.str.1 = [17 x i8] c"memory exhausted\00"
define i8* @xmalloc(i64 %0) {
%2 = tail call i64 @malloc(i64 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @lt_fatal(i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str, i64 0, i64 0), i32 311, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = inttoptr i64 %2 to i8*
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void cmsfs_free(void *buffer) {
  free(buffer);
  return;
}


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

x86 assembly (clang, -O2):
<cmsfs_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @cmsfs_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
int strlen(char *);
pad(char *s, int len) {
  while (strlen(s) < len) {
    strcat(s, "          ");
    s[len] = 0;
  }
}


x86 assembly (clang, -O0):
<pad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    -0x14(%rbp),%eax
jge    1162 <pad+0x42>
mov    -0x10(%rbp),%rdi
lea    0xeb4(%rip),%rsi
call   1040 <strcat@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
jmp    112f <pad+0xf>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pad>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%r15d
mov    %rdi,%rbx
call   1030 <strlen@plt>
cmp    %r15d,%eax
jge    116c <pad+0x4c>
movslq %r15d,%rbp
lea    0xebf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strcat@plt>
movb   $0x0,(%rbx,%rbp,1)
mov    %rbx,%rdi
call   1030 <strlen@plt>
cmp    %r15d,%eax
jl     1150 <pad+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [11 x i8] c" \00"
define i32 @pad(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
br label %6
6: ; preds = %11, %2
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = load i32, i32* %5
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %18
11: ; preds = %6
%12 = load i8*, i8** %4
%13 = call i32 @strcat(i8* %12, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%14 = load i8*, i8** %4
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
store i8 0, i8* %17
br label %6
18: ; preds = %6
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@.str = [11 x i8] c" \00"
define i32 @pad(i8* %0, i32 %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = icmp slt i32 %3, %1
br i1 %4, label %5, label %12
5: ; preds = %2
%6 = sext i32 %1 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
br label %8
8: ; preds = %5, %8
%9 = tail call i32 @strcat(i8* %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i8 0, i8* %7
%10 = tail call i32 @strlen(i8* %0)
%11 = icmp slt i32 %10, %1
br i1 %11, label %8, label %12
12: ; preds = %8, %2
ret i32 undef
}
/* Variables and functions */
size_t DispositionRipetitionR(int /*<<< orphan*/, int *, int *, size_t, size_t,
                              int /*<<< orphan*/);
int /*<<< orphan*/ free(int *);
scalar_t__ malloc(size_t);
size_t DispositionRipetition(int *val, size_t n, size_t k) {
  size_t count;
  int *sol = (int *)malloc(k * sizeof(int));
  count = DispositionRipetitionR(0, val, sol, n, k, 0);
  free(sol);
  return (count);
}


x86 assembly (clang, -O0):
<DispositionRipetition>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
shl    $0x2,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
xor    %r9d,%r9d
mov    %r9d,%edi
call   1050 <DispositionRipetitionR@plt>
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DispositionRipetition>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r12
mov    %rsi,%r14
mov    %rdi,%r15
lea    0x0(,%rdx,4),%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %edi,%edi
mov    %r15,%rsi
mov    %rax,%rdx
mov    %r14,%rcx
mov    %r12,%r8
xor    %r9d,%r9d
call   1050 <DispositionRipetitionR@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @DispositionRipetition(i32* %0, i64 %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32*
store i32* %0, i32** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%9 = load i64, i64* %6
%10 = mul i64 %9, 4
%11 = call i64 @malloc(i64 %10)
%12 = inttoptr i64 %11 to i32*
store i32* %12, i32** %8
%13 = load i32*, i32** %4
%14 = load i32*, i32** %8
%15 = load i64, i64* %5
%16 = load i64, i64* %6
%17 = call i64 @DispositionRipetitionR(i32 0, i32* %13, i32* %14, i64 %15, i64 %16, i32 0)
store i64 %17, i64* %7
%18 = load i32*, i32** %8
%19 = call i32 @free(i32* %18)
%20 = load i64, i64* %7
ret i64 %20
}

LLVM IR (-O2):
define i64 @DispositionRipetition(i32* %0, i64 %1, i64 %2) {
%4 = shl i64 %2, 2
%5 = tail call i64 @malloc(i64 %4)
%6 = inttoptr i64 %5 to i32*
%7 = tail call i64 @DispositionRipetitionR(i32 0, i32* %0, i32* %6, i64 %1, i64 %2, i32 0)
%8 = tail call i32 @free(i32* %6)
ret i64 %7
}
int ddebug_remove_module(char *mod) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ddebug_remove_module(i8* nocapture readnone %0) {
ret i32 0
}
void btusb_proc_init(void) {}


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

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

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

LLVM IR (-O2):
define void @btusb_proc_init() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct hle_t {
  int dummy;
};

/* Variables and functions */
void SPNOOP(struct hle_t *UNUSED_hle __attribute__((__unused__)),
            uint32_t UNUSED_w1 __attribute__((__unused__)),
            uint32_t UNUSED_w2 __attribute__((__unused__))) {}


x86 assembly (clang, -O0):
<SPNOOP>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.hle_t = type { i32 }
define void @SPNOOP(%struct.hle_t* %0, i32 %1, i32 %2) {
%4 = alloca %struct.hle_t*
%5 = alloca i32
%6 = alloca i32
store %struct.hle_t* %0, %struct.hle_t** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
%struct.hle_t = type { i32 }
define void @SPNOOP(%struct.hle_t* nocapture %0, i32 %1, i32 %2) {
ret void
}
void x509_certificate_chain_free(struct x509_certificate *cert) {}


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

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

LLVM IR (-O0):
%struct.x509_certificate = type opaque
define void @x509_certificate_chain_free(%struct.x509_certificate* %0) {
%2 = alloca %struct.x509_certificate*
store %struct.x509_certificate* %0, %struct.x509_certificate** %2
ret void
}

LLVM IR (-O2):
%struct.x509_certificate = type opaque
define void @x509_certificate_chain_free(%struct.x509_certificate* nocapture %0) {
ret void
}
/* Variables and functions */
float clamp(float, double, double);
float saturatef(float x) { return clamp(x, 0.0, 1.0); }


x86 assembly (clang, -O0):
<saturatef>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
movsd  0xed3(%rip),%xmm2
call   1030 <clamp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<saturatef>:
movsd  0xee8(%rip),%xmm2
xorps  %xmm1,%xmm1
jmp    1030 <clamp@plt>

LLVM IR (-O0):
define float @saturatef(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @clamp(float %3, double 0.000000e+00, double 1.000000e+00)
ret float %4
}

LLVM IR (-O2):
define float @saturatef(float %0) {
%2 = tail call float @clamp(float %0, double 0.000000e+00, double 1.000000e+00)
ret float %2
}
/* Variables and functions */
short get_sr();
int /*<<< orphan*/ set_sr(short);
int main() {
  short sr;
  sr = get_sr();
  sr = sr - 0x700;
  set_sr(sr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <get_sr@plt>
mov    %ax,-0x6(%rbp)
movswl -0x6(%rbp),%eax
sub    $0x700,%eax
mov    %ax,-0x6(%rbp)
movswl -0x6(%rbp),%edi
call   1030 <set_sr@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <get_sr@plt>
add    $0xfffff900,%eax
movswl %ax,%edi
call   1030 <set_sr@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i16
store i32 0, i32* %1
%3 = call signext i16 (...) @get_sr()
store i16 %3, i16* %2
%4 = load i16, i16* %2
%5 = sext i16 %4 to i32
%6 = sub nsw i32 %5, 1792
%7 = trunc i32 %6 to i16
store i16 %7, i16* %2
%8 = load i16, i16* %2
%9 = call i32 @set_sr(i16 signext %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call signext i16 (...) @get_sr()
%2 = add i16 %1, -1792
%3 = tail call i32 @set_sr(i16 signext %2)
ret i32 0
}
/* Variables and functions */
char getchar();
int run(char);
int main(void) {
  char i = getchar();
  return run(i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <run@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
movsbl %al,%edi
pop    %rax
jmp    1030 <run@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call signext i8 (...) @getchar()
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = call i32 @run(i8 signext %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call signext i8 (...) @getchar()
%2 = tail call i32 @run(i8 signext %1)
ret i32 %2
}
void foo_1_2_1_1_2_2_1_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_1_1_2_2_1_1_2() {
ret void
}
void setup_jtag_ports() {
  *(volatile unsigned long *)((void *)0xfffff400 + 0x00) =
      ((1 << 12) | (1 << 13) | (1 << 14));
  *(volatile unsigned long *)((void *)0xfffff400 + 0x10) =
      (1 << 13) | (1 << 14);
  *(volatile unsigned long *)((void *)0xfffff400 + 0x34) =
      ((1 << 12) | (1 << 13) | (1 << 14));
  *(volatile unsigned long *)((void *)0xfffff400 + 0x30) = (1 << (11));
}


x86 assembly (clang, -O0):
<setup_jtag_ports>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffff400,%eax
movq   $0x7000,(%rax)
mov    $0xfffff400,%eax
movq   $0x6000,0x10(%rax)
mov    $0xfffff400,%eax
movq   $0x7000,0x34(%rax)
mov    $0xfffff400,%eax
movq   $0x800,0x30(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup_jtag_ports>:
mov    $0xfffff400,%eax
movq   $0x7000,(%rax)
movq   $0x6000,0x10(%rax)
movq   $0x7000,0x34(%rax)
movq   $0x800,0x30(%rax)
ret

LLVM IR (-O0):
define void @setup_jtag_ports() {
store volatile i64 28672, i64* inttoptr (i64 4294964224 to i64*)
store volatile i64 24576, i64* bitcast (i8* getelementptr (i8, i8* inttoptr (i64 4294964224 to i8*), i64 16) to i64*)
store volatile i64 28672, i64* bitcast (i8* getelementptr (i8, i8* inttoptr (i64 4294964224 to i8*), i64 52) to i64*)
store volatile i64 2048, i64* bitcast (i8* getelementptr (i8, i8* inttoptr (i64 4294964224 to i8*), i64 48) to i64*)
ret void
}

LLVM IR (-O2):
define void @setup_jtag_ports() {
store volatile i64 28672, i64* inttoptr (i64 4294964224 to i64*)
store volatile i64 24576, i64* inttoptr (i64 4294964240 to i64*)
store volatile i64 28672, i64* inttoptr (i64 4294964276 to i64*)
store volatile i64 2048, i64* inttoptr (i64 4294964272 to i64*)
ret void
}
int lcm(int x, int y) {
  short a, b, c;
  a = x;
  b = y;
  while ((c = a % b) != 0) {
    a = b;
    b = c;
  }
  return (x * y / b);
}


x86 assembly (clang, -O0):
<lcm>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%eax
mov    %ax,-0xc(%rbp)
movswl -0xa(%rbp),%eax
movswl -0xc(%rbp),%ecx
cltd
idiv   %ecx
mov    %dx,%ax
mov    %ax,-0xe(%rbp)
cwtl
cmp    $0x0,%eax
je     1149 <lcm+0x49>
mov    -0xc(%rbp),%ax
mov    %ax,-0xa(%rbp)
mov    -0xe(%rbp),%ax
mov    %ax,-0xc(%rbp)
jmp    1118 <lcm+0x18>
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
movswl -0xc(%rbp),%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcm>:
mov    %esi,%r8d
mov    %esi,%edx
mov    %edi,%eax
nopw   0x0(%rax,%rax,1)
cwtl
mov    %edx,%esi
movswl %si,%ecx
cltd
idiv   %ecx
mov    %esi,%eax
test   %edx,%edx
jne    1110 <lcm+0x10>
imul   %edi,%r8d
mov    %r8d,%eax
cltd
idiv   %ecx
ret

LLVM IR (-O0):
define i32 @lcm(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i16
%6 = alloca i16
%7 = alloca i16
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = load i32, i32* %3
%9 = trunc i32 %8 to i16
store i16 %9, i16* %5
%10 = load i32, i32* %4
%11 = trunc i32 %10 to i16
store i16 %11, i16* %6
br label %12
12: ; preds = %21, %2
%13 = load i16, i16* %5
%14 = sext i16 %13 to i32
%15 = load i16, i16* %6
%16 = sext i16 %15 to i32
%17 = srem i32 %14, %16
%18 = trunc i32 %17 to i16
store i16 %18, i16* %7
%19 = sext i16 %18 to i32
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %12
%22 = load i16, i16* %6
store i16 %22, i16* %5
%23 = load i16, i16* %7
store i16 %23, i16* %6
br label %12
24: ; preds = %12
%25 = load i32, i32* %3
%26 = load i32, i32* %4
%27 = mul nsw i32 %25, %26
%28 = load i16, i16* %6
%29 = sext i16 %28 to i32
%30 = sdiv i32 %27, %29
ret i32 %30
}

LLVM IR (-O2):
define i32 @lcm(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %1, %2 ], [ %10, %3 ]
%5 = phi i32 [ %0, %2 ], [ %4, %3 ]
%6 = shl i32 %5, 16
%7 = ashr exact i32 %6, 16
%8 = shl i32 %4, 16
%9 = ashr exact i32 %8, 16
%10 = srem i32 %7, %9
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %3
12: ; preds = %3
%13 = mul nsw i32 %1, %0
%14 = sdiv i32 %13, %9
ret i32 %14
}