xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ foobar(int);
int main() {
  int a = 10;
  foobar(a);
  foobar(a--);
  foobar(a);
  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),%edi
call   1030 <foobar@plt>
mov    -0x8(%rbp),%edi
mov    %edi,%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
call   1030 <foobar@plt>
mov    -0x8(%rbp),%edi
call   1030 <foobar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foobar(i32 10)
%2 = tail call i32 @foobar(i32 10)
%3 = tail call i32 @foobar(i32 9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void br(void) { printf("Brazil, Russia"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Brazil, Russia\00"
define void @br() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"Brazil, Russia\00"
define void @br() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
void gtk_text_buffer_add_selection_clipboard() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_buffer_add_selection_clipboard() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ crypt1_p(char const *, char const *, unsigned char *);
int /*<<< orphan*/ strcmp(int /*<<< orphan*/, char const *);
int ytht_crypt_checkpasswd(const char *pw_crypted, const char *pw_try) {
  unsigned char buf[20];
  return !strcmp(crypt1_p(pw_try, pw_crypted, buf), pw_crypted);
}


x86 assembly (clang, -O0):
<ytht_crypt_checkpasswd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1030 <crypt1_p@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ytht_crypt_checkpasswd>:
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rbx
mov    %rsp,%rdx
mov    %rsi,%rdi
mov    %rbx,%rsi
call   1030 <crypt1_p@plt>
mov    %eax,%edi
mov    %rbx,%rsi
call   1040 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ytht_crypt_checkpasswd(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [20 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = load i8*, i8** %3
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%9 = call i32 @crypt1_p(i8* %6, i8* %7, i8* %8)
%10 = load i8*, i8** %3
%11 = call i32 @strcmp(i32 %9, i8* %10)
%12 = icmp ne i32 %11, 0
%13 = xor i1 %12, true
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @ytht_crypt_checkpasswd(i8* %0, i8* %1) {
%3 = alloca [20 x i8]
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%5 = call i32 @crypt1_p(i8* %1, i8* %0, i8* %4)
%6 = call i32 @strcmp(i32 %5, i8* %0)
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void sys_aligned_free(void *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<sys_aligned_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @sys_aligned_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int iModPositive(int ix, int iy) {
  if (iy > 0) {
    ix %= iy;
    if (ix < 0)
      ix += iy;
  }
  return ix;
}


x86 assembly (clang, -O0):
<iModPositive>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1138 <iModPositive+0x38>
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1133 <iModPositive+0x33>
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1138 <iModPositive+0x38>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iModPositive>:
mov    %edi,%eax
test   %esi,%esi
jle    1112 <iModPositive+0x12>
cltd
idiv   %esi
mov    %edx,%eax
sar    $0x1f,%eax
and    %esi,%eax
add    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @iModPositive(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = srem i32 %0, %1
%6 = icmp slt i32 %5, 0
%7 = select i1 %6, i32 %1, i32 0
%8 = add nsw i32 %7, %5
br label %9
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %8, %4 ]
ret i32 %10
}
void op_create_sh() {}


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

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

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

LLVM IR (-O2):
define void @op_create_sh() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ leconvert_uint64_from(int /*<<< orphan*/);
int64_t leconvert_int64_from(int64_t little) {
  return leconvert_uint64_from(little);
}


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

x86 assembly (clang, -O2):
<leconvert_int64_from>:
jmp    1030 <leconvert_uint64_from@plt>

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

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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
movslq -0x8(%rbp),%rax
cmp    $0xff,%rax
jg     1174 <main+0x64>
mov    -0x8(%rbp),%eax
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%esi
movsbl -0x9(%rbp),%edx
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113b <main+0x2b>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%r14
xor    %ebx,%ebx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edx
sar    $0x18,%edx
mov    %r14,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
add    $0x1000000,%ebx
cmp    $0x100,%ebp
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str.1 = [9 x i8] c"\0A%d - %c\00"
@str = [12 x i8] c"Ascii table\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %7, %2 ]
%4 = shl nuw i32 %3, 24
%5 = ashr exact i32 %4, 24
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %3, i32 %5)
%7 = add nuw nsw i32 %3, 1
%8 = icmp eq i32 %7, 256
br i1 %8, label %9, label %2
9: ; preds = %2
ret i32 0
}
unsigned long ieee_swcr_to_fpcr(unsigned long sw) {
  unsigned long fp;
  fp = (sw &
        ((1UL << 17) | (1UL << 18) | (1UL << 19) | (1UL << 20) | (1UL << 21)))
       << 35;
  fp |=
      sw & ((1UL << 17) | (1UL << 18) | (1UL << 19) | (1UL << 20) | (1UL << 21))
          ? (1UL << 63)
          : 0;
  fp |= (~sw & ((1UL << 1) | (1UL << 2) | (1UL << 3))) << 48;
  fp |= (~sw & ((1UL << 4) | (1UL << 5))) << 57;
  return fp;
}


x86 assembly (clang, -O0):
<ieee_swcr_to_fpcr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0x3e0000,%rax
shl    $0x23,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
and    $0x3e0000,%rdx
xor    %eax,%eax
movabs $0x8000000000000000,%rcx
cmp    $0x0,%rdx
cmovne %rcx,%rax
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
xor    $0xffffffffffffffff,%rax
and    $0xe,%rax
shl    $0x30,%rax
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
xor    $0xffffffffffffffff,%rax
and    $0x30,%rax
shl    $0x39,%rax
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ieee_swcr_to_fpcr>:
mov    %edi,%eax
and    $0x3e0000,%eax
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
shl    $0x23,%rax
shl    $0x3f,%rcx
or     %rax,%rcx
not    %rdi
mov    %edi,%eax
and    $0xe,%eax
shl    $0x30,%rax
or     %rcx,%rax
and    $0x30,%edi
shl    $0x39,%rdi
or     %rdi,%rax
ret

LLVM IR (-O0):
define i64 @ieee_swcr_to_fpcr(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = and i64 %4, 4063232
%6 = shl i64 %5, 35
store i64 %6, i64* %3
%7 = load i64, i64* %2
%8 = and i64 %7, 4063232
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i64
%11 = select i1 %9, i64 -9223372036854775808, i64 0
%12 = load i64, i64* %3
%13 = or i64 %12, %11
store i64 %13, i64* %3
%14 = load i64, i64* %2
%15 = xor i64 %14, -1
%16 = and i64 %15, 14
%17 = shl i64 %16, 48
%18 = load i64, i64* %3
%19 = or i64 %18, %17
store i64 %19, i64* %3
%20 = load i64, i64* %2
%21 = xor i64 %20, -1
%22 = and i64 %21, 48
%23 = shl i64 %22, 57
%24 = load i64, i64* %3
%25 = or i64 %24, %23
store i64 %25, i64* %3
%26 = load i64, i64* %3
ret i64 %26
}

LLVM IR (-O2):
define i64 @ieee_swcr_to_fpcr(i64 %0) {
%2 = and i64 %0, 4063232
%3 = shl nuw nsw i64 %2, 35
%4 = icmp eq i64 %2, 0
%5 = select i1 %4, i64 0, i64 -9223372036854775808
%6 = or i64 %5, %3
%7 = xor i64 %0, -1
%8 = shl i64 %7, 48
%9 = and i64 %8, 3940649673949184
%10 = or i64 %6, %9
%11 = shl i64 %7, 57
%12 = and i64 %11, 6917529027641081856
%13 = or i64 %10, %12
ret i64 %13
}
void Error_Throw() {}


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

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

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

LLVM IR (-O2):
define void @Error_Throw() {
ret void
}
/* Type definitions */
struct gpf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct gpf *);
void gp_free(struct gpf *ret) { free(ret); }


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

x86 assembly (clang, -O2):
<gp_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.gpf = type { i32 }
define void @gp_free(%struct.gpf* nocapture %0) {
%2 = tail call i32 @free(%struct.gpf* %0)
ret void
}
/* Variables and functions */
void const *GppcFinfoV1();
const void *pg_finfo_timestamptzfunc1(void) { return GppcFinfoV1(); }


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

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

LLVM IR (-O0):
define i8* @pg_finfo_timestamptzfunc1() {
%1 = call i8* (...) @GppcFinfoV1()
ret i8* %1
}

LLVM IR (-O2):
define i8* @pg_finfo_timestamptzfunc1() {
%1 = tail call i8* (...) @GppcFinfoV1()
ret i8* %1
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_mvwinwstr(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


x86 assembly (clang, -O0):
<cmd_mvwinwstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    115a <cmd_mvwinwstr+0x2a>
jmp    1170 <cmd_mvwinwstr+0x40>
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xe95(%rip),%rdi
call   1050 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_mvwinwstr>:
push   %rax
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1142 <cmd_mvwinwstr+0x12>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xead(%rip),%rdi
pop    %rax
jmp    1050 <report_error@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_mvwinwstr(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = call i32 @check_arg_count(i32 %5, i32 1)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %12
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_mvwinwstr(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}
/* Variables and functions */
double omp_get_wtime();
double gettime(void) { return omp_get_wtime(); }


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

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

LLVM IR (-O0):
define double @gettime() {
%1 = call double (...) @omp_get_wtime()
ret double %1
}

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

/* Variables and functions */
const char *RMXGetChannelName(uint8_t id, size_t rmxlen, const uint8_t *body) {
  return NULL;
}


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

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

LLVM IR (-O0):
define i8* @RMXGetChannelName(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
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @RMXGetChannelName(i32 %0, i64 %1, i32* nocapture readnone %2) {
ret i8* null
}
int badopt(void) {
  static int failed = 0;
  if (failed) {
    return -1;
  } else {
    failed = 1;
    return '?';
  }
}


x86 assembly (clang, -O0):
<badopt>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f19(%rip)
je     111d <badopt+0x1d>
movl   $0xffffffff,-0x4(%rbp)
jmp    112e <badopt+0x2e>
movl   $0x1,0x2efd(%rip)
movl   $0x3f,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<badopt>:
mov    $0xffffffff,%eax
cmpb   $0x0,0x2f18(%rip)
jne    111a <badopt+0x1a>
movb   $0x1,0x2f0f(%rip)
mov    $0x3f,%eax
ret

LLVM IR (-O0):
@badopt.failed = internal global i32 0
define i32 @badopt() {
%1 = alloca i32
%2 = load i32, i32* @badopt.failed
%3 = icmp ne i32 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 -1, i32* %1
br label %6
5: ; preds = %0
store i32 1, i32* @badopt.failed
store i32 63, i32* %1
br label %6
6: ; preds = %5, %4
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
@badopt.failed = internal unnamed_addr global i1 false
define i32 @badopt() {
%1 = load i1, i1* @badopt.failed
br i1 %1, label %3, label %2
2: ; preds = %0
store i1 true, i1* @badopt.failed
br label %3
3: ; preds = %0, %2
%4 = phi i32 [ 63, %2 ], [ -1, %0 ]
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void rtpp_stats_getidxbyname_fin(void *pub) {
  fprintf(stderr,
          "Method rtpp_stats@%p::getidxbyname (rtpp_stats_getidxbyname) is "
          "invoked after destruction\x0a",
          pub);
  abort();
}


x86 assembly (clang, -O0):
<rtpp_stats_getidxbyname_fin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<rtpp_stats_getidxbyname_fin>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [91 x i8] c"Method rtpp_stats@%p::getidxbyname (rtpp_stats_getidxbyname) is invoked after destruction\0A\00"
define void @rtpp_stats_getidxbyname_fin(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [91 x i8] c"Method rtpp_stats@%p::getidxbyname (rtpp_stats_getidxbyname) is invoked after destruction\0A\00"
define void @rtpp_stats_getidxbyname_fin(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ db(int);
void fprem1() {
  db(0xD9);
  db(0xF5);
}


x86 assembly (clang, -O0):
<fprem1>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd9,%edi
call   1030 <db@plt>
mov    $0xf5,%edi
call   1030 <db@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fprem1>:
push   %rax
mov    $0xd9,%edi
call   1030 <db@plt>
mov    $0xf5,%edi
pop    %rax
jmp    1030 <db@plt>

LLVM IR (-O0):
define void @fprem1() {
%1 = call i32 @db(i32 217)
%2 = call i32 @db(i32 245)
ret void
}

LLVM IR (-O2):
define void @fprem1() {
%1 = tail call i32 @db(i32 217)
%2 = tail call i32 @db(i32 245)
ret void
}
/* Variables and functions */
float arm_rand32();
float randf() { return arm_rand32() / 4294967296.0f; }


x86 assembly (clang, -O0):
<randf>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <arm_rand32@plt>
movss  0xedd(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<randf>:
push   %rax
xor    %eax,%eax
call   1030 <arm_rand32@plt>
mulss  0xee0(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @randf() {
%1 = call float (...) @arm_rand32()
%2 = fdiv float %1, 0x41F0000000000000
ret float %2
}

LLVM IR (-O2):
define float @randf() {
%1 = tail call float (...) @arm_rand32()
%2 = fmul float %1, 0x3DF0000000000000
ret float %2
}
/* Variables and functions */
int PAPI_set_cmp_domain(int, int);
void papif_set_cmp_domain_(int *domain, int *cidx, int *check) {
  *check = PAPI_set_cmp_domain(*domain, *cidx);
}


x86 assembly (clang, -O0):
<papif_set_cmp_domain_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
call   1030 <PAPI_set_cmp_domain@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<papif_set_cmp_domain_>:
push   %rbx
mov    %rdx,%rbx
mov    (%rdi),%edi
mov    (%rsi),%esi
call   1030 <PAPI_set_cmp_domain@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @papif_set_cmp_domain_(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = load i32*, i32** %5
%10 = load i32, i32* %9
%11 = call i32 @PAPI_set_cmp_domain(i32 %8, i32 %10)
%12 = load i32*, i32** %6
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @papif_set_cmp_domain_(i32* nocapture %0, i32* nocapture %1, i32* nocapture writeonly %2) {
%4 = load i32, i32* %0
%5 = load i32, i32* %1
%6 = tail call i32 @PAPI_set_cmp_domain(i32 %4, i32 %5)
store i32 %6, i32* %2
ret void
}
int stat(const char *path, struct stat *st) { return -1; }


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

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

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

LLVM IR (-O2):
%struct.stat = type opaque
define i32 @stat(i8* nocapture readnone %0, %struct.stat* nocapture readnone %1) {
ret i32 -1
}
int _WLocale_mb_cur_max(struct _Locale_codecvt *lcodecvt
                        __attribute__((__unused__))) {
  return 1;
}


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

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

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

LLVM IR (-O2):
%struct._Locale_codecvt = type opaque
define i32 @_WLocale_mb_cur_max(%struct._Locale_codecvt* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ expand(char *, char *);
int main() {
  char original[5], new[5];
  expand(original, new);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0x13(%rsp),%rdi
lea    0xe(%rsp),%rsi
call   1030 <expand@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i8]
%3 = alloca [5 x i8]
store i32 0, i32* %1
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%6 = call i32 @expand(i8* %4, i8* %5)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [5 x i8]
%2 = alloca [5 x i8]
%3 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%5 = call i32 @expand(i8* %3, i8* %4)
ret i32 0
}
void RTTcpSgWriteLV(void) {}


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

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

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

LLVM IR (-O2):
define void @RTTcpSgWriteLV() {
ret void
}
int c012(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @c012() {
ret i32 0
}
void init_engine(void) {}


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

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

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

LLVM IR (-O2):
define void @init_engine() {
ret void
}
int conditional(int x, int y, int z) {
  return ((((!(!x)) << 31) >> 31) & y) | ((((!x) << 31) >> 31) & z);
}


x86 assembly (clang, -O0):
<conditional>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
shl    $0x1f,%eax
sar    $0x1f,%eax
and    -0x8(%rbp),%eax
cmpl   $0x0,-0x4(%rbp)
setne  %cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
shl    $0x1f,%ecx
sar    $0x1f,%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<conditional>:
mov    %esi,%eax
test   %edi,%edi
cmove  %edx,%eax
ret

LLVM IR (-O0):
define i32 @conditional(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
%10 = xor i1 %9, true
%11 = zext i1 %10 to i32
%12 = shl i32 %11, 31
%13 = ashr i32 %12, 31
%14 = load i32, i32* %5
%15 = and i32 %13, %14
%16 = load i32, i32* %4
%17 = icmp ne i32 %16, 0
%18 = xor i1 %17, true
%19 = zext i1 %18 to i32
%20 = shl i32 %19, 31
%21 = ashr i32 %20, 31
%22 = load i32, i32* %6
%23 = and i32 %21, %22
%24 = or i32 %15, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @conditional(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i32 %2, i32 %1
ret i32 %5
}
/* Type definitions */
struct cpu {
  int dummy;
};

/* Variables and functions */
unsigned char cpu_get_r8(struct cpu *, int);
unsigned char cpu_get_a(struct cpu *cpu) { return cpu_get_r8(cpu, (1)); }


x86 assembly (clang, -O0):
<cpu_get_a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <cpu_get_r8@plt>
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpu_get_a>:
mov    $0x1,%esi
jmp    1030 <cpu_get_r8@plt>

LLVM IR (-O0):
%struct.cpu = type { i32 }
define zeroext i8 @cpu_get_a(%struct.cpu* %0) {
%2 = alloca %struct.cpu*
store %struct.cpu* %0, %struct.cpu** %2
%3 = load %struct.cpu*, %struct.cpu** %2
%4 = call zeroext i8 @cpu_get_r8(%struct.cpu* %3, i32 1)
ret i8 %4
}

LLVM IR (-O2):
%struct.cpu = type { i32 }
define zeroext i8 @cpu_get_a(%struct.cpu* %0) {
%2 = tail call zeroext i8 @cpu_get_r8(%struct.cpu* %0, i32 1)
ret i8 %2
}
int foo(int bar) { return bar + 1; }


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

x86 assembly (clang, -O2):
<foo>:
lea    0x1(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int minCut(char *);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  if (argc != 2) {
    fprintf(stderr, "Usage: ./test string\n");
    exit(-1);
  }
  printf("%d\n", minCut(argv[1]));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     117f <main+0x3f>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
lea    0xe90(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <minCut@plt>
mov    %eax,%esi
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    1161 <main+0x21>
mov    0x8(%rsi),%rdi
call   1050 <minCut@plt>
lea    0xec0(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
lea    0xe8f(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c"Usage: ./test string\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 2
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 -1)
unreachable
12: ; preds = %2
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i32 @minCut(i8* %15)
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %16)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"Usage: ./test string\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @minCut(i8* %10)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %11)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void mostrar(char *msg) { printf("> %s\n", msg); }


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

x86 assembly (clang, -O2):
<mostrar>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"> %s\0A\00"
define void @mostrar(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int mips_ejtag_data(unsigned int);
int /*<<< orphan*/ mips_ejtag_instr(int);
int mips_ejtag_ctrl(unsigned int ctrl) {
  mips_ejtag_instr(0x0A);
  ctrl |= 0x00004000;
  return mips_ejtag_data(ctrl);
}


x86 assembly (clang, -O0):
<mips_ejtag_ctrl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xa,%edi
call   1030 <mips_ejtag_instr@plt>
mov    -0x4(%rbp),%eax
or     $0x4000,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <mips_ejtag_data@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mips_ejtag_ctrl>:
push   %rbx
mov    %edi,%ebx
mov    $0xa,%edi
call   1030 <mips_ejtag_instr@plt>
or     $0x4000,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1040 <mips_ejtag_data@plt>

LLVM IR (-O0):
define i32 @mips_ejtag_ctrl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @mips_ejtag_instr(i32 10)
%4 = load i32, i32* %2
%5 = or i32 %4, 16384
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @mips_ejtag_data(i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @mips_ejtag_ctrl(i32 %0) {
%2 = tail call i32 @mips_ejtag_instr(i32 10)
%3 = or i32 %0, 16384
%4 = tail call i32 @mips_ejtag_data(i32 %3)
ret i32 %4
}
/* Type definitions */
struct rubikCube {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ rotateFaceClockwise(struct rubikCube *, unsigned char);
void rotateFaceCounterClockwise(struct rubikCube *cube, unsigned char face) {
  unsigned char i;
  for (i = 0; i < 3; i++) {
    rotateFaceClockwise(cube, face);
  }
}


x86 assembly (clang, -O0):
<rotateFaceCounterClockwise>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movb   $0x0,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
cmp    $0x3,%eax
jge    114d <rotateFaceCounterClockwise+0x3d>
mov    -0x8(%rbp),%rdi
movzbl -0x9(%rbp),%esi
call   1030 <rotateFaceClockwise@plt>
mov    -0xa(%rbp),%al
add    $0x1,%al
mov    %al,-0xa(%rbp)
jmp    1126 <rotateFaceCounterClockwise+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotateFaceCounterClockwise>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <rotateFaceClockwise@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <rotateFaceClockwise@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <rotateFaceClockwise@plt>

LLVM IR (-O0):
%struct.rubikCube = type { i32 }
define void @rotateFaceCounterClockwise(%struct.rubikCube* %0, i8 zeroext %1) {
%3 = alloca %struct.rubikCube*
%4 = alloca i8
%5 = alloca i8
store %struct.rubikCube* %0, %struct.rubikCube** %3
store i8 %1, i8* %4
store i8 0, i8* %5
br label %6
6: ; preds = %14, %2
%7 = load i8, i8* %5
%8 = zext i8 %7 to i32
%9 = icmp slt i32 %8, 3
br i1 %9, label %10, label %17
10: ; preds = %6
%11 = load %struct.rubikCube*, %struct.rubikCube** %3
%12 = load i8, i8* %4
%13 = call i32 @rotateFaceClockwise(%struct.rubikCube* %11, i8 zeroext %12)
br label %14
14: ; preds = %10
%15 = load i8, i8* %5
%16 = add i8 %15, 1
store i8 %16, i8* %5
br label %6
17: ; preds = %6
ret void
}

LLVM IR (-O2):
%struct.rubikCube = type { i32 }
define void @rotateFaceCounterClockwise(%struct.rubikCube* %0, i8 zeroext %1) {
%3 = tail call i32 @rotateFaceClockwise(%struct.rubikCube* %0, i8 zeroext %1)
%4 = tail call i32 @rotateFaceClockwise(%struct.rubikCube* %0, i8 zeroext %1)
%5 = tail call i32 @rotateFaceClockwise(%struct.rubikCube* %0, i8 zeroext %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf(
      "There should be no explciit rules in either direction for the execution "
      "of "
      "this binary");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [87 x i8] c"There should be no explciit rules in either direction for the execution of this binary\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [87 x i8] c"There should be no explciit rules in either direction for the execution of this binary\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([87 x i8], [87 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void mlx5e_ethtool_init_steering(struct mlx5e_priv *priv) {}


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

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

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

LLVM IR (-O2):
%struct.mlx5e_priv = type opaque
define void @mlx5e_ethtool_init_steering(%struct.mlx5e_priv* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint64_t;

/* Variables and functions */
uint8_t u64_b1(uint64_t value) {
  return (uint8_t)((value & 0x000000000000FF00) >> 8);
}


x86 assembly (clang, -O0):
<u64_b1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @u64_b1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 65280
%5 = ashr i32 %4, 8
ret i32 %5
}

LLVM IR (-O2):
define i32 @u64_b1(i32 %0) {
%2 = lshr i32 %0, 8
%3 = and i32 %2, 255
ret i32 %3
}
int cairo_code_draw_envScope_get_height() { return 200; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_envScope_get_height() {
ret i32 200
}

LLVM IR (-O2):
define i32 @cairo_code_draw_envScope_get_height() {
ret i32 200
}
__attribute__((noipa)) void fn24(char *p) {
  if ((((long unsigned int)p) & 15) != 0)
    fn23();
  asm("");
}


x86 assembly (clang, -O0):
<fn24>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xf,%rax
cmp    $0x0,%rax
je     1135 <fn24+0x25>
mov    $0x0,%al
call   1030 <fn23@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn24>:
test   $0xf,%dil
je     1122 <fn24+0x12>
push   %rax
xor    %eax,%eax
call   1030 <fn23@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @fn24(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = and i64 %4, 15
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 (...) @fn23()
br label %9
9: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @fn24(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = and i64 %2, 15
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @fn23()
br label %7
7: ; preds = %5, %1
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  printf("Number of arguments from the user: %d\n", argc);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [39 x i8] c"Number of arguments from the user: %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [39 x i8] c"Number of arguments from the user: %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
int EAST_CD_2(int in) {
  FILE *fin = fopen("func_header.h.ecov", "a");
  if (fin) {
    fprintf(fin, "CD2:%d\n", in);
  }
  fclose(fin);
  return in;
}


x86 assembly (clang, -O0):
<EAST_CD_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
lea    0xeca(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1170 <EAST_CD_2+0x40>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xeaa(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EAST_CD_2>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
lea    0xec4(%rip),%rdi
lea    0xed0(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1161 <EAST_CD_2+0x31>
lea    0xebe(%rip),%rsi
mov    %rbx,%rdi
mov    %ebp,%edx
call   1040 <fprintf@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"func_header.h.ecov\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [8 x i8] c"CD2:%d\0A\00"
define i32 @EAST_CD_2(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = call i32* @fopen(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %4, i32** %3
%5 = load i32*, i32** %3
%6 = icmp ne i32* %5, null
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32*, i32** %3
%9 = load i32, i32* %2
%10 = call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %7, %1
%12 = load i32*, i32** %3
%13 = call i32 @fclose(i32* %12)
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@.str = [19 x i8] c"func_header.h.ecov\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [8 x i8] c"CD2:%d\0A\00"
define i32 @EAST_CD_2(i32 returned %0) {
%2 = tail call i32* @fopen(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fprintf(i32* %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %0)
br label %6
6: ; preds = %4, %1
%7 = tail call i32 @fclose(i32* %2)
ret i32 %0
}
char *sha256hex(bitstr, bitcnt)
unsigned char *bitstr;
unsigned long bitcnt;
{ return ((char *)shacomp(256, 2, bitstr, bitcnt)); }


x86 assembly (clang, -O0):
<sha256hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    $0x100,%edi
mov    $0x2,%esi
mov    $0x0,%al
call   1030 <shacomp@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sha256hex>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    $0x100,%edi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <shacomp@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i8* @sha256hex(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i32 (i32, i32, i8*, i64, ...) bitcast (i32 (...)* @shacomp to i32 (i32, i32, i8*, i64, ...)*)(i32 256, i32 2, i8* %5, i64 %6)
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
ret i8* %9
}

LLVM IR (-O2):
define i8* @sha256hex(i8* %0, i64 %1) {
%3 = tail call i32 (i32, i32, i8*, i64, ...) bitcast (i32 (...)* @shacomp to i32 (i32, i32, i8*, i64, ...)*)(i32 256, i32 2, i8* %0, i64 %1)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xc0() {
  Assert_real((isalnum(192) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              965, ("isalnum should be 0 for 0xc0"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xc0\00"
define void @t_isalnum_0xc0() {
%1 = call i64 @isalnum(i32 192)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 965, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xc0\00"
define void @t_isalnum_0xc0() {
%1 = tail call i64 @isalnum(i32 192)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 965, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void gtk_spin_button_set_value() {}


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

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

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

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