xunge/DecIR huggingface dataset:
extern void xmlrpc_client_init(int const flags, const char *const appname,
                               const char *const appversion) {}


x86 assembly (clang, -O0):
<xmlrpc_client_init>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @xmlrpc_client_init(i32 %0, i8* nocapture %1, i8* nocapture %2) {
ret void
}
void write_event(event_type, channel, data, n) int event_type;
int channel, n;
char data[];
{
  if (channel >= 16) {
    event_error("Channel limit exceeded\n");
  } else {
    mf_write_midi_event(0, event_type, channel, data, n);
  };
}


x86 assembly (clang, -O0):
<write_event>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
cmpl   $0x10,-0x8(%rbp)
jl     1152 <write_event+0x32>
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <event_error@plt>
jmp    1169 <write_event+0x49>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
xor    %edi,%edi
mov    $0x0,%al
call   1030 <mf_write_midi_event@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_event>:
mov    %ecx,%r8d
mov    %rdx,%rcx
mov    %esi,%edx
cmp    $0x10,%esi
jl     113b <write_event+0x1b>
lea    0xecc(%rip),%rdi
xor    %eax,%eax
jmp    1040 <event_error@plt>
mov    %edi,%esi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <mf_write_midi_event@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Channel limit exceeded\0A\00"
define void @write_event(i32 %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i32, i32* %6
%10 = icmp sge i32 %9, 16
br i1 %10, label %11, label %13
11: ; preds = %4
%12 = call i32 (i8*, ...) bitcast (i32 (...)* @event_error to i32 (i8*, ...)*)(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %19
13: ; preds = %4
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = load i8*, i8** %7
%17 = load i32, i32* %8
%18 = call i32 (i32, i32, i32, i8*, i32, ...) bitcast (i32 (...)* @mf_write_midi_event to i32 (i32, i32, i32, i8*, i32, ...)*)(i32 0, i32 %14, i32 %15, i8* %16, i32 %17)
br label %19
19: ; preds = %13, %11
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"Channel limit exceeded\0A\00"
define void @write_event(i32 %0, i32 %1, i8* %2, i32 %3) {
%5 = icmp sgt i32 %1, 15
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 (i8*, ...) bitcast (i32 (...)* @event_error to i32 (i8*, ...)*)(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %10
8: ; preds = %4
%9 = tail call i32 (i32, i32, i32, i8*, i32, ...) bitcast (i32 (...)* @mf_write_midi_event to i32 (i32, i32, i32, i8*, i32, ...)*)(i32 0, i32 %0, i32 %1, i8* %2, i32 %3)
br label %10
10: ; preds = %8, %6
ret void
}
/* Variables and functions */
scalar_t__ have_situs_suffix(char *);
int test_situs(char *);
int test_situs_header_and_suffix(char *vol_file) {
  if (have_situs_suffix(vol_file) == 0)
    return 999999;
  else
    return test_situs(vol_file);
}


x86 assembly (clang, -O0):
<test_situs_header_and_suffix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <have_situs_suffix@plt>
cmp    $0x0,%rax
jne    114b <test_situs_header_and_suffix+0x2b>
movl   $0xf423f,-0x4(%rbp)
jmp    1157 <test_situs_header_and_suffix+0x37>
mov    -0x10(%rbp),%rdi
call   1030 <test_situs@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_situs_header_and_suffix>:
push   %rbx
mov    %rdi,%rbx
call   1040 <have_situs_suffix@plt>
test   %rax,%rax
je     1137 <test_situs_header_and_suffix+0x17>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <test_situs@plt>
mov    $0xf423f,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @test_situs_header_and_suffix(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @have_situs_suffix(i8* %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 999999, i32* %2
br label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i32 @test_situs(i8* %9)
store i32 %10, i32* %2
br label %11
11: ; preds = %8, %7
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @test_situs_header_and_suffix(i8* %0) {
%2 = tail call i64 @have_situs_suffix(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @test_situs(i8* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ 999999, %1 ]
ret i32 %7
}
/* Variables and functions */
int rand();
int getRandomNum(int max) { return rand() % max; }


x86 assembly (clang, -O0):
<getRandomNum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cltd
idivl  -0x4(%rbp)
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getRandomNum>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebx
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @getRandomNum(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @rand()
%4 = load i32, i32* %2
%5 = srem i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @getRandomNum(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, %0
ret i32 %3
}
/* Type definitions */
typedef int clock_t;

/* Variables and functions */
int clock();
void delay() {
  clock_t start = 0, finish = 0;
  start = clock();
  while ((finish - start) < 600)
    finish = clock();
  return;
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
cmp    $0x258,%eax
jge    1150 <delay+0x40>
mov    $0x0,%al
call   1030 <clock@plt>
mov    %eax,-0x8(%rbp)
jmp    1130 <delay+0x20>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
push   %rbx
xor    %eax,%eax
call   1030 <clock@plt>
cmp    $0xfffffda9,%eax
jl     1140 <delay+0x30>
mov    %eax,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <clock@plt>
sub    %ebx,%eax
cmp    $0x258,%eax
jl     1130 <delay+0x20>
pop    %rbx
ret

LLVM IR (-O0):
define void @delay() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 (...) @clock()
store i32 %3, i32* %1
br label %4
4: ; preds = %9, %0
%5 = load i32, i32* %2
%6 = load i32, i32* %1
%7 = sub nsw i32 %5, %6
%8 = icmp slt i32 %7, 600
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = call i32 (...) @clock()
store i32 %10, i32* %2
br label %4
11: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @delay() {
%1 = tail call i32 (...) @clock()
%2 = icmp sgt i32 %1, -600
br i1 %2, label %3, label %7
3: ; preds = %0, %3
%4 = tail call i32 (...) @clock()
%5 = sub nsw i32 %4, %1
%6 = icmp slt i32 %5, 600
br i1 %6, label %3, label %7
7: ; preds = %3, %0
ret void
}
int power(int a) {
  int j = 0, mod = 0, temp;
  while (a >= 2) {
    temp = a / 2;
    mod = a % 2;
    a = temp + mod;
    j++;
  }
  return j;
}


x86 assembly (clang, -O0):
<power>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x2,-0x4(%rbp)
jl     1152 <power+0x52>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <power+0x15>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<power>:
xor    %eax,%eax
cmp    $0x2,%edi
jl     1121 <power+0x21>
xor    %eax,%eax
nopl   0x0(%rax)
mov    %edi,%ecx
shr    %ecx
and    $0x1,%edi
add    %ecx,%edi
add    $0x1,%eax
cmp    $0x1,%edi
ja     1110 <power+0x10>
ret

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

LLVM IR (-O2):
define i32 @power(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %11
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = lshr i32 %4, 1
%7 = and i32 %4, 1
%8 = add nuw nsw i32 %6, %7
%9 = add nuw nsw i32 %5, 1
%10 = icmp ugt i32 %8, 1
br i1 %10, label %3, label %11
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %9, %3 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ ATOMIC_EXCHANGE(int volatile, int, int);
int atomic_exchange_int(volatile int *var, int newval) {
  int result;
  ATOMIC_EXCHANGE(*var, newval, result);
  return result;
}


x86 assembly (clang, -O0):
<atomic_exchange_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <ATOMIC_EXCHANGE@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atomic_exchange_int>:
mov    (%rdi),%edi
jmp    1030 <ATOMIC_EXCHANGE@plt>

LLVM IR (-O0):
define i32 @atomic_exchange_int(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32*, i32** %3
%7 = load volatile i32, i32* %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = call i32 @ATOMIC_EXCHANGE(i32 %7, i32 %8, i32 %9)
%11 = load i32, i32* %5
ret i32 %11
}

LLVM IR (-O2):
define i32 @atomic_exchange_int(i32* %0, i32 %1) {
%3 = load volatile i32, i32* %0
%4 = tail call i32 @ATOMIC_EXCHANGE(i32 %3, i32 %1, i32 undef)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ system(char *);
int main() {
  puts("\n\tPress Enter to see a listof files:");
  getchar();
  system("dir");
  puts("Done!");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
lea    0xecc(%rip),%rdi
call   1040 <system@plt>
lea    0xec4(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
lea    0xeda(%rip),%rdi
call   1040 <system@plt>
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"\0A\09Press Enter to see a listof files:\00"
@.str.1 = [4 x i8] c"dir\00"
@.str.2 = [6 x i8] c"Done!\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @getchar()
%4 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [37 x i8] c"\0A\09Press Enter to see a listof files:\00"
@.str.1 = [4 x i8] c"dir\00"
@.str.2 = [6 x i8] c"Done!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @getchar()
%3 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int uint32_t;
typedef int int32_t;

/* Variables and functions */
int32_t read32bitLE(unsigned char *buf) {
  int i;
  uint32_t value = 0;
  for (i = 3; i >= 0; i--) {
    value <<= 8;
    value |= buf[i];
  }
  return value;
}


x86 assembly (clang, -O0):
<read32bitLE>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x3,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1149 <read32bitLE+0x49>
mov    -0x10(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <read32bitLE+0x16>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @read32bitLE(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %4, 16
%9 = shl nuw nsw i32 %7, 8
%10 = or i32 %8, %9
%11 = getelementptr inbounds i8, i8* %0, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = or i32 %10, %13
%15 = shl nuw i32 %14, 8
%16 = load i8, i8* %0
%17 = zext i8 %16 to i32
%18 = or i32 %15, %17
ret i32 %18
}
/* Variables and functions */
char *get_filename(char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char str[] = "GET /1.txt HTTP/1.1";
  char *filename = get_filename(str);
  printf("filename = %s\n", filename);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec5(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <get_filename@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rsi
lea    0xeae(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x312e31,0x10(%rsp)
mov    %rsp,%rdi
call   1030 <get_filename@plt>
lea    0xece(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.str = [20 x i8] c"GET /1.txt HTTP/1.1\00"
@.str = [15 x i8] c"filename = %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
%3 = alloca i8*
store i32 0, i32* %1
%4 = bitcast [20 x i8]* %2 to i8*
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%6 = call i8* @get_filename(i8* %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %7)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [20 x i8] c"GET /1.txt HTTP/1.1\00"
@.str = [15 x i8] c"filename = %s\0A\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = call i8* @get_filename(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ zlibVersion();
int main() {
  zlibVersion();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @zlibVersion()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t xtime(int in) {
  in <<= 1;
  if (in & 0x100)
    in ^= 0x11b;
  return (uint8_t)in;
}


x86 assembly (clang, -O0):
<xtime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x100,%eax
cmp    $0x0,%eax
je     112c <xtime+0x2c>
mov    -0x4(%rbp),%eax
xor    $0x11b,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xtime>:
lea    (%rdi,%rdi,1),%ecx
mov    %ecx,%eax
xor    $0x11b,%eax
test   $0x80,%dil
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @xtime(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 1
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = and i32 %5, 256
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* %2
%10 = xor i32 %9, 283
store i32 %10, i32* %2
br label %11
11: ; preds = %8, %1
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @xtime(i32 %0) {
%2 = shl i32 %0, 1
%3 = and i32 %0, 128
%4 = icmp eq i32 %3, 0
%5 = xor i32 %2, 283
%6 = select i1 %4, i32 %2, i32 %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void printversioninfo() {
  printf("\n\nTIFAA %s\n"
         "============\n"
         "Cut out and stich postage stamps from surveys.\n"
         "\nCopyright (C) 2013-2014  Mohammad Akhlaghi\n"
         "This program comes with ABSOLUTELY NO WARRANTY.\n"
         "This is free software, and you are welcome to\n"
         "modify and redistribute it under the\n"
         "GNU Public License v3 or later.\n\n\n",
         "v0.3");
}


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

x86 assembly (clang, -O2):
<printversioninfo>:
lea    0xee9(%rip),%rdi
lea    0xffb(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [281 x i8] c"\0A\0ATIFAA %s\0A============\0ACut out and stich postage stamps from surveys.\0A\0ACopyright (C) 2013-2014 Mohammad Akhlaghi\0AThis program comes with ABSOLUTELY NO WARRANTY.\0AThis is free software, and you are welcome to\0Amodify and redistribute it under the\0AGNU Public License v3 or later.\0A\0A\0A\00"
@.str.1 = [5 x i8] c"v0.3\00"
define void @printversioninfo() {
%1 = call i32 @printf(i8* getelementptr inbounds ([281 x i8], [281 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [281 x i8] c"\0A\0ATIFAA %s\0A============\0ACut out and stich postage stamps from surveys.\0A\0ACopyright (C) 2013-2014 Mohammad Akhlaghi\0AThis program comes with ABSOLUTELY NO WARRANTY.\0AThis is free software, and you are welcome to\0Amodify and redistribute it under the\0AGNU Public License v3 or later.\0A\0A\0A\00"
@.str.1 = [5 x i8] c"v0.3\00"
define void @printversioninfo() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([281 x i8], [281 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
char *strndup(char const *, size_t);
char *btp_strndup(const char *s, size_t n) {
  char *result = strndup(s, n);
  if (result == NULL) {
    fprintf(stderr, "btp: out of memory");
    exit(1);
  }
  return result;
}


x86 assembly (clang, -O0):
<btp_strndup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strndup@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    117b <btp_strndup+0x4b>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
lea    0xe94(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<btp_strndup>:
push   %rax
call   1030 <strndup@plt>
test   %rax,%rax
je     113d <btp_strndup+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [19 x i8] c"btp: out of memory\00"
define i8* @btp_strndup(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @strndup(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @exit(i32 1)
unreachable
15: ; preds = %2
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"btp: out of memory\00"
define noalias i8* @btp_strndup(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @strndup(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
int libswd_bin32_print(int *data) {
  unsigned int i, bits = *data;
  for (i = 0; i < 32; i++)
    putchar(((bits << i) & 0x80000000) ? '1' : '0');
  return i;
}


x86 assembly (clang, -O0):
<libswd_bin32_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x20,-0xc(%rbp)
jae    116a <libswd_bin32_print+0x5a>
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
shl    %cl,%edx
and    $0x80000000,%edx
mov    $0x30,%eax
mov    $0x31,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
movsbl %al,%edi
call   1030 <putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112c <libswd_bin32_print+0x1c>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libswd_bin32_print>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%ebp
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    %ebp,%edi
mov    %ebx,%ecx
shl    %cl,%edi
shr    $0x1f,%edi
or     $0x30,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    $0x20,%ebx
jne    1120 <libswd_bin32_print+0x10>
mov    $0x20,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @libswd_bin32_print(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
store i32 %6, i32* %4
store i32 0, i32* %3
br label %7
7: ; preds = %20, %1
%8 = load i32, i32* %3
%9 = icmp ult i32 %8, 32
br i1 %9, label %10, label %23
10: ; preds = %7
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = shl i32 %11, %12
%14 = and i32 %13, -2147483648
%15 = icmp ne i32 %14, 0
%16 = zext i1 %15 to i64
%17 = select i1 %15, i32 49, i32 48
%18 = trunc i32 %17 to i8
%19 = call i32 @putchar(i8 signext %18)
br label %20
20: ; preds = %10
%21 = load i32, i32* %3
%22 = add i32 %21, 1
store i32 %22, i32* %3
br label %7
23: ; preds = %7
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @libswd_bin32_print(i32* nocapture %0) {
%2 = load i32, i32* %0
br label %3
3: ; preds = %1, %3
%4 = phi i32 [ 0, %1 ], [ %9, %3 ]
%5 = shl i32 %2, %4
%6 = icmp sgt i32 %5, -1
%7 = select i1 %6, i8 48, i8 49
%8 = tail call i32 @putchar(i8 signext %7)
%9 = add nuw nsw i32 %4, 1
%10 = icmp eq i32 %9, 32
br i1 %10, label %11, label %3
11: ; preds = %3
ret i32 32
}
void to_stdout(char c) {
  int volatile *IO = (int *)(0x3c000000 + 1 * 0x00000020);
  *IO = (unsigned char)c;
}


x86 assembly (clang, -O0):
<to_stdout>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x3c000020,%eax
mov    %rax,-0x10(%rbp)
movzbl -0x1(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_stdout>:
movzbl %dil,%eax
mov    %eax,0x3c000020
ret

LLVM IR (-O0):
define void @to_stdout(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32*
store i8 %0, i8* %2
store i32* inttoptr (i64 1006632992 to i32*), i32** %3
%4 = load i8, i8* %2
%5 = zext i8 %4 to i32
%6 = load i32*, i32** %3
store volatile i32 %5, i32* %6
ret void
}

LLVM IR (-O2):
define void @to_stdout(i8 signext %0) {
%2 = zext i8 %0 to i32
store volatile i32 %2, i32* inttoptr (i64 1006632992 to i32*)
ret void
}
char *getYear() {}


x86 assembly (clang, -O0):
<getYear>:
push   %rbp
mov    %rsp,%rbp
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @getYear() {
%1 = alloca i8*
%2 = load i8*, i8** %1
ret i8* %2
}

LLVM IR (-O2):
define noalias i8* @getYear() {
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int);
void mouse(int b, int s, int x, int y) {
  printf("b=%d  s=%d  x=%d y=%d\n", b, s, x, y);
}


x86 assembly (clang, -O0):
<mouse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mouse>:
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
lea    0xee0(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"b=%d s=%d x=%d y=%d\0A\00"
define void @mouse(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10, i32 %11, i32 %12)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"b=%d s=%d x=%d y=%d\0A\00"
define void @mouse(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2, i32 %3)
ret void
}
int int_log10(int n) {
  int tmp1 = n;
  int tmp2 = 0;
  while (tmp1 /= 10) {
    tmp2++;
  }
  return tmp2;
}


x86 assembly (clang, -O0):
<int_log10>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     1139 <int_log10+0x39>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1114 <int_log10+0x14>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_log10>:
lea    0x9(%rdi),%ecx
xor    %eax,%eax
cmp    $0x13,%ecx
jb     1135 <int_log10+0x35>
xor    %eax,%eax
nopl   0x0(%rax)
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
lea    (%rcx,%rdx,1),%edi
add    $0x1,%eax
add    %edx,%ecx
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <int_log10+0x10>
ret

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

LLVM IR (-O2):
define i32 @int_log10(i32 %0) {
%2 = add i32 %0, 9
%3 = icmp ult i32 %2, 19
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i32 [ %7, %4 ], [ %0, %1 ]
%7 = sdiv i32 %6, 10
%8 = add nuw nsw i32 %5, 1
%9 = add nsw i32 %7, 9
%10 = icmp ult i32 %9, 19
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Type definitions */
struct Param {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ eval_A_times_u(struct Param *);
int /*<<< orphan*/ eval_At_times_u(struct Param *);
void eval_AtA_times_u(struct Param *p) {
  eval_A_times_u(p);
#pragma omp barrier
  eval_At_times_u(p);
#pragma omp barrier
}


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

x86 assembly (clang, -O2):
<eval_AtA_times_u>:
push   %rbx
mov    %rdi,%rbx
call   1040 <eval_A_times_u@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <eval_At_times_u@plt>

LLVM IR (-O0):
%struct.Param = type { i32 }
define void @eval_AtA_times_u(%struct.Param* %0) {
%2 = alloca %struct.Param*
store %struct.Param* %0, %struct.Param** %2
%3 = load %struct.Param*, %struct.Param** %2
%4 = call i32 @eval_A_times_u(%struct.Param* %3)
%5 = load %struct.Param*, %struct.Param** %2
%6 = call i32 @eval_At_times_u(%struct.Param* %5)
ret void
}

LLVM IR (-O2):
%struct.Param = type { i32 }
define void @eval_AtA_times_u(%struct.Param* %0) {
%2 = tail call i32 @eval_A_times_u(%struct.Param* %0)
%3 = tail call i32 @eval_At_times_u(%struct.Param* %0)
ret void
}
extern int strcmp(const char *cs, const char *ct) {
  register int __res __asm__("ax");
  __asm__("cld\n"
          "1:\tlodsb\n\t"
          "scasb\n\t"
          "jne 2f\n\t"
          "testb %%al,%%al\n\t"
          "jne 1b\n\t"
          "xorl %%eax,%%eax\n\t"
          "jmp 3f\n"
          "2:\tmovl $1,%%eax\n\t"
          "jl 3f\n\t"
          "negl %%eax\n"
          "3:"
          : "=a"(__res)
          : "D"(cs), "S"(ct));
  return __res;
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
cld
lods   %ds:(%rsi),%al
scas   %es:(%rdi),%al
jne    112c <strcmp+0x2c>
test   %al,%al
jne    1115 <strcmp+0x15>
xor    %eax,%eax
jmp    1139 <strcmp+0x39>
mov    $0x1,%eax
jl     1139 <strcmp+0x39>
neg    %eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
cld
lods   %ds:(%rsi),%al
scas   %es:(%rdi),%al
jne    110d <strcmp+0xd>
test   %al,%al
jne    1101 <strcmp+0x1>
xor    %eax,%eax
jmp    1116 <strcmp+0x16>
mov    $0x1,%eax
jl     1116 <strcmp+0x16>
neg    %eax
ret

LLVM IR (-O0):
define i32 @strcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 asm "cld\0A1:\09lodsb\0A\09scasb\0A\09jne 2f\0A\09testb %al,%al\0A\09jne 1b\0A\09xorl %eax,%eax\0A\09jmp 3f\0A2:\09movl $$1,%eax\0A\09jl 3f\0A\09negl %eax\0A3:", "={ax},{di},{si},~{dirflag},~{fpsr},~{flags}"(i8* %6, i8* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @strcmp(i8* readnone %0, i8* readnone %1) {
%3 = tail call i32 asm "cld\0A1:\09lodsb\0A\09scasb\0A\09jne 2f\0A\09testb %al,%al\0A\09jne 1b\0A\09xorl %eax,%eax\0A\09jmp 3f\0A2:\09movl $$1,%eax\0A\09jl 3f\0A\09negl %eax\0A3:", "={ax},{di},{si},~{dirflag},~{fpsr},~{flags}"(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int fn_sq_ch_68_ch_105_ch_115_ch_106_ch_111_ch_105_ch_110_ch_116_ch_85_ch_110_ch_105_ch_111_ch_110(
    char const *);
int fn_al_sq_ch_68_ch_105_ch_115_ch_106_ch_111_ch_105_ch_110_ch_116_ch_85_ch_110_ch_105_ch_111_ch_110(
    const char *text) {
  int pos = 0;
  pos =
      fn_sq_ch_68_ch_105_ch_115_ch_106_ch_111_ch_105_ch_110_ch_116_ch_85_ch_110_ch_105_ch_111_ch_110(
          text);
  if (pos != -1)
    return pos;
  return -1;
}


x86 assembly (clang, -O0):
<fn_al_sq_ch_68_ch_105_ch_115_ch_106_ch_111_ch_105_ch_110_ch_116_ch_85_ch_110_ch_105_ch_111_ch_110>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fn_sq_ch_68_ch_105_ch_115_ch_106_ch_111_ch_105_ch_110_ch_116_ch_85_ch_110_ch_105_ch_111_ch_110@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
je     1144 <fn_al_sq_ch_68_ch_105_ch_115_ch_106_ch_111_ch_105_ch_110_ch_116_ch_85_ch_110_ch_105_ch_111_ch_110+0x34>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <fn_al_sq_ch_68_ch_105_ch_115_ch_106_ch_111_ch_105_ch_110_ch_116_ch_85_ch_110_ch_105_ch_111_ch_110+0x3b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_al_sq_ch_68_ch_105_ch_115_ch_106_ch_111_ch_105_ch_110_ch_116_ch_85_ch_110_ch_105_ch_111_ch_110>:
jmp    1030 <fn_sq_ch_68_ch_105_ch_115_ch_106_ch_111_ch_105_ch_110_ch_116_ch_85_ch_110_ch_105_ch_111_ch_110@plt>

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

LLVM IR (-O2):
define i32 @fn_al_sq_ch_68_ch_105_ch_115_ch_106_ch_111_ch_105_ch_110_ch_116_ch_85_ch_110_ch_105_ch_111_ch_110(i8* %0) {
%2 = tail call i32 @fn_sq_ch_68_ch_105_ch_115_ch_106_ch_111_ch_105_ch_110_ch_116_ch_85_ch_110_ch_105_ch_111_ch_110(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ hyperlink_print_old();
void lmn_hyperlink_print_old() { hyperlink_print_old(); }


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

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

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

LLVM IR (-O2):
define void @lmn_hyperlink_print_old() {
%1 = tail call i32 (...) @hyperlink_print_old()
ret void
}
/* Variables and functions */
scalar_t__ setgid(int);
scalar_t__ setuid(int);
int drop_root(int uid, int gid) {
  if (setuid(uid)) {
    return 2;
  }
  if (setgid(gid)) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<drop_root>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <setuid@plt>
cmp    $0x0,%rax
je     114c <drop_root+0x2c>
movl   $0x2,-0x4(%rbp)
jmp    1171 <drop_root+0x51>
mov    -0xc(%rbp),%edi
call   1030 <setgid@plt>
cmp    $0x0,%rax
je     116a <drop_root+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1171 <drop_root+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drop_root>:
push   %rbx
mov    %esi,%ebx
call   1040 <setuid@plt>
mov    %rax,%rcx
mov    $0x2,%eax
test   %rcx,%rcx
je     1137 <drop_root+0x17>
pop    %rbx
ret
mov    %ebx,%edi
call   1030 <setgid@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @drop_root(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* %4
%7 = call i64 @setuid(i32 %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 2, i32* %3
br label %16
10: ; preds = %2
%11 = load i32, i32* %5
%12 = call i64 @setgid(i32 %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %10
store i32 1, i32* %3
br label %16
15: ; preds = %10
store i32 0, i32* %3
br label %16
16: ; preds = %15, %14, %9
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @drop_root(i32 %0, i32 %1) {
%3 = tail call i64 @setuid(i32 %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i64 @setgid(i32 %1)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 2, %2 ], [ %8, %5 ]
ret i32 %10
}
int fn7(int a, int b) {
  int tem1 = a ^ b;
  int tem2 = b & a;
  return tem1 | tem2;
}


x86 assembly (clang, -O0):
<fn7>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
or     -0x10(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fn7(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = xor i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %4
%11 = load i32, i32* %3
%12 = and i32 %10, %11
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = or i32 %13, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @fn7(i32 %0, i32 %1) {
%3 = or i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void fun() { printf("I am fun\n"); }


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

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

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

LLVM IR (-O2):
@str = [9 x i8] c"I am fun\00"
define void @fun() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret void
}
int msm_unclamp_secondary_arm_cpu(unsigned int cpu) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @msm_unclamp_secondary_arm_cpu(i32 %0) {
ret i32 0
}
int Athena_TickAI(struct Athena_AI *ai, struct Athena_Field *field) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.Athena_AI = type opaque
%struct.Athena_Field = type opaque
define i32 @Athena_TickAI(%struct.Athena_AI* %0, %struct.Athena_Field* %1) {
%3 = alloca %struct.Athena_AI*
%4 = alloca %struct.Athena_Field*
store %struct.Athena_AI* %0, %struct.Athena_AI** %3
store %struct.Athena_Field* %1, %struct.Athena_Field** %4
ret i32 0
}

LLVM IR (-O2):
%struct.Athena_AI = type opaque
%struct.Athena_Field = type opaque
define i32 @Athena_TickAI(%struct.Athena_AI* nocapture readnone %0, %struct.Athena_Field* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_encoding_from_string() {
  printf("NOT IMPLEMENTED:"
         "pa_encoding_from_string"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [40 x i8] c"NOT IMPLEMENTED:pa_encoding_from_string\00"
define i32 @pa_encoding_from_string() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, long);
int main(void) {
  long number_of_chars = 0;
  while (getchar() != EOF) {
    ++number_of_chars;
  }
  printf("The number of characters in the text stream is: %ld",
         number_of_chars);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2ea3(%rip),%rcx
cmp    (%rcx),%rax
je     115f <main+0x3f>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1137 <main+0x17>
mov    -0x10(%rbp),%rsi
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0xffffffffffffffff,%rbx
mov    0x2eb6(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <getchar@plt>
add    $0x1,%rbx
cmp    (%r14),%rax
jne    1140 <main+0x20>
lea    0xea9(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EOF = global i64 0
@.str = [52 x i8] c"The number of characters in the text stream is: %ld\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
store i64 0, i64* %2
br label %3
3: ; preds = %7, %0
%4 = call i64 (...) @getchar()
%5 = load i64, i64* @EOF
%6 = icmp ne i64 %4, %5
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = load i64, i64* %2
%9 = add nsw i64 %8, 1
store i64 %9, i64* %2
br label %3
10: ; preds = %3
%11 = load i64, i64* %2
%12 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i64 %11)
ret i32 0
}

LLVM IR (-O2):
@EOF = global i64 0
@.str = [52 x i8] c"The number of characters in the text stream is: %ld\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i64 [ 0, %0 ], [ %6, %1 ]
%3 = tail call i64 (...) @getchar()
%4 = load i64, i64* @EOF
%5 = icmp eq i64 %3, %4
%6 = add nuw nsw i64 %2, 1
br i1 %5, label %7, label %1
7: ; preds = %1
%8 = tail call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i64 %2)
ret i32 0
}
void uart_put(const char c) {
  while (!((*(volatile unsigned int *)0x3F215054) & (1U << 6)) &&
         !((*(volatile unsigned int *)0x3F215054) & (1U << 5)))
    ;
  (*(volatile unsigned int *)0x3F215040) = c;
}


x86 assembly (clang, -O0):
<uart_put>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x3f215054,%eax
mov    (%rax),%ecx
and    $0x40,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x2(%rbp)
jne    1137 <uart_put+0x37>
mov    $0x3f215054,%eax
mov    (%rax),%eax
and    $0x20,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
test   $0x1,%al
jne    1147 <uart_put+0x47>
jmp    114c <uart_put+0x4c>
jmp    110a <uart_put+0xa>
movsbl -0x1(%rbp),%ecx
mov    $0x3f215040,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_put>:
testl  $0x40,0x3f215054
jne    111a <uart_put+0x1a>
testl  $0x20,0x3f215054
je     1100 <uart_put>
movsbl %dil,%eax
mov    %eax,0x3f215040
ret

LLVM IR (-O0):
define void @uart_put(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
br label %3
3: ; preds = %14, %1
%4 = load volatile i32, i32* inttoptr (i64 1059147860 to i32*)
%5 = and i32 %4, 64
%6 = icmp ne i32 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %3
%8 = load volatile i32, i32* inttoptr (i64 1059147860 to i32*)
%9 = and i32 %8, 32
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
br label %12
12: ; preds = %7, %3
%13 = phi i1 [ false, %3 ], [ %11, %7 ]
br i1 %13, label %14, label %15
14: ; preds = %12
br label %3
15: ; preds = %12
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
store volatile i32 %17, i32* inttoptr (i64 1059147840 to i32*)
ret void
}

LLVM IR (-O2):
define void @uart_put(i8 signext %0) {
br label %2
2: ; preds = %6, %1
%3 = load volatile i32, i32* inttoptr (i64 1059147860 to i32*)
%4 = and i32 %3, 64
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = load volatile i32, i32* inttoptr (i64 1059147860 to i32*)
%8 = and i32 %7, 32
%9 = icmp eq i32 %8, 0
br i1 %9, label %2, label %10
10: ; preds = %2, %6
%11 = sext i8 %0 to i32
store volatile i32 %11, i32* inttoptr (i64 1059147840 to i32*)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ transpose_16bit_16x16(int /*<<< orphan*/ *const,
                                         int /*<<< orphan*/ *const);
int /*<<< orphan*/ vpx_iadst16_8col_sse2(int /*<<< orphan*/ *const);
void iadst16_sse2(__m128i *const in0, __m128i *const in1) {
  transpose_16bit_16x16(in0, in1);
  vpx_iadst16_8col_sse2(in0);
  vpx_iadst16_8col_sse2(in1);
}


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

x86 assembly (clang, -O2):
<iadst16_sse2>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <transpose_16bit_16x16@plt>
mov    %rbx,%rdi
call   1040 <vpx_iadst16_8col_sse2@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <vpx_iadst16_8col_sse2@plt>

LLVM IR (-O0):
define void @iadst16_sse2(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 @transpose_16bit_16x16(i32* %5, i32* %6)
%8 = load i32*, i32** %3
%9 = call i32 @vpx_iadst16_8col_sse2(i32* %8)
%10 = load i32*, i32** %4
%11 = call i32 @vpx_iadst16_8col_sse2(i32* %10)
ret void
}

LLVM IR (-O2):
define void @iadst16_sse2(i32* %0, i32* %1) {
%3 = tail call i32 @transpose_16bit_16x16(i32* %0, i32* %1)
%4 = tail call i32 @vpx_iadst16_8col_sse2(i32* %0)
%5 = tail call i32 @vpx_iadst16_8col_sse2(i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BrushlessMotorsInit();
void MotorsInit(void) { BrushlessMotorsInit(); }


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

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

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

LLVM IR (-O2):
define void @MotorsInit() {
%1 = tail call i32 (...) @BrushlessMotorsInit()
ret void
}