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

/* Variables and functions */
struct Value *boolean(int);
struct Value *equal_integer(int *a, int *b) {
  if (*a == *b)
    return boolean(1);
  return boolean(0);
}


x86 assembly (clang, -O0):
<equal_integer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jne    1145 <equal_integer+0x35>
mov    $0x1,%edi
call   1030 <boolean@plt>
mov    %rax,-0x8(%rbp)
jmp    1150 <equal_integer+0x40>
xor    %edi,%edi
call   1030 <boolean@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<equal_integer>:
mov    (%rdi),%eax
xor    %edi,%edi
cmp    (%rsi),%eax
sete   %dil
jmp    1030 <boolean@plt>

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

LLVM IR (-O2):
%struct.Value = type { i32 }
define %struct.Value* @equal_integer(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = icmp eq i32 %3, %4
%6 = zext i1 %5 to i32
%7 = tail call %struct.Value* @boolean(i32 %6)
ret %struct.Value* %7
}
/* Type definitions */
typedef int uint8_t;
typedef int uint64_t;

/* Variables and functions */
void pushbackSixBitByte(uint64_t *c, uint8_t z, int n) {
  uint64_t masked = z & 0x3F;
  uint64_t eraser = 0x3F;
  masked <<= 42 - 6 * n;
  eraser <<= 42 - 6 * n;
  eraser = ~eraser;
  (*c) &= eraser;
  (*c) |= masked;
}


