xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_usage() {
  fprintf(stderr, "usage: brutemonkey <char set> <word length>\n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [45 x i8] c"usage: brutemonkey <char set> <word length>\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [45 x i8] c"usage: brutemonkey <char set> <word length>\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_banner(void) {
  fprintf(stderr, "Dice Roller v0.1.1\n"
                  "Copyright (c) 2013 Jim Ingram <ingramj@gmail.com>\n"
                  "ctrl-d to quit\n");
}


x86 assembly (clang, -O0):
<print_banner>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_banner>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [85 x i8] c"Dice Roller v0.1.1\0ACopyright (c) 2013 Jim Ingram <ingramj@gmail.com>\0Actrl-d to quit\0A\00"
define void @print_banner() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [85 x i8] c"Dice Roller v0.1.1\0ACopyright (c) 2013 Jim Ingram <ingramj@gmail.com>\0Actrl-d to quit\0A\00"
define void @print_banner() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct ps_summary_info {
  int dummy;
};
struct ps_summary {
  int dummy;
};

/* Variables and functions */
scalar_t__ obus_object_get_info(int /*<<< orphan*/);
int /*<<< orphan*/ ps_summary_const_object(struct ps_summary const *);
const struct ps_summary_info *
ps_summary_get_info(const struct ps_summary *object) {
  return (const struct ps_summary_info *)obus_object_get_info(
      ps_summary_const_object(object));
}


x86 assembly (clang, -O0):
<ps_summary_get_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ps_summary_const_object@plt>
mov    %eax,%edi
call   1030 <obus_object_get_info@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ps_summary_get_info>:
push   %rax
call   1040 <ps_summary_const_object@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <obus_object_get_info@plt>

LLVM IR (-O0):
%struct.ps_summary_info = type { i32 }
%struct.ps_summary = type { i32 }
define %struct.ps_summary_info* @ps_summary_get_info(%struct.ps_summary* %0) {
%2 = alloca %struct.ps_summary*
store %struct.ps_summary* %0, %struct.ps_summary** %2
%3 = load %struct.ps_summary*, %struct.ps_summary** %2
%4 = call i32 @ps_summary_const_object(%struct.ps_summary* %3)
%5 = call i64 @obus_object_get_info(i32 %4)
%6 = inttoptr i64 %5 to %struct.ps_summary_info*
ret %struct.ps_summary_info* %6
}

LLVM IR (-O2):
%struct.ps_summary_info = type { i32 }
%struct.ps_summary = type { i32 }
define %struct.ps_summary_info* @ps_summary_get_info(%struct.ps_summary* %0) {
%2 = tail call i32 @ps_summary_const_object(%struct.ps_summary* %0)
%3 = tail call i64 @obus_object_get_info(i32 %2)
%4 = inttoptr i64 %3 to %struct.ps_summary_info*
ret %struct.ps_summary_info* %4
}
/* Variables and functions */
double exp(double);
double log(double);
double pow10(double x) { return exp(x * log(10.0)); }


x86 assembly (clang, -O0):
<pow10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xec1(%rip),%xmm0
call   1040 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define double @pow10(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @log(double 1.000000e+01)
%5 = fmul double %3, %4
%6 = call double @exp(double %5)
ret double %6
}

LLVM IR (-O2):
define double @pow10(double %0) {
%2 = fmul double %0, 0x40026BB1BBB55516
%3 = tail call double @exp(double %2)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int /*<<< orphan*/);
int /*<<< orphan*/ __VERIFIER_nondet_int();
main() {
  int x = __VERIFIER_nondet_int();
  int *p = &x;
  while (x < 100) {
    (*p)++;
  }
  __VERIFIER_assert(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    115b <main+0x3b>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
jmp    1141 <main+0x21>
xor    %edi,%edi
call   1040 <__VERIFIER_assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %edi,%edi
call   1040 <__VERIFIER_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 @__VERIFIER_assert(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int, char *, int, int, int, int);
int stderr;
int stdin;
int stdout;
int main(int argc, char **argv) {
  fprintf(stdout, "error code=%d, stdin=%x, stdout=%x, stderr=%x\n", 1, stdin,
          stdout, stderr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
mov    0x2eb2(%rip),%rax
mov    (%rax),%ecx
mov    0x2e91(%rip),%rax
mov    (%rax),%r8d
mov    0x2e8f(%rip),%rax
mov    (%rax),%r9d
lea    0xead(%rip),%rsi
mov    $0x1,%edx
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
mov    0x2ec7(%rip),%rax
mov    (%rax),%ecx
mov    0x2eae(%rip),%rax
mov    (%rax),%r9d
lea    0xecc(%rip),%rsi
mov    $0x1,%edx
mov    %edi,%r8d
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [47 x i8] c"error code=%d, stdin=%x, stdout=%x, stderr=%x\0A\00"
@stdin = global i32 0
@stderr = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @stdout
%7 = load i32, i32* @stdin
%8 = load i32, i32* @stdout
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 1, i32 %7, i32 %8, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [47 x i8] c"error code=%d, stdin=%x, stdout=%x, stderr=%x\0A\00"
@stdin = global i32 0
@stderr = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdout
%4 = load i32, i32* @stdin
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 1, i32 %4, i32 %3, i32 %5)
ret i32 0
}
/* Variables and functions */
char *strchr(char *, char);
char *LastChar(char *p) { return strchr(p, '\0') - 1; }


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

x86 assembly (clang, -O2):
<LastChar>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
add    %rbx,%rax
add    $0xffffffffffffffff,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @LastChar(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @strchr(i8* %3, i8 signext 0)
%5 = getelementptr inbounds i8, i8* %4, i64 -1
ret i8* %5
}

LLVM IR (-O2):
define i8* @LastChar(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = getelementptr i8, i8* %0, i64 %2
%4 = getelementptr inbounds i8, i8* %3, i64 -1
ret i8* %4
}
/* Type definitions */
struct tcb {
  int dummy;
};

/* Variables and functions */
int decode_open(struct tcb *, int);
int sys_openat(struct tcb *tcp) { return decode_open(tcp, 1); }


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

x86 assembly (clang, -O2):
<sys_openat>:
mov    $0x1,%esi
jmp    1030 <decode_open@plt>

LLVM IR (-O0):
%struct.tcb = type { i32 }
define i32 @sys_openat(%struct.tcb* %0) {
%2 = alloca %struct.tcb*
store %struct.tcb* %0, %struct.tcb** %2
%3 = load %struct.tcb*, %struct.tcb** %2
%4 = call i32 @decode_open(%struct.tcb* %3, i32 1)
ret i32 %4
}

LLVM IR (-O2):
%struct.tcb = type { i32 }
define i32 @sys_openat(%struct.tcb* %0) {
%2 = tail call i32 @decode_open(%struct.tcb* %0, i32 1)
ret i32 %2
}
void SystemInit(void) {}


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

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

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

LLVM IR (-O2):
define void @SystemInit() {
ret void
}
/* Type definitions */
struct passwd {
  char *pw_name;
};

/* Variables and functions */
struct passwd *getpwuid(int /*<<< orphan*/);
int /*<<< orphan*/ getuid();
char *get_username() {
  struct passwd *p = getpwuid(getuid());
  return p->pw_name;
}


x86 assembly (clang, -O0):
<get_username>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getuid@plt>
mov    %eax,%edi
call   1030 <getpwuid@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_username>:
push   %rax
xor    %eax,%eax
call   1040 <getuid@plt>
mov    %eax,%edi
call   1030 <getpwuid@plt>
mov    (%rax),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.passwd = type { i8* }
define i8* @get_username() {
%1 = alloca %struct.passwd*
%2 = call i32 (...) @getuid()
%3 = call %struct.passwd* @getpwuid(i32 %2)
store %struct.passwd* %3, %struct.passwd** %1
%4 = load %struct.passwd*, %struct.passwd** %1
%5 = getelementptr inbounds %struct.passwd, %struct.passwd* %4, i32 0, i32 0
%6 = load i8*, i8** %5
ret i8* %6
}

LLVM IR (-O2):
%struct.passwd = type { i8* }
define i8* @get_username() {
%1 = tail call i32 (...) @getuid()
%2 = tail call %struct.passwd* @getpwuid(i32 %1)
%3 = getelementptr inbounds %struct.passwd, %struct.passwd* %2, i64 0, i32 0
%4 = load i8*, i8** %3
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ __check_free(void *);
void *__check_malloc(size_t);
void *realloc(void *, size_t);
void *__check_realloc(void *p, size_t s) {
  if (s == 0) {
    __check_free(p);
    return NULL;
  } else if (p == NULL)
    return __check_malloc(s);
  else
    return realloc(p, s);
}


x86 assembly (clang, -O0):
<__check_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1161 <__check_realloc+0x31>
mov    -0x10(%rbp),%rdi
call   1050 <__check_free@plt>
movq   $0x0,-0x8(%rbp)
jmp    118f <__check_realloc+0x5f>
cmpq   $0x0,-0x10(%rbp)
jne    117e <__check_realloc+0x4e>
mov    -0x18(%rbp),%rdi
call   1040 <__check_malloc@plt>
mov    %rax,-0x8(%rbp)
jmp    118f <__check_realloc+0x5f>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__check_realloc>:
test   %rsi,%rsi
je     113f <__check_realloc+0xf>
test   %rdi,%rdi
je     1149 <__check_realloc+0x19>
jmp    1030 <realloc@plt>
push   %rax
call   1050 <__check_free@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    %rsi,%rdi
jmp    1040 <__check_malloc@plt>

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

LLVM IR (-O2):
define i8* @__check_realloc(i8* %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @__check_free(i8* %0)
br label %12
6: ; preds = %2
%7 = icmp eq i8* %0, null
br i1 %7, label %8, label %10
8: ; preds = %6
%9 = tail call i8* @__check_malloc(i64 %1)
br label %12
10: ; preds = %6
%11 = tail call i8* @realloc(i8* %0, i64 %1)
br label %12
12: ; preds = %10, %8, %4
%13 = phi i8* [ null, %4 ], [ %9, %8 ], [ %11, %10 ]
ret i8* %13
}
char *BigExp(char *num1, char *num2) { return ""; }


x86 assembly (clang, -O0):
<BigExp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeed(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @BigExp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @BigExp(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ ClearONOFF();
int /*<<< orphan*/ DeinitFields();
void SwitchFrom_XA(void) {
  DeinitFields();
  ClearONOFF();
}


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

x86 assembly (clang, -O2):
<SwitchFrom_XA>:
push   %rax
xor    %eax,%eax
call   1030 <DeinitFields@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <ClearONOFF@plt>

LLVM IR (-O0):
define void @SwitchFrom_XA() {
%1 = call i32 (...) @DeinitFields()
%2 = call i32 (...) @ClearONOFF()
ret void
}

LLVM IR (-O2):
define void @SwitchFrom_XA() {
%1 = tail call i32 (...) @DeinitFields()
%2 = tail call i32 (...) @ClearONOFF()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xf8() {
  Assert_real((isgraph(248) == 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_isgraph.c",
              1245, ("isgraph should be 0 for 0xf8"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0xf8>:
push   %rax
mov    $0xf8,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4dd,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xf8\00"
define void @t_isgraph_0xf8() {
%1 = call i64 @isgraph(i32 248)
%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 1245, 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xf8\00"
define void @t_isgraph_0xf8() {
%1 = tail call i64 @isgraph(i32 248)
%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 1245, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void error_send(const char *mess) {
  fprintf(stderr, "%s", mess);
  exit(-1);
}


x86 assembly (clang, -O0):
<error_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error_send>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @error_send(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @error_send(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 -1)
unreachable
}
/* Type definitions */
struct tms {
  int dummy;
};
typedef int /*<<< orphan*/ clock_t;

/* Variables and functions */
int /*<<< orphan*/ GetTickCount();
clock_t times(struct tms *buffer) { return GetTickCount(); }


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

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

LLVM IR (-O0):
%struct.tms = type { i32 }
define i32 @times(%struct.tms* %0) {
%2 = alloca %struct.tms*
store %struct.tms* %0, %struct.tms** %2
%3 = call i32 (...) @GetTickCount()
ret i32 %3
}

LLVM IR (-O2):
%struct.tms = type { i32 }
define i32 @times(%struct.tms* nocapture readnone %0) {
%2 = tail call i32 (...) @GetTickCount()
ret i32 %2
}
void foo_2_1_1_1_1_2_2_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_1_1_1_2_2_1_1() {
ret void
}
/* Variables and functions */
unsigned long long rng_u64();
unsigned long long rng__u64_in(unsigned long long range,
                               unsigned long long mask) {
  while (1) {
    unsigned long long x = rng_u64();
    x &= mask;
    if (x < range)
      return x;
  }
}


x86 assembly (clang, -O0):
<rng__u64_in>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rng_u64@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
and    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    114f <rng__u64_in+0x3f>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret
jmp    1120 <rng__u64_in+0x10>

x86 assembly (clang, -O2):
<rng__u64_in>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <rng_u64@plt>
and    %r14,%rax
cmp    %rbx,%rax
jae    1120 <rng__u64_in+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @rng__u64_in(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
br label %6
6: ; preds = %2, %16
%7 = call i64 (...) @rng_u64()
store i64 %7, i64* %5
%8 = load i64, i64* %4
%9 = load i64, i64* %5
%10 = and i64 %9, %8
store i64 %10, i64* %5
%11 = load i64, i64* %5
%12 = load i64, i64* %3
%13 = icmp ult i64 %11, %12
br i1 %13, label %14, label %16
14: ; preds = %6
%15 = load i64, i64* %5
ret i64 %15
16: ; preds = %6
br label %6
}

LLVM IR (-O2):
define i64 @rng__u64_in(i64 %0, i64 %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i64 (...) @rng_u64()
%5 = and i64 %4, %1
%6 = icmp ult i64 %5, %0
br i1 %6, label %7, label %3
7: ; preds = %3
ret i64 %5
}
__attribute__((used)) int link(char *old, char *new) { return -1; }


x86 assembly (clang, -O0):
<link>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (i8*, i8*)* @link to i8*)], section "llvm.metadata"
define i32 @link(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret i32 -1
}

LLVM IR (-O2):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (i8*, i8*)* @link to i8*)], section "llvm.metadata"
define i32 @link(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 -1
}
int fitsBits(int x, int n) { return !(x >> (n + ~0) ^ (x >> 31)); }


x86 assembly (clang, -O0):
<fitsBits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0xffffffff,%ecx
sar    %cl,%eax
mov    -0x4(%rbp),%ecx
sar    $0x1f,%ecx
xor    %ecx,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fitsBits>:
lea    -0x1(%rsi),%ecx
mov    %edi,%edx
sar    %cl,%edx
sar    $0x1f,%edi
xor    %eax,%eax
cmp    %edi,%edx
sete   %al
ret

LLVM IR (-O0):
define i32 @fitsBits(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = add nsw i32 %6, -1
%8 = ashr i32 %5, %7
%9 = load i32, i32* %3
%10 = ashr i32 %9, 31
%11 = xor i32 %8, %10
%12 = icmp ne i32 %11, 0
%13 = xor i1 %12, true
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @fitsBits(i32 %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = ashr i32 %0, %3
%5 = ashr i32 %0, 31
%6 = icmp eq i32 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
int fun133() { return 133; }


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

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

LLVM IR (-O0):
define i32 @fun133() {
ret i32 133
}

LLVM IR (-O2):
define i32 @fun133() {
ret i32 133
}
/* Variables and functions */
scalar_t__ count(int *, int);
int test_small_array() {
  int array[] = {1};
  return 0 == count(NULL, 0) && 0 == count(array, 1);
}


x86 assembly (clang, -O0):
<test_small_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee2(%rip),%eax
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
call   1030 <count@plt>
mov    %rax,%rdx
xor    %eax,%eax
xor    %ecx,%ecx
cmp    %rdx,%rcx
mov    %al,-0x5(%rbp)
jne    115b <test_small_array+0x4b>
lea    -0x4(%rbp),%rdi
mov    $0x1,%esi
call   1030 <count@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_small_array>:
push   %rbx
sub    $0x10,%rsp
movl   $0x1,0xc(%rsp)
xor    %ebx,%ebx
xor    %edi,%edi
xor    %esi,%esi
call   1030 <count@plt>
test   %rax,%rax
jne    1144 <test_small_array+0x34>
lea    0xc(%rsp),%rdi
mov    $0x1,%esi
call   1030 <count@plt>
xor    %ebx,%ebx
test   %rax,%rax
sete   %bl
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.test_small_array.array = [1 x i32] [i32 1]
define i32 @test_small_array() {
%1 = alloca [1 x i32]
%2 = bitcast [1 x i32]* %1 to i8*
%3 = call i64 @count(i32* null, i32 0)
%4 = icmp eq i64 0, %3
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
%7 = call i64 @count(i32* %6, i32 1)
%8 = icmp eq i64 0, %7
br label %9
9: ; preds = %5, %0
%10 = phi i1 [ false, %0 ], [ %8, %5 ]
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @test_small_array() {
%1 = alloca [1 x i32]
%2 = bitcast [1 x i32]* %1 to i8*
%3 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
store i32 1, i32* %3
%4 = tail call i64 @count(i32* null, i32 0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %0
%7 = call i64 @count(i32* %3, i32 1)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %0
%11 = phi i32 [ 0, %0 ], [ %9, %6 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ acid_reload(char *);
int /*<<< orphan*/ signal(int, void (*)(int));
void handle_hup(int sig) {
  acid_reload("Got HUP signal. Reloading.\n");
  signal(sig, handle_hup);
}


x86 assembly (clang, -O0):
<handle_hup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1040 <acid_reload@plt>
mov    -0x4(%rbp),%edi
mov    0x2e9f(%rip),%rsi
call   1030 <signal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_hup>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1040 <acid_reload@plt>
mov    0x2eaa(%rip),%rsi
mov    %ebx,%edi
pop    %rbx
jmp    1030 <signal@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Got HUP signal. Reloading.\0A\00"
define void @handle_hup(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @acid_reload(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @signal(i32 %4, void (i32)* @handle_hup)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"Got HUP signal. Reloading.\0A\00"
define void @handle_hup(i32 %0) {
%2 = tail call i32 @acid_reload(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @signal(i32 %0, void (i32)* @handle_hup)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RecursiveReturn();
int /*<<< orphan*/ TXTOUT(char *);
void EndCODE() {
  TXTOUT("}");
  RecursiveReturn();
}


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c"}\00"
define void @EndCODE() {
%1 = tail call i32 @TXTOUT(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @RecursiveReturn()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void clear_list(char **list, unsigned len) {
  unsigned i = 0;
  while (i < len) {
    free(list[i++]);
  }
  return;
}


x86 assembly (clang, -O0):
<clear_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1151 <clear_list+0x41>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x10(%rbp)
mov    %ecx,%ecx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
jmp    1126 <clear_list+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_list>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
je     1142 <clear_list+0x32>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
add    $0x1,%rbx
call   1030 <free@plt>
cmp    %rbx,%r15
jne    1130 <clear_list+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @clear_list(i8** nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %8, %6 ]
%8 = add nuw nsw i64 %7, 1
%9 = getelementptr inbounds i8*, i8** %0, i64 %7
%10 = load i8*, i8** %9
%11 = tail call i32 @free(i8* %10)
%12 = icmp eq i64 %8, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
int ld_ble_rm1(long double a1, long double *a2) {
  return (__builtin_islessequal(a1, *a2));
}


x86 assembly (clang, -O0):
<ld_ble_rm1>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %rdi,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    -0x18(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_ble_rm1>:
fldt   0x8(%rsp)
fldt   (%rdi)
xor    %eax,%eax
fucomip %st(1),%st
fstp   %st(0)
setae  %al
ret

LLVM IR (-O0):
define i32 @ld_ble_rm1(x86_fp80 %0, x86_fp80* %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80*
store x86_fp80 %0, x86_fp80* %3
store x86_fp80* %1, x86_fp80** %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80*, x86_fp80** %4
%7 = load x86_fp80, x86_fp80* %6
%8 = fcmp ole x86_fp80 %5, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @ld_ble_rm1(x86_fp80 %0, x86_fp80* nocapture %1) {
%3 = load x86_fp80, x86_fp80* %1
%4 = fcmp oge x86_fp80 %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
int intCount(int x) {
  int count = 0;
  while (x != 0) {
    x /= 10;
    ++count;
  }
  return count;
}


x86 assembly (clang, -O0):
<intCount>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1134 <intCount+0x34>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <intCount+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<intCount>:
xor    %eax,%eax
test   %edi,%edi
je     1132 <intCount+0x32>
cs nopw 0x0(%rax,%rax,1)
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rdi
add    %edx,%edi
add    $0x1,%eax
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <intCount+0x10>
ret

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

LLVM IR (-O2):
define i32 @intCount(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = sdiv i32 %5, 10
%7 = add nuw nsw i32 %4, 1
%8 = add i32 %5, 9
%9 = icmp ult i32 %8, 19
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %11
}
int fun405() { return 405; }


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

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

LLVM IR (-O0):
define i32 @fun405() {
ret i32 405
}

LLVM IR (-O2):
define i32 @fun405() {
ret i32 405
}
/* Variables and functions */
int /*<<< orphan*/ espcomm_delay_ms(int);
int /*<<< orphan*/ serialport_set_dtr(int /*<<< orphan*/);
int /*<<< orphan*/ serialport_set_rts(int);
void board_nodemcu_ra() {
  serialport_set_dtr(0);
  serialport_set_rts(1);
  espcomm_delay_ms(5);
  serialport_set_rts(0);
}


x86 assembly (clang, -O0):
<board_nodemcu_ra>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <serialport_set_dtr@plt>
mov    $0x1,%edi
call   1050 <serialport_set_rts@plt>
mov    $0x5,%edi
call   1030 <espcomm_delay_ms@plt>
xor    %edi,%edi
call   1050 <serialport_set_rts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<board_nodemcu_ra>:
push   %rax
xor    %edi,%edi
call   1040 <serialport_set_dtr@plt>
mov    $0x1,%edi
call   1050 <serialport_set_rts@plt>
mov    $0x5,%edi
call   1030 <espcomm_delay_ms@plt>
xor    %edi,%edi
pop    %rax
jmp    1050 <serialport_set_rts@plt>

LLVM IR (-O0):
define void @board_nodemcu_ra() {
%1 = call i32 @serialport_set_dtr(i32 0)
%2 = call i32 @serialport_set_rts(i32 1)
%3 = call i32 @espcomm_delay_ms(i32 5)
%4 = call i32 @serialport_set_rts(i32 0)
ret void
}

LLVM IR (-O2):
define void @board_nodemcu_ra() {
%1 = tail call i32 @serialport_set_dtr(i32 0)
%2 = tail call i32 @serialport_set_rts(i32 1)
%3 = tail call i32 @espcomm_delay_ms(i32 5)
%4 = tail call i32 @serialport_set_rts(i32 0)
ret void
}
int compInt(const void *p1, const void *p2) { return *(int *)p1 - *(int *)p2; }


x86 assembly (clang, -O0):
<compInt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @compInt(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @compInt(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
void f(void) {
  int i;
  i = 1;
  _Static_assert(0 + 1, "f");
  i = 2;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
movl   $0x2,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f() {
ret void
}
/* Type definitions */
typedef double clock_t;

/* Variables and functions */
int CLOCKS_PER_SEC;
double qcs_diffclock(clock_t clock1, clock_t clock2) {
  double diffticks = clock1 - clock2;
  double diffms = (diffticks) / (CLOCKS_PER_SEC / 1000);
  return diffms;
}


x86 assembly (clang, -O0):
<qcs_diffclock>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    0x2ebf(%rip),%rax
mov    (%rax),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<qcs_diffclock>:
subsd  %xmm1,%xmm0
mov    0x2edd(%rip),%rax
movslq (%rax),%rax
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rax
add    %ecx,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
@CLOCKS_PER_SEC = global i32 0
define double @qcs_diffclock(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %3
store double %1, double* %4
%7 = load double, double* %3
%8 = load double, double* %4
%9 = fsub double %7, %8
store double %9, double* %5
%10 = load double, double* %5
%11 = load i32, i32* @CLOCKS_PER_SEC
%12 = sdiv i32 %11, 1000
%13 = sitofp i32 %12 to double
%14 = fdiv double %10, %13
store double %14, double* %6
%15 = load double, double* %6
ret double %15
}

LLVM IR (-O2):
@CLOCKS_PER_SEC = global i32 0
define double @qcs_diffclock(double %0, double %1) {
%3 = fsub double %0, %1
%4 = load i32, i32* @CLOCKS_PER_SEC
%5 = sdiv i32 %4, 1000
%6 = sitofp i32 %5 to double
%7 = fdiv double %3, %6
ret double %7
}
int increment() {
  static int i = 45;
  i += 5;
  return i;
}


x86 assembly (clang, -O0):
<increment>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f16(%rip),%eax
add    $0x5,%eax
mov    %eax,0x2f0d(%rip)
mov    0x2f07(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<increment>:
mov    0x2f1a(%rip),%eax
add    $0x5,%eax
mov    %eax,0x2f11(%rip)
ret

LLVM IR (-O0):
@increment.i = internal global i32 45
define i32 @increment() {
%1 = load i32, i32* @increment.i
%2 = add nsw i32 %1, 5
store i32 %2, i32* @increment.i
%3 = load i32, i32* @increment.i
ret i32 %3
}

LLVM IR (-O2):
@increment.i = internal unnamed_addr global i32 45
define i32 @increment() {
%1 = load i32, i32* @increment.i
%2 = add nsw i32 %1, 5
store i32 %2, i32* @increment.i
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ epdc_buffer_init();
int /*<<< orphan*/ epdc_init_settings();
int /*<<< orphan*/ epdc_load_image();
int /*<<< orphan*/ epdc_send_mode0_to_black_update();
void epdc_pvi_svga_sdr_init(void) {
  epdc_buffer_init();
  epdc_init_settings();
  epdc_load_image();
  epdc_send_mode0_to_black_update();
}


x86 assembly (clang, -O0):
<epdc_pvi_svga_sdr_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <epdc_buffer_init@plt>
mov    $0x0,%al
call   1030 <epdc_init_settings@plt>
mov    $0x0,%al
call   1040 <epdc_load_image@plt>
mov    $0x0,%al
call   1050 <epdc_send_mode0_to_black_update@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<epdc_pvi_svga_sdr_init>:
push   %rax
xor    %eax,%eax
call   1060 <epdc_buffer_init@plt>
xor    %eax,%eax
call   1030 <epdc_init_settings@plt>
xor    %eax,%eax
call   1040 <epdc_load_image@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <epdc_send_mode0_to_black_update@plt>

LLVM IR (-O0):
define void @epdc_pvi_svga_sdr_init() {
%1 = call i32 (...) @epdc_buffer_init()
%2 = call i32 (...) @epdc_init_settings()
%3 = call i32 (...) @epdc_load_image()
%4 = call i32 (...) @epdc_send_mode0_to_black_update()
ret void
}

LLVM IR (-O2):
define void @epdc_pvi_svga_sdr_init() {
%1 = tail call i32 (...) @epdc_buffer_init()
%2 = tail call i32 (...) @epdc_init_settings()
%3 = tail call i32 (...) @epdc_load_image()
%4 = tail call i32 (...) @epdc_send_mode0_to_black_update()
ret void
}
void cam_lam_disable(const int c, const int n) {}


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

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

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

LLVM IR (-O2):
define void @cam_lam_disable(i32 %0, i32 %1) {
ret void
}
const char *get_pal_version(void) {
  return "Gateway6 Client PAL for "
         "Unknown platform"
         " built on "
         "Mar 16 2022";
}


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

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

LLVM IR (-O0):
@.str = [62 x i8] c"Gateway6 Client PAL for Unknown platform built on Mar 16 2022\00"
define i8* @get_pal_version() {
ret i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [62 x i8] c"Gateway6 Client PAL for Unknown platform built on Mar 16 2022\00"
define i8* @get_pal_version() {
ret i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct polyad {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(void *);
void polyad_free(const struct polyad *p) { free((void *)p); }


x86 assembly (clang, -O0):
<polyad_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):
<polyad_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.polyad = type { i32 }
define void @polyad_free(%struct.polyad* %0) {
%2 = alloca %struct.polyad*
store %struct.polyad* %0, %struct.polyad** %2
%3 = load %struct.polyad*, %struct.polyad** %2
%4 = bitcast %struct.polyad* %3 to i8*
%5 = call i32 @free(i8* %4)
ret void
}

LLVM IR (-O2):
%struct.polyad = type { i32 }
define void @polyad_free(%struct.polyad* nocapture %0) {
%2 = bitcast %struct.polyad* %0 to i8*
%3 = tail call i32 @free(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void f13(long j) {
  if ((j & ((1UL << (13)) - 1)) >= ((1UL << ((13) - 1)) + 2))
    abort();
}


x86 assembly (clang, -O0):
<f13>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0x1fff,%rax
cmp    $0x1002,%rax
jb     1139 <f13+0x29>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f13>:
and    $0x1ffe,%edi
cmp    $0x1002,%edi
jae    111f <f13+0xf>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @f13(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 8191
%5 = icmp uge i64 %4, 4098
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @f13(i64 %0) {
%2 = and i64 %0, 8190
%3 = icmp ugt i64 %2, 4097
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ forloop(int);
void op_forloops() { forloop(1); }


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

x86 assembly (clang, -O2):
<op_forloops>:
mov    $0x1,%edi
jmp    1030 <forloop@plt>

LLVM IR (-O0):
define void @op_forloops() {
%1 = call i32 @forloop(i32 1)
ret void
}

LLVM IR (-O2):
define void @op_forloops() {
%1 = tail call i32 @forloop(i32 1)
ret void
}
/* Variables and functions */
int from_gps(int);
int ch_q_prompt(int ch) { return (from_gps((ch << 2) + 0x87)); }


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

x86 assembly (clang, -O2):
<ch_q_prompt>:
lea    0x87(,%rdi,4),%edi
jmp    1030 <from_gps@plt>

LLVM IR (-O0):
define i32 @ch_q_prompt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 2
%5 = add nsw i32 %4, 135
%6 = call i32 @from_gps(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @ch_q_prompt(i32 %0) {
%2 = shl i32 %0, 2
%3 = add nsw i32 %2, 135
%4 = tail call i32 @from_gps(i32 %3)
ret i32 %4
}
/* Variables and functions */
scalar_t__ EDOM;
scalar_t__ errno;
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, double);
double sqrt(int);
int main() {
  errno = 0;
  double d = sqrt(-1);
  printf("%lf\n", d);
  if (errno == EDOM) {
    perror("EDOM error");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e92(%rip),%rax
movq   $0x0,(%rax)
mov    $0xffffffff,%edi
call   1050 <sqrt@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e64(%rip),%rax
mov    (%rax),%rax
mov    0x2e6a(%rip),%rcx
cmp    (%rcx),%rax
jne    1193 <main+0x63>
lea    0xe77(%rip),%rdi
call   1040 <perror@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2ea0(%rip),%rbx
movq   $0x0,(%rbx)
mov    $0xffffffff,%edi
call   1050 <sqrt@plt>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
mov    (%rbx),%rax
mov    0x2e89(%rip),%rcx
cmp    (%rcx),%rax
je     1168 <main+0x38>
xor    %eax,%eax
pop    %rbx
ret
lea    0xe96(%rip),%rdi
call   1040 <perror@plt>
jmp    1164 <main+0x34>

LLVM IR (-O0):
@errno = global i64 0
@.str = [5 x i8] c"%lf\0A\00"
@EDOM = global i64 0
@.str.1 = [11 x i8] c"EDOM error\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
store i64 0, i64* @errno
%3 = call double @sqrt(i32 -1)
store double %3, double* %2
%4 = load double, double* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %4)
%6 = load i64, i64* @errno
%7 = load i64, i64* @EDOM
%8 = icmp eq i64 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %0
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@errno = global i64 0
@.str = [5 x i8] c"%lf\0A\00"
@EDOM = global i64 0
@.str.1 = [11 x i8] c"EDOM error\00"
define i32 @main() {
store i64 0, i64* @errno
%1 = tail call double @sqrt(i32 -1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %1)
%3 = load i64, i64* @errno
%4 = load i64, i64* @EDOM
%5 = icmp eq i64 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = tail call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %0
ret i32 0
}
int main() {
  int i, a[2];
  for (i = 0; i < 10; i++)
    a[3] = 1;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}