xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int nonblock_socket(int);
int /*<<< orphan*/ perror(char *);
void xnonblock_socket(int sockfd) {
  int x;
  x = nonblock_socket(sockfd);
  if (x != 0) {
    perror("nonblock_socket: fcntl");
    exit(EXIT_FAILURE);
  } else {
    return;
  }
}


x86 assembly (clang, -O0):
<xnonblock_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <nonblock_socket@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     116a <xnonblock_socket+0x3a>
lea    0xea9(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xnonblock_socket>:
push   %rax
call   1030 <nonblock_socket@plt>
test   %eax,%eax
jne    113c <xnonblock_socket+0xc>
pop    %rax
ret
lea    0xebd(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"nonblock_socket: fcntl\00"
@EXIT_FAILURE = global i32 0
define void @xnonblock_socket(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @nonblock_socket(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = call i32 @perror(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* @EXIT_FAILURE
%11 = call i32 @exit(i32 %10)
unreachable
12: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"nonblock_socket: fcntl\00"
@EXIT_FAILURE = global i32 0
define void @xnonblock_socket(i32 %0) {
%2 = tail call i32 @nonblock_socket(i32 %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
ret void
}
unsigned int f() {
  static const char string[] __attribute__((aligned(sizeof(int)))) = "Private";
  unsigned int priv;
  __builtin_memcpy(&priv, &string[0], sizeof(priv));
  return priv;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    0xef6(%rip),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@f.string = internal constant [8 x i8] c"Private\00"
define i32 @f() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @f() {
ret i32 1986622032
}
void foo() { foo(); }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
call   1030 <foo@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
jmp    1100 <foo>

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

LLVM IR (-O2):
define void @foo() {
br label %1
1: ; preds = %1, %0
br label %1
}
void OCSP_REQINFO_new(void) {}


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

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

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

LLVM IR (-O2):
define void @OCSP_REQINFO_new() {
ret void
}
/* Variables and functions */
int compute(int, int, int);
int /*<<< orphan*/ printf(char *, int);
long main() { printf("compute=%d\n", compute(1, 2, 3)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1040 <compute@plt>
mov    %eax,%esi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1040 <compute@plt>
lea    0xec4(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"compute=%d\0A\00"
define i64 @main() {
%1 = tail call i32 @compute(i32 1, i32 2, i32 3)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i64 undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ whine(char *);
void error(char *message, int exitcode) {
  whine(message);
  exit(exitcode);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <whine@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rbx
mov    %esi,%ebx
call   1030 <whine@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @error(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 @whine(i8* %5)
%7 = load i32, i32* %4
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
define void @error(i8* %0, i32 %1) {
%3 = tail call i32 @whine(i8* %0)
%4 = tail call i32 @exit(i32 %1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("Oleg programing mother fucker\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%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
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [30 x i8] c"Oleg programing mother fucker\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
char *strstr(char *, char *);
bool haspre(char *prefix, char *str) {
  char *test = strstr(str, prefix);
  return test == str;
}


x86 assembly (clang, -O0):
<haspre>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strstr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<haspre>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @haspre(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** %4
%7 = load i8*, i8** %3
%8 = call i8* @strstr(i8* %6, i8* %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = load i8*, i8** %4
%11 = icmp eq i8* %9, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @haspre(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i32 @strncmp(i8* %1, i8* %0, i64 %3)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
unsigned char to_uns_char(__float128 a) { return (unsigned char)a; }


x86 assembly (clang, -O0):
<to_uns_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movaps %xmm0,-0x10(%rbp)
movaps -0x10(%rbp),%xmm0
call   1120 <__fixtfsi>
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret
xchg   %ax,%ax

x86 assembly (clang, -O2):
<to_uns_char>:
push   %rax
call   1110 <__fixtfsi>
pop    %rcx
ret
nopl   0x0(%rax,%rax,1)

LLVM IR (-O0):
define zeroext i8 @to_uns_char(fp128 %0) {
%2 = alloca fp128
store fp128 %0, fp128* %2
%3 = load fp128, fp128* %2
%4 = fptoui fp128 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define zeroext i8 @to_uns_char(fp128 %0) {
%2 = fptoui fp128 %0 to i8
ret i8 %2
}
void g_arith_hypot_f_s64(void *s, void *d, void *o) {}


x86 assembly (clang, -O0):
<g_arith_hypot_f_s64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @g_arith_hypot_f_s64(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
ret void
}

LLVM IR (-O2):
define void @g_arith_hypot_f_s64(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2) {
ret void
}
void mfence(void) { __asm volatile("mfence"); }


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

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

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

LLVM IR (-O2):
define void @mfence() {
tail call void asm sideeffect "mfence", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;
struct passwd {
  int /*<<< orphan*/ pw_uid;
};

/* Variables and functions */
struct passwd *getpwnam(char *);
uid_t uid_by_name(char *name) {
  struct passwd *info;
  info = getpwnam(name);
  if (!info)
    return 0;
  return info->pw_uid;
}


x86 assembly (clang, -O0):
<uid_by_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <getpwnam@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1140 <uid_by_name+0x30>
movl   $0x0,-0x4(%rbp)
jmp    1149 <uid_by_name+0x39>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uid_by_name>:
push   %rax
call   1030 <getpwnam@plt>
test   %rax,%rax
je     111f <uid_by_name+0xf>
mov    (%rax),%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.passwd = type { i32 }
define i32 @uid_by_name(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.passwd*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call %struct.passwd* @getpwnam(i8* %5)
store %struct.passwd* %6, %struct.passwd** %4
%7 = load %struct.passwd*, %struct.passwd** %4
%8 = icmp ne %struct.passwd* %7, null
br i1 %8, label %10, label %9
9: ; preds = %1
store i32 0, i32* %2
br label %14
10: ; preds = %1
%11 = load %struct.passwd*, %struct.passwd** %4
%12 = getelementptr inbounds %struct.passwd, %struct.passwd* %11, i32 0, i32 0
%13 = load i32, i32* %12
store i32 %13, i32* %2
br label %14
14: ; preds = %10, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
%struct.passwd = type { i32 }
define i32 @uid_by_name(i8* nocapture %0) {
%2 = tail call %struct.passwd* @getpwnam(i8* %0)
%3 = icmp eq %struct.passwd* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = getelementptr inbounds %struct.passwd, %struct.passwd* %2, i64 0, i32 0
%6 = load i32, i32* %5
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ %6, %4 ], [ 0, %1 ]
ret i32 %8
}
/* Type definitions */
typedef union REGS {
  int dummy;
} REGS;
struct SREGS {
  int dummy;
};

/* Variables and functions */
int int86x(int, union REGS *, union REGS *, struct SREGS *);
intdosx(union REGS *in, union REGS *out, struct SREGS *seg) {
  return int86x(0x21, in, out, seg);
}


x86 assembly (clang, -O0):
<intdosx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x21,%edi
call   1030 <int86x@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intdosx>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x21,%edi
jmp    1030 <int86x@plt>

LLVM IR (-O0):
%union.REGS = type { i32 }
%struct.SREGS = type { i32 }
define i32 @intdosx(%union.REGS* %0, %union.REGS* %1, %struct.SREGS* %2) {
%4 = alloca %union.REGS*
%5 = alloca %union.REGS*
%6 = alloca %struct.SREGS*
store %union.REGS* %0, %union.REGS** %4
store %union.REGS* %1, %union.REGS** %5
store %struct.SREGS* %2, %struct.SREGS** %6
%7 = load %union.REGS*, %union.REGS** %4
%8 = load %union.REGS*, %union.REGS** %5
%9 = load %struct.SREGS*, %struct.SREGS** %6
%10 = call i32 @int86x(i32 33, %union.REGS* %7, %union.REGS* %8, %struct.SREGS* %9)
ret i32 %10
}

LLVM IR (-O2):
%union.REGS = type { i32 }
%struct.SREGS = type { i32 }
define i32 @intdosx(%union.REGS* %0, %union.REGS* %1, %struct.SREGS* %2) {
%4 = tail call i32 @int86x(i32 33, %union.REGS* %0, %union.REGS* %1, %struct.SREGS* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_usage(void) {
  fprintf(stderr,
          "Usage: generic_buffer [options]...\n"
          "Capture, convert and output data from IIO device buffer\n"
          "  -a         Auto-activate all available channels\n"
          "  -c <n>     Do n conversions\n"
          "  -e         Disable wait for event (new data)\n"
          "  -g         Use trigger-less mode\n"
          "  -l <n>     Set buffer length to n samples\n"
          "  -n <name>  Set device name (mandatory)\n"
          "  -t <name>  Set trigger name\n"
          "  -w <n>     Set delay between reads in us (event-less mode)\n");
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [430 x i8] c"Usage: generic_buffer [options]...\0ACapture, convert and output data from IIO device buffer\0A -a Auto-activate all available channels\0A -c <n> Do n conversions\0A -e Disable wait for event (new data)\0A -g Use trigger-less mode\0A -l <n> Set buffer length to n samples\0A -n <name> Set device name (mandatory)\0A -t <name> Set trigger name\0A -w <n> Set delay between reads in us (event-less mode)\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([430 x i8], [430 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [430 x i8] c"Usage: generic_buffer [options]...\0ACapture, convert and output data from IIO device buffer\0A -a Auto-activate all available channels\0A -c <n> Do n conversions\0A -e Disable wait for event (new data)\0A -g Use trigger-less mode\0A -l <n> Set buffer length to n samples\0A -n <name> Set device name (mandatory)\0A -t <name> Set trigger name\0A -w <n> Set delay between reads in us (event-less mode)\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([430 x i8], [430 x i8]* @.str, i64 0, i64 0))
ret void
}
void setval_203(unsigned *p) { *p = 2445379995U; }


x86 assembly (clang, -O0):
<setval_203>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x91c1899b,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<setval_203>:
movl   $0x91c1899b,(%rdi)
ret

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

LLVM IR (-O2):
define void @setval_203(i32* nocapture writeonly %0) {
store i32 -1849587301, i32* %0
ret void
}
extern unsigned long unsigned_long_to_unsigned_long(unsigned long x, int k) {
  return x + k;
}


x86 assembly (clang, -O0):
<unsigned_long_to_unsigned_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsigned_long_to_unsigned_long>:
movslq %esi,%rax
add    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @unsigned_long_to_unsigned_long(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = add i64 %5, %7
ret i64 %8
}

LLVM IR (-O2):
define i64 @unsigned_long_to_unsigned_long(i64 %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = add i64 %3, %0
ret i64 %4
}
int ZLIBH_getDistributionTotal() { return (1U << (14 - 2)); }


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

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

LLVM IR (-O0):
define i32 @ZLIBH_getDistributionTotal() {
ret i32 4096
}

LLVM IR (-O2):
define i32 @ZLIBH_getDistributionTotal() {
ret i32 4096
}
/* Variables and functions */
int /*<<< orphan*/ VIDEO_CONTINUE;
int ioctl(int, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int videoContinue(int fd, char *arg) {
  if (arg)
    return -1;
  if (ioctl(fd, VIDEO_CONTINUE) == -1)
    perror("VIDEO_CONTINUE");
  return 0;
}


x86 assembly (clang, -O0):
<videoContinue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1146 <videoContinue+0x26>
movl   $0xffffffff,-0x4(%rbp)
jmp    1173 <videoContinue+0x53>
mov    -0x8(%rbp),%edi
mov    0x2e90(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
cmp    $0xffffffff,%eax
jne    116c <videoContinue+0x4c>
lea    0xe99(%rip),%rdi
call   1040 <perror@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<videoContinue>:
push   %rbx
mov    $0xffffffff,%ebx
test   %rsi,%rsi
jne    1140 <videoContinue+0x20>
mov    0x2eae(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
xor    %ebx,%ebx
cmp    $0xffffffff,%eax
je     1144 <videoContinue+0x24>
mov    %ebx,%eax
pop    %rbx
ret
lea    0xeb5(%rip),%rdi
call   1040 <perror@plt>
jmp    1140 <videoContinue+0x20>

LLVM IR (-O0):
@VIDEO_CONTINUE = global i32 0
@.str = [15 x i8] c"VIDEO_CONTINUE\00"
define i32 @videoContinue(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = load i8*, i8** %5
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 -1, i32* %3
br label %17
9: ; preds = %2
%10 = load i32, i32* %4
%11 = load i32, i32* @VIDEO_CONTINUE
%12 = call i32 @ioctl(i32 %10, i32 %11)
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %16
14: ; preds = %9
%15 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %14, %9
store i32 0, i32* %3
br label %17
17: ; preds = %16, %8
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@VIDEO_CONTINUE = global i32 0
@.str = [15 x i8] c"VIDEO_CONTINUE\00"
define i32 @videoContinue(i32 %0, i8* readnone %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = load i32, i32* @VIDEO_CONTINUE
%6 = tail call i32 @ioctl(i32 %0, i32 %5)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %10
8: ; preds = %4
%9 = tail call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %4, %8, %2
%11 = phi i32 [ -1, %2 ], [ 0, %8 ], [ 0, %4 ]
ret i32 %11
}
void initArray() {
  int array[100];
  int i;
  for (i = 0; i < 100; i++) {
    array[i] = i;
  }
}


x86 assembly (clang, -O0):
<initArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x194(%rbp)
cmpl   $0x64,-0x194(%rbp)
jge    114a <initArray+0x4a>
mov    -0x194(%rbp),%ecx
movslq -0x194(%rbp),%rax
mov    %ecx,-0x190(%rbp,%rax,4)
mov    -0x194(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x194(%rbp)
jmp    1115 <initArray+0x15>
add    $0x120,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @initArray() {
ret void
}
void INT_Excep_SCIFA8_RXIF8(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_SCIFA8_RXIF8() {
ret void
}
void s2e_codeselector_select_module(const char *moduleId) {
  __s2e_touch_string(moduleId);
  __asm__ __volatile__(".byte 0x0f, 0x3f\n"
                       ".byte 0x00, 0xAE, 0x02, 0x00\n"
                       ".byte 0x00, 0x00, 0x00, 0x00\n"
                       :
                       : "c"(moduleId));
}


x86 assembly (clang, -O0):
<s2e_codeselector_select_module>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <__s2e_touch_string@plt>
mov    -0x8(%rbp),%rcx
(bad)
add    %ch,0x2(%rsi)
add    %al,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s2e_codeselector_select_module>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <__s2e_touch_string@plt>
mov    %rbx,%rcx
(bad)
add    %ch,0x2(%rsi)
add    %al,(%rax)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @s2e_codeselector_select_module(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @__s2e_touch_string to i32 (i8*, ...)*)(i8* %0)
tail call void asm sideeffect ".byte 0x0f, 0x3f\0A.byte 0x00, 0xAE, 0x02, 0x00\0A.byte 0x00, 0x00, 0x00, 0x00\0A", "{cx},~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret void
}
void KeccakF200_Initialize(void) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @KeccakF200_Initialize() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ spiWriteRegister(int, int);
void rfmClearInterrupts(void) {
  spiWriteRegister(0x05, 0x00);
  spiWriteRegister(0x06, 0x00);
}


x86 assembly (clang, -O0):
<rfmClearInterrupts>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
xor    %esi,%esi
call   1030 <spiWriteRegister@plt>
mov    $0x6,%edi
xor    %esi,%esi
call   1030 <spiWriteRegister@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rfmClearInterrupts>:
push   %rax
mov    $0x5,%edi
xor    %esi,%esi
call   1030 <spiWriteRegister@plt>
mov    $0x6,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <spiWriteRegister@plt>

LLVM IR (-O0):
define void @rfmClearInterrupts() {
%1 = call i32 @spiWriteRegister(i32 5, i32 0)
%2 = call i32 @spiWriteRegister(i32 6, i32 0)
ret void
}

LLVM IR (-O2):
define void @rfmClearInterrupts() {
%1 = tail call i32 @spiWriteRegister(i32 5, i32 0)
%2 = tail call i32 @spiWriteRegister(i32 6, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glLightModeli(unsigned int, int);
void LightModeli(unsigned int p, int v) { glLightModeli(p, v); }


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

x86 assembly (clang, -O2):
<LightModeli>:
jmp    1030 <glLightModeli@plt>

LLVM IR (-O0):
define void @LightModeli(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 = call i32 @glLightModeli(i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @LightModeli(i32 %0, i32 %1) {
%3 = tail call i32 @glLightModeli(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
scalar_t__ strcmp(void const *, void const *);
int key_compare(void *privdata, const void *key1, const void *key2) {
  return (strcmp(key1, key2) == 0);
}


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

x86 assembly (clang, -O2):
<key_compare>:
push   %rax
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @key_compare(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %5
%8 = load i8*, i8** %6
%9 = call i64 @strcmp(i8* %7, i8* %8)
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @key_compare(i8* nocapture readnone %0, i8* %1, i8* %2) {
%4 = tail call i64 @strcmp(i8* %1, i8* %2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ appendCODE(int /*<<< orphan*/);
int /*<<< orphan*/ makeCODEineg(int /*<<< orphan*/ *);
void code_ineg() { appendCODE(makeCODEineg(NULL)); }


x86 assembly (clang, -O0):
<code_ineg>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <makeCODEineg@plt>
mov    %eax,%edi
call   1030 <appendCODE@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @code_ineg() {
%1 = call i32 @makeCODEineg(i32* null)
%2 = call i32 @appendCODE(i32 %1)
ret void
}

LLVM IR (-O2):
define void @code_ineg() {
%1 = tail call i32 @makeCODEineg(i32* null)
%2 = tail call i32 @appendCODE(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_188() {
  Assert_real((isqrt(188) == 13),
              "/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/stdlib/isqrt.c",
              945, ("Integer square root of 188 should be 13"));
}


x86 assembly (clang, -O0):
<t_sqrt_188>:
push   %rbp
mov    %rsp,%rbp
mov    $0xbc,%edi
call   1030 <isqrt@plt>
cmp    $0xd,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x3b1,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_188>:
push   %rax
mov    $0xbc,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xd,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x3b1,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 188 should be 13\00"
define void @t_sqrt_188() {
%1 = call i32 @isqrt(i32 188)
%2 = icmp eq i32 %1, 13
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 945, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 188 should be 13\00"
define void @t_sqrt_188() {
%1 = tail call i32 @isqrt(i32 188)
%2 = icmp eq i32 %1, 13
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 945, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int GET32(int);
int /*<<< orphan*/ PUT32(int, unsigned char);
void uart_putc(unsigned char byte) {
  while (1) {
    if (GET32(0x3F215054) & 0x20)
      break;
  }
  PUT32(0x3F215040, byte);
}


x86 assembly (clang, -O0):
<uart_putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x3f215054,%edi
call   1040 <GET32@plt>
and    $0x20,%eax
cmp    $0x0,%eax
je     1149 <uart_putc+0x29>
jmp    114e <uart_putc+0x2e>
jmp    112e <uart_putc+0xe>
mov    $0x3f215040,%edi
movzbl -0x1(%rbp),%esi
call   1030 <PUT32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_putc>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x3f215054,%edi
call   1040 <GET32@plt>
test   $0x20,%al
je     1130 <uart_putc+0x10>
movzbl %bl,%esi
mov    $0x3f215040,%edi
pop    %rbx
jmp    1030 <PUT32@plt>

LLVM IR (-O0):
define void @uart_putc(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
br label %3
3: ; preds = %1, %8
%4 = call i32 @GET32(i32 1059147860)
%5 = and i32 %4, 32
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %9
8: ; preds = %3
br label %3
9: ; preds = %7
%10 = load i8, i8* %2
%11 = call i32 @PUT32(i32 1059147840, i8 zeroext %10)
ret void
}

LLVM IR (-O2):
define void @uart_putc(i8 zeroext %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @GET32(i32 1059147860)
%4 = and i32 %3, 32
%5 = icmp eq i32 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
%7 = tail call i32 @PUT32(i32 1059147840, i8 zeroext %0)
ret void
}
/* Variables and functions */
int __get_cpuid(int /*<<< orphan*/, unsigned int *, unsigned int *,
                unsigned int *, unsigned int *);
int main(void) {
  unsigned int a, b, c, d;
  return __get_cpuid(0, &a, &b, &c, &d);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1030 <__get_cpuid@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
xor    %edi,%edi
call   1030 <__get_cpuid@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @main() {
%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 @__get_cpuid(i32 0, i32* %1, i32* %2, i32* %3, i32* %4)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ acker(int, int);
__main() {
  int i;
  for (i = 1; i <= 10; i++)
    acker(3, 6);
}


x86 assembly (clang, -O0):
<__main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jg     1146 <__main+0x36>
mov    $0x3,%edi
mov    $0x6,%esi
call   1030 <acker@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111f <__main+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__main>:
push   %rax
mov    $0x3,%edi
mov    $0x6,%esi
call   1030 <acker@plt>
mov    $0x3,%edi
mov    $0x6,%esi
call   1030 <acker@plt>
mov    $0x3,%edi
mov    $0x6,%esi
call   1030 <acker@plt>
mov    $0x3,%edi
mov    $0x6,%esi
call   1030 <acker@plt>
mov    $0x3,%edi
mov    $0x6,%esi
call   1030 <acker@plt>
mov    $0x3,%edi
mov    $0x6,%esi
call   1030 <acker@plt>
mov    $0x3,%edi
mov    $0x6,%esi
call   1030 <acker@plt>
mov    $0x3,%edi
mov    $0x6,%esi
call   1030 <acker@plt>
mov    $0x3,%edi
mov    $0x6,%esi
call   1030 <acker@plt>
mov    $0x3,%edi
mov    $0x6,%esi
pop    %rax
jmp    1030 <acker@plt>

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

LLVM IR (-O2):
define i32 @__main() {
%1 = tail call i32 @acker(i32 3, i32 6)
%2 = tail call i32 @acker(i32 3, i32 6)
%3 = tail call i32 @acker(i32 3, i32 6)
%4 = tail call i32 @acker(i32 3, i32 6)
%5 = tail call i32 @acker(i32 3, i32 6)
%6 = tail call i32 @acker(i32 3, i32 6)
%7 = tail call i32 @acker(i32 3, i32 6)
%8 = tail call i32 @acker(i32 3, i32 6)
%9 = tail call i32 @acker(i32 3, i32 6)
%10 = tail call i32 @acker(i32 3, i32 6)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ f(int *);
int main() {
  int a = 0;
  f(&a);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @f(i32* %1)
ret i32 0
}
int snmp_get_errno(void) { return (0); }


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

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

LLVM IR (-O0):
define i32 @snmp_get_errno() {
ret i32 0
}

LLVM IR (-O2):
define i32 @snmp_get_errno() {
ret i32 0
}
AR0RX1(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{
  if ((p0[10000000]) <= (p1[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<AR0RX1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    0x2625a00(%rax),%eax
mov    -0x28(%rbp),%rcx
movslq -0x14(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jg     113f <AR0RX1+0x3f>
movl   $0x1,-0x4(%rbp)
jmp    1146 <AR0RX1+0x46>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AR0RX1>:
mov    0x2625a00(%r8),%edx
movslq %ecx,%rcx
xor    %eax,%eax
cmp    (%r9,%rcx,4),%edx
setle  %al
ret

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

LLVM IR (-O2):
define i32 @AR0RX1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture %4, i32* nocapture %5) {
%7 = getelementptr inbounds i32, i32* %4, i64 10000000
%8 = load i32, i32* %7
%9 = sext i32 %3 to i64
%10 = getelementptr inbounds i32, i32* %5, i64 %9
%11 = load i32, i32* %10
%12 = icmp sle i32 %8, %11
%13 = zext i1 %12 to i32
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ setMR(int);
void iinchip_init(void) { setMR(0x80); }


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

x86 assembly (clang, -O2):
<iinchip_init>:
mov    $0x80,%edi
jmp    1030 <setMR@plt>

LLVM IR (-O0):
define void @iinchip_init() {
%1 = call i32 @setMR(i32 128)
ret void
}

LLVM IR (-O2):
define void @iinchip_init() {
%1 = tail call i32 @setMR(i32 128)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t rot32l2(uint32_t x) { return (x << 2) | (x >> 30); }


x86 assembly (clang, -O0):
<rot32l2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x2,%eax
mov    -0x4(%rbp),%ecx
sar    $0x1e,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rot32l2>:
lea    0x0(,%rdi,4),%eax
sar    $0x1e,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rot32l2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 2
%5 = load i32, i32* %2
%6 = ashr i32 %5, 30
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @rot32l2(i32 %0) {
%2 = shl i32 %0, 2
%3 = ashr i32 %0, 30
%4 = or i32 %2, %3
ret i32 %4
}
char *ft_strcpy(char *dest, const char *src) {
  int i;
  i = 0;
  while (src[i]) {
    dest[i] = src[i];
    i++;
  }
  dest[i] = src[i];
  return (dest);
}


x86 assembly (clang, -O0):
<ft_strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1149 <ft_strcpy+0x49>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <ft_strcpy+0x13>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
test   %cl,%cl
je     1127 <ft_strcpy+0x27>
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
mov    %cl,(%rax,%rdx,1)
movzbl 0x1(%rsi,%rdx,1),%ecx
add    $0x1,%rdx
test   %cl,%cl
jne    1110 <ft_strcpy+0x10>
mov    %edx,%ecx
movb   $0x0,(%rax,%rcx,1)
ret
xor    %ecx,%ecx
movb   $0x0,(%rax,%rcx,1)
ret

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

LLVM IR (-O2):
define i8* @ft_strcpy(i8* returned writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %9, %5 ], [ 0, %2 ]
%7 = phi i8 [ %11, %5 ], [ %3, %2 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %6
store i8 %7, i8* %8
%9 = add nuw nsw i64 %6, 1
%10 = getelementptr inbounds i8, i8* %1, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5
%14 = and i64 %9, 4294967295
br label %15
15: ; preds = %13, %2
%16 = phi i64 [ 0, %2 ], [ %14, %13 ]
%17 = getelementptr inbounds i8, i8* %0, i64 %16
store i8 0, i8* %17
ret i8* %0
}
int gauss_get_sum(int min, int max) {
  if (max < min) {
    return 0;
  }
  return (int)((max + min) * (double)(max - min + 1) / 2);
}


x86 assembly (clang, -O0):
<gauss_get_sum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1122 <gauss_get_sum+0x22>
movl   $0x0,-0x4(%rbp)
jmp    1150 <gauss_get_sum+0x50>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
cvtsi2sd %eax,%xmm0
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xebb(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gauss_get_sum>:
xor    %eax,%eax
mov    %esi,%ecx
sub    %edi,%ecx
jl     1125 <gauss_get_sum+0x25>
add    %edi,%esi
cvtsi2sd %esi,%xmm0
add    $0x1,%ecx
cvtsi2sd %ecx,%xmm1
mulsd  %xmm0,%xmm1
mulsd  0xedf(%rip),%xmm1
cvttsd2si %xmm1,%eax
ret

LLVM IR (-O0):
define i32 @gauss_get_sum(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = load i32, i32* %4
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 0, i32* %3
br label %23
10: ; preds = %2
%11 = load i32, i32* %5
%12 = load i32, i32* %4
%13 = add nsw i32 %11, %12
%14 = sitofp i32 %13 to double
%15 = load i32, i32* %5
%16 = load i32, i32* %4
%17 = sub nsw i32 %15, %16
%18 = add nsw i32 %17, 1
%19 = sitofp i32 %18 to double
%20 = fmul double %14, %19
%21 = fdiv double %20, 2.000000e+00
%22 = fptosi double %21 to i32
store i32 %22, i32* %3
br label %23
23: ; preds = %10, %9
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @gauss_get_sum(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, %0
br i1 %3, label %13, label %4
4: ; preds = %2
%5 = add nsw i32 %1, %0
%6 = sitofp i32 %5 to double
%7 = sub i32 1, %0
%8 = add i32 %7, %1
%9 = sitofp i32 %8 to double
%10 = fmul double %6, %9
%11 = fmul double %10, 5.000000e-01
%12 = fptosi double %11 to i32
br label %13
13: ; preds = %2, %4
%14 = phi i32 [ %12, %4 ], [ 0, %2 ]
ret i32 %14
}
/* Type definitions */
typedef scalar_t__ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
scalar_t__ write(int /*<<< orphan*/, char const *, size_t);
void print(const char *s, size_t n) {
  while (n > 0) {
    ssize_t written = write(STDOUT_FILENO, s, n);
    if (written < 0) {
      break;
    }
    n -= written;
    s += written;
  }
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jbe    1175 <print+0x65>
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <write@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jge    1155 <print+0x45>
jmp    1175 <print+0x65>
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1120 <print+0x10>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
mov    0x2ece(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
test   %rbx,%rbx
je     114e <print+0x3e>
mov    (%r15),%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <write@plt>
sub    %rax,%rbx
add    %rax,%r14
test   %rax,%rax
jns    1130 <print+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
define void @print(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
br label %6
6: ; preds = %17, %2
%7 = load i64, i64* %4
%8 = icmp ugt i64 %7, 0
br i1 %8, label %9, label %24
9: ; preds = %6
%10 = load i32, i32* @STDOUT_FILENO
%11 = load i8*, i8** %3
%12 = load i64, i64* %4
%13 = call i64 @write(i32 %10, i8* %11, i64 %12)
store i64 %13, i64* %5
%14 = load i64, i64* %5
%15 = icmp slt i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %9
br label %24
17: ; preds = %9
%18 = load i64, i64* %5
%19 = load i64, i64* %4
%20 = sub i64 %19, %18
store i64 %20, i64* %4
%21 = load i64, i64* %5
%22 = load i8*, i8** %3
%23 = getelementptr inbounds i8, i8* %22, i64 %21
store i8* %23, i8** %3
br label %6
24: ; preds = %16, %6
ret void
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
define void @print(i8* nocapture %0, i64 %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i64 [ %1, %2 ], [ %11, %7 ]
%5 = phi i8* [ %0, %2 ], [ %12, %7 ]
%6 = icmp eq i64 %4, 0
br i1 %6, label %13, label %7
7: ; preds = %3
%8 = load i32, i32* @STDOUT_FILENO
%9 = tail call i64 @write(i32 %8, i8* %5, i64 %4)
%10 = icmp slt i64 %9, 0
%11 = sub i64 %4, %9
%12 = getelementptr inbounds i8, i8* %5, i64 %9
br i1 %10, label %13, label %3
13: ; preds = %7, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar(unsigned long long, int);
int /*<<< orphan*/ foo(unsigned long long, int);
int main() {
  foo(1ULL, 0x100000000ULL);
  bar(1ULL, 0x100000000ULL);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <foo@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <bar@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @foo(i64 1, i32 0)
%2 = call i32 @bar(i64 1, i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i64 1, i32 0)
%2 = tail call i32 @bar(i64 1, i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void explain(void) {
  fprintf(stderr, "Usage: ... prio bands NUMBER priomap P1 P2...\n");
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [47 x i8] c"Usage: ... prio bands NUMBER priomap P1 P2...\0A\00"
define void @explain() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [47 x i8] c"Usage: ... prio bands NUMBER priomap P1 P2...\0A\00"
define void @explain() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
ret void
}