xunge/DecIR huggingface dataset:
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ENODEV;
int /*<<< orphan*/ errno;
int fstat(int fd, struct stat *buf) {
  (void)fd;
  (void)buf;
  errno = ENODEV;
  return -1;
}


x86 assembly (clang, -O0):
<fstat>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec5(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fstat>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@ENODEV = global i32 0
@errno = global i32 0
define i32 @fstat(i32 %0, %struct.stat* %1) {
%3 = alloca i32
%4 = alloca %struct.stat*
store i32 %0, i32* %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i32, i32* %3
%6 = load %struct.stat*, %struct.stat** %4
%7 = load i32, i32* @ENODEV
store i32 %7, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@ENODEV = global i32 0
@errno = global i32 0
define i32 @fstat(i32 %0, %struct.stat* nocapture readnone %1) {
%3 = load i32, i32* @ENODEV
store i32 %3, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void print(char *beg, char *end) {
  while (beg <= end) {
    putchar(*beg);
    ++beg;
  }
  if (*(end - 1) != '\n') {
    putchar('\n');
  }
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
ja     114b <print+0x3b>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1120 <print+0x10>
mov    -0x10(%rbp),%rax
movsbl -0x1(%rax),%eax
cmp    $0xa,%eax
je     1166 <print+0x56>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
cmp    %rsi,%rdi
ja     1131 <print+0x21>
mov    %rdi,%rbx
nop
movsbl (%rbx),%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %r14,%rbx
jbe    1120 <print+0x10>
cmpb   $0xa,-0x1(%r14)
jne    1140 <print+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @print(i8* %0, i8* %1) {
%3 = icmp ugt i8* %0, %1
br i1 %3, label %10, label %4
4: ; preds = %2, %4
%5 = phi i8* [ %8, %4 ], [ %0, %2 ]
%6 = load i8, i8* %5
%7 = tail call i32 @putchar(i8 signext %6)
%8 = getelementptr inbounds i8, i8* %5, i64 1
%9 = icmp ugt i8* %8, %1
br i1 %9, label %10, label %4
10: ; preds = %4, %2
%11 = getelementptr inbounds i8, i8* %1, i64 -1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 10
br i1 %13, label %16, label %14
14: ; preds = %10
%15 = tail call i32 @putchar(i8 signext 10)
br label %16
16: ; preds = %14, %10
ret void
}
void vnum_result7(int *data) {
  int i;
  if (data[0]) {
    i = data[2];
    data[i] = 2;
  }
  data[0] = 0;
}


x86 assembly (clang, -O0):
<vnum_result7>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
je     112e <vnum_result7+0x2e>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0x2,(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<vnum_result7>:
cmpl   $0x0,(%rdi)
je     1110 <vnum_result7+0x10>
movslq 0x8(%rdi),%rax
movl   $0x2,(%rdi,%rax,4)
movl   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @vnum_result7(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = getelementptr inbounds i32, i32* %0, i64 2
%6 = load i32, i32* %5
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
store i32 2, i32* %8
br label %9
9: ; preds = %4, %1
store i32 0, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
void errorStrLen(void) { error("String literal too long\n"); }


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

x86 assembly (clang, -O2):
<errorStrLen>:
lea    0xee9(%rip),%rdi
jmp    1030 <error@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"String literal too long\0A\00"
define void @errorStrLen() {
%1 = call i32 @error(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"String literal too long\0A\00"
define void @errorStrLen() {
%1 = tail call i32 @error(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int gpi_exif_get_lilend(char *, int);
int gpe_theval(char *data, int tagind) {
  return (gpi_exif_get_lilend(data + tagind * 12 + 10, 4));
}


x86 assembly (clang, -O0):
<gpe_theval>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
imul   $0xc,-0xc(%rbp),%eax
cltq
add    %rax,%rdi
add    $0xa,%rdi
mov    $0x4,%esi
call   1030 <gpi_exif_get_lilend@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpe_theval>:
shl    $0x2,%esi
lea    (%rsi,%rsi,2),%eax
cltq
add    %rax,%rdi
add    $0xa,%rdi
mov    $0x4,%esi
jmp    1030 <gpi_exif_get_lilend@plt>

LLVM IR (-O0):
define i32 @gpe_theval(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 = load i32, i32* %4
%7 = mul nsw i32 %6, 12
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %5, i64 %8
%10 = getelementptr inbounds i8, i8* %9, i64 10
%11 = call i32 @gpi_exif_get_lilend(i8* %10, i32 4)
ret i32 %11
}

LLVM IR (-O2):
define i32 @gpe_theval(i8* %0, i32 %1) {
%3 = mul nsw i32 %1, 12
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = getelementptr inbounds i8, i8* %5, i64 10
%7 = tail call i32 @gpi_exif_get_lilend(i8* %6, i32 4)
ret i32 %7
}
/* Variables and functions */
int unsetenv(char const *);
int aeron_env_unset(const char *key) { return unsetenv(key); }


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

x86 assembly (clang, -O2):
<aeron_env_unset>:
jmp    1030 <unsetenv@plt>

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

LLVM IR (-O2):
define i32 @aeron_env_unset(i8* nocapture %0) {
%2 = tail call i32 @unsetenv(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: fsync file ...\n");
  exit(EX_USAGE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [23 x i8] c"usage: fsync file ...\0A\00"
@EX_USAGE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EX_USAGE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [23 x i8] c"usage: fsync file ...\0A\00"
@EX_USAGE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EX_USAGE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() { printf("Usage: demo_tcp_client hostname port\n"); }


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

x86 assembly (clang, -O2):
<usage>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"Usage: demo_tcp_client hostname port\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [37 x i8] c"Usage: demo_tcp_client hostname port\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int n;
  scanf("%d", &n);
  if (n % 2 == 0) {
    printf("É par!");
  } else {
    printf("É ímpar!");
  }
  printf("\n");
  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
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1164 <main+0x44>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
jmp    1170 <main+0x50>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
testb  $0x1,0x4(%rsp)
lea    0xeb5(%rip),%rax
lea    0xeb6(%rip),%rdi
cmove  %rax,%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [8 x i8] c"\C3\89 par!\00"
@.str.2 = [11 x i8] c"\C3\89 \C3\ADmpar!\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = and i32 %4, 1
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0)
%8 = call i32 @printf(i8* dereferenceable(1) %7)
%9 = call i32 @putchar(i32 10)
ret i32 0
}
/* Variables and functions */
int execvp(char const *, char **);
int Execvp(const char *path, const char *argv[]) {
  return execvp(path, (char **)argv);
}


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

x86 assembly (clang, -O2):
<Execvp>:
jmp    1030 <execvp@plt>

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

LLVM IR (-O2):
define i32 @Execvp(i8* %0, i8** %1) {
%3 = tail call i32 @execvp(i8* %0, i8** %1)
ret i32 %3
}
indreg0regx1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{
  if ((*p0) <= (p1[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<indreg0regx1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movswl (%rax),%eax
mov    -0x20(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movswl (%rcx,%rdx,2),%ecx
cmp    %ecx,%eax
jg     1146 <indreg0regx1+0x46>
movl   $0x1,-0x4(%rbp)
jmp    114d <indreg0regx1+0x4d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<indreg0regx1>:
movzwl (%r8),%edx
movslq %ecx,%rcx
xor    %eax,%eax
cmp    (%r9,%rcx,2),%dx
setle  %al
ret

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

LLVM IR (-O2):
define i32 @indreg0regx1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture %4, i16* nocapture %5) {
%7 = load i16, i16* %4
%8 = sext i32 %3 to i64
%9 = getelementptr inbounds i16, i16* %5, i64 %8
%10 = load i16, i16* %9
%11 = icmp sle i16 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
double cdfnor_(double *, double *);
double ccdfnor(double *x, double *para) { return cdfnor_(x, para); }


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

x86 assembly (clang, -O2):
<ccdfnor>:
jmp    1030 <cdfnor_@plt>

LLVM IR (-O0):
define double @ccdfnor(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = load double*, double** %4
%7 = call double @cdfnor_(double* %5, double* %6)
ret double %7
}

LLVM IR (-O2):
define double @ccdfnor(double* %0, double* %1) {
%3 = tail call double @cdfnor_(double* %0, double* %1)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ parloop(int);
int main(void) {
  parloop(400);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @parloop(i32 400)
ret i32 0
}
int are_equal_short(const void *a, const void *b) {
  return *(short *)a == *(short *)b;
}


x86 assembly (clang, -O0):
<are_equal_short>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%eax
mov    -0x10(%rbp),%rcx
movswl (%rcx),%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<are_equal_short>:
movzwl (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%cx
sete   %al
ret

LLVM IR (-O0):
define i32 @are_equal_short(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i16*
%7 = load i16, i16* %6
%8 = sext i16 %7 to i32
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i16*
%11 = load i16, i16* %10
%12 = sext i16 %11 to i32
%13 = icmp eq i32 %8, %12
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @are_equal_short(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i16*
%4 = load i16, i16* %3
%5 = bitcast i8* %1 to i16*
%6 = load i16, i16* %5
%7 = icmp eq i16 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long, long, double);
int main(void) {
  double a;
  long int i = 87654321, j;
  a = i;
  j = a;
  printf("i = %ld, j = %ld, a = %f\n", i, j, a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x5397fb1,-0x18(%rbp)
05
cvtsi2sdq -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
cvttsd2si -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
movsd  -0x10(%rbp),%xmm0
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [26 x i8] c"i = %ld, j = %ld, a = %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca i64
%4 = alloca i64
store i32 0, i32* %1
store i64 87654321, i64* %3
%5 = load i64, i64* %3
%6 = sitofp i64 %5 to double
store double %6, double* %2
%7 = load double, double* %2
%8 = fptosi double %7 to i64
store i64 %8, i64* %4
%9 = load i64, i64* %3
%10 = load i64, i64* %4
%11 = load double, double* %2
%12 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i64 %9, i64 %10, double %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"i = %ld, j = %ld, a = %f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i64 87654321, i64 87654321, double 0x4194E5FEC4000000)
ret i32 0
}
/* Variables and functions */
int cio_read(int);
int /*<<< orphan*/ cio_skip(int);
void j2k_read_crg() {
  int len;
  len = cio_read(2);

  cio_skip(len - 2);
}


x86 assembly (clang, -O0):
<j2k_read_crg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x2,%edi
call   1040 <cio_read@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
sub    $0x2,%edi
call   1030 <cio_skip@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<j2k_read_crg>:
push   %rax
mov    $0x2,%edi
call   1040 <cio_read@plt>
lea    -0x2(%rax),%edi
pop    %rax
jmp    1030 <cio_skip@plt>

LLVM IR (-O0):
define void @j2k_read_crg() {
%1 = alloca i32
%2 = call i32 @cio_read(i32 2)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = sub nsw i32 %3, 2
%5 = call i32 @cio_skip(i32 %4)
ret void
}

LLVM IR (-O2):
define void @j2k_read_crg() {
%1 = tail call i32 @cio_read(i32 2)
%2 = add nsw i32 %1, -2
%3 = tail call i32 @cio_skip(i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ fd_set;

/* Variables and functions */
int /*<<< orphan*/ FD_COPY(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void _d_gnu_fd_copy(fd_set *f, fd_set *t) { FD_COPY(f, t); }


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

x86 assembly (clang, -O2):
<_d_gnu_fd_copy>:
jmp    1030 <FD_COPY@plt>

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

LLVM IR (-O2):
define void @_d_gnu_fd_copy(i32* %0, i32* %1) {
%3 = tail call i32 @FD_COPY(i32* %0, i32* %1)
ret void
}
/* Type definitions */
struct tdb_context {
  int dummy;
};

/* Variables and functions */
int F_WRLCK;
int _tdb_unlockall(struct tdb_context *, int);
int ext2fs_tdb_lockall_unmark(struct tdb_context *tdb) {
  return _tdb_unlockall(tdb, F_WRLCK | 0x80000000);
}


x86 assembly (clang, -O0):
<ext2fs_tdb_lockall_unmark>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
or     $0x80000000,%esi
call   1030 <_tdb_unlockall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ext2fs_tdb_lockall_unmark>:
mov    0x2ec9(%rip),%rax
mov    $0x80000000,%esi
or     (%rax),%esi
jmp    1030 <_tdb_unlockall@plt>

LLVM IR (-O0):
%struct.tdb_context = type { i32 }
@F_WRLCK = global i32 0
define i32 @ext2fs_tdb_lockall_unmark(%struct.tdb_context* %0) {
%2 = alloca %struct.tdb_context*
store %struct.tdb_context* %0, %struct.tdb_context** %2
%3 = load %struct.tdb_context*, %struct.tdb_context** %2
%4 = load i32, i32* @F_WRLCK
%5 = or i32 %4, -2147483648
%6 = call i32 @_tdb_unlockall(%struct.tdb_context* %3, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
%struct.tdb_context = type { i32 }
@F_WRLCK = global i32 0
define i32 @ext2fs_tdb_lockall_unmark(%struct.tdb_context* %0) {
%2 = load i32, i32* @F_WRLCK
%3 = or i32 %2, -2147483648
%4 = tail call i32 @_tdb_unlockall(%struct.tdb_context* %0, i32 %3)
ret i32 %4
}
void g_thread_pool_get_num_threads() {}


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

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

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

LLVM IR (-O2):
define void @g_thread_pool_get_num_threads() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
void idt_int6(void) { print("!! Invalid Opcode "); }


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

x86 assembly (clang, -O2):
<idt_int6>:
lea    0xee9(%rip),%rdi
jmp    1030 <print@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"!! Invalid Opcode \00"
define void @idt_int6() {
%1 = call i32 @print(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"!! Invalid Opcode \00"
define void @idt_int6() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ stu_ptr;
typedef int /*<<< orphan*/ stu_1;
typedef int /*<<< orphan*/ ptr;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char const *argv[]) {
  struct student {
    long id;
    char name[1];
    int age;
  };
  struct student stu_1;
  struct student *stu_ptr;
  struct student *ptr = &stu_1;
  printf("%d\n", sizeof(stu_1));
  printf("%d\n", sizeof(stu_ptr));
  printf("%d\n", sizeof(ptr));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
lea    0xecb(%rip),%rdi
mov    $0x10,%esi
call   1030 <printf@plt>
lea    0xeba(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
lea    0xea9(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.student = type { i64, [1 x i8], i32 }
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 16)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 8)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 8)
ret i32 0
}
/* Variables and functions */
int do_an_allocation();
int main(int argc, char *argv[]) {
  int i = do_an_allocation();
  return i % 2;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <do_an_allocation@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <do_an_allocation@plt>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
and    $0xfffffffe,%ecx
sub    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (...) @do_an_allocation()
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = srem i32 %8, 2
ret i32 %9
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @do_an_allocation()
%4 = srem i32 %3, 2
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ read(int, void *, size_t);
ssize_t __read(int fd, void *buf, size_t count) { return read(fd, buf, count); }


x86 assembly (clang, -O0):
<__read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__read>:
jmp    1030 <read@plt>

LLVM IR (-O0):
define i32 @__read(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @read(i32 %7, i8* %8, i64 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @__read(i32 %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @read(i32 %0, i8* %1, i64 %2)
ret i32 %4
}
const char *X509_get_default_cert_file_env(void) { return ("SSL_CERT_FILE"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"SSL_CERT_FILE\00"
define i8* @X509_get_default_cert_file_env() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [14 x i8] c"SSL_CERT_FILE\00"
define i8* @X509_get_default_cert_file_env() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ lcd_init();
void display_init(void) { lcd_init(); }


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

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

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

LLVM IR (-O2):
define void @display_init() {
%1 = tail call i32 (...) @lcd_init()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
void LPCCOMxIntClear(unsigned long ulBase, unsigned long ulIntFlags) {
  DEBUG_ASSERT(ulBase == 0x40080000);
  DEBUG_ASSERT((ulIntFlags & ~(0x02000000 | 0x01000000 | 0x00800000)) == 0);
  (*((volatile unsigned long *)(ulBase + 0x00000120))) |= ulIntFlags;
}


x86 assembly (clang, -O0):
<LPCCOMxIntClear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x40080000,-0x8(%rbp)
40
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rax
and    $0xfffffffffc7fffff,%rax
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rax
mov    0x120(%rax),%rcx
or     %rdx,%rcx
mov    %rcx,0x120(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LPCCOMxIntClear>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
cmp    $0x40080000,%rbx
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
xor    %edi,%edi
test   $0xfffffffffc7fffff,%r14
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
or     %r14,0x120(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @LPCCOMxIntClear(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 = icmp eq i64 %5, 1074266112
%7 = zext i1 %6 to i32
%8 = call i32 @DEBUG_ASSERT(i32 %7)
%9 = load i64, i64* %4
%10 = and i64 %9, -58720257
%11 = icmp eq i64 %10, 0
%12 = zext i1 %11 to i32
%13 = call i32 @DEBUG_ASSERT(i32 %12)
%14 = load i64, i64* %4
%15 = load i64, i64* %3
%16 = add i64 %15, 288
%17 = inttoptr i64 %16 to i64*
%18 = load volatile i64, i64* %17
%19 = or i64 %18, %14
store volatile i64 %19, i64* %17
ret void
}

LLVM IR (-O2):
define void @LPCCOMxIntClear(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, 1074266112
%4 = zext i1 %3 to i32
%5 = tail call i32 @DEBUG_ASSERT(i32 %4)
%6 = and i64 %1, -58720257
%7 = icmp eq i64 %6, 0
%8 = zext i1 %7 to i32
%9 = tail call i32 @DEBUG_ASSERT(i32 %8)
%10 = add i64 %0, 288
%11 = inttoptr i64 %10 to i64*
%12 = load volatile i64, i64* %11
%13 = or i64 %12, %1
store volatile i64 %13, i64* %11
ret void
}
/* Variables and functions */
int /*<<< orphan*/ execlp(char *, char *, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void client_terminate(const int signo) {
  fprintf(stderr, "\n\n********** Timeout ***********\n");
  execlp("stty", "stty", "echo", NULL);
  exit(0);
}


x86 assembly (clang, -O0):
<client_terminate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
lea    0xeb5(%rip),%rsi
call   1030 <fprintf@plt>
lea    0xecb(%rip),%rsi
lea    0xec9(%rip),%rdx
xor    %eax,%eax
mov    %eax,%ecx
mov    %rsi,%rdi
call   1050 <execlp@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<client_terminate>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
lea    0xebf(%rip),%rsi
call   1030 <fprintf@plt>
lea    0xed5(%rip),%rdi
lea    0xed3(%rip),%rdx
mov    %rdi,%rsi
xor    %ecx,%ecx
call   1050 <execlp@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [34 x i8] c"\0A\0A********** Timeout ***********\0A\00"
@.str.1 = [5 x i8] c"stty\00"
@.str.2 = [5 x i8] c"echo\00"
define void @client_terminate(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @execlp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32* null)
%5 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int /*<<< orphan*/ clock_settime(int /*<<< orphan*/, struct timespec *);
void timet_h() {
  struct timespec *ptp;
  clock_settime(CLOCK_REALTIME, ptp);
}


x86 assembly (clang, -O0):
<timet_h>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <clock_settime@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timet_h>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <clock_settime@plt>

LLVM IR (-O0):
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
define void @timet_h() {
%1 = alloca %struct.timespec*
%2 = load i32, i32* @CLOCK_REALTIME
%3 = load %struct.timespec*, %struct.timespec** %1
%4 = call i32 @clock_settime(i32 %2, %struct.timespec* %3)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
define void @timet_h() {
%1 = load i32, i32* @CLOCK_REALTIME
%2 = tail call i32 @clock_settime(i32 %1, %struct.timespec* undef)
ret void
}
/* Variables and functions */
double countGHz();
double getHz() {
  double GHz;
  do {
    GHz = countGHz();
  } while (GHz < 0.1 || GHz > 10.0);
  return GHz * 1000000000.0;
}


x86 assembly (clang, -O0):
<getHz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <countGHz@plt>
movsd  %xmm0,-0x8(%rbp)
mov    $0x1,%al
movsd  0xed2(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
mov    %al,-0x9(%rbp)
ja     1153 <getHz+0x43>
movsd  -0x8(%rbp),%xmm0
movsd  0xebf(%rip),%xmm1
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1118 <getHz+0x8>
movsd  0xeaa(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getHz>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <countGHz@plt>
movsd  0xed1(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     1120 <getHz+0x10>
ucomisd 0xecb(%rip),%xmm0
ja     1120 <getHz+0x10>
mulsd  0xec9(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @getHz() {
%1 = alloca double
br label %2
2: ; preds = %10, %0
%3 = call double (...) @countGHz()
store double %3, double* %1
br label %4
4: ; preds = %2
%5 = load double, double* %1
%6 = fcmp olt double %5, 1.000000e-01
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = load double, double* %1
%9 = fcmp ogt double %8, 1.000000e+01
br label %10
10: ; preds = %7, %4
%11 = phi i1 [ true, %4 ], [ %9, %7 ]
br i1 %11, label %2, label %12
12: ; preds = %10
%13 = load double, double* %1
%14 = fmul double %13, 1.000000e+09
ret double %14
}

LLVM IR (-O2):
define double @getHz() {
br label %1
1: ; preds = %1, %0
%2 = tail call double (...) @countGHz()
%3 = fcmp olt double %2, 1.000000e-01
%4 = fcmp ogt double %2, 1.000000e+01
%5 = or i1 %3, %4
br i1 %5, label %1, label %6
6: ; preds = %1
%7 = fmul double %2, 1.000000e+09
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ buf_free();
void b_free(void) { buf_free(); }


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

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

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

LLVM IR (-O2):
define void @b_free() {
%1 = tail call i32 (...) @buf_free()
ret void
}
void tdefault_fetch_registers(struct target_ops *self, struct regcache *arg1,
                              int arg2) {}


x86 assembly (clang, -O0):
<tdefault_fetch_registers>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.target_ops = type opaque
%struct.regcache = type opaque
define void @tdefault_fetch_registers(%struct.target_ops* nocapture %0, %struct.regcache* nocapture %1, i32 %2) {
ret void
}
/* Variables and functions */
float fmin(float, float);
float green(float ratio) {
  return fmin(1.0f, -2.44f * ratio * ratio + 2.15f * ratio + 0.369f);
}


x86 assembly (clang, -O0):
<green>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xee7(%rip),%xmm1
mulss  -0x4(%rbp),%xmm1
movss  -0x4(%rbp),%xmm2
movss  0xed1(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  0xeb8(%rip),%xmm0
addss  %xmm0,%xmm1
movss  0xea8(%rip),%xmm0
call   1030 <fmin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<green>:
movss  0xef8(%rip),%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  0xeec(%rip),%xmm0
addss  %xmm1,%xmm0
addss  0xee4(%rip),%xmm0
minss  0xee0(%rip),%xmm0
ret

LLVM IR (-O0):
define float @green(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float 0xC003851EC0000000, %3
%5 = load float, float* %2
%6 = load float, float* %2
%7 = fmul float 0x4001333340000000, %6
%8 = call float @llvm.fmuladd.f32(float %4, float %5, float %7)
%9 = fadd float %8, 0x3FD79DB220000000
%10 = call float @fmin(float 1.000000e+00, float %9)
ret float %10
}

LLVM IR (-O2):
define float @green(float %0) {
%2 = fmul float %0, 0xC003851EC0000000
%3 = fmul float %0, 0x4001333340000000
%4 = tail call float @llvm.fmuladd.f32(float %2, float %0, float %3)
%5 = fadd float %4, 0x3FD79DB220000000
%6 = tail call nsz float @llvm.minnum.f32(float %5, float 1.000000e+00)
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int nondet_int();
int main() {
  int i, n = nondet_int(), sn = 0;
  for (i = 1; i <= n; i++) {
    sn = sn + (2);
  }
  assert(sn == n * (2) || sn == 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <nondet_int@plt>
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     116a <main+0x4a>
mov    -0x10(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1147 <main+0x27>
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
shl    $0x1,%edx
mov    $0x1,%al
cmp    %edx,%ecx
mov    %al,-0x11(%rbp)
je     118a <main+0x6a>
cmpl   $0x0,-0x10(%rbp)
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <nondet_int@plt>
lea    (%rax,%rax,1),%ecx
test   %eax,%eax
cmovg  %ecx,%ebx
cmp    %ecx,%ebx
sete   %al
test   %ebx,%ebx
sete   %cl
or     %al,%cl
movzbl %cl,%edi
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (...) @nondet_int()
store i32 %5, i32* %3
store i32 0, i32* %4
store i32 1, i32* %2
br label %6
6: ; preds = %13, %0
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = icmp sle i32 %7, %8
br i1 %9, label %10, label %16
10: ; preds = %6
%11 = load i32, i32* %4
%12 = add nsw i32 %11, 2
store i32 %12, i32* %4
br label %13
13: ; preds = %10
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %6
16: ; preds = %6
%17 = load i32, i32* %4
%18 = load i32, i32* %3
%19 = mul nsw i32 %18, 2
%20 = icmp eq i32 %17, %19
br i1 %20, label %24, label %21
21: ; preds = %16
%22 = load i32, i32* %4
%23 = icmp eq i32 %22, 0
br label %24
24: ; preds = %21, %16
%25 = phi i1 [ true, %16 ], [ %23, %21 ]
%26 = zext i1 %25 to i32
%27 = call i32 @assert(i32 %26)
%28 = load i32, i32* %1
ret i32 %28
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @nondet_int()
%2 = shl i32 %1, 1
%3 = icmp sgt i32 %1, 0
%4 = select i1 %3, i32 %2, i32 0
%5 = icmp eq i32 %4, %2
%6 = icmp eq i32 %4, 0
%7 = or i1 %5, %6
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
ret i32 0
}
int regulator_enable(struct regulator *r) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.regulator = type opaque
define i32 @regulator_enable(%struct.regulator* nocapture readnone %0) {
ret i32 0
}
double polynomial(double x, int n) {
  if (n == 0)
    return 1;
  else
    return x * polynomial(x, n - 1);
}


x86 assembly (clang, -O0):
<polynomial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    113c <polynomial+0x2c>
movsd  0xece(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1167 <polynomial+0x57>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x14(%rbp),%edi
sub    $0x1,%edi
call   1030 <polynomial@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<polynomial>:
push   %rax
test   %edi,%edi
je     1129 <polynomial+0x19>
add    $0xffffffff,%edi
movsd  %xmm0,(%rsp)
call   1030 <polynomial@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret
movsd  0xecf(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @polynomial(double %0, i32 %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca i32
store double %0, double* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store double 1.000000e+00, double* %3
br label %16
9: ; preds = %2
%10 = load double, double* %4
%11 = load double, double* %4
%12 = load i32, i32* %5
%13 = sub nsw i32 %12, 1
%14 = call double @polynomial(double %11, i32 %13)
%15 = fmul double %10, %14
store double %15, double* %3
br label %16
16: ; preds = %9, %8
%17 = load double, double* %3
ret double %17
}

LLVM IR (-O2):
define double @polynomial(double %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2, %6
%5 = phi double [ %9, %6 ], [ 1.000000e+00, %2 ]
ret double %5
6: ; preds = %2
%7 = add nsw i32 %1, -1
%8 = tail call double @polynomial(double %0, i32 %7)
%9 = fmul double %8, %0
br label %4
}
int ft_isascii(int c) {
  int retour;
  retour = 0;
  if (c >= 0 && c <= 127)
    retour = 1;
  return (retour);
}


x86 assembly (clang, -O0):
<ft_isascii>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     1129 <ft_isascii+0x29>
cmpl   $0x7f,-0x4(%rbp)
jg     1129 <ft_isascii+0x29>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isascii>:
xor    %eax,%eax
cmp    $0x80,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @ft_isascii(i32 %0) {
%2 = icmp ult i32 %0, 128
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
char boardColumnToChar(int);
void validColumnIndicesConvertedToUpperCaseChars(void) {
  assert(boardColumnToChar(0) == 'A');
  assert(boardColumnToChar(18) == 'T');
}


x86 assembly (clang, -O0):
<validColumnIndicesConvertedToUpperCaseChars>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <boardColumnToChar@plt>
movsbl %al,%eax
cmp    $0x41,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x12,%edi
call   1040 <boardColumnToChar@plt>
movsbl %al,%eax
cmp    $0x54,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<validColumnIndicesConvertedToUpperCaseChars>:
push   %rax
xor    %edi,%edi
call   1040 <boardColumnToChar@plt>
xor    %edi,%edi
cmp    $0x41,%al
sete   %dil
call   1030 <assert@plt>
mov    $0x12,%edi
call   1040 <boardColumnToChar@plt>
xor    %edi,%edi
cmp    $0x54,%al
sete   %dil
pop    %rax
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @validColumnIndicesConvertedToUpperCaseChars() {
%1 = call signext i8 @boardColumnToChar(i32 0)
%2 = sext i8 %1 to i32
%3 = icmp eq i32 %2, 65
%4 = zext i1 %3 to i32
%5 = call i32 @assert(i32 %4)
%6 = call signext i8 @boardColumnToChar(i32 18)
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 84
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
ret void
}

LLVM IR (-O2):
define void @validColumnIndicesConvertedToUpperCaseChars() {
%1 = tail call signext i8 @boardColumnToChar(i32 0)
%2 = icmp eq i8 %1, 65
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call signext i8 @boardColumnToChar(i32 18)
%6 = icmp eq i8 %5, 84
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
ret void
}