xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ kputc(int /*<<< orphan*/);
void kputs(char *s) {
  while (*s) {
    kputc(*s++);
  }
}


x86 assembly (clang, -O0):
<kputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <kputs+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <kputc@plt>
jmp    111c <kputs+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kputs>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <kputs+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <kputc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <kputs+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @kputs(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @kputc(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_create();
int /*<<< orphan*/ test_size();
int main(void) {
  test_create();
  test_size();
  printf("----------\nAll tests passed\n----------\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <test_create@plt>
mov    $0x0,%al
call   1030 <test_size@plt>
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [39 x i8] c"----------\0AAll tests passed\0A----------\00"
define i32 @main() {
%1 = tail call i32 (...) @test_create()
%2 = tail call i32 (...) @test_size()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
ret i32 0
}
double at_perlin_get_3d(struct at_perlin *per, double x, double y, double z) {
  return 0.0;
}


x86 assembly (clang, -O0):
<at_perlin_get_3d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<at_perlin_get_3d>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
%struct.at_perlin = type opaque
define double @at_perlin_get_3d(%struct.at_perlin* %0, double %1, double %2, double %3) {
%5 = alloca %struct.at_perlin*
%6 = alloca double
%7 = alloca double
%8 = alloca double
store %struct.at_perlin* %0, %struct.at_perlin** %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
ret double 0.000000e+00
}

LLVM IR (-O2):
%struct.at_perlin = type opaque
define double @at_perlin_get_3d(%struct.at_perlin* nocapture readnone %0, double %1, double %2, double %3) {
ret double 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ entab(char *);
int /*<<< orphan*/ esettab(int, char **, char *);
int main(int argc, char *argv[]) {
  char tab[100 + 1];
  esettab(argc, argv, tab);
  entab(tab);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdx
call   1040 <esettab@plt>
mov    %rbx,%rdi
call   1030 <entab@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [101 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds [101 x i8], [101 x i8]* %6, i64 0, i64 0
%10 = call i32 @esettab(i32 %7, i8** %8, i8* %9)
%11 = getelementptr inbounds [101 x i8], [101 x i8]* %6, i64 0, i64 0
%12 = call i32 @entab(i8* %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca [101 x i8]
%4 = getelementptr inbounds [101 x i8], [101 x i8]* %3, i64 0, i64 0
%5 = call i32 @esettab(i32 %0, i8** %1, i8* %4)
%6 = call i32 @entab(i8* %4)
ret i32 0
}
unsigned int direct_hash(const void *p) { return (long)p; }


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

x86 assembly (clang, -O2):
<direct_hash>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i32 @direct_hash(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @direct_hash(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
char *util_fmt_int(char *fmt, int n) {
  static char tmp[32];
  sprintf(tmp, fmt, n);
  return tmp;
}


x86 assembly (clang, -O0):
<util_fmt_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0x2f13(%rip),%rdi
call   1030 <sprintf@plt>
lea    0x2f07(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_fmt_int>:
push   %rbx
mov    %esi,%edx
mov    %rdi,%rsi
lea    0x2f23(%rip),%rbx
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@util_fmt_int.tmp = internal global [32 x i8] zeroinitializer
define i8* @util_fmt_int(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @sprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @util_fmt_int.tmp, i64 0, i64 0), i8* %5, i32 %6)
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @util_fmt_int.tmp, i64 0, i64 0)
}

LLVM IR (-O2):
@util_fmt_int.tmp = internal global [32 x i8] zeroinitializer
define i8* @util_fmt_int(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @util_fmt_int.tmp, i64 0, i64 0), i8* dereferenceable(1) %0, i32 %1)
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @util_fmt_int.tmp, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
int main() {
  char src[] = "Copy me!";
  char dst[] = "..............";
  strncpy(dst, src, 4);
  printf("Final string: '%s'\n", dst);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0xd(%rbp)
mov    0xec8(%rip),%al
mov    %al,-0x5(%rbp)
mov    0xebf(%rip),%rax
mov    %rax,-0x1c(%rbp)
mov    0xebd(%rip),%eax
mov    %eax,-0x14(%rbp)
mov    0xeb7(%rip),%ax
mov    %ax,-0x10(%rbp)
mov    0xeaf(%rip),%al
mov    %al,-0xe(%rbp)
lea    -0x1c(%rbp),%rdi
lea    -0xd(%rbp),%rsi
mov    $0x4,%edx
call   1030 <strncpy@plt>
lea    -0x1c(%rbp),%rsi
lea    0xe90(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movabs $0x21656d2079706f43,%rax
6d 65 21
mov    %rax,(%rsp)
movb   $0x0,0x8(%rsp)
movabs $0x2e2e2e2e2e2e2e,%rax
mov    %rax,0x17(%rsp)
movabs $0x2e2e2e2e2e2e2e2e,%rax
2e 2e 2e
mov    %rax,0x10(%rsp)
lea    0x10(%rsp),%rbx
mov    %rsp,%rsi
mov    %rbx,%rdi
mov    $0x4,%edx
call   1030 <strncpy@plt>
lea    0xea6(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.src = [9 x i8] c"Copy me!\00"
@__const.main.dst = [15 x i8] c"..............\00"
@.str = [20 x i8] c"Final string: '%s'\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [9 x i8]
%3 = alloca [15 x i8]
store i32 0, i32* %1
%4 = bitcast [9 x i8]* %2 to i8*
%5 = bitcast [15 x i8]* %3 to i8*
%6 = getelementptr inbounds [15 x i8], [15 x i8]* %3, i64 0, i64 0
%7 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 0
%8 = call i32 @strncpy(i8* %6, i8* %7, i32 4)
%9 = getelementptr inbounds [15 x i8], [15 x i8]* %3, i64 0, i64 0
%10 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.src = [9 x i8] c"Copy me!\00"
@__const.main.dst = [15 x i8] c"..............\00"
@.str = [20 x i8] c"Final string: '%s'\0A\00"
define i32 @main() {
%1 = alloca [9 x i8]
%2 = alloca [15 x i8]
%3 = getelementptr inbounds [9 x i8], [9 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 0
%5 = call i32 @strncpy(i8* %4, i8* %3, i32 4)
%6 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
void icaldirset_lock(const char *dir) {}


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

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

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

LLVM IR (-O2):
define void @icaldirset_lock(i8* nocapture %0) {
ret void
}
void foo_2_1_1_1_1_2_1_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_1_1_1_2_1_1_2() {
ret void
}
int imax(const int a, const int b) { return a > b ? a : b; }


x86 assembly (clang, -O0):
<imax>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <imax+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <imax+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<imax>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @imax(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ CL_Disconnect(void *);
int /*<<< orphan*/ Com_Quit();
void CL_Quit(void) {
  CL_Disconnect(((void *)0));
  Com_Quit();
}


x86 assembly (clang, -O0):
<CL_Quit>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <CL_Disconnect@plt>
mov    $0x0,%al
call   1030 <Com_Quit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<CL_Quit>:
push   %rax
xor    %edi,%edi
call   1040 <CL_Disconnect@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <Com_Quit@plt>

LLVM IR (-O0):
define void @CL_Quit() {
%1 = call i32 @CL_Disconnect(i8* null)
%2 = call i32 (...) @Com_Quit()
ret void
}

LLVM IR (-O2):
define void @CL_Quit() {
%1 = tail call i32 @CL_Disconnect(i8* null)
%2 = tail call i32 (...) @Com_Quit()
ret void
}
int test_imm_56int16_mem(short *val) {
  return ((*val) & (0x56 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_56int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 86
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ base_height;
};
typedef TYPE_1__ XSizeHints;

/* Variables and functions */
int get_XSizeHints_base_height(void *_p) {
  return (int)((XSizeHints *)_p)->base_height;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XSizeHints_base_height(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XSizeHints_base_height(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
unsigned blend_multiply(register unsigned color1, register unsigned color2) {
  return (((color1) * (color2)) >> 8);
}


x86 assembly (clang, -O0):
<blend_multiply>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
shr    $0x8,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<blend_multiply>:
mov    %edi,%eax
imul   %esi,%eax
shr    $0x8,%eax
ret

LLVM IR (-O0):
define i32 @blend_multiply(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = mul i32 %5, %6
%8 = lshr i32 %7, 8
ret i32 %8
}

LLVM IR (-O2):
define i32 @blend_multiply(i32 %0, i32 %1) {
%3 = mul i32 %1, %0
%4 = lshr i32 %3, 8
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ putn(int, int);
void put3(int t) { putn(3, t); }


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

x86 assembly (clang, -O2):
<put3>:
mov    %edi,%esi
mov    $0x3,%edi
jmp    1030 <putn@plt>

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

LLVM IR (-O2):
define void @put3(i32 %0) {
%2 = tail call i32 @putn(i32 3, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isprint(int);
void t_isprint_0x28() {
  Assert_real((isprint(40)),
              "/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_isprint.c",
              205, ("isprint should be 1 for ("));
}


x86 assembly (clang, -O0):
<t_isprint_0x28>:
push   %rbp
mov    %rsp,%rbp
mov    $0x28,%edi
call   1030 <isprint@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0xcd,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isprint_0x28>:
push   %rax
mov    $0x28,%edi
call   1030 <isprint@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0xcd,%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_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for (\00"
define void @t_isprint_0x28() {
%1 = call i32 @isprint(i32 40)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 205, 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_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for (\00"
define void @t_isprint_0x28() {
%1 = tail call i32 @isprint(i32 40)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 205, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void removePound(char *channel, char *fixedChannel) {
  int i;
  for (i = 1; channel[i] != '\0'; i++) {
    fixedChannel[i - 1] = channel[i];
  }
  fixedChannel[i - 1] = '\0';
}


x86 assembly (clang, -O0):
<removePound>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1151 <removePound+0x51>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <removePound+0x13>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<removePound>:
mov    0x1(%rdi),%cl
test   %cl,%cl
je     113c <removePound+0x3c>
xor    %edx,%edx
movabs $0x100000000,%r8
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    %r8,%rax
mov    %cl,(%rsi,%rdx,1)
movzbl 0x2(%rdi,%rdx,1),%ecx
add    $0x1,%rdx
test   %cl,%cl
jne    1120 <removePound+0x20>
sar    $0x20,%rax
movb   $0x0,(%rsi,%rax,1)
ret
xor    %eax,%eax
movb   $0x0,(%rsi,%rax,1)
ret

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

LLVM IR (-O2):
define void @removePound(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
br i1 %5, label %18, label %6
6: ; preds = %2, %6
%7 = phi i64 [ %11, %6 ], [ 1, %2 ]
%8 = phi i8 [ %13, %6 ], [ %4, %2 ]
%9 = add nsw i64 %7, -1
%10 = getelementptr inbounds i8, i8* %1, i64 %9
store i8 %8, i8* %10
%11 = add nuw nsw i64 %7, 1
%12 = getelementptr inbounds i8, i8* %0, i64 %11
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %6
15: ; preds = %6
%16 = shl i64 %7, 32
%17 = ashr exact i64 %16, 32
br label %18
18: ; preds = %15, %2
%19 = phi i64 [ 0, %2 ], [ %17, %15 ]
%20 = getelementptr inbounds i8, i8* %1, i64 %19
store i8 0, i8* %20
ret void
}
unsigned HashInt(unsigned V) {
  V = (V + 0x7ed55d16) + (V << 12);
  V = (V ^ 0xc761c23c) ^ (V >> 19);
  V = (V + 0x165667b1) + (V << 5);
  V = (V + 0xd3a2646c) ^ (V << 9);
  V = (V + 0xfd7046c5) + (V << 3);
  V = (V ^ 0xb55a4f09) ^ (V >> 16);
  return V;
}


x86 assembly (clang, -O0):
<HashInt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x7ed55d16,%eax
mov    -0x4(%rbp),%ecx
shl    $0xc,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xc761c23c,%eax
mov    -0x4(%rbp),%ecx
shr    $0x13,%ecx
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x165667b1,%eax
mov    -0x4(%rbp),%ecx
shl    $0x5,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xd3a2646c,%eax
mov    -0x4(%rbp),%ecx
shl    $0x9,%ecx
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xfd7046c5,%eax
mov    -0x4(%rbp),%ecx
shl    $0x3,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xb55a4f09,%eax
mov    -0x4(%rbp),%ecx
shr    $0x10,%ecx
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<HashInt>:
mov    %edi,%eax
shl    $0xc,%eax
add    %edi,%eax
add    $0x7ed55d16,%eax
mov    %eax,%ecx
shr    $0x13,%ecx
xor    %eax,%ecx
xor    $0xc761c23c,%ecx
mov    %ecx,%eax
shl    $0x5,%eax
lea    (%rcx,%rax,1),%edx
shl    $0x9,%edx
add    %ecx,%eax
add    $0xe9f8cc1d,%eax
add    $0xaccf6200,%edx
xor    %eax,%edx
lea    (%rdx,%rdx,8),%ecx
add    $0xfd7046c5,%ecx
mov    %ecx,%eax
shr    $0x10,%eax
xor    %ecx,%eax
xor    $0xb55a4f09,%eax
ret

LLVM IR (-O0):
define i32 @HashInt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, 2127912214
%5 = load i32, i32* %2
%6 = shl i32 %5, 12
%7 = add i32 %4, %6
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = xor i32 %8, -949894596
%10 = load i32, i32* %2
%11 = lshr i32 %10, 19
%12 = xor i32 %9, %11
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = add i32 %13, 374761393
%15 = load i32, i32* %2
%16 = shl i32 %15, 5
%17 = add i32 %14, %16
store i32 %17, i32* %2
%18 = load i32, i32* %2
%19 = add i32 %18, -744332180
%20 = load i32, i32* %2
%21 = shl i32 %20, 9
%22 = xor i32 %19, %21
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = add i32 %23, -42973499
%25 = load i32, i32* %2
%26 = shl i32 %25, 3
%27 = add i32 %24, %26
store i32 %27, i32* %2
%28 = load i32, i32* %2
%29 = xor i32 %28, -1252372727
%30 = load i32, i32* %2
%31 = lshr i32 %30, 16
%32 = xor i32 %29, %31
store i32 %32, i32* %2
%33 = load i32, i32* %2
ret i32 %33
}

LLVM IR (-O2):
define i32 @HashInt(i32 %0) {
%2 = add i32 %0, 2127912214
%3 = shl i32 %0, 12
%4 = add i32 %2, %3
%5 = lshr i32 %4, 19
%6 = xor i32 %4, %5
%7 = xor i32 %6, -949894596
%8 = add i32 %7, 374761393
%9 = shl i32 %7, 5
%10 = add i32 %8, %9
%11 = add i32 %10, -744332180
%12 = shl i32 %10, 9
%13 = xor i32 %11, %12
%14 = add i32 %13, -42973499
%15 = shl i32 %13, 3
%16 = add i32 %14, %15
%17 = lshr i32 %16, 16
%18 = xor i32 %16, %17
%19 = xor i32 %18, -1252372727
ret i32 %19
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int addr_to_page(uint32_t addr) {
  if ((addr & 0xF0000) == 0xD0000) {
    return ((addr >> 14) & 3);
  }
  return -1;
}


x86 assembly (clang, -O0):
<addr_to_page>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xf0000,%eax
cmp    $0xd0000,%eax
jne    112b <addr_to_page+0x2b>
mov    -0x8(%rbp),%eax
sar    $0xe,%eax
and    $0x3,%eax
mov    %eax,-0x4(%rbp)
jmp    1132 <addr_to_page+0x32>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<addr_to_page>:
mov    %edi,%eax
and    $0xf0000,%eax
shr    $0xe,%edi
and    $0x3,%edi
cmp    $0xd0000,%eax
mov    $0xffffffff,%eax
cmove  %edi,%eax
ret

LLVM IR (-O0):
define i32 @addr_to_page(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 %4, 983040
%6 = icmp eq i32 %5, 851968
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* %3
%9 = ashr i32 %8, 14
%10 = and i32 %9, 3
store i32 %10, i32* %2
br label %12
11: ; preds = %1
store i32 -1, i32* %2
br label %12
12: ; preds = %11, %7
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @addr_to_page(i32 %0) {
%2 = and i32 %0, 983040
%3 = icmp eq i32 %2, 851968
%4 = lshr i32 %0, 14
%5 = and i32 %4, 3
%6 = select i1 %3, i32 %5, i32 -1
ret i32 %6
}
/* Variables and functions */
int unknown1();
void main(int argc, char *argv[]) {
  int n;
  int i, k, j;
  n = unknown1();
  if (n < 1)
    return;
  if (k < n)
    return;
  j = 0;
  while (j <= n - 1) {
    j++;
    k--;
  }
  if (j < n)
    return;
  if (k <= -1) {
    goto ERROR;
  ERROR:;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <unknown1@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jge    1138 <main+0x28>
jmp    119d <main+0x8d>
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1149 <main+0x39>
jmp    119d <main+0x8d>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1178 <main+0x68>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    1150 <main+0x40>
mov    -0x20(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1189 <main+0x79>
jmp    119d <main+0x8d>
cmpl   $0xffffffff,-0x1c(%rbp)
jg     119d <main+0x8d>
jmp    1198 <main+0x88>
jmp    119d <main+0x8d>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%9 = call i32 (...) @unknown1()
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = icmp slt i32 %10, 1
br i1 %11, label %12, label %13
12: ; preds = %2
br label %39
13: ; preds = %2
%14 = load i32, i32* %7
%15 = load i32, i32* %5
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %18
17: ; preds = %13
br label %39
18: ; preds = %13
store i32 0, i32* %8
br label %19
19: ; preds = %24, %18
%20 = load i32, i32* %8
%21 = load i32, i32* %5
%22 = sub nsw i32 %21, 1
%23 = icmp sle i32 %20, %22
br i1 %23, label %24, label %29
24: ; preds = %19
%25 = load i32, i32* %8
%26 = add nsw i32 %25, 1
store i32 %26, i32* %8
%27 = load i32, i32* %7
%28 = add nsw i32 %27, -1
store i32 %28, i32* %7
br label %19
29: ; preds = %19
%30 = load i32, i32* %8
%31 = load i32, i32* %5
%32 = icmp slt i32 %30, %31
br i1 %32, label %33, label %34
33: ; preds = %29
br label %39
34: ; preds = %29
%35 = load i32, i32* %7
%36 = icmp sle i32 %35, -1
br i1 %36, label %37, label %39
37: ; preds = %34
br label %38
38: ; preds = %37
br label %39
39: ; preds = %12, %17, %33, %38, %34
ret void
}

LLVM IR (-O2):
define void @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @unknown1()
ret void
}
void gtk_icon_set_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_set_new() {
ret void
}
/* Variables and functions */
scalar_t__ COND_LT();
int /*<<< orphan*/ EA_AY_IX_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_slt_8_ix(void) {
  m68ki_write_8(EA_AY_IX_8(), COND_LT() ? 0xff : 0);
}


x86 assembly (clang, -O0):
<m68k_op_slt_8_ix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <EA_AY_IX_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <COND_LT@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
xor    %esi,%esi
mov    $0xff,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
call   1050 <m68ki_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_slt_8_ix>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <EA_AY_IX_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <COND_LT@plt>
test   %rax,%rax
mov    $0xff,%esi
cmove  %ebp,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_slt_8_ix() {
%1 = call i32 (...) @EA_AY_IX_8()
%2 = call i64 (...) @COND_LT()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 255, i32 0
%6 = call i32 @m68ki_write_8(i32 %1, i32 %5)
ret void
}

LLVM IR (-O2):
define void @m68k_op_slt_8_ix() {
%1 = tail call i32 (...) @EA_AY_IX_8()
%2 = tail call i64 (...) @COND_LT()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x0a() {
  Assert_real((ispunct(10) == 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_ispunct.c",
              55, ("ispunct should be 0 for 0x0a"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x0a>:
push   %rax
mov    $0xa,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x37,%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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x0a\00"
define void @t_ispunct_0x0a() {
%1 = call i64 @ispunct(i32 10)
%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 55, 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x0a\00"
define void @t_ispunct_0x0a() {
%1 = tail call i64 @ispunct(i32 10)
%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 55, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int is_cleared(int /*<<< orphan*/ const *);
bool ncurses_is_cleared(const WINDOW *win) { return is_cleared(win); }


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

x86 assembly (clang, -O2):
<ncurses_is_cleared>:
jmp    1030 <is_cleared@plt>

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

LLVM IR (-O2):
define i32 @ncurses_is_cleared(i32* %0) {
%2 = tail call i32 @is_cleared(i32* %0)
ret i32 %2
}
unsigned int osp_get_num_bands() { return 6; }


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

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

LLVM IR (-O0):
define i32 @osp_get_num_bands() {
ret i32 6
}

LLVM IR (-O2):
define i32 @osp_get_num_bands() {
ret i32 6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int /*<<< orphan*/, int);
void print_version_info(char *name) { printf("%s v%i.%i\n", name, 0, 1); }


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

x86 assembly (clang, -O2):
<print_version_info>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
xor    %edx,%edx
mov    $0x1,%ecx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [11 x i8] c"%s v%i.%i\0A\00"
define void @print_version_info(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0, i32 0, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int scanf(char *, double *);
main() {
  double sum, v;
  sum = 0;
  while (scanf("%1f", &v) == 1)
    printf("\t%.2f\n", sum += v);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xec2(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    1170 <main+0x50>
movsd  -0x18(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
jmp    1137 <main+0x17>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xed0(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    118d <main+0x6d>
xorpd  %xmm0,%xmm0
lea    0xeba(%rip),%r14
lea    0xeaf(%rip),%r15
lea    0x8(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    %r14,%rdi
movsd  (%rsp),%xmm0
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm0
cmp    $0x1,%eax
je     1160 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%1f\00"
@.str.1 = [7 x i8] c"\09%.2f\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %12
5: ; preds = %0, %5
%6 = phi double [ %8, %5 ], [ 0.000000e+00, %0 ]
%7 = load double, double* %1
%8 = fadd double %6, %7
%9 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %8)
%10 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%11 = icmp eq i32 %10, 1
br i1 %11, label %5, label %12
12: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ getpid();
int /*<<< orphan*/ printf(char *, long, int /*<<< orphan*/, void **);
int /*<<< orphan*/ pthread_testcancel();
int /*<<< orphan*/ sleep(int);
void *thread(void *arg) {
  printf("thread %ld %d %p\n", (long)arg, getpid(), &arg);
  while (1) {
    pthread_testcancel();
    sleep(1);
  }
}


x86 assembly (clang, -O0):
<thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
lea    0xe98(%rip),%rdi
lea    -0x8(%rbp),%rcx
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <pthread_testcancel@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
jmp    1171 <thread+0x31>

x86 assembly (clang, -O2):
<thread>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    %rdi,0x8(%rsp)
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xea5(%rip),%rdi
lea    0x8(%rsp),%rcx
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <printf@plt>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <pthread_testcancel@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
jmp    1170 <thread+0x30>

LLVM IR (-O0):
@.str = [18 x i8] c"thread %ld %d %p\0A\00"
define i8* @thread(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = call i32 (...) @getpid()
%6 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i64 %4, i32 %5, i8** %2)
br label %7
7: ; preds = %1, %7
%8 = call i32 (...) @pthread_testcancel()
%9 = call i32 @sleep(i32 1)
br label %7
}

LLVM IR (-O2):
@.str = [18 x i8] c"thread %ld %d %p\0A\00"
define noalias i8* @thread(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = ptrtoint i8* %0 to i64
%4 = tail call i32 (...) @getpid()
%5 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i64 %3, i32 %4, i8** %2)
br label %6
6: ; preds = %1, %6
%7 = call i32 (...) @pthread_testcancel()
%8 = call i32 @sleep(i32 1)
br label %6
}
/* Variables and functions */
int *collage(int *, int *);
int *encrypt_binaire(char);
int *malloc(int);
int *encrypt(char *Msg) {
  int *binaireMsg1 = encrypt_binaire(Msg[0]);
  int *binaireMsg2 = encrypt_binaire(Msg[1]);
  int *binaireMsg = malloc(10 * sizeof(int));
  binaireMsg = collage(binaireMsg1, binaireMsg2);
  return binaireMsg;
}


x86 assembly (clang, -O0):
<encrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1050 <encrypt_binaire@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%edi
call   1050 <encrypt_binaire@plt>
mov    %rax,-0x18(%rbp)
mov    $0x28,%edi
call   1030 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <collage@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<encrypt>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movsbl (%rdi),%edi
call   1050 <encrypt_binaire@plt>
mov    %rax,%r14
movsbl 0x1(%rbx),%edi
call   1050 <encrypt_binaire@plt>
mov    %rax,%rbx
mov    $0x28,%edi
call   1030 <malloc@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <collage@plt>

LLVM IR (-O0):
define i32* @encrypt(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32*
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = call i32* @encrypt_binaire(i8 signext %8)
store i32* %9, i32** %3
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = call i32* @encrypt_binaire(i8 signext %12)
store i32* %13, i32** %4
%14 = call i32* @malloc(i32 40)
store i32* %14, i32** %5
%15 = load i32*, i32** %3
%16 = load i32*, i32** %4
%17 = call i32* @collage(i32* %15, i32* %16)
store i32* %17, i32** %5
%18 = load i32*, i32** %5
ret i32* %18
}

LLVM IR (-O2):
define i32* @encrypt(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i32* @encrypt_binaire(i8 signext %2)
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = tail call i32* @encrypt_binaire(i8 signext %5)
%7 = tail call i32* @malloc(i32 40)
%8 = tail call i32* @collage(i32* %3, i32* %6)
ret i32* %8
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int getc(int /*<<< orphan*/ *);
void flush_input(FILE *in) {
  int c;
  while (((c = getc(in)) != EOF) && (c != '\n'))
    ;
}


x86 assembly (clang, -O0):
<flush_input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getc@plt>
mov    %eax,%ecx
mov    %ecx,-0xc(%rbp)
xor    %eax,%eax
mov    0x2eb5(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0xd(%rbp)
je     1148 <flush_input+0x38>
cmpl   $0xa,-0xc(%rbp)
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1158 <flush_input+0x48>
jmp    115d <flush_input+0x4d>
jmp    111c <flush_input+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flush_input>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eca(%rip),%r14
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <getc@plt>
cmp    $0xa,%eax
je     1132 <flush_input+0x22>
cmp    (%r14),%eax
jne    1120 <flush_input+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EOF = global i32 0
define void @flush_input(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
br label %4
4: ; preds = %14, %1
%5 = load i32*, i32** %2
%6 = call i32 @getc(i32* %5)
store i32 %6, i32* %3
%7 = load i32, i32* @EOF
%8 = icmp ne i32 %6, %7
br i1 %8, label %9, label %12
9: ; preds = %4
%10 = load i32, i32* %3
%11 = icmp ne i32 %10, 10
br label %12
12: ; preds = %9, %4
%13 = phi i1 [ false, %4 ], [ %11, %9 ]
br i1 %13, label %14, label %15
14: ; preds = %12
br label %4
15: ; preds = %12
ret void
}

LLVM IR (-O2):
@EOF = global i32 0
define void @flush_input(i32* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @getc(i32* %0)
%4 = load i32, i32* @EOF
%5 = icmp ne i32 %3, %4
%6 = icmp ne i32 %3, 10
%7 = and i1 %6, %5
br i1 %7, label %2, label %8
8: ; preds = %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ getc(int /*<<< orphan*/ *);
int /*<<< orphan*/ serial_write(int /*<<< orphan*/, int /*<<< orphan*/);
void serial_loadstate(FILE *f) { serial_write(0, getc(f)); }


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

x86 assembly (clang, -O2):
<serial_loadstate>:
push   %rax
call   1040 <getc@plt>
xor    %edi,%edi
mov    %eax,%esi
pop    %rax
jmp    1030 <serial_write@plt>

LLVM IR (-O0):
define void @serial_loadstate(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @getc(i32* %3)
%5 = call i32 @serial_write(i32 0, i32 %4)
ret void
}

LLVM IR (-O2):
define void @serial_loadstate(i32* nocapture %0) {
%2 = tail call i32 @getc(i32* %0)
%3 = tail call i32 @serial_write(i32 0, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int my_int_func(int x) { printf("%d\n", x); }


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

x86 assembly (clang, -O2):
<my_int_func>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @my_int_func(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
int /*<<< orphan*/ WatchdogStatusHandle();
void WatchdogStatusUpdated() { UAVObjUpdated(WatchdogStatusHandle()); }


x86 assembly (clang, -O0):
<WatchdogStatusUpdated>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <WatchdogStatusHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjUpdated@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<WatchdogStatusUpdated>:
push   %rax
xor    %eax,%eax
call   1030 <WatchdogStatusHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjUpdated@plt>

LLVM IR (-O0):
define void @WatchdogStatusUpdated() {
%1 = call i32 (...) @WatchdogStatusHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @WatchdogStatusUpdated() {
%1 = tail call i32 (...) @WatchdogStatusHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SYS_pipe;
int syscall_1(int /*<<< orphan*/, long);
int pipe(int filedes[2]) {
  int ret;
  ret = syscall_1(SYS_pipe, ((long)filedes));
  return ret;
}


x86 assembly (clang, -O0):
<pipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <syscall_1@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pipe>:
mov    %rdi,%rsi
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall_1@plt>

LLVM IR (-O0):
@SYS_pipe = global i32 0
define i32 @pipe(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32, i32* @SYS_pipe
%5 = load i32*, i32** %2
%6 = ptrtoint i32* %5 to i64
%7 = call i32 @syscall_1(i32 %4, i64 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
@SYS_pipe = global i32 0
define i32 @pipe(i32* %0) {
%2 = load i32, i32* @SYS_pipe
%3 = ptrtoint i32* %0 to i64
%4 = tail call i32 @syscall_1(i32 %2, i64 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ hoc_pushx(int);
int /*<<< orphan*/ hoc_ret();
hoc_regraph() {
  hoc_ret();
  hoc_pushx(0.);
}


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

x86 assembly (clang, -O2):
<hoc_regraph>:
push   %rax
xor    %eax,%eax
call   1030 <hoc_ret@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <hoc_pushx@plt>

LLVM IR (-O0):
define i32 @hoc_regraph() {
%1 = alloca i32
%2 = call i32 (...) @hoc_ret()
%3 = call i32 @hoc_pushx(i32 0)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @hoc_regraph() {
%1 = tail call i32 (...) @hoc_ret()
%2 = tail call i32 @hoc_pushx(i32 0)
ret i32 undef
}