xunge/DecIR huggingface dataset:
/* Variables and functions */
int f1(int);
int f4(int x) {
  extern int w;
  if (w)
    return f1(x);
  return 0;
}


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    0x2ec6(%rip),%rax
cmpl   $0x0,(%rax)
je     113b <f4+0x2b>
mov    -0x8(%rbp),%edi
call   1030 <f1@plt>
mov    %eax,-0x4(%rbp)
jmp    1142 <f4+0x32>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
mov    0x2ed1(%rip),%rax
cmpl   $0x0,(%rax)
je     1121 <f4+0x11>
jmp    1030 <f1@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
@w = external global i32
define i32 @f4(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* @w
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = call i32 @f1(i32 %7)
store i32 %8, i32* %2
br label %10
9: ; preds = %1
store i32 0, i32* %2
br label %10
10: ; preds = %9, %6
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@w = external global i32
define i32 @f4(i32 %0) {
%2 = load i32, i32* @w
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @f1(i32 %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  while (1) {
    printf("IAE povo!!\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
jmp    111f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <puts@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
@.str = [12 x i8] c"IAE povo!!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %2
}

LLVM IR (-O2):
@str = [11 x i8] c"IAE povo!!\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(float *, float const *, int);
void tml_sr_vCopy(const float *src, float *dst, int n) {
  memcpy(dst, src, n * sizeof(float));
}


x86 assembly (clang, -O0):
<tml_sr_vCopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tml_sr_vCopy>:
mov    %rdi,%rax
shl    $0x2,%edx
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @tml_sr_vCopy(float* %0, float* %1, i32 %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca i32
store float* %0, float** %4
store float* %1, float** %5
store i32 %2, i32* %6
%7 = load float*, float** %5
%8 = load float*, float** %4
%9 = load i32, i32* %6
%10 = sext i32 %9 to i64
%11 = mul i64 %10, 4
%12 = trunc i64 %11 to i32
%13 = call i32 @memcpy(float* %7, float* %8, i32 %12)
ret void
}

LLVM IR (-O2):
define void @tml_sr_vCopy(float* %0, float* %1, i32 %2) {
%4 = shl i32 %2, 2
%5 = tail call i32 @memcpy(float* %1, float* %0, i32 %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ clearerr_unlocked(int /*<<< orphan*/ *);
int /*<<< orphan*/ flockfile(int /*<<< orphan*/ *);
int /*<<< orphan*/ funlockfile(int /*<<< orphan*/ *);
void clearerr(FILE *file) {
  flockfile(file);
  clearerr_unlocked(file);
  funlockfile(file);
}


x86 assembly (clang, -O0):
<clearerr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <flockfile@plt>
mov    -0x8(%rbp),%rdi
call   1040 <clearerr_unlocked@plt>
mov    -0x8(%rbp),%rdi
call   1030 <funlockfile@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearerr>:
push   %rbx
mov    %rdi,%rbx
call   1050 <flockfile@plt>
mov    %rbx,%rdi
call   1040 <clearerr_unlocked@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <funlockfile@plt>

LLVM IR (-O0):
define void @clearerr(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @flockfile(i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @clearerr_unlocked(i32* %5)
%7 = load i32*, i32** %2
%8 = call i32 @funlockfile(i32* %7)
ret void
}

LLVM IR (-O2):
define void @clearerr(i32* %0) {
%2 = tail call i32 @flockfile(i32* %0)
%3 = tail call i32 @clearerr_unlocked(i32* %0)
%4 = tail call i32 @funlockfile(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ io_hlt();
void task_idle(void) {
  while (1) {
    io_hlt();
  }
}


x86 assembly (clang, -O0):
<task_idle>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <task_idle+0x9>
mov    $0x0,%al
call   1030 <io_hlt@plt>
jmp    1119 <task_idle+0x9>

x86 assembly (clang, -O2):
<task_idle>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <io_hlt@plt>
jmp    1120 <task_idle+0x10>

LLVM IR (-O0):
define void @task_idle() {
br label %1
1: ; preds = %0, %1
%2 = call i32 (...) @io_hlt()
br label %1
}

LLVM IR (-O2):
define void @task_idle() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 (...) @io_hlt()
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int pthread_getconcurrency() { assert(0); }


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

x86 assembly (clang, -O2):
<pthread_getconcurrency>:
xor    %edi,%edi
jmp    1030 <assert@plt>

LLVM IR (-O0):
define i32 @pthread_getconcurrency() {
%1 = alloca i32
%2 = call i32 @assert(i32 0)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @pthread_getconcurrency() {
%1 = tail call i32 @assert(i32 0)
ret i32 undef
}
/* Variables and functions */
int S_IRUSR;
int S_IWUSR;
int __gen_tempname(char *, int /*<<< orphan*/, int /*<<< orphan*/,
                   int /*<<< orphan*/, int);
int mkstemp(char *template) {
  return __gen_tempname(template, 0, 0, 0, S_IRUSR | S_IWUSR);
}


x86 assembly (clang, -O0):
<mkstemp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%r8d
mov    0x2eb7(%rip),%rax
or     (%rax),%r8d
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <__gen_tempname@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkstemp>:
mov    0x2ec1(%rip),%rax
mov    0x2eca(%rip),%rcx
mov    (%rcx),%r8d
or     (%rax),%r8d
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <__gen_tempname@plt>

LLVM IR (-O0):
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
define i32 @mkstemp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @S_IRUSR
%5 = load i32, i32* @S_IWUSR
%6 = or i32 %4, %5
%7 = call i32 @__gen_tempname(i8* %3, i32 0, i32 0, i32 0, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
define i32 @mkstemp(i8* %0) {
%2 = load i32, i32* @S_IRUSR
%3 = load i32, i32* @S_IWUSR
%4 = or i32 %3, %2
%5 = tail call i32 @__gen_tempname(i8* %0, i32 0, i32 0, i32 0, i32 %4)
ret i32 %5
}
/* Variables and functions */
long long INT_MAX;
int neubot_socket_valid(long long filenum) {
  return (filenum >= 0 && filenum <= INT_MAX);
}


x86 assembly (clang, -O0):
<neubot_socket_valid>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jl     112c <neubot_socket_valid+0x2c>
mov    -0x8(%rbp),%rax
mov    0x2ec5(%rip),%rcx
cmp    (%rcx),%rax
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<neubot_socket_valid>:
test   %rdi,%rdi
setns  %al
mov    0x2edb(%rip),%rcx
cmp    %rdi,(%rcx)
setge  %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
@INT_MAX = global i64 0
define i32 @neubot_socket_valid(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp sge i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i64, i64* %2
%7 = load i64, i64* @INT_MAX
%8 = icmp sle i64 %6, %7
br label %9
9: ; preds = %5, %1
%10 = phi i1 [ false, %1 ], [ %8, %5 ]
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
@INT_MAX = global i64 0
define i32 @neubot_socket_valid(i64 %0) {
%2 = icmp sgt i64 %0, -1
%3 = load i64, i64* @INT_MAX
%4 = icmp sge i64 %3, %0
%5 = select i1 %2, i1 %4, i1 false
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void printError(char *s) {
  printf("Cannot open file handle %s. Aborting...\n", s);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<printError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<printError>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"Cannot open file handle %s. Aborting...\0A\00"
@EXIT_FAILURE = global i32 0
define void @printError(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [41 x i8] c"Cannot open file handle %s. Aborting...\0A\00"
@EXIT_FAILURE = global i32 0
define void @printError(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
scalar_t__ calloc(int, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
char *Memory(int length, int size) {
  char *fb;
  fb = (char *)calloc(length * size, size);
  if (fb == NULL) {
    printf("\nMemory error\n");
    exit(-1);
  };
  return (fb);
}


x86 assembly (clang, -O0):
<Memory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
imul   -0x8(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1172 <Memory+0x42>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Memory>:
push   %rax
imul   %esi,%edi
call   1040 <calloc@plt>
test   %rax,%rax
je     1140 <Memory+0x10>
pop    %rcx
ret
lea    0xeb9(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"\0AMemory error\0A\00"
define i8* @Memory(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = mul nsw i32 %6, %7
%9 = load i32, i32* %4
%10 = call i64 @calloc(i32 %8, i32 %9)
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %5
%12 = load i8*, i8** %5
%13 = icmp eq i8* %12, null
br i1 %13, label %14, label %17
14: ; preds = %2
%15 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @exit(i32 -1)
unreachable
17: ; preds = %2
%18 = load i8*, i8** %5
ret i8* %18
}

LLVM IR (-O2):
@str = [14 x i8] c"\0AMemory error\00"
define i8* @Memory(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
%4 = tail call i64 @calloc(i32 %3, i32 %1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 -1)
unreachable
9: ; preds = %2
%10 = inttoptr i64 %4 to i8*
ret i8* %10
}
/* Variables and functions */
unsigned int Select(unsigned int const, unsigned int, unsigned int const);
__attribute__((no)) unsigned Predictor(unsigned left,
                                       const unsigned *const top) {
  const unsigned pred = Select(top[1], left, top[0]);
  return pred;
}


x86 assembly (clang, -O0):
<Predictor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
call   1030 <Select@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Predictor>:
mov    %edi,%eax
mov    (%rsi),%edx
mov    0x4(%rsi),%edi
mov    %eax,%esi
jmp    1030 <Select@plt>

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

LLVM IR (-O2):
define i32 @Predictor(i32 %0, i32* nocapture %1) {
%3 = getelementptr inbounds i32, i32* %1, i64 1
%4 = load i32, i32* %3
%5 = load i32, i32* %1
%6 = tail call i32 @Select(i32 %4, i32 %0, i32 %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int mkstemp(char *);
int /*<<< orphan*/ printf(char *, char *);
main() {
  int fd;
  char template[] = "template-XXXXXX";
  fd = mkstemp(template);
  printf("template = %s\n", template);
  close(fd);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xec1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xebe(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
call   1050 <mkstemp@plt>
mov    %eax,-0x4(%rbp)
lea    -0x20(%rbp),%rsi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
movaps 0xec3(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <mkstemp@plt>
mov    %eax,%ebp
lea    0xebb(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %ebp,%edi
call   1040 <close@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.template = [16 x i8] c"template-XXXXXX\00"
@.str = [15 x i8] c"template = %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [16 x i8]
%3 = bitcast [16 x i8]* %2 to i8*
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%5 = call i32 @mkstemp(i8* %4)
store i32 %5, i32* %1
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%7 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32, i32* %1
%9 = call i32 @close(i32 %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.template = [16 x i8] c"template-XXXXXX\00"
@.str = [15 x i8] c"template = %s\0A\00"
define i32 @main() {
%1 = alloca [16 x i8]
%2 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%3 = call i32 @mkstemp(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = call i32 @close(i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x55() {
  Assert_real((isascii(85)),
              "/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_isascii.c",
              430, ("isascii should be 1 for U"));
}


x86 assembly (clang, -O0):
<t_isascii_0x55>:
push   %rbp
mov    %rsp,%rbp
mov    $0x55,%edi
call   1030 <isascii@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x1ae,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0x55>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x1ae,%edx
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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for U\00"
define void @t_isascii_0x55() {
%1 = call i32 @isascii(i32 85)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 430, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for U\00"
define void @t_isascii_0x55() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 430, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int ipow(int x, int y) {
  int i;
  for (i = 0; i < y; i++) {
    x *= x;
  }
  return x;
}


x86 assembly (clang, -O0):
<ipow>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1135 <ipow+0x35>
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1111 <ipow+0x11>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipow>:
mov    %edi,%eax
test   %esi,%esi
jle    1158 <ipow+0x58>
lea    -0x1(%rsi),%edx
mov    %esi,%ecx
and    $0x7,%ecx
cmp    $0x7,%edx
jb     113d <ipow+0x3d>
and    $0xfffffff8,%esi
cs nopw 0x0(%rax,%rax,1)
imul   %eax,%eax
imul   %eax,%eax
imul   %eax,%eax
imul   %eax,%eax
imul   %eax,%eax
imul   %eax,%eax
imul   %eax,%eax
imul   %eax,%eax
add    $0xfffffff8,%esi
jne    1120 <ipow+0x20>
test   %ecx,%ecx
je     1158 <ipow+0x58>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
imul   %eax,%eax
add    $0xffffffff,%ecx
jne    1150 <ipow+0x50>
ret

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

LLVM IR (-O2):
define i32 @ipow(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %33
4: ; preds = %2
%5 = add i32 %1, -1
%6 = and i32 %1, 7
%7 = icmp ult i32 %5, 7
br i1 %7, label %23, label %8
8: ; preds = %4
%9 = and i32 %1, -8
br label %10
10: ; preds = %10, %8
%11 = phi i32 [ %0, %8 ], [ %20, %10 ]
%12 = phi i32 [ 0, %8 ], [ %21, %10 ]
%13 = mul nsw i32 %11, %11
%14 = mul nsw i32 %13, %13
%15 = mul nsw i32 %14, %14
%16 = mul nsw i32 %15, %15
%17 = mul nsw i32 %16, %16
%18 = mul nsw i32 %17, %17
%19 = mul nsw i32 %18, %18
%20 = mul nsw i32 %19, %19
%21 = add i32 %12, 8
%22 = icmp eq i32 %21, %9
br i1 %22, label %23, label %10
23: ; preds = %10, %4
%24 = phi i32 [ undef, %4 ], [ %20, %10 ]
%25 = phi i32 [ %0, %4 ], [ %20, %10 ]
%26 = icmp eq i32 %6, 0
br i1 %26, label %33, label %27
27: ; preds = %23, %27
%28 = phi i32 [ %30, %27 ], [ %25, %23 ]
%29 = phi i32 [ %31, %27 ], [ 0, %23 ]
%30 = mul nsw i32 %28, %28
%31 = add i32 %29, 1
%32 = icmp eq i32 %31, %6
br i1 %32, label %33, label %27
33: ; preds = %23, %27, %2
%34 = phi i32 [ %0, %2 ], [ %24, %23 ], [ %30, %27 ]
ret i32 %34
}
void save_term_title() {}


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

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

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

LLVM IR (-O2):
define void @save_term_title() {
ret void
}
/* Variables and functions */
int countPalindromeSubstrings(char *, int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("Number of Possible Palindrome Substrings: %d\n",
         countPalindromeSubstrings("abaab", 5));
  return (0);
}


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

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

LLVM IR (-O0):
@.str = [46 x i8] c"Number of Possible Palindrome Substrings: %d\0A\00"
@.str.1 = [6 x i8] c"abaab\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @countPalindromeSubstrings(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 5)
%3 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [46 x i8] c"Number of Possible Palindrome Substrings: %d\0A\00"
@.str.1 = [6 x i8] c"abaab\00"
define i32 @main() {
%1 = tail call i32 @countPalindromeSubstrings(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int iso_711(c)
char *c;
{ return (*c & 0xff); }


x86 assembly (clang, -O0):
<iso_711>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
and    $0xff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iso_711>:
movzbl (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @iso_711(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, 255
ret i32 %6
}

LLVM IR (-O2):
define i32 @iso_711(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
ret i32 %3
}
void a_barrier() {
  ((int (*)(int, int, volatile int *))0xffff0fc0)(0, 0, &(int){0});
}


x86 assembly (clang, -O0):
<a_barrier>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %esi,%esi
lea    -0x4(%rbp),%rdx
mov    $0xffff0fc0,%eax
mov    %esi,%edi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_barrier>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rdx
mov    $0xffff0fc0,%eax
xor    %edi,%edi
xor    %esi,%esi
call   *%rax
pop    %rax
ret

LLVM IR (-O0):
define void @a_barrier() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 inttoptr (i64 4294905792 to i32 (i32, i32, i32*)*)(i32 0, i32 0, i32* %1)
ret void
}

LLVM IR (-O2):
define void @a_barrier() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 inttoptr (i64 4294905792 to i32 (i32, i32, i32*)*)(i32 0, i32 0, i32* %1)
ret void
}
/* Variables and functions */
scalar_t__ white(char);
int skip(char *c, int i) {
  while (white(c[i]))
    i++;
  return i;
}


x86 assembly (clang, -O0):
<skip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <white@plt>
cmp    $0x0,%rax
je     1148 <skip+0x38>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    111f <skip+0xf>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
movslq %esi,%rax
lea    -0x1(%rax),%ebp
add    %rax,%rbx
nop
movsbl (%rbx),%edi
call   1030 <white@plt>
add    $0x1,%ebp
add    $0x1,%rbx
test   %rax,%rax
jne    1120 <skip+0x10>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @skip(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
br label %4
4: ; preds = %4, %2
%5 = phi i64 [ %10, %4 ], [ %3, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = tail call i64 @white(i8 signext %7)
%9 = icmp eq i64 %8, 0
%10 = add i64 %5, 1
br i1 %9, label %11, label %4
11: ; preds = %4
%12 = trunc i64 %5 to i32
ret i32 %12
}
int intAbs(int a) { return (a >= 0 ? a : -a); }


x86 assembly (clang, -O0):
<intAbs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     111c <intAbs+0x1c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <intAbs+0x24>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<intAbs>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

LLVM IR (-O0):
define i32 @intAbs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i32, i32* %2
br label %10
7: ; preds = %1
%8 = load i32, i32* %2
%9 = sub nsw i32 0, %8
br label %10
10: ; preds = %7, %5
%11 = phi i32 [ %6, %5 ], [ %9, %7 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @intAbs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Type definitions */
struct strarray {
  int dummy;
};
struct const_strarray {
  int dummy;
};

/* Variables and functions */
int strarray_copy(struct strarray *, struct strarray const *);
__attribute__((always_)) int strarray_copy_c(struct strarray *dst,
                                             const struct const_strarray *src) {
  return strarray_copy(dst, (const struct strarray *)src);
}


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

x86 assembly (clang, -O2):
<strarray_copy_c>:
jmp    1030 <strarray_copy@plt>

LLVM IR (-O0):
%struct.strarray = type { i32 }
%struct.const_strarray = type { i32 }
define i32 @strarray_copy_c(%struct.strarray* %0, %struct.const_strarray* %1) {
%3 = alloca %struct.strarray*
%4 = alloca %struct.const_strarray*
store %struct.strarray* %0, %struct.strarray** %3
store %struct.const_strarray* %1, %struct.const_strarray** %4
%5 = load %struct.strarray*, %struct.strarray** %3
%6 = load %struct.const_strarray*, %struct.const_strarray** %4
%7 = bitcast %struct.const_strarray* %6 to %struct.strarray*
%8 = call i32 @strarray_copy(%struct.strarray* %5, %struct.strarray* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.strarray = type { i32 }
%struct.const_strarray = type { i32 }
define i32 @strarray_copy_c(%struct.strarray* %0, %struct.const_strarray* %1) {
%3 = bitcast %struct.const_strarray* %1 to %struct.strarray*
%4 = tail call i32 @strarray_copy(%struct.strarray* %0, %struct.strarray* %3)
ret i32 %4
}
/* Type definitions */
struct ovs_list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ovs_list_is_empty(struct ovs_list const *);
scalar_t__ ovs_list_is_short(struct ovs_list const *);
bool ovs_list_is_singleton(const struct ovs_list *list) {
  return ovs_list_is_short(list) && !ovs_list_is_empty(list);
}


x86 assembly (clang, -O0):
<ovs_list_is_singleton>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ovs_list_is_short@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
je     115b <ovs_list_is_singleton+0x3b>
mov    -0x8(%rbp),%rdi
call   1040 <ovs_list_is_empty@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ovs_list_is_singleton>:
push   %rbx
mov    %rdi,%rbx
call   1030 <ovs_list_is_short@plt>
test   %rax,%rax
je     1141 <ovs_list_is_singleton+0x21>
mov    %rbx,%rdi
call   1040 <ovs_list_is_empty@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.ovs_list = type { i32 }
define i32 @ovs_list_is_singleton(%struct.ovs_list* %0) {
%2 = alloca %struct.ovs_list*
store %struct.ovs_list* %0, %struct.ovs_list** %2
%3 = load %struct.ovs_list*, %struct.ovs_list** %2
%4 = call i64 @ovs_list_is_short(%struct.ovs_list* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load %struct.ovs_list*, %struct.ovs_list** %2
%8 = call i32 @ovs_list_is_empty(%struct.ovs_list* %7)
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
br label %11
11: ; preds = %6, %1
%12 = phi i1 [ false, %1 ], [ %10, %6 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
%struct.ovs_list = type { i32 }
define i32 @ovs_list_is_singleton(%struct.ovs_list* %0) {
%2 = tail call i64 @ovs_list_is_short(%struct.ovs_list* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @ovs_list_is_empty(%struct.ovs_list* %0)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
void gdk_property_change() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ vec2_one(float *);
__attribute__((always_)) struct vec2 *psvec2_one(struct vec2 *result) {
  vec2_one((float *)result);
  return result;
}


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

x86 assembly (clang, -O2):
<psvec2_one>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec2_one@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec2 = type { i32 }
define %struct.vec2* @psvec2_one(%struct.vec2* %0) {
%2 = alloca %struct.vec2*
store %struct.vec2* %0, %struct.vec2** %2
%3 = load %struct.vec2*, %struct.vec2** %2
%4 = bitcast %struct.vec2* %3 to float*
%5 = call i32 @vec2_one(float* %4)
%6 = load %struct.vec2*, %struct.vec2** %2
ret %struct.vec2* %6
}

LLVM IR (-O2):
%struct.vec2 = type { i32 }
define %struct.vec2* @psvec2_one(%struct.vec2* returned %0) {
%2 = bitcast %struct.vec2* %0 to float*
%3 = tail call i32 @vec2_one(float* %2)
ret %struct.vec2* %0
}
/* Variables and functions */
int /*<<< orphan*/ floydWarshall(int **);
int main() {
  int graph[4][4] = {{0, 2, 5, 99999},
                     {99999, 0, 5, 99999},
                     {99999, 5, 0, 99999},
                     {3, 99999, -4, 0}};
  floydWarshall(graph);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x40,%edx
call   1030 <memcpy@plt>
lea    -0x50(%rbp),%rdi
call   1040 <floydWarshall@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
movaps 0xf15(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xef9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xedd(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <floydWarshall@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@__const.main.graph = [4 x [4 x i32]] [[4 x i32] [i32 0, i32 2, i32 5, i32 99999], [4 x i32] [i32 99999, i32 0, i32 5, i32 99999], [4 x i32] [i32 99999, i32 5, i32 0, i32 99999], [4 x i32] [i32 3, i32 99999, i32 -4, i32 0]]
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x [4 x i32]]
store i32 0, i32* %1
%3 = bitcast [4 x [4 x i32]]* %2 to i8*
%4 = getelementptr inbounds [4 x [4 x i32]], [4 x [4 x i32]]* %2, i64 0, i64 0
%5 = bitcast [4 x i32]* %4 to i32**
%6 = call i32 @floydWarshall(i32** %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.graph = [4 x [4 x i32]] [[4 x i32] [i32 0, i32 2, i32 5, i32 99999], [4 x i32] [i32 99999, i32 0, i32 5, i32 99999], [4 x i32] [i32 99999, i32 5, i32 0, i32 99999], [4 x i32] [i32 3, i32 99999, i32 -4, i32 0]]
define i32 @main() {
%1 = alloca [4 x [4 x i32]]
%2 = bitcast [4 x [4 x i32]]* %1 to i8*
%3 = bitcast [4 x [4 x i32]]* %1 to i32**
%4 = call i32 @floydWarshall(i32** %3)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ cptr;

/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *malloc(size_t);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  char *cptr = malloc((size_t)(3000 * sizeof(char)));
  printf("sizeof (cptr) = [%d]\n(Should equal 300)\n", (int)sizeof(cptr));
  free(cptr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xbb8,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
lea    0xeac(%rip),%rdi
mov    $0x8,%esi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xbb8,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
lea    0xebb(%rip),%rdi
mov    $0x8,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [41 x i8] c"sizeof (cptr) = [%d]\0A(Should equal 300)\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i8* @malloc(i64 3000)
store i8* %3, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 8)
%5 = load i8*, i8** %2
%6 = call i32 @free(i8* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [41 x i8] c"sizeof (cptr) = [%d]\0A(Should equal 300)\0A\00"
define i32 @main() {
%1 = tail call dereferenceable_or_null(3000) i8* @malloc(i64 3000)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 8)
%3 = tail call i32 @free(i8* %1)
ret i32 0
}
/* Variables and functions */
double sin(double);
double sinValey(double x, double y) {
  double f = (sin(x) - y);
  return f * f + x * x * 0.1;
}


x86 assembly (clang, -O0):
<sinValey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  0xeae(%rip),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sinValey>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
call   1030 <sin@plt>
subsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  %xmm1,%xmm1
mulsd  0xec3(%rip),%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @sinValey(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = call double @sin(double %6)
%8 = load double, double* %4
%9 = fsub double %7, %8
store double %9, double* %5
%10 = load double, double* %5
%11 = load double, double* %5
%12 = load double, double* %3
%13 = load double, double* %3
%14 = fmul double %12, %13
%15 = fmul double %14, 1.000000e-01
%16 = call double @llvm.fmuladd.f64(double %10, double %11, double %15)
ret double %16
}

LLVM IR (-O2):
define double @sinValey(double %0, double %1) {
%3 = tail call double @sin(double %0)
%4 = fsub double %3, %1
%5 = fmul double %0, %0
%6 = fmul double %5, 1.000000e-01
%7 = tail call double @llvm.fmuladd.f64(double %4, double %4, double %6)
ret double %7
}
void foo229(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo229(i32 %0) {
ret void
}
unsigned ltou(l)
char l[];
{ return (l[3] + (l[2] << 8)); }


x86 assembly (clang, -O0):
<ltou>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x3(%rax),%eax
mov    -0x8(%rbp),%rcx
movsbl 0x2(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ltou>:
movsbl 0x3(%rdi),%ecx
movsbl 0x2(%rdi),%eax
shl    $0x8,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @ltou(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 3
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 2
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = add nsw i32 %6, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @ltou(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = shl nsw i32 %7, 8
%9 = add nsw i32 %8, %4
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ std_memcpy(void *, void const *, int);
void pack_buff(void **pp, const void *src, int len) {
  std_memcpy(*pp, src, len);
  *pp += len;
}


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

x86 assembly (clang, -O2):
<pack_buff>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <std_memcpy@plt>
movslq %ebp,%rax
add    %rax,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @pack_buff(i8** %0, i8* %1, i32 %2) {
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i32
store i8** %0, i8*** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8**, i8*** %4
%8 = load i8*, i8** %7
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @std_memcpy(i8* %8, i8* %9, i32 %10)
%12 = load i32, i32* %6
%13 = load i8**, i8*** %4
%14 = load i8*, i8** %13
%15 = sext i32 %12 to i64
%16 = getelementptr i8, i8* %14, i64 %15
store i8* %16, i8** %13
ret void
}

LLVM IR (-O2):
define void @pack_buff(i8** nocapture %0, i8* %1, i32 %2) {
%4 = load i8*, i8** %0
%5 = tail call i32 @std_memcpy(i8* %4, i8* %1, i32 %2)
%6 = load i8*, i8** %0
%7 = sext i32 %2 to i64
%8 = getelementptr i8, i8* %6, i64 %7
store i8* %8, i8** %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ backup_export(char const *, char const *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ steel_tracker_file_exists();
void backup_database(const char *source, const char *dest) {
  if (!steel_tracker_file_exists())
    return;
  if (!backup_export(source, dest)) {
    fprintf(stderr, "Unable to backup the database.\n");
  }
}


x86 assembly (clang, -O0):
<backup_database>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <steel_tracker_file_exists@plt>
cmp    $0x0,%eax
jne    1155 <backup_database+0x25>
jmp    1180 <backup_database+0x50>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <backup_export@plt>
cmp    $0x0,%eax
jne    1180 <backup_database+0x50>
mov    0x2e6e(%rip),%rax
mov    (%rax),%edi
lea    0xe85(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<backup_database>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <steel_tracker_file_exists@plt>
test   %eax,%eax
je     1154 <backup_database+0x24>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <backup_export@plt>
test   %eax,%eax
je     115c <backup_database+0x2c>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
lea    0xe94(%rip),%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"Unable to backup the database.\0A\00"
define void @backup_database(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 (...) @steel_tracker_file_exists()
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %2
br label %16
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = load i8*, i8** %4
%11 = call i32 @backup_export(i8* %9, i8* %10)
%12 = icmp ne i32 %11, 0
br i1 %12, label %16, label %13
13: ; preds = %8
%14 = load i32, i32* @stderr
%15 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %7, %13, %8
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"Unable to backup the database.\0A\00"
define void @backup_database(i8* %0, i8* %1) {
%3 = tail call i32 (...) @steel_tracker_file_exists()
%4 = icmp eq i32 %3, 0
br i1 %4, label %11, label %5
5: ; preds = %2
%6 = tail call i32 @backup_export(i8* %0, i8* %1)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* @stderr
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %2, %8, %5
ret void
}
int GSL_MAX_INT(int a, int b) { return ((a) > (b) ? (a) : (b)); }


x86 assembly (clang, -O0):
<GSL_MAX_INT>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <GSL_MAX_INT+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <GSL_MAX_INT+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GSL_MAX_INT>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define i32 @GSL_MAX_INT(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 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @GSL_MAX_INT(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
int /*<<< orphan*/ pnumber(int);
void range(char *what, int n) {
  error(what);
  error(" out of range: ");
  pnumber(n);
  error(".\n");
}


x86 assembly (clang, -O0):
<range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <error@plt>
lea    0xec1(%rip),%rdi
call   1040 <error@plt>
mov    -0xc(%rbp),%edi
call   1030 <pnumber@plt>
lea    0xebd(%rip),%rdi
call   1040 <error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<range>:
push   %rbx
mov    %esi,%ebx
call   1040 <error@plt>
lea    0xed1(%rip),%rdi
call   1040 <error@plt>
mov    %ebx,%edi
call   1030 <pnumber@plt>
lea    0xece(%rip),%rdi
pop    %rbx
jmp    1040 <error@plt>

LLVM IR (-O0):
@.str = [16 x i8] c" out of range: \00"
@.str.1 = [3 x i8] c".\0A\00"
define void @range(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @error(i8* %5)
%7 = call i32 @error(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %4
%9 = call i32 @pnumber(i32 %8)
%10 = call i32 @error(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c" out of range: \00"
@.str.1 = [3 x i8] c".\0A\00"
define void @range(i8* %0, i32 %1) {
%3 = tail call i32 @error(i8* %0)
%4 = tail call i32 @error(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @pnumber(i32 %1)
%6 = tail call i32 @error(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int volatile uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint8_t Profile_Get(void) {
  return ((((*((volatile uint32_t *)0x400243FC))) & 0x0E) >> 1) |
         ((((*((volatile uint32_t *)0x400253FC))) & 0x02) << 2) |
         ((((*((volatile uint32_t *)0x400243FC))) & 0x01) << 4) |
         ((((*((volatile uint32_t *)0x400063FC))) & 0x20)) |
         ((((*((volatile uint32_t *)0x400063FC))) & 0x80) >> 1) | 0x80;
}


x86 assembly (clang, -O0):
<Profile_Get>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400243fc,%eax
mov    (%rax),%eax
and    $0xe,%eax
sar    $0x1,%eax
mov    $0x400253fc,%ecx
mov    (%rcx),%ecx
and    $0x2,%ecx
shl    $0x2,%ecx
or     %ecx,%eax
mov    $0x400243fc,%ecx
mov    (%rcx),%ecx
and    $0x1,%ecx
shl    $0x4,%ecx
or     %ecx,%eax
mov    $0x400063fc,%ecx
mov    (%rcx),%ecx
and    $0x20,%ecx
or     %ecx,%eax
mov    $0x400063fc,%ecx
mov    (%rcx),%ecx
and    $0x80,%ecx
sar    $0x1,%ecx
or     %ecx,%eax
or     $0x80,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Profile_Get>:
mov    0x400243fc,%eax
shr    %eax
and    $0x7,%eax
mov    0x400253fc,%ecx
and    $0x2,%ecx
mov    0x400243fc,%edx
shl    $0x4,%edx
and    $0x10,%edx
mov    0x400063fc,%esi
and    $0x20,%esi
mov    0x400063fc,%edi
shr    %edi
and    $0x40,%edi
lea    (%rax,%rcx,4),%eax
or     %edx,%eax
or     %esi,%eax
add    %edi,%eax
add    $0x80,%eax
ret

LLVM IR (-O0):
define i32 @Profile_Get() {
%1 = load volatile i32, i32* inttoptr (i64 1073890300 to i32*)
%2 = and i32 %1, 14
%3 = ashr i32 %2, 1
%4 = load volatile i32, i32* inttoptr (i64 1073894396 to i32*)
%5 = and i32 %4, 2
%6 = shl i32 %5, 2
%7 = or i32 %3, %6
%8 = load volatile i32, i32* inttoptr (i64 1073890300 to i32*)
%9 = and i32 %8, 1
%10 = shl i32 %9, 4
%11 = or i32 %7, %10
%12 = load volatile i32, i32* inttoptr (i64 1073767420 to i32*)
%13 = and i32 %12, 32
%14 = or i32 %11, %13
%15 = load volatile i32, i32* inttoptr (i64 1073767420 to i32*)
%16 = and i32 %15, 128
%17 = ashr i32 %16, 1
%18 = or i32 %14, %17
%19 = or i32 %18, 128
ret i32 %19
}

LLVM IR (-O2):
define i32 @Profile_Get() {
%1 = load volatile i32, i32* inttoptr (i64 1073890300 to i32*)
%2 = lshr i32 %1, 1
%3 = and i32 %2, 7
%4 = load volatile i32, i32* inttoptr (i64 1073894396 to i32*)
%5 = shl i32 %4, 2
%6 = and i32 %5, 8
%7 = load volatile i32, i32* inttoptr (i64 1073890300 to i32*)
%8 = shl i32 %7, 4
%9 = and i32 %8, 16
%10 = load volatile i32, i32* inttoptr (i64 1073767420 to i32*)
%11 = and i32 %10, 32
%12 = load volatile i32, i32* inttoptr (i64 1073767420 to i32*)
%13 = lshr i32 %12, 1
%14 = and i32 %13, 64
%15 = or i32 %3, %6
%16 = or i32 %15, %9
%17 = or i32 %16, %11
%18 = or i32 %17, %14
%19 = or i32 %18, 128
ret i32 %19
}
void _delay_us(int delay) {}


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

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

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

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