xunge/DecIR huggingface dataset:
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ printf(char *, int);
main() {
  int c, nl;
  nl = 0;
  while ((c = getchar()) != EOF)
    if (c == '\n')
      ++nl;
  printf("Lines counting: %d", nl);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea1(%rip),%rcx
cmp    (%rcx),%eax
je     1167 <main+0x47>
cmpl   $0xa,-0x8(%rbp)
jne    1162 <main+0x42>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <main+0x16>
mov    -0xc(%rbp),%esi
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb4(%rip),%r14
cmp    (%r14),%eax
je     1156 <main+0x36>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
xor    %ecx,%ecx
cmp    $0xa,%eax
sete   %cl
add    %ecx,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r14),%eax
jne    1140 <main+0x20>
lea    0xea3(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i32 0
@.str = [19 x i8] c"Lines counting: %d\00"
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %13, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %10, %4 ], [ %1, %0 ]
%6 = phi i32 [ %9, %4 ], [ 0, %0 ]
%7 = icmp eq i32 %5, 10
%8 = zext i1 %7 to i32
%9 = add nuw nsw i32 %6, %8
%10 = tail call i32 (...) @getchar()
%11 = load i32, i32* @EOF
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %4
13: ; preds = %4, %0
%14 = phi i32 [ 0, %0 ], [ %9, %4 ]
%15 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %14)
ret i32 0
}
/* Type definitions */
struct sigaction {
  int /*<<< orphan*/ sa_mask;
  scalar_t__ sa_flags;
  scalar_t__ sa_handler;
};

/* Variables and functions */
int /*<<< orphan*/ sigaction(int /*<<< orphan*/, struct sigaction *,
                             struct sigaction *);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
