xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ hoedown_version(int *, int *, int *, int *);
int /*<<< orphan*/ printf(char *, int, int, int, int);
void print_version() {
  int major, minor, revision, extras;
  hoedown_version(&major, &minor, &revision, &extras);
  printf("Built with Hoedown v%d.%d.%d.%d.\n", major, minor, revision, extras);
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1030 <hoedown_version@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
lea    0xeaf(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_version>:
sub    $0x18,%rsp
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
lea    0x8(%rsp),%rcx
call   1030 <hoedown_version@plt>
mov    0x14(%rsp),%esi
mov    0x10(%rsp),%edx
mov    0xc(%rsp),%ecx
mov    0x8(%rsp),%r8d
lea    0xeab(%rip),%rdi
call   1040 <printf@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [34 x i8] c"Built with Hoedown v%d.%d.%d.%d.\0A\00"
define void @print_version() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 @hoedown_version(i32* %1, i32* %2, i32* %3, i32* %4)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7, i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"Built with Hoedown v%d.%d.%d.%d.\0A\00"
define void @print_version() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @hoedown_version(i32* %1, i32* %2, i32* %3, i32* %4)
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %11, i32 %12, i32 %13)
ret void
}
int main() {
  char val = 'A';
  switch (val) {
  case 'A':
    val++;
    __attribute__((fallthrough));
  case 'B':
    val *= 2;
    break;
  default:
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movb   $0x41,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x41,%eax
je     1135 <main+0x35>
jmp    1124 <main+0x24>
mov    -0xc(%rbp),%eax
sub    $0x42,%eax
je     113d <main+0x3d>
jmp    114c <main+0x4c>
mov    -0x5(%rbp),%al
add    $0x1,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
shl    $0x1,%eax
mov    %al,-0x5(%rbp)
jmp    1151 <main+0x51>
jmp    1151 <main+0x51>
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 i8
store i32 0, i32* %1
store i8 65, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
switch i32 %4, label %13 [
i32 65, label %5
i32 66, label %8
]
5: ; preds = %0
%6 = load i8, i8* %2
%7 = add i8 %6, 1
store i8 %7, i8* %2
br label %8
8: ; preds = %0, %5
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = mul nsw i32 %10, 2
%12 = trunc i32 %11 to i8
store i8 %12, i8* %2
br label %14
13: ; preds = %0
br label %14
14: ; preds = %13, %8
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
unsigned char DCode_mime(unsigned char code, const unsigned char *pMimiArray,
                         int len) {
  unsigned char index = 0;
  for (index = 0; index < len; index++) {
    if (pMimiArray[index] == code) {
      break;
    }
  }
  return index;
}


x86 assembly (clang, -O0):
<DCode_mime>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movb   $0x0,-0x15(%rbp)
movb   $0x0,-0x15(%rbp)
movzbl -0x15(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1155 <DCode_mime+0x55>
mov    -0x10(%rbp),%rax
movzbl -0x15(%rbp),%ecx
movzbl (%rax,%rcx,1),%eax
movzbl -0x1(%rbp),%ecx
cmp    %ecx,%eax
jne    1143 <DCode_mime+0x43>
jmp    1155 <DCode_mime+0x55>
jmp    1148 <DCode_mime+0x48>
mov    -0x15(%rbp),%al
add    $0x1,%al
mov    %al,-0x15(%rbp)
jmp    1119 <DCode_mime+0x19>
movzbl -0x15(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<DCode_mime>:
xor    %eax,%eax
test   %edx,%edx
jle    1122 <DCode_mime+0x22>
cs nopw 0x0(%rax,%rax,1)
movzbl %al,%ecx
cmp    %dil,(%rsi,%rcx,1)
je     1122 <DCode_mime+0x22>
add    $0x1,%al
movzbl %al,%ecx
cmp    %edx,%ecx
jl     1110 <DCode_mime+0x10>
ret

LLVM IR (-O0):
define zeroext i8 @DCode_mime(i8 zeroext %0, i8* %1, i32 %2) {
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8
store i8 %0, i8* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
store i8 0, i8* %7
store i8 0, i8* %7
br label %8
8: ; preds = %25, %3
%9 = load i8, i8* %7
%10 = zext i8 %9 to i32
%11 = load i32, i32* %6
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %28
13: ; preds = %8
%14 = load i8*, i8** %5
%15 = load i8, i8* %7
%16 = zext i8 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = icmp eq i32 %19, %21
br i1 %22, label %23, label %24
23: ; preds = %13
br label %28
24: ; preds = %13
br label %25
25: ; preds = %24
%26 = load i8, i8* %7
%27 = add i8 %26, 1
store i8 %27, i8* %7
br label %8
28: ; preds = %23, %8
%29 = load i8, i8* %7
ret i8 %29
}

LLVM IR (-O2):
define zeroext i8 @DCode_mime(i8 zeroext %0, i8* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %15
5: ; preds = %3, %11
%6 = phi i8 [ %12, %11 ], [ 0, %3 ]
%7 = zext i8 %6 to i64
%8 = getelementptr inbounds i8, i8* %1, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, %0
br i1 %10, label %15, label %11
11: ; preds = %5
%12 = add i8 %6, 1
%13 = zext i8 %12 to i32
%14 = icmp slt i32 %13, %2
br i1 %14, label %5, label %15
15: ; preds = %11, %5, %3
%16 = phi i8 [ 0, %3 ], [ %6, %5 ], [ %12, %11 ]
ret i8 %16
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() { printf("bar\n"); }


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

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

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

LLVM IR (-O2):
@str = [4 x i8] c"bar\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int grub_strcmp(char const *, char const *);
int strcmp(const char *s1, const char *s2) { return grub_strcmp(s1, s2); }


x86 assembly (clang, -O0):
<strcmp>:
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 <grub_strcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
jmp    1030 <grub_strcmp@plt>

LLVM IR (-O0):
define i32 @strcmp(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 = load i8*, i8** %4
%7 = call i32 @grub_strcmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @strcmp(i8* %0, i8* %1) {
%3 = tail call i32 @grub_strcmp(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int Command_IsMd(char *command) { return strcmp(command, "md") == 0; }


x86 assembly (clang, -O0):
<Command_IsMd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Command_IsMd>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"md\00"
define i32 @Command_IsMd(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@.str = [3 x i8] c"md\00"
define i32 @Command_IsMd(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  scalar_t__ error;
};
typedef TYPE_1__ ERR_STRING_DATA;

/* Variables and functions */
int err_cmp(ERR_STRING_DATA *a, ERR_STRING_DATA *b) {
  return ((int)(a->error - b->error));
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { i64 }
define i32 @err_cmp(%struct.TYPE_4__* %0, %struct.TYPE_4__* %1) {
%3 = alloca %struct.TYPE_4__*
%4 = alloca %struct.TYPE_4__*
store %struct.TYPE_4__* %0, %struct.TYPE_4__** %3
store %struct.TYPE_4__* %1, %struct.TYPE_4__** %4
%5 = load %struct.TYPE_4__*, %struct.TYPE_4__** %3
%6 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %8, i32 0, i32 0
%10 = load i64, i64* %9
%11 = sub nsw i64 %7, %10
%12 = trunc i64 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { i64 }
define i32 @err_cmp(%struct.TYPE_4__* nocapture %0, %struct.TYPE_4__* nocapture %1) {
%3 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %0, i64 0, i32 0
%4 = load i64, i64* %3
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 0
%6 = load i64, i64* %5
%7 = sub nsw i64 %4, %6
%8 = trunc i64 %7 to i32
ret i32 %8
}
/* Type definitions */
struct timespec {
  unsigned int tv_sec;
  unsigned int tv_nsec;
};

/* Variables and functions */
int nanosleep(struct timespec *, int /*<<< orphan*/ *);
int usleep(unsigned int useconds) {
  struct timespec ts;
  ts.tv_sec = useconds / 1000000;
  ts.tv_nsec = (useconds % 1000000) * 1000;
  return nanosleep(&ts, NULL);
}


x86 assembly (clang, -O0):
<usleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xf4240,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xf4240,%ecx
xor    %edx,%edx
div    %ecx
imul   $0x3e8,%edx,%eax
mov    %eax,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usleep>:
push   %rax
mov    %edi,%eax
imul   $0x431bde83,%rax,%rax
shr    $0x32,%rax
mov    %eax,(%rsp)
imul   $0xf4240,%eax,%eax
sub    %eax,%edi
imul   $0x3e8,%edi,%eax
mov    %eax,0x4(%rsp)
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
define i32 @usleep(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.timespec
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = udiv i32 %4, 1000000
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
store i32 %5, i32* %6
%7 = load i32, i32* %2
%8 = urem i32 %7, 1000000
%9 = mul i32 %8, 1000
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
store i32 %9, i32* %10
%11 = call i32 @nanosleep(%struct.timespec* %3, i32* null)
ret i32 %11
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
define i32 @usleep(i32 %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = udiv i32 %0, 1000000
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i32 %4, i32* %5
%6 = urem i32 %0, 1000000
%7 = mul nuw nsw i32 %6, 1000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
store i32 %7, i32* %8
%9 = call i32 @nanosleep(%struct.timespec* %2, i32* null)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ fn1();
int /*<<< orphan*/ fn2();
int /*<<< orphan*/ fn3();
int main(void) {
  fn1();
  fn2();
  fn3();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <fn1@plt>
mov    $0x0,%al
call   1050 <fn2@plt>
mov    $0x0,%al
call   1040 <fn3@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <fn1@plt>
xor    %eax,%eax
call   1050 <fn2@plt>
xor    %eax,%eax
call   1040 <fn3@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @fn1()
%2 = tail call i32 (...) @fn2()
%3 = tail call i32 (...) @fn3()
ret i32 0
}
void main() { return; }


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

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

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

LLVM IR (-O2):
define void @main() {
ret void
}
stderr2(s1, s2) char *s1, *s2;
{
  std_err("rmdir: ");
  std_err(s1);
  std_err(s2);
}


x86 assembly (clang, -O0):
<stderr2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <std_err@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <std_err@plt>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1030 <std_err@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stderr2>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xedf(%rip),%rdi
xor    %eax,%eax
call   1030 <std_err@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <std_err@plt>
mov    %r14,%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <std_err@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"rmdir: \00"
define i32 @stderr2(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%7 = load i8*, i8** %4
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* %7)
%9 = load i8*, i8** %5
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* %9)
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
@.str = [8 x i8] c"rmdir: \00"
define i32 @stderr2(i8* %0, i8* %1) {
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* %0)
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @std_err to i32 (i8*, ...)*)(i8* %1)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0x1c() {
  Assert_real((isprint(28) == 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_isprint.c",
              145, ("isprint should be 0 for 0x1c"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0x1c\00"
define void @t_isprint_0x1c() {
%1 = call i64 @isprint(i32 28)
%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 145, 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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0x1c\00"
define void @t_isprint_0x1c() {
%1 = tail call i64 @isprint(i32 28)
%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 145, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
float quad_easeOut(float t, float b, float c, float d) {
  t /= d;
  return -c * t * (t - 2) + b;
}


x86 assembly (clang, -O0):
<quad_easeOut>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x10(%rbp),%xmm1
movss  -0x4(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
movss  0xeb1(%rip),%xmm1
subss  %xmm1,%xmm2
movss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<quad_easeOut>:
divss  %xmm3,%xmm0
mulss  %xmm0,%xmm2
addss  0xef0(%rip),%xmm0
mulss  %xmm2,%xmm0
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @quad_easeOut(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %8
%10 = load float, float* %5
%11 = fdiv float %10, %9
store float %11, float* %5
%12 = load float, float* %7
%13 = fneg float %12
%14 = load float, float* %5
%15 = fmul float %13, %14
%16 = load float, float* %5
%17 = fsub float %16, 2.000000e+00
%18 = load float, float* %6
%19 = call float @llvm.fmuladd.f32(float %15, float %17, float %18)
ret float %19
}

LLVM IR (-O2):
define float @quad_easeOut(float %0, float %1, float %2, float %3) {
%5 = fdiv float %0, %3
%6 = fneg float %2
%7 = fmul float %5, %6
%8 = fadd float %5, -2.000000e+00
%9 = tail call float @llvm.fmuladd.f32(float %7, float %8, float %1)
ret float %9
}
/* Variables and functions */
int /*<<< orphan*/ printError();
void alisp_print_error(void) { printError(); }


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

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

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

LLVM IR (-O2):
define void @alisp_print_error() {
%1 = tail call i32 (...) @printError()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int i;
  for (i = 0; i <= 255; i++) {
    printf("\n %d - %c \n", i, i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jg     1153 <main+0x43>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [12 x i8] c"\0A %d - %c \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %10, %0
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 255
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
br label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %3
13: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"\0A %d - %c \0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 256
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
void swap_char(char *a, char *b) {
  char t;
  t = *a;
  *a = *b;
  *b = t;
}


x86 assembly (clang, -O0):
<swap_char>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x11(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_char>:
mov    (%rdi),%al
mov    (%rsi),%cl
mov    %cl,(%rdi)
mov    %al,(%rsi)
ret

LLVM IR (-O0):
define void @swap_char(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
store i8 %7, i8* %5
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = load i8*, i8** %3
store i8 %9, i8* %10
%11 = load i8, i8* %5
%12 = load i8*, i8** %4
store i8 %11, i8* %12
ret void
}

LLVM IR (-O2):
define void @swap_char(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
store i8 %4, i8* %0
store i8 %3, i8* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ UpnpResponseGeneric(void const *, char *, char *, char *);
void UpnpResponse_MediaRenderer_RenderingControl_SetVolume(
    const void *UPnPToken) {
  UpnpResponseGeneric(UPnPToken,
                      "urn:schemas-upnp-org:service:RenderingControl:1",
                      "SetVolume", "");
}


x86 assembly (clang, -O0):
<UpnpResponse_MediaRenderer_RenderingControl_SetVolume>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
lea    0xf02(%rip),%rdx
lea    0xefa(%rip),%rcx
call   1030 <UpnpResponseGeneric@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UpnpResponse_MediaRenderer_RenderingControl_SetVolume>:
lea    0xee9(%rip),%rsi
lea    0xf12(%rip),%rdx
lea    0xf0a(%rip),%rcx
jmp    1030 <UpnpResponseGeneric@plt>

LLVM IR (-O0):
@.str = [48 x i8] c"urn:schemas-upnp-org:service:RenderingControl:1\00"
@.str.1 = [10 x i8] c"SetVolume\00"
@.str.2 = [1 x i8] zeroinitializer
define void @UpnpResponse_MediaRenderer_RenderingControl_SetVolume(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @UpnpResponseGeneric(i8* %3, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [48 x i8] c"urn:schemas-upnp-org:service:RenderingControl:1\00"
@.str.1 = [10 x i8] c"SetVolume\00"
@.str.2 = [1 x i8] zeroinitializer
define void @UpnpResponse_MediaRenderer_RenderingControl_SetVolume(i8* %0) {
%2 = tail call i32 @UpnpResponseGeneric(i8* %0, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, int);
char *int_to_string(int a) {
  char *str = malloc(sizeof(char) * 15);
  sprintf(str, "%d", a);
  return str;
}


x86 assembly (clang, -O0):
<int_to_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xf,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xeb9(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_to_string>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0xf,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
lea    0xec7(%rip),%rsi
mov    %rax,%rdi
mov    %ebp,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i8* @int_to_string(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = call i8* @malloc(i32 15)
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = load i32, i32* %2
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define noalias i8* @int_to_string(i32 %0) {
%2 = tail call dereferenceable_or_null(15) i8* @malloc(i32 15)
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %2, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* %2
}
int add(int lhs, int rhs) { return lhs + rhs; }


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

x86 assembly (clang, -O2):
<add>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @add(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 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @add(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
void init_ai(int side) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @XGrabKeyboard() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int a;
  a = 0 ? (3 > 2 ? 23 : (2 > 5 ? (7 < 6 ? 34 : 48) : 64)) : 1;
  printf("%d\n", a);
}


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 1, i32* %1
%2 = load i32, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char c;
  do {
    scanf("%c", &c);
  } while (c < 'a' || c > 'z');
  printf("%c \n", 'z' - (c - 'a'));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%ecx
mov    $0x1,%al
cmp    $0x61,%ecx
mov    %al,-0x6(%rbp)
jl     115e <main+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
setg   %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
test   $0x1,%al
jne    112f <main+0xf>
movsbl -0x5(%rbp),%ecx
sub    $0x61,%ecx
mov    $0x7a,%eax
sub    %ecx,%eax
lea    0xe85(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%r14
lea    0x7(%rsp),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
movzbl 0x7(%rsp),%eax
lea    -0x7b(%rax),%ecx
cmp    $0xe6,%cl
jb     1130 <main+0x10>
mov    $0xdb,%cl
sub    %al,%cl
movsbl %cl,%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [5 x i8] c"%c \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
br label %3
3: ; preds = %13, %0
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %5
5: ; preds = %3
%6 = load i8, i8* %2
%7 = sext i8 %6 to i32
%8 = icmp slt i32 %7, 97
br i1 %8, label %13, label %9
9: ; preds = %5
%10 = load i8, i8* %2
%11 = sext i8 %10 to i32
%12 = icmp sgt i32 %11, 122
br label %13
13: ; preds = %9, %5
%14 = phi i1 [ true, %5 ], [ %12, %9 ]
br i1 %14, label %3, label %15
15: ; preds = %13
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
%18 = sub nsw i32 %17, 97
%19 = sub nsw i32 122, %18
%20 = trunc i32 %19 to i8
%21 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8 signext %20)
%22 = load i32, i32* %1
ret i32 %22
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [5 x i8] c"%c \0A\00"
define i32 @main() {
%1 = alloca i8
br label %2
2: ; preds = %2, %0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = load i8, i8* %1
%5 = add i8 %4, -123
%6 = icmp ult i8 %5, -26
br i1 %6, label %2, label %7
7: ; preds = %2
%8 = sub nuw i8 -37, %4
%9 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8 signext %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ lmrnor_(double *, double *, int *);
void clmrnor(double *para, double *xmom, int nmom) {
  lmrnor_(para, xmom, &nmom);
}


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

x86 assembly (clang, -O2):
<clmrnor>:
push   %rax
mov    %edx,0x4(%rsp)
lea    0x4(%rsp),%rdx
call   1030 <lmrnor_@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @clmrnor(double* %0, double* %1, i32 %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca i32
store double* %0, double** %4
store double* %1, double** %5
store i32 %2, i32* %6
%7 = load double*, double** %4
%8 = load double*, double** %5
%9 = call i32 @lmrnor_(double* %7, double* %8, i32* %6)
ret void
}

LLVM IR (-O2):
define void @clmrnor(double* %0, double* %1, i32 %2) {
%4 = alloca i32
store i32 %2, i32* %4
%5 = call i32 @lmrnor_(double* %0, double* %1, i32* %4)
ret void
}
/* Type definitions */
struct sqlConnection {
  int dummy;
};

/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ freeMem(char *);
char *stringFieldInSubmissionSet(struct sqlConnection *, int, char *);
int visiGeneYear(struct sqlConnection *conn, int id) {
  char *s = stringFieldInSubmissionSet(conn, id, "year");
  int year = atoi(s);
  freeMem(s);
  return year;
}


x86 assembly (clang, -O0):
<visiGeneYear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xeb3(%rip),%rdx
call   1040 <stringFieldInSubmissionSet@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <freeMem@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<visiGeneYear>:
push   %rbp
push   %rbx
push   %rax
lea    0xec6(%rip),%rdx
call   1040 <stringFieldInSubmissionSet@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <atoi@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <freeMem@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.sqlConnection = type { i32 }
@.str = [5 x i8] c"year\00"
define i32 @visiGeneYear(%struct.sqlConnection* %0, i32 %1) {
%3 = alloca %struct.sqlConnection*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store %struct.sqlConnection* %0, %struct.sqlConnection** %3
store i32 %1, i32* %4
%7 = load %struct.sqlConnection*, %struct.sqlConnection** %3
%8 = load i32, i32* %4
%9 = call i8* @stringFieldInSubmissionSet(%struct.sqlConnection* %7, i32 %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = call i32 @atoi(i8* %10)
store i32 %11, i32* %6
%12 = load i8*, i8** %5
%13 = call i32 @freeMem(i8* %12)
%14 = load i32, i32* %6
ret i32 %14
}

LLVM IR (-O2):
%struct.sqlConnection = type { i32 }
@.str = [5 x i8] c"year\00"
define i32 @visiGeneYear(%struct.sqlConnection* %0, i32 %1) {
%3 = tail call i8* @stringFieldInSubmissionSet(%struct.sqlConnection* %0, i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @atoi(i8* %3)
%5 = tail call i32 @freeMem(i8* %3)
ret i32 %4
}
unsigned int _xpnd2(unsigned int src1) {
  int v0 = (src1 & 0x1) ? 0x0000ffff : 0x00000000;
  int v1 = (src1 & 0x2) ? 0xffff0000 : 0x00000000;
  return v0 | v1;
}


x86 assembly (clang, -O0):
<_xpnd2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x1,%edx
xor    %eax,%eax
mov    $0xffff,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edx
and    $0x2,%edx
xor    %eax,%eax
mov    $0xffff0000,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_xpnd2>:
mov    %edi,%eax
and    $0x1,%eax
neg    %eax
movzwl %ax,%eax
shl    $0x1e,%edi
sar    $0x1f,%edi
and    $0xffff0000,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @_xpnd2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = and i32 %5, 1
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 65535, i32 0
store i32 %9, i32* %3
%10 = load i32, i32* %2
%11 = and i32 %10, 2
%12 = icmp ne i32 %11, 0
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 -65536, i32 0
store i32 %14, i32* %4
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = or i32 %15, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @_xpnd2(i32 %0) {
%2 = and i32 %0, 1
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 0, i32 65535
%5 = and i32 %0, 2
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i32 0, i32 -65536
%8 = or i32 %4, %7
ret i32 %8
}
int test_imm_BBuint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0xBB << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_BBuint64_lowword_mem>:
testb  $0xbb,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_BBuint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 187
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct bitis_ReturnToken {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ returnToken_dispose(struct bitis_ReturnToken *);
void bitis_DisposeReturnToken(struct bitis_ReturnToken *token) {
  returnToken_dispose(token);
}


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

x86 assembly (clang, -O2):
<bitis_DisposeReturnToken>:
jmp    1030 <returnToken_dispose@plt>

LLVM IR (-O0):
%struct.bitis_ReturnToken = type { i32 }
define void @bitis_DisposeReturnToken(%struct.bitis_ReturnToken* %0) {
%2 = alloca %struct.bitis_ReturnToken*
store %struct.bitis_ReturnToken* %0, %struct.bitis_ReturnToken** %2
%3 = load %struct.bitis_ReturnToken*, %struct.bitis_ReturnToken** %2
%4 = call i32 @returnToken_dispose(%struct.bitis_ReturnToken* %3)
ret void
}

LLVM IR (-O2):
%struct.bitis_ReturnToken = type { i32 }
define void @bitis_DisposeReturnToken(%struct.bitis_ReturnToken* %0) {
%2 = tail call i32 @returnToken_dispose(%struct.bitis_ReturnToken* %0)
ret void
}
int skip_spaces(char *line, int last_position) {
  while (line[last_position] == ' ' || line[last_position] == '\t')
    last_position++;
  return last_position;
}


x86 assembly (clang, -O0):
<skip_spaces>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0xd(%rbp)
je     113a <skip_spaces+0x3a>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    114a <skip_spaces+0x4a>
jmp    1158 <skip_spaces+0x58>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110b <skip_spaces+0xb>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_spaces>:
mov    %esi,%eax
movslq %esi,%rcx
add    %rdi,%rcx
jmp    1117 <skip_spaces+0x17>
nopw   0x0(%rax,%rax,1)
add    $0x1,%eax
add    $0x1,%rcx
movzbl (%rcx),%edx
cmp    $0x20,%dl
je     1110 <skip_spaces+0x10>
cmp    $0x9,%dl
je     1110 <skip_spaces+0x10>
ret

LLVM IR (-O0):
define i32 @skip_spaces(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 = %23, %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 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 32
br i1 %12, label %21, label %13
13: ; preds = %5
%14 = load i8*, i8** %3
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 9
br label %21
21: ; preds = %13, %5
%22 = phi i1 [ true, %5 ], [ %20, %13 ]
br i1 %22, label %23, label %26
23: ; preds = %21
%24 = load i32, i32* %4
%25 = add nsw i32 %24, 1
store i32 %25, i32* %4
br label %5
26: ; preds = %21
%27 = load i32, i32* %4
ret i32 %27
}

LLVM IR (-O2):
define i32 @skip_spaces(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
br label %4
4: ; preds = %8, %2
%5 = phi i64 [ %9, %8 ], [ %3, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
switch i8 %7, label %10 [
i8 32, label %8
i8 9, label %8
]
8: ; preds = %4, %4
%9 = add i64 %5, 1
br label %4
10: ; preds = %4
%11 = trunc i64 %5 to i32
ret i32 %11
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int64_t signed_bits(int64_t value, int bits) {
  if (bits < 64) {
    value &= ((int64_t)1 << bits) - 1;
    if (value & (int64_t)1 << (bits - 1))
      value |= (int64_t)-1 << bits;
  }
  return value;
}


x86 assembly (clang, -O0):
<signed_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x40,-0x8(%rbp)
jge    1159 <signed_bits+0x59>
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
sub    $0x1,%eax
and    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1154 <signed_bits+0x54>
mov    -0x8(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1159 <signed_bits+0x59>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<signed_bits>:
mov    %edi,%eax
cmp    $0x3f,%esi
jg     1128 <signed_bits+0x28>
mov    $0xffffffff,%edx
mov    %esi,%ecx
shl    %cl,%edx
mov    %edx,%ecx
not    %ecx
and    %eax,%ecx
add    $0xff,%sil
movzbl %sil,%esi
or     %eax,%edx
bt     %esi,%ecx
cmovae %ecx,%edx
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @signed_bits(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp slt i32 %5, 64
br i1 %6, label %7, label %25
7: ; preds = %2
%8 = load i32, i32* %4
%9 = shl i32 1, %8
%10 = sub nsw i32 %9, 1
%11 = load i32, i32* %3
%12 = and i32 %11, %10
store i32 %12, i32* %3
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = sub nsw i32 %14, 1
%16 = shl i32 1, %15
%17 = and i32 %13, %16
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %24
19: ; preds = %7
%20 = load i32, i32* %4
%21 = shl i32 -1, %20
%22 = load i32, i32* %3
%23 = or i32 %22, %21
store i32 %23, i32* %3
br label %24
24: ; preds = %19, %7
br label %25
25: ; preds = %24, %2
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @signed_bits(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, 64
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = shl nsw i32 -1, %1
%6 = xor i32 %5, -1
%7 = and i32 %6, %0
%8 = add nsw i32 %1, -1
%9 = shl nuw i32 1, %8
%10 = and i32 %7, %9
%11 = icmp eq i32 %10, 0
%12 = or i32 %5, %0
%13 = select i1 %11, i32 %7, i32 %12
br label %14
14: ; preds = %4, %2
%15 = phi i32 [ %0, %2 ], [ %13, %4 ]
ret i32 %15
}
int _dl_cap_equal(unsigned long a, unsigned long b) {
  (void)a;
  (void)b;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @_dl_cap_equal(i64 %0, i64 %1) {
ret i32 0
}
void init_co_pf_fold(int length) {}


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

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

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

LLVM IR (-O2):
define void @init_co_pf_fold(i32 %0) {
ret void
}
/* Variables and functions */
int inp_emulate(int);
char TOSH_READ_POT_SELECT_PIN() { return 0x01 & (inp_emulate(0x44) >> 5); }


x86 assembly (clang, -O0):
<TOSH_READ_POT_SELECT_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0x44,%edi
call   1030 <inp_emulate@plt>
sar    $0x5,%eax
and    $0x1,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_READ_POT_SELECT_PIN>:
push   %rax
mov    $0x44,%edi
call   1030 <inp_emulate@plt>
shr    $0x5,%al
and    $0x1,%al
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @TOSH_READ_POT_SELECT_PIN() {
%1 = call i32 @inp_emulate(i32 68)
%2 = ashr i32 %1, 5
%3 = and i32 1, %2
%4 = trunc i32 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @TOSH_READ_POT_SELECT_PIN() {
%1 = tail call i32 @inp_emulate(i32 68)
%2 = trunc i32 %1 to i8
%3 = lshr i8 %2, 5
%4 = and i8 %3, 1
ret i8 %4
}
int gint(char **sp) {
  int n;
  n = *(*sp)++;
  n += *(*sp)++ * 64;
  return (n);
}


x86 assembly (clang, -O0):
<gint>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,(%rcx)
movsbl (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,(%rcx)
movsbl (%rax),%eax
shl    $0x6,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gint>:
mov    (%rdi),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rdi)
movsbl (%rax),%ecx
lea    0x2(%rax),%rdx
mov    %rdx,(%rdi)
movsbl 0x1(%rax),%eax
shl    $0x6,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @gint(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8, i8* %5, i32 1
store i8* %6, i8** %4
%7 = load i8, i8* %5
%8 = sext i8 %7 to i32
store i32 %8, i32* %3
%9 = load i8**, i8*** %2
%10 = load i8*, i8** %9
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %9
%12 = load i8, i8* %10
%13 = sext i8 %12 to i32
%14 = mul nsw i32 %13, 64
%15 = load i32, i32* %3
%16 = add nsw i32 %15, %14
store i32 %16, i32* %3
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @gint(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = getelementptr inbounds i8, i8* %2, i64 1
store i8* %3, i8** %0
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = getelementptr inbounds i8, i8* %2, i64 2
store i8* %6, i8** %0
%7 = load i8, i8* %3
%8 = sext i8 %7 to i32
%9 = shl nsw i32 %8, 6
%10 = add nsw i32 %9, %5
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main() {
  int a, b, c;
  scanf("%d%d%d", &a, &b, &c);
  printf("%d", a + b + c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
add    -0xc(%rbp),%esi
add    -0x10(%rbp),%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x10(%rsp),%esi
add    0x14(%rsp),%esi
add    0xc(%rsp),%esi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d%d%d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = add nsw i32 %9, %8
%11 = load i32, i32* %3
%12 = add nsw i32 %10, %11
%13 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %12)
ret i32 0
}