x86 assembly (clang, -O0):
<pushbackSixBitByte>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    $0x3f,%eax
mov    %eax,-0x14(%rbp)
movl   $0x3f,-0x18(%rbp)
imul   $0x6,-0x10(%rbp),%eax
mov    $0x2a,%ecx
sub    %eax,%ecx
mov    -0x14(%rbp),%eax
shl    %cl,%eax
mov    %eax,-0x14(%rbp)
imul   $0x6,-0x10(%rbp),%eax
mov    $0x2a,%ecx
sub    %eax,%ecx
mov    -0x18(%rbp),%eax
shl    %cl,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%ecx
mov    -0x8(%rbp),%rax
and    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%rax
or     (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<pushbackSixBitByte>:
and    $0x3f,%esi
add    %edx,%edx
lea    (%rdx,%rdx,2),%ecx
neg    %ecx
add    $0x2a,%cl
shl    %cl,%esi
mov    $0x3f,%eax
shl    %cl,%eax
not    %eax
and    (%rdi),%eax
or     %esi,%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @pushbackSixBitByte(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %5
%10 = and i32 %9, 63
store i32 %10, i32* %7
store i32 63, i32* %8
%11 = load i32, i32* %6
%12 = mul nsw i32 6, %11
%13 = sub nsw i32 42, %12
%14 = load i32, i32* %7
%15 = shl i32 %14, %13
store i32 %15, i32* %7
%16 = load i32, i32* %6
%17 = mul nsw i32 6, %16
%18 = sub nsw i32 42, %17
%19 = load i32, i32* %8
%20 = shl i32 %19, %18
store i32 %20, i32* %8
%21 = load i32, i32* %8
%22 = xor i32 %21, -1
store i32 %22, i32* %8
%23 = load i32, i32* %8
%24 = load i32*, i32** %4
%25 = load i32, i32* %24
%26 = and i32 %25, %23
store i32 %26, i32* %24
%27 = load i32, i32* %7
%28 = load i32*, i32** %4
%29 = load i32, i32* %28
%30 = or i32 %29, %27
store i32 %30, i32* %28
ret void
}

LLVM IR (-O2):
define void @pushbackSixBitByte(i32* nocapture %0, i32 %1, i32 %2) {
%4 = and i32 %1, 63
%5 = mul i32 %2, -6
%6 = add i32 %5, 42
%7 = shl i32 %4, %6
%8 = shl i32 63, %6
%9 = xor i32 %8, -1
%10 = load i32, i32* %0
%11 = and i32 %10, %9
%12 = or i32 %11, %7
store i32 %12, i32* %0
ret void
}
void pmu_adc_disable() {}


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

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

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

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

/* Variables and functions */
int dll_getc(int /*<<< orphan*/ *);
int __wrap__IO_getc_unlocked(FILE *stream) { return dll_getc(stream); }


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

x86 assembly (clang, -O2):
<__wrap__IO_getc_unlocked>:
jmp    1030 <dll_getc@plt>

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

LLVM IR (-O2):
define i32 @__wrap__IO_getc_unlocked(i32* %0) {
%2 = tail call i32 @dll_getc(i32* %0)
ret i32 %2
}
/* Variables and functions */
int strlen(char *);
char *Space(char *n) {
  int i;
  i = strlen(n);
  if (i < 1)
    return "\t\t\t";
  if (i < 8)
    return "\t\t";
  return "\t";
}


x86 assembly (clang, -O0):
<Space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jge    1142 <Space+0x32>
lea    0xec7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1167 <Space+0x57>
cmpl   $0x8,-0x14(%rbp)
jge    115c <Space+0x4c>
lea    0xeae(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1167 <Space+0x57>
lea    0xe9f(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Space>:
push   %rax
call   1030 <strlen@plt>
cmp    $0x8,%eax
lea    0xee1(%rip),%rcx
lea    0xedb(%rip),%rdx
cmovl  %rcx,%rdx
test   %eax,%eax
lea    0xecc(%rip),%rax
cmovg  %rdx,%rax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"\09\09\09\00"
@.str.1 = [3 x i8] c"\09\09\00"
@.str.2 = [2 x i8] c"\09\00"
define i8* @Space(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp slt i32 %2, 1
%4 = icmp slt i32 %2, 8
%5 = select i1 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)
%6 = select i1 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void show_help() {
  printf("\n\tOption: t - interval, c - command, h -help\n\n");
}


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

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

LLVM IR (-O0):
@.str = [47 x i8] c"\0A\09Option: t - interval, c - command, h -help\0A\0A\00"
define void @show_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [46 x i8] c"\0A\09Option: t - interval, c - command, h -help\0A\00"
define void @show_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ permutations(unsigned int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, unsigned int *);
int main() {
  unsigned int a;
  scanf("%u", &a);
  printf("\nThe Perutations are :\n");
  permutations(a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1050 <permutations@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%edi
call   1050 <permutations@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%u\00"
@.str.1 = [24 x i8] c"\0AThe Perutations are :\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%3 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%4 = load i32, i32* %1
%5 = call i32 @permutations(i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%u\00"
@str = [23 x i8] c"\0AThe Perutations are :\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%5 = load i32, i32* %1
%6 = call i32 @permutations(i32 %5)
ret i32 0
}
void SetFree(s) char *s;
{ free(s); }


x86 assembly (clang, -O0):
<SetFree>:
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):
<SetFree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @SetFree(i8* nocapture %0) {
tail call void @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ printid(int *);
int main() {
  int a[2] = {2, 3};
  float r;
  r = a[1] /= a[0];
  print("a 2 1");
  printid(a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x10(%rbp)
lea    0xeb2(%rip),%rdi
call   1030 <print@plt>
lea    -0xc(%rbp),%rdi
call   1040 <printid@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movabs $0x100000002,%rax
mov    %rax,(%rsp)
lea    0xeca(%rip),%rdi
call   1030 <print@plt>
mov    %rsp,%rdi
call   1040 <printid@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.a = [2 x i32] [i32 2, i32 3]
@.str = [6 x i8] c"a 2 1\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x i32]
%3 = alloca float
store i32 0, i32* %1
%4 = bitcast [2 x i32]* %2 to i8*
%5 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%6 = load i32, i32* %5
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 1
%8 = load i32, i32* %7
%9 = sdiv i32 %8, %6
store i32 %9, i32* %7
%10 = sitofp i32 %9 to float
store float %10, float* %3
%11 = call i32 @print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%13 = call i32 @printid(i32* %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"a 2 1\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
store i64 4294967298, i64* %1
%3 = bitcast i64* %1 to i32*
%4 = tail call i32 @print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @printid(i32* %3)
ret i32 0
}
/* Variables and functions */
int add(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", add(5, 6));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @add(i32 5, i32 6)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void clearScreen() {
  printf("\033[2J");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<clearScreen>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearScreen>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[2J\00"
@stdout = global i32 0
define void @clearScreen() {
%1 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = call i32 @fflush(i32 %2)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[2J\00"
@stdout = global i32 0
define void @clearScreen() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
ret void
}
int test_imm_A1uint8_reg(unsigned char val) {
  return ((val) & (0xA1 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A1uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xa1,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_A1uint8_reg>:
test   $0xa1,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_A1uint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 161
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_A1uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -95
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ minprintf(char *, int, char *, int);
int main(void) {
  minprintf("%d, %s, %2x\n", 12, "t_base_define", 15);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0xc,%esi
lea    0xedb(%rip),%rdx
mov    $0xf,%ecx
call   1030 <minprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xeee(%rip),%rdx
mov    $0xc,%esi
mov    $0xf,%ecx
call   1030 <minprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"%d, %s, %2x\0A\00"
@.str.1 = [14 x i8] c"t_base_define\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @minprintf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 12, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 15)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"%d, %s, %2x\0A\00"
@.str.1 = [14 x i8] c"t_base_define\00"
define i32 @main() {
%1 = tail call i32 @minprintf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 12, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 15)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("\ngp_bsa_dump_agent is not supported on this platform\n\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [55 x i8] c"\0Agp_bsa_dump_agent is not supported on this platform\0A\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [54 x i8] c"\0Agp_bsa_dump_agent is not supported on this platform\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int _increasing_unsignedint(const void *a, const void *b) {
  if ((((unsigned int *)b)[0]) > (((unsigned int *)a)[0]))
    return (-1);
  else if ((((unsigned int *)b)[0]) < (((unsigned int *)a)[0]))
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<_increasing_unsignedint>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jbe    112a <_increasing_unsignedint+0x2a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1154 <_increasing_unsignedint+0x54>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jae    1148 <_increasing_unsignedint+0x48>
movl   $0x1,-0x4(%rbp)
jmp    1154 <_increasing_unsignedint+0x54>
jmp    114d <_increasing_unsignedint+0x4d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_increasing_unsignedint>:
mov    (%rsi),%eax
xor    %ecx,%ecx
cmp    (%rdi),%eax
setb   %cl
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @_increasing_unsignedint(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %0 to i32*
%6 = load i32, i32* %5
%7 = icmp ugt i32 %4, %6
%8 = icmp ult i32 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
char *absolute_path(char *);
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ free(char *);
void make_absolute_path(char **path) {
  char *abs;
  assert(path != NULL);
  assert(*path != NULL);
  abs = absolute_path(*path);
  free(*path);
  *path = abs;
}


x86 assembly (clang, -O0):
<make_absolute_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1050 <absolute_path@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_absolute_path>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
xor    %edi,%edi
cmpq   $0x0,(%rbx)
setne  %dil
call   1040 <assert@plt>
mov    (%rbx),%rdi
call   1050 <absolute_path@plt>
mov    %rax,%r14
mov    (%rbx),%rdi
call   1030 <free@plt>
mov    %r14,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @make_absolute_path(i8** %0) {
%2 = alloca i8**
%3 = alloca i8*
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
%5 = icmp ne i8** %4, null
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i8**, i8*** %2
%9 = load i8*, i8** %8
%10 = icmp ne i8* %9, null
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i8**, i8*** %2
%14 = load i8*, i8** %13
%15 = call i8* @absolute_path(i8* %14)
store i8* %15, i8** %3
%16 = load i8**, i8*** %2
%17 = load i8*, i8** %16
%18 = call i32 @free(i8* %17)
%19 = load i8*, i8** %3
%20 = load i8**, i8*** %2
store i8* %19, i8** %20
ret void
}

LLVM IR (-O2):
define void @make_absolute_path(i8** %0) {
%2 = icmp ne i8** %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = load i8*, i8** %0
%6 = icmp ne i8* %5, null
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = load i8*, i8** %0
%10 = tail call i8* @absolute_path(i8* %9)
%11 = load i8*, i8** %0
%12 = tail call i32 @free(i8* %11)
store i8* %10, i8** %0
ret void
}
/* 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_BR_0(int in) {
  FILE *fin = fopen("func_header.h.ecov", "a");
  if (fin) {
    fprintf(fin, "BR0:%d\n", in);
  }
  fclose(fin);
  return in;
}


x86 assembly (clang, -O0):
<EAST_BR_0>:
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_BR_0+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_BR_0>:
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_BR_0+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"BR0:%d\0A\00"
define i32 @EAST_BR_0(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"BR0:%d\0A\00"
define i32 @EAST_BR_0(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
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x2a() {
  Assert_real((islower(42) == 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_islower.c",
              215, ("islower should be 0 for *"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x2a>:
push   %rax
mov    $0x2a,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xd7,%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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for *\00"
define void @t_islower_0x2a() {
%1 = call i64 @islower(i32 42)
%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 215, i8* getelementptr inbounds ([26 x i8], [26 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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for *\00"
define void @t_islower_0x2a() {
%1 = tail call i64 @islower(i32 42)
%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 215, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int test_imm_82int32_mem(int *val) {
  return ((*val) & (0x82 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_82int32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0x82,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_82int32_mem>:
testb  $0x82,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_82int32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 130
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_82int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 130
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
unsigned long factorial(unsigned int);
unsigned long int npr(unsigned int n, unsigned int r) {
  return factorial(n) / factorial(n - r);
}


x86 assembly (clang, -O0):
<npr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <factorial@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
sub    -0x8(%rbp),%edi
call   1030 <factorial@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
xor    %edx,%edx
div    %rcx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<npr>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%ebp
call   1030 <factorial@plt>
mov    %rax,%rbx
sub    %r14d,%ebp
mov    %ebp,%edi
call   1030 <factorial@plt>
mov    %rax,%rcx
mov    %rbx,%rax
or     %rcx,%rax
shr    $0x20,%rax
je     1144 <npr+0x34>
mov    %rbx,%rax
xor    %edx,%edx
div    %rcx
jmp    114a <npr+0x3a>
mov    %ebx,%eax
xor    %edx,%edx
div    %ecx
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i64 @npr(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 = call i64 @factorial(i32 %5)
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = sub i32 %7, %8
%10 = call i64 @factorial(i32 %9)
%11 = udiv i64 %6, %10
ret i64 %11
}

LLVM IR (-O2):
define i64 @npr(i32 %0, i32 %1) {
%3 = tail call i64 @factorial(i32 %0)
%4 = sub i32 %0, %1
%5 = tail call i64 @factorial(i32 %4)
%6 = udiv i64 %3, %5
ret i64 %6
}
void ff_hevc_put_hevc_qpel_h64_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_qpel_h64_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ invalid_phase(char *);
void phase_6(char *input) { invalid_phase("6b"); }


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"6b\00"
define void @phase_6(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @invalid_phase(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"6b\00"
define void @phase_6(i8* nocapture readnone %0) {
%2 = tail call i32 @invalid_phase(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
double sgn(double n) { return (n > 0.0) - (n < 0.0); }


x86 assembly (clang, -O0):
<sgn>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sgn>:
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm1,%xmm0
seta   %al
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
seta   %cl
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
ret

LLVM IR (-O0):
define double @sgn(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ogt double %3, 0.000000e+00
%5 = zext i1 %4 to i32
%6 = load double, double* %2
%7 = fcmp olt double %6, 0.000000e+00
%8 = zext i1 %7 to i32
%9 = sub nsw i32 %5, %8
%10 = sitofp i32 %9 to double
ret double %10
}

LLVM IR (-O2):
define double @sgn(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
%3 = zext i1 %2 to i32
%4 = fcmp olt double %0, 0.000000e+00
%5 = sext i1 %4 to i32
%6 = add nsw i32 %5, %3
%7 = sitofp i32 %6 to double
ret double %7
}
/* Type definitions */
struct memorycontainer {
  int dummy;
};

/* Variables and functions */
struct memorycontainer *createExpression(int, struct memorycontainer *,
                                         struct memorycontainer *);
struct memorycontainer *
createMulExpression(struct memorycontainer *expression1,
                    struct memorycontainer *expression2) {
  return createExpression(0x000D, expression1, expression2);
}


x86 assembly (clang, -O0):
<createMulExpression>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0xd,%edi
call   1030 <createExpression@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<createMulExpression>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0xd,%edi
jmp    1030 <createExpression@plt>

LLVM IR (-O0):
%struct.memorycontainer = type { i32 }
define %struct.memorycontainer* @createMulExpression(%struct.memorycontainer* %0, %struct.memorycontainer* %1) {
%3 = alloca %struct.memorycontainer*
%4 = alloca %struct.memorycontainer*
store %struct.memorycontainer* %0, %struct.memorycontainer** %3
store %struct.memorycontainer* %1, %struct.memorycontainer** %4
%5 = load %struct.memorycontainer*, %struct.memorycontainer** %3
%6 = load %struct.memorycontainer*, %struct.memorycontainer** %4
%7 = call %struct.memorycontainer* @createExpression(i32 13, %struct.memorycontainer* %5, %struct.memorycontainer* %6)
ret %struct.memorycontainer* %7
}

LLVM IR (-O2):
%struct.memorycontainer = type { i32 }
define %struct.memorycontainer* @createMulExpression(%struct.memorycontainer* %0, %struct.memorycontainer* %1) {
%3 = tail call %struct.memorycontainer* @createExpression(i32 13, %struct.memorycontainer* %0, %struct.memorycontainer* %1)
ret %struct.memorycontainer* %3
}
void gtk_widget_set_double_buffered() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_set_double_buffered() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ wstrFree(void *);
void dictWstrDestructor(void *val) { wstrFree(val); }


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

x86 assembly (clang, -O2):
<dictWstrDestructor>:
jmp    1030 <wstrFree@plt>

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

LLVM IR (-O2):
define void @dictWstrDestructor(i8* %0) {
%2 = tail call i32 @wstrFree(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void print_reverse(char line[], int len) {
  int i;
  for (i = len - 1; i >= 0; i--) {
    putchar(line[i]);
  }
}


x86 assembly (clang, -O0):
<print_reverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1151 <print_reverse+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1128 <print_reverse+0x18>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_reverse>:
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
jle    1147 <print_reverse+0x37>
mov    %rdi,%r14
mov    %esi,%ebx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    -0x2(%rbx),%eax
movsbl (%r14,%rax,1),%edi
call   1030 <putchar@plt>
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%rbx
ja     1130 <print_reverse+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @print_reverse(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ %5, %4 ], [ %8, %6 ]
%8 = add nsw i64 %7, -1
%9 = and i64 %8, 4294967295
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = tail call i32 @putchar(i8 signext %11)
%13 = icmp ugt i64 %7, 1
br i1 %13, label %6, label %14
14: ; preds = %6, %2
ret void
}
exclsrh(prog, arg1, arg2) char *prog, *arg1, *arg2;
{ return (excvsrh(prog, &arg1)); }


x86 assembly (clang, -O0):
<exclsrh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <excvsrh@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exclsrh>:
push   %rax
mov    %rsi,(%rsp)
mov    %rsp,%rsi
xor    %eax,%eax
call   1030 <excvsrh@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @exclsrh(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = call i32 (i8*, i8**, ...) bitcast (i32 (...)* @excvsrh to i32 (i8*, i8**, ...)*)(i8* %7, i8** %5)
ret i32 %8
}

LLVM IR (-O2):
define i32 @exclsrh(i8* %0, i8* %1, i8* nocapture readnone %2) {
%4 = alloca i8*
store i8* %1, i8** %4
%5 = call i32 (i8*, i8**, ...) bitcast (i32 (...)* @excvsrh to i32 (i8*, i8**, ...)*)(i8* %0, i8** %4)
ret i32 %5
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int do_some_work(int64_t p) {
  int64_t i = 2;
  while (i < p) {
    if ((p % i++) == 0) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<do_some_work>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1145 <do_some_work+0x45>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1140 <do_some_work+0x40>
movl   $0x1,-0x4(%rbp)
jmp    114c <do_some_work+0x4c>
jmp    110e <do_some_work+0xe>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_some_work>:
cmp    $0x3,%edi
mov    $0x2,%esi
mov    $0x2,%ecx
cmovge %edi,%ecx
cmp    %esi,%ecx
je     1128 <do_some_work+0x28>
mov    %edi,%eax
cltd
idiv   %esi
lea    0x1(%rsi),%eax
mov    %eax,%esi
test   %edx,%edx
jne    1110 <do_some_work+0x10>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @do_some_work(i32 %0) {
%2 = call i32 @llvm.smax.i32(i32 %0, i32 2)
br label %3
3: ; preds = %6, %1
%4 = phi i32 [ 2, %1 ], [ %7, %6 ]
%5 = icmp eq i32 %4, %2
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = add nuw i32 %4, 1
%8 = srem i32 %0, %4
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %3
10: ; preds = %3, %6
%11 = phi i32 [ 1, %6 ], [ 0, %3 ]
ret i32 %11
}
__attribute__((always_)) int elf_coredump_extra_notes_size(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @elf_coredump_extra_notes_size() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int setcolor(int cor, int bk) {
  cor = cor + 30;
  bk = bk + 40;
  printf("{FONTE}33[%d;%dm", cor, bk);
  return 1;
}


x86 assembly (clang, -O0):
<setcolor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1e,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x28,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setcolor>:
push   %rax
lea    0x1e(%rdi),%eax
lea    0x28(%rsi),%edx
lea    0xee2(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"{FONTE}33[%d;%dm\00"
define i32 @setcolor(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 = add nsw i32 %5, 30
store i32 %6, i32* %3
%7 = load i32, i32* %4
%8 = add nsw i32 %7, 40
store i32 %8, i32* %4
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
ret i32 1
}

LLVM IR (-O2):
@.str = [17 x i8] c"{FONTE}33[%d;%dm\00"
define i32 @setcolor(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 30
%4 = add nsw i32 %1, 40
%5 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
ret i32 1
}
float BlinnWyvillCosineApproximation(float x) {
  float x2 = x * x;
  float x4 = x2 * x2;
  float x6 = x4 * x2;
  float fa = 4.f / 9.f;
  float fb = 17.f / 9.f;
  float fc = 22.f / 9.f;
  float y = fa * x6 - fb * x4 + fc * x2;
  return y;
}


x86 assembly (clang, -O0):
<BlinnWyvillCosineApproximation>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xeca(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xeb9(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xea8(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x14(%rbp),%xmm1
movss  -0x10(%rbp),%xmm2
movss  -0x18(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x1c(%rbp),%xmm0
movss  -0x8(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<BlinnWyvillCosineApproximation>:
mulss  %xmm0,%xmm0
movaps %xmm0,%xmm1
mulss  %xmm0,%xmm1
movaps %xmm0,%xmm2
mulss  %xmm1,%xmm2
mulss  0xee6(%rip),%xmm1
mulss  0xee2(%rip),%xmm2
addss  %xmm1,%xmm2
mulss  0xeda(%rip),%xmm0
addss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @BlinnWyvillCosineApproximation(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
store float %0, float* %2
%10 = load float, float* %2
%11 = load float, float* %2
%12 = fmul float %10, %11
store float %12, float* %3
%13 = load float, float* %3
%14 = load float, float* %3
%15 = fmul float %13, %14
store float %15, float* %4
%16 = load float, float* %4
%17 = load float, float* %3
%18 = fmul float %16, %17
store float %18, float* %5
store float 0x3FDC71C720000000, float* %6
store float 0x3FFE38E380000000, float* %7
store float 0x40038E38E0000000, float* %8
%19 = load float, float* %6
%20 = load float, float* %5
%21 = load float, float* %7
%22 = load float, float* %4
%23 = fmul float %21, %22
%24 = fneg float %23
%25 = call float @llvm.fmuladd.f32(float %19, float %20, float %24)
%26 = load float, float* %8
%27 = load float, float* %3
%28 = call float @llvm.fmuladd.f32(float %26, float %27, float %25)
store float %28, float* %9
%29 = load float, float* %9
ret float %29
}

LLVM IR (-O2):
define float @BlinnWyvillCosineApproximation(float %0) {
%2 = fmul float %0, %0
%3 = fmul float %2, %2
%4 = fmul float %2, %3
%5 = fmul float %3, 0xBFFE38E380000000
%6 = tail call float @llvm.fmuladd.f32(float %4, float 0x3FDC71C720000000, float %5)
%7 = tail call float @llvm.fmuladd.f32(float %2, float 0x40038E38E0000000, float %6)
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/ empty_log(char *);
void d_rtclock_time_restart() { empty_log("d_rtclock_time_restart\n"); }


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

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

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

LLVM IR (-O2):
@.str = [24 x i8] c"d_rtclock_time_restart\0A\00"
define void @d_rtclock_time_restart() {
%1 = tail call i32 @empty_log(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}
const char *string_ret_const() { return "Hello, World!"; }


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

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

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

LLVM IR (-O2):
@.str = [14 x i8] c"Hello, World!\00"
define i8* @string_ret_const() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
scalar_t__ write_com_4bit(int);
void cursor_shift_R() {
  write_com_4bit(0x0010 | 0x04);
  while (write_com_4bit(0x0100) != 0)
    ;
}


x86 assembly (clang, -O0):
<cursor_shift_R>:
push   %rbp
mov    %rsp,%rbp
mov    $0x14,%edi
call   1030 <write_com_4bit@plt>
mov    $0x100,%edi
call   1030 <write_com_4bit@plt>
cmp    $0x0,%rax
je     1137 <cursor_shift_R+0x27>
jmp    111e <cursor_shift_R+0xe>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cursor_shift_R>:
push   %rax
mov    $0x14,%edi
call   1030 <write_com_4bit@plt>
nopl   0x0(%rax,%rax,1)
mov    $0x100,%edi
call   1030 <write_com_4bit@plt>
test   %rax,%rax
jne    1120 <cursor_shift_R+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @cursor_shift_R() {
%1 = call i64 @write_com_4bit(i32 20)
br label %2
2: ; preds = %5, %0
%3 = call i64 @write_com_4bit(i32 256)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %2
br label %2
6: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @cursor_shift_R() {
%1 = tail call i64 @write_com_4bit(i32 20)
br label %2
2: ; preds = %2, %0
%3 = tail call i64 @write_com_4bit(i32 256)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %2
5: ; preds = %2
ret void
}