void main() {
  struct sigaction sa;
  sa.sa_handler = 0;
  sa.sa_flags = 0;
  sigemptyset(&sa.sa_mask);
  sigaction(0, &sa, (struct sigaction *)0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0x0,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
lea    -0x18(%rbp),%rdi
call   1040 <sigemptyset@plt>
xor    %edi,%edi
lea    -0x18(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigaction@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rsp)
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <sigemptyset@plt>
xor    %edi,%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1030 <sigaction@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.sigaction = type { i32, i64, i64 }
define void @main() {
%1 = alloca %struct.sigaction
%2 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %1, i32 0, i32 2
store i64 0, i64* %2
%3 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %1, i32 0, i32 1
store i64 0, i64* %3
%4 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %1, i32 0, i32 0
%5 = call i32 @sigemptyset(i32* %4)
%6 = call i32 @sigaction(i32 0, %struct.sigaction* %1, %struct.sigaction* null)
ret void
}

LLVM IR (-O2):
%struct.sigaction = type { i32, i64, i64 }
define void @main() {
%1 = alloca %struct.sigaction
%2 = bitcast %struct.sigaction* %1 to i8*
%3 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %1, i64 0, i32 1
%4 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %1, i64 0, i32 0
%5 = bitcast i64* %3 to i8*
%6 = call i32 @sigemptyset(i32* %4)
%7 = call i32 @sigaction(i32 0, %struct.sigaction* %1, %struct.sigaction* null)
ret void
}
/* Variables and functions */
char const *hashtable_iter_key(void *);
const char *json_object_iter_key(void *iter) {
  if (!iter)
    return NULL;
  return hashtable_iter_key(iter);
}


x86 assembly (clang, -O0):
<json_object_iter_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <json_object_iter_key+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1141 <json_object_iter_key+0x31>
mov    -0x10(%rbp),%rdi
call   1030 <hashtable_iter_key@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<json_object_iter_key>:
test   %rdi,%rdi
je     111a <json_object_iter_key+0xa>
jmp    1030 <hashtable_iter_key@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @json_object_iter_key(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %7, label %6
6: ; preds = %1
store i8* null, i8** %2
br label %10
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = call i8* @hashtable_iter_key(i8* %8)
store i8* %9, i8** %2
br label %10
10: ; preds = %7, %6
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
define i8* @json_object_iter_key(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i8* @hashtable_iter_key(i8* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i8* [ %4, %3 ], [ null, %1 ]
ret i8* %6
}
/* Type definitions */
typedef int num;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ fputc(int, int /*<<< orphan*/ *);
int mywav_fwi16(FILE *fd, int num) {
  if (fputc((num)&0xff, fd) < 0)
    return (-1);
  if (fputc((num >> 8) & 0xff, fd) < 0)
    return (-1);
  return (0);
}


x86 assembly (clang, -O0):
<mywav_fwi16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%edi
and    $0xff,%edi
mov    -0x10(%rbp),%rsi
call   1030 <fputc@plt>
cmp    $0x0,%rax
jge    1147 <mywav_fwi16+0x37>
movl   $0xffffffff,-0x4(%rbp)
jmp    1179 <mywav_fwi16+0x69>
mov    -0x14(%rbp),%edi
sar    $0x8,%edi
and    $0xff,%edi
mov    -0x10(%rbp),%rsi
call   1030 <fputc@plt>
cmp    $0x0,%rax
jge    1172 <mywav_fwi16+0x62>
movl   $0xffffffff,-0x4(%rbp)
jmp    1179 <mywav_fwi16+0x69>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mywav_fwi16>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
movzbl %bl,%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
test   %rax,%rax
js     113a <mywav_fwi16+0x2a>
movzbl %bh,%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
sar    $0x3f,%rax
jmp    113f <mywav_fwi16+0x2f>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @mywav_fwi16(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 = and i32 %6, 255
%8 = load i32*, i32** %4
%9 = call i64 @fputc(i32 %7, i32* %8)
%10 = icmp slt i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 -1, i32* %3
br label %21
12: ; preds = %2
%13 = load i32, i32* %5
%14 = ashr i32 %13, 8
%15 = and i32 %14, 255
%16 = load i32*, i32** %4
%17 = call i64 @fputc(i32 %15, i32* %16)
%18 = icmp slt i64 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %12
store i32 -1, i32* %3
br label %21
20: ; preds = %12
store i32 0, i32* %3
br label %21
21: ; preds = %20, %19, %11
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @mywav_fwi16(i32* nocapture %0, i32 %1) {
%3 = and i32 %1, 255
%4 = tail call i64 @fputc(i32 %3, i32* %0)
%5 = icmp slt i64 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %2
%7 = lshr i32 %1, 8
%8 = and i32 %7, 255
%9 = tail call i64 @fputc(i32 %8, i32* %0)
%10 = ashr i64 %9, 63
%11 = trunc i64 %10 to i32
br label %12
12: ; preds = %6, %2
%13 = phi i32 [ -1, %2 ], [ %11, %6 ]
ret i32 %13
}
int _falmbGenericTextEscapement() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @_falmbGenericTextEscapement() {
ret i32 0
}
/* Type definitions */
struct timespec {
  int tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ nanosleep(struct timespec *, int /*<<< orphan*/ *);
void do_sleep_ms(int ms) {
  struct timespec req;
  req.tv_sec = 0;
  req.tv_nsec = ms * 1000000;
  nanosleep(&req, NULL);
}


x86 assembly (clang, -O0):
<do_sleep_ms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
imul   $0xf4240,-0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_sleep_ms>:
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
imul   $0xf4240,%edi,%eax
mov    %eax,0x8(%rsp)
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
define void @do_sleep_ms(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.timespec
store i32 %0, i32* %2
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
store i64 0, i64* %4
%5 = load i32, i32* %2
%6 = mul nsw i32 %5, 1000000
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
store i32 %6, i32* %7
%8 = call i32 @nanosleep(%struct.timespec* %3, i32* null)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
define void @do_sleep_ms(i32 %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
store i64 0, i64* %4
%5 = mul nsw i32 %0, 1000000
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i32 %5, i32* %6
%7 = call i32 @nanosleep(%struct.timespec* %2, i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char const *, char *,
                          char const *);
void gru_cli_program_description(const char *program, const char *description) {
  printf("\t%s%s%-15s%s\t%s\n", "\x1B[00m", "\x1B[01;37m", program, "\x1B[00m",
         description);
}


x86 assembly (clang, -O0):
<gru_cli_program_description>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r9
lea    0xed1(%rip),%rdi
lea    0xedb(%rip),%r8
lea    0xeda(%rip),%rdx
mov    %r8,%rsi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gru_cli_program_description>:
mov    %rsi,%r9
mov    %rdi,%rcx
lea    0xee3(%rip),%rdi
lea    0xef3(%rip),%rdx
lea    0xee6(%rip),%rsi
mov    %rsi,%r8
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"\09%s%s%-15s%s\09%s\0A\00"
@.str.1 = [6 x i8] c"\1B[00m\00"
@.str.2 = [9 x i8] c"\1B[01;37m\00"
define void @gru_cli_program_description(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 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"\09%s%s%-15s%s\09%s\0A\00"
@.str.1 = [6 x i8] c"\1B[00m\00"
@.str.2 = [9 x i8] c"\1B[01;37m\00"
define void @gru_cli_program_description(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %1)
ret void
}
void drop_capabilities(void) {}


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

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

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

LLVM IR (-O2):
define void @drop_capabilities() {
ret void
}
void checkSerialExist() {}


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

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

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

LLVM IR (-O2):
define void @checkSerialExist() {
ret void
}
void clear_string(char string[1000]) {
  int i = 0;
  while (i < 1000) {
    string[i] = 0;
    i++;
  };
}


x86 assembly (clang, -O0):
<clear_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3e8,-0xc(%rbp)
jge    1136 <clear_string+0x36>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <clear_string+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_string>:
push   %rax
mov    $0x3e8,%edx
xor    %esi,%esi
call   1030 <memset@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @clear_string(i8* nocapture writeonly %0) {
ret void
}
/* Variables and functions */
scalar_t__ isdigit(char);
int strcountd(char *s) {
  int n;
  for (n = 0; *s != '\0'; ++s) {
    if (isdigit(*s)) {
      n++;
    }
  }
  return n;
}


x86 assembly (clang, -O0):
<strcountd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1168 <strcountd+0x58>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1152 <strcountd+0x42>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1157 <strcountd+0x47>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1123 <strcountd+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcountd>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     114c <strcountd+0x3c>
mov    %rdi,%rbx
add    $0x1,%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %al,%edi
call   1030 <isdigit@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebp
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <strcountd+0x20>
jmp    114e <strcountd+0x3e>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @strcountd(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %13, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %12, %4 ], [ %0, %1 ]
%8 = tail call i64 @isdigit(i8 signext %5)
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
%11 = add nuw nsw i32 %6, %10
%12 = getelementptr inbounds i8, i8* %7, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %16
}
/* Variables and functions */
int strpos(char *, char *);
int strnpos(char *str, char *substr, int window) {
  int retval = strpos(str, substr);
  if (retval > window)
    retval = -1;
  return retval;
}


x86 assembly (clang, -O0):
<strnpos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strpos@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    1146 <strnpos+0x36>
movl   $0xffffffff,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strnpos>:
push   %rbx
mov    %edx,%ebx
call   1030 <strpos@plt>
cmp    %ebx,%eax
mov    $0xffffffff,%ecx
cmovg  %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @strnpos(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = call i32 @strpos(i8* %8, i8* %9)
store i32 %10, i32* %7
%11 = load i32, i32* %7
%12 = load i32, i32* %6
%13 = icmp sgt i32 %11, %12
br i1 %13, label %14, label %15
14: ; preds = %3
store i32 -1, i32* %7
br label %15
15: ; preds = %14, %3
%16 = load i32, i32* %7
ret i32 %16
}

LLVM IR (-O2):
define i32 @strnpos(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @strpos(i8* %0, i8* %1)
%5 = icmp sgt i32 %4, %2
%6 = select i1 %5, i32 -1, i32 %4
ret i32 %6
}
unsigned int check_uint() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @check_uint() {
ret i32 0
}
void g_convert_with_fallback() {}


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

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

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

LLVM IR (-O2):
define void @g_convert_with_fallback() {
ret void
}
void pthread_rwlock_tryrdlock() {}


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

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

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

LLVM IR (-O2):
define void @pthread_rwlock_tryrdlock() {
ret void
}
int strlen_utf8(char *s) {
  int i = 0, j = 0;
  while (s[i]) {
    if ((s[i] & 0xc0) != 0x80)
      j++;
    i++;
  }
  return j;
}


x86 assembly (clang, -O0):
<strlen_utf8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     115b <strlen_utf8+0x5b>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
and    $0xc0,%eax
cmp    $0x80,%eax
je     114d <strlen_utf8+0x4d>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <strlen_utf8+0x16>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen_utf8>:
mov    (%rdi),%cl
test   %cl,%cl
je     1129 <strlen_utf8+0x29>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
and    $0xc0,%cl
xor    %edx,%edx
cmp    $0x80,%cl
setne  %dl
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <strlen_utf8+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @strlen_utf8(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %12, %4 ], [ 0, %1 ]
%6 = phi i8 [ %14, %4 ], [ %2, %1 ]
%7 = phi i32 [ %11, %4 ], [ 0, %1 ]
%8 = and i8 %6, -64
%9 = icmp ne i8 %8, -128
%10 = zext i1 %9 to i32
%11 = add nuw nsw i32 %7, %10
%12 = add nuw nsw i64 %5, 1
%13 = getelementptr inbounds i8, i8* %0, i64 %12
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %4
16: ; preds = %4, %1
%17 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %17
}
int reversed_number(long int number) {
  int reversed;
  reversed = 0;
  while (number != 0) {
    reversed = reversed * 10;
    reversed = reversed + number % 10;
    number = number / 10;
  }
  return reversed;
}


x86 assembly (clang, -O0):
<reversed_number>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1158 <reversed_number+0x58>
imul   $0xa,-0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    -0x18(%rbp),%rax
add    %rdx,%rax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rax,-0x8(%rbp)
jmp    110f <reversed_number+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reversed_number>:
test   %rdi,%rdi
je     1152 <reversed_number+0x52>
mov    %rdi,%rcx
xor    %eax,%eax
movabs $0x6666666666666667,%r8
66 66 66
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    (%rax,%rax,4),%esi
mov    %rcx,%rax
imul   %r8
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x2,%rdx
add    %rax,%rdx
lea    (%rdx,%rdx,1),%eax
lea    (%rax,%rax,4),%eax
mov    %ecx,%edi
sub    %eax,%edi
lea    (%rdi,%rsi,2),%eax
add    $0x9,%rcx
cmp    $0x12,%rcx
mov    %rdx,%rcx
ja     1120 <reversed_number+0x20>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @reversed_number(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %9, %3 ], [ 0, %1 ]
%5 = phi i64 [ %10, %3 ], [ %0, %1 ]
%6 = mul nsw i32 %4, 10
%7 = srem i64 %5, 10
%8 = trunc i64 %7 to i32
%9 = add i32 %6, %8
%10 = sdiv i64 %5, 10
%11 = add i64 %5, 9
%12 = icmp ult i64 %11, 19
br i1 %12, label %13, label %3
13: ; preds = %3, %1
%14 = phi i32 [ 0, %1 ], [ %9, %3 ]
ret i32 %14
}
unsigned short int cast_int_ushort(int x) { return (unsigned short int)x; }


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

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

LLVM IR (-O0):
define zeroext i16 @cast_int_ushort(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i16
ret i16 %4
}

LLVM IR (-O2):
define zeroext i16 @cast_int_ushort(i32 %0) {
%2 = trunc i32 %0 to i16
ret i16 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ __u8;

/* Variables and functions */
int /*<<< orphan*/ I2C_SLAVE;
int ioctl(int, int /*<<< orphan*/, int /*<<< orphan*/);
int i2c_set_slave(int fd, __u8 slave) { return ioctl(fd, I2C_SLAVE, slave); }


x86 assembly (clang, -O0):
<i2c_set_slave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%edx
call   1030 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_set_slave>:
mov    %esi,%edx
mov    0x2ecf(%rip),%rax
mov    (%rax),%esi
jmp    1030 <ioctl@plt>

LLVM IR (-O0):
@I2C_SLAVE = global i32 0
define i32 @i2c_set_slave(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* @I2C_SLAVE
%7 = load i32, i32* %4
%8 = call i32 @ioctl(i32 %5, i32 %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@I2C_SLAVE = global i32 0
define i32 @i2c_set_slave(i32 %0, i32 %1) {
%3 = load i32, i32* @I2C_SLAVE
%4 = tail call i32 @ioctl(i32 %0, i32 %3, i32 %1)
ret i32 %4
}
/* Variables and functions */
size_t strlen(char *);
char tolower(char);
void to_lower(char *str) {
  size_t len = strlen(str);
  size_t i;
  for (i = 0; i < len; ++i) {
    str[i] = tolower(str[i]);
  }
}


x86 assembly (clang, -O0):
<to_lower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    117e <to_lower+0x5e>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <tolower@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1141 <to_lower+0x21>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_lower>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
call   1030 <strlen@plt>
test   %rax,%rax
je     1157 <to_lower+0x37>
mov    %rax,%r14
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%edi
call   1040 <tolower@plt>
mov    %al,(%r15,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1140 <to_lower+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @to_lower(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %9, %4 ], [ 0, %1 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = tail call signext i8 @tolower(i8 signext %7)
store i8 %8, i8* %6
%9 = add nuw i64 %5, 1
%10 = icmp eq i64 %9, %2
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
void XSetPlaneMask() {}


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

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

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

LLVM IR (-O2):
define void @XSetPlaneMask() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, ...);
int printextralines(int playerwins, int numberoftries, char hiddenword[7]) {
  if (playerwins == 1) {
    printf("The player wins the game with %d tries.\n", numberoftries);
  } else {
    printf("The player lost the game. %d tries were not enough to get to the "
           "word %s.\n",
           numberoftries, hiddenword);
  }
}


x86 assembly (clang, -O0):
<printextralines>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1142 <printextralines+0x32>
mov    -0xc(%rbp),%esi
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1157 <printextralines+0x47>
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printextralines>:
push   %rax
cmp    $0x1,%edi
jne    1126 <printextralines+0x16>
lea    0xee3(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
pop    %rcx
ret
lea    0xefc(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [41 x i8] c"The player wins the game with %d tries.\0A\00"
@.str.1 = [75 x i8] c"The player lost the game. %d tries were not enough to get to the word %s.\0A\00"
define i32 @printextralines(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
%8 = load i32, i32* %5
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %13
10: ; preds = %3
%11 = load i32, i32* %6
%12 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %11)
br label %17
13: ; preds = %3
%14 = load i32, i32* %6
%15 = load i8*, i8** %7
%16 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.1, i64 0, i64 0), i32 %14, i8* %15)
br label %17
17: ; preds = %13, %10
%18 = load i32, i32* %4
ret i32 %18
}

LLVM IR (-O2):
@.str = [41 x i8] c"The player wins the game with %d tries.\0A\00"
@.str.1 = [75 x i8] c"The player lost the game. %d tries were not enough to get to the word %s.\0A\00"
define i32 @printextralines(i32 %0, i32 %1, i8* %2) {
%4 = icmp eq i32 %0, 1
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %1)
br label %9
7: ; preds = %3
%8 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.1, i64 0, i64 0), i32 %1, i8* %2)
br label %9
9: ; preds = %7, %5
ret i32 undef
}
/* Variables and functions */
double strtod(char const *, char const **);
double atof(const char *s) { return strtod(s, (const char **)((void *)0)); }


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

x86 assembly (clang, -O2):
<atof>:
xor    %esi,%esi
jmp    1030 <strtod@plt>

LLVM IR (-O0):
define double @atof(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call double @strtod(i8* %3, i8** null)
ret double %4
}

LLVM IR (-O2):
define double @atof(i8* nocapture %0) {
%2 = tail call double @strtod(i8* nocapture %0, i8** null)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ nrerror(char *);
void usage(void) {
  nrerror("usage:\n"
          "RNAcofold [-a] [-c] [-f concfile]\n"
          "[-p[0]] [-C] [-T temp] [-4] [-d[2|3]] [-noGU] [-noCloseGU]\n"
          "[-noLP] [-e e_set] [-noPS] [-P paramfile] [-nsp pairs] [-S scale] "
          "[-noconv]\n");
}


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

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

LLVM IR (-O0):
@.str = [177 x i8] c"usage:\0ARNAcofold [-a] [-c] [-f concfile]\0A[-p[0]] [-C] [-T temp] [-4] [-d[2|3]] [-noGU] [-noCloseGU]\0A[-noLP] [-e e_set] [-noPS] [-P paramfile] [-nsp pairs] [-S scale] [-noconv]\0A\00"
define void @usage() {
%1 = call i32 @nrerror(i8* getelementptr inbounds ([177 x i8], [177 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [177 x i8] c"usage:\0ARNAcofold [-a] [-c] [-f concfile]\0A[-p[0]] [-C] [-T temp] [-4] [-d[2|3]] [-noGU] [-noCloseGU]\0A[-noLP] [-e e_set] [-noPS] [-P paramfile] [-nsp pairs] [-S scale] [-noconv]\0A\00"
define void @usage() {
%1 = tail call i32 @nrerror(i8* getelementptr inbounds ([177 x i8], [177 x i8]* @.str, i64 0, i64 0))
ret void
}
int usbh_polling_root_hubs(void) {
  int ret, change = 0;
  return change;
}


x86 assembly (clang, -O0):
<usbh_polling_root_hubs>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @usbh_polling_root_hubs() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ x;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, int);
void put_uint32(void *p, uint32_t x) { memcpy(p, (const void *)&x, sizeof(x)); }


x86 assembly (clang, -O0):
<put_uint32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_uint32>:
push   %rax
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @put_uint32(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 = bitcast i32* %4 to i8*
%7 = call i32 @memcpy(i8* %5, i8* %6, i32 4)
ret void
}

LLVM IR (-O2):
define void @put_uint32(i8* %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = bitcast i32* %3 to i8*
%5 = call i32 @memcpy(i8* %0, i8* %4, i32 4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef size_t uint32_t;

/* Variables and functions */
void store_UINT64(uint64_t *arr, uint32_t idx, uint64_t value) {
  arr[idx] = value;
}


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

x86 assembly (clang, -O2):
<store_UINT64>:
mov    %edx,(%rdi,%rsi,4)
ret

LLVM IR (-O0):
define void @store_UINT64(i32* %0, i64 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i32
store i32* %0, i32** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = load i32*, i32** %4
%9 = load i64, i64* %5
%10 = getelementptr inbounds i32, i32* %8, i64 %9
store i32 %7, i32* %10
ret void
}

LLVM IR (-O2):
define void @store_UINT64(i32* nocapture writeonly %0, i64 %1, i32 %2) {
%4 = getelementptr inbounds i32, i32* %0, i64 %1
store i32 %2, i32* %4
ret void
}
/* Variables and functions */
double THRandom_cauchy(double, double);
double Random_cauchy(double median, double sigma) {
  return THRandom_cauchy(median, sigma);
}


x86 assembly (clang, -O0):
<Random_cauchy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <THRandom_cauchy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Random_cauchy>:
jmp    1030 <THRandom_cauchy@plt>

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

LLVM IR (-O2):
define double @Random_cauchy(double %0, double %1) {
%3 = tail call double @THRandom_cauchy(double %0, double %1)
ret double %3
}
/* Variables and functions */
int bar(int);
int foo(int);
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int x = 10;
  printf("foo(%d) = %d\n", x, foo(x));
  printf("bar(%d) = %d\n", x, bar(x));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <foo@plt>
mov    -0x10(%rbp),%esi
mov    %eax,%edx
lea    0xea0(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <bar@plt>
mov    -0xc(%rbp),%esi
mov    %eax,%edx
lea    0xe8f(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
call   1050 <foo@plt>
lea    0xebe(%rip),%rdi
mov    $0xa,%esi
mov    %eax,%edx
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <bar@plt>
lea    0xeaf(%rip),%rdi
mov    $0xa,%esi
mov    %eax,%edx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"foo(%d) = %d\0A\00"
@.str.1 = [14 x i8] c"bar(%d) = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @foo(i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 10, i32 %1)
%3 = tail call i32 @bar(i32 10)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 10, i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ glPopMatrix();
int /*<<< orphan*/ glPushMatrix();
int /*<<< orphan*/ glScaled(int, double, int);
int /*<<< orphan*/ glTranslated(double, double, double);
int /*<<< orphan*/ glutSolidCube(double);
void wall(double thick) {
  glPushMatrix();
  glTranslated(0.5, .5 * thick, .5);
  glScaled(1, thick, 1);
  glutSolidCube(1.0);
  glPopMatrix();
}


x86 assembly (clang, -O0):
<wall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1060 <glPushMatrix@plt>
movsd  0xe9c(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  0xe8f(%rip),%xmm2
movaps %xmm2,%xmm0
call   1070 <glTranslated@plt>
movsd  -0x8(%rbp),%xmm0
mov    $0x1,%esi
mov    %esi,%edi
call   1050 <glScaled@plt>
movsd  0xe66(%rip),%xmm0
call   1030 <glutSolidCube@plt>
mov    $0x0,%al
call   1040 <glPopMatrix@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wall>:
push   %rax
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1060 <glPushMatrix@plt>
movsd  0xe9b(%rip),%xmm0
movsd  (%rsp),%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm0,%xmm2
call   1070 <glTranslated@plt>
mov    $0x1,%edi
movsd  (%rsp),%xmm0
mov    $0x1,%esi
call   1050 <glScaled@plt>
movsd  0xe75(%rip),%xmm0
call   1030 <glutSolidCube@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <glPopMatrix@plt>

LLVM IR (-O0):
define void @wall(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 (...) @glPushMatrix()
%4 = load double, double* %2
%5 = fmul double 5.000000e-01, %4
%6 = call i32 @glTranslated(double 5.000000e-01, double %5, double 5.000000e-01)
%7 = load double, double* %2
%8 = call i32 @glScaled(i32 1, double %7, i32 1)
%9 = call i32 @glutSolidCube(double 1.000000e+00)
%10 = call i32 (...) @glPopMatrix()
ret void
}

LLVM IR (-O2):
define void @wall(double %0) {
%2 = tail call i32 (...) @glPushMatrix()
%3 = fmul double %0, 5.000000e-01
%4 = tail call i32 @glTranslated(double 5.000000e-01, double %3, double 5.000000e-01)
%5 = tail call i32 @glScaled(i32 1, double %0, i32 1)
%6 = tail call i32 @glutSolidCube(double 1.000000e+00)
%7 = tail call i32 (...) @glPopMatrix()
ret void
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ INIT_LIST_HEAD(struct list_head *);
int /*<<< orphan*/ list_replace(struct list_head *, struct list_head *);
void list_replace_init(struct list_head *old, struct list_head *new_node) {
  list_replace(old, new_node);
  INIT_LIST_HEAD(old);
}


x86 assembly (clang, -O0):
<list_replace_init>:
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   1040 <list_replace@plt>
mov    -0x8(%rbp),%rdi
call   1030 <INIT_LIST_HEAD@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_replace_init>:
push   %rbx
mov    %rdi,%rbx
call   1040 <list_replace@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <INIT_LIST_HEAD@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
define void @list_replace_init(%struct.list_head* %0, %struct.list_head* %1) {
%3 = alloca %struct.list_head*
%4 = alloca %struct.list_head*
store %struct.list_head* %0, %struct.list_head** %3
store %struct.list_head* %1, %struct.list_head** %4
%5 = load %struct.list_head*, %struct.list_head** %3
%6 = load %struct.list_head*, %struct.list_head** %4
%7 = call i32 @list_replace(%struct.list_head* %5, %struct.list_head* %6)
%8 = load %struct.list_head*, %struct.list_head** %3
%9 = call i32 @INIT_LIST_HEAD(%struct.list_head* %8)
ret void
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @list_replace_init(%struct.list_head* %0, %struct.list_head* %1) {
%3 = tail call i32 @list_replace(%struct.list_head* %0, %struct.list_head* %1)
%4 = tail call i32 @INIT_LIST_HEAD(%struct.list_head* %0)
ret void
}
void two_cycle(int arr[], int ind0, int ind1) {
  int temp;
  temp = arr[ind0];
  arr[ind0] = arr[ind1];
  arr[ind1] = temp;
  return;
}


x86 assembly (clang, -O0):
<two_cycle>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<two_cycle>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

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

LLVM IR (-O2):
define void @two_cycle(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ opch32(char);
void nl(void) { opch32('\n'); }


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

x86 assembly (clang, -O2):
<nl>:
mov    $0xa,%edi
jmp    1030 <opch32@plt>

LLVM IR (-O0):
define void @nl() {
%1 = call i32 @opch32(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @nl() {
%1 = tail call i32 @opch32(i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
char *strdup(char *);
__attribute__((no, noclone)) char *foo(int r) {
  char buf[10] = "";
  strcat(buf, r ? "r" : "w");
  strcat(buf, "b");
  return strdup(buf);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0xe(%rbp),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1030 <memset@plt>
lea    -0xe(%rbp),%rdi
mov    -0x4(%rbp),%ecx
lea    0xea9(%rip),%rsi
lea    0xea0(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
call   1040 <strcat@plt>
lea    -0xe(%rbp),%rdi
lea    0xe8d(%rip),%rsi
call   1040 <strcat@plt>
lea    -0xe(%rbp),%rdi
call   1050 <strdup@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbx
sub    $0x10,%rsp
movw   $0x0,0x8(%rsp)
movq   $0x0,(%rsp)
test   %edi,%edi
lea    0xec5(%rip),%rax
lea    0xebc(%rip),%rsi
cmove  %rax,%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strcat@plt>
lea    0xeaa(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcat@plt>
mov    %rbx,%rdi
call   1040 <strdup@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [2 x i8] c"b\00"
define i8* @foo(i32 %0) {
%2 = alloca i32
%3 = alloca [10 x i8]
store i32 %0, i32* %2
%4 = bitcast [10 x i8]* %3 to i8*
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0)
%10 = call i32 @strcat(i8* %5, i8* %9)
%11 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%12 = call i32 @strcat(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%13 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%14 = call i8* @strdup(i8* %13)
ret i8* %14
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [2 x i8] c"b\00"
define noalias i8* @foo(i32 %0) {
%2 = alloca [10 x i8]
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
%6 = call i32 @strcat(i8* %3, i8* %5)
%7 = call i32 @strcat(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%8 = call i8* @strdup(i8* %3)
ret i8* %8
}