xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ changendian32(int /*<<< orphan*/ *);
void changendian(void *a) {
  changendian32((uint32_t *)(&(((uint32_t *)a)[0])));
  changendian32((uint32_t *)(&(((uint32_t *)a)[1])));
  changendian32((uint32_t *)(&(((uint32_t *)a)[2])));
  changendian32((uint32_t *)(&(((uint32_t *)a)[3])));
}


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

x86 assembly (clang, -O2):
<changendian>:
push   %rbx
mov    %rdi,%rbx
call   1030 <changendian32@plt>
lea    0x4(%rbx),%rdi
call   1030 <changendian32@plt>
lea    0x8(%rbx),%rdi
call   1030 <changendian32@plt>
add    $0xc,%rbx
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <changendian32@plt>

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

LLVM IR (-O2):
define void @changendian(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @changendian32(i32* %2)
%4 = getelementptr inbounds i8, i8* %0, i64 4
%5 = bitcast i8* %4 to i32*
%6 = tail call i32 @changendian32(i32* %5)
%7 = getelementptr inbounds i8, i8* %0, i64 8
%8 = bitcast i8* %7 to i32*
%9 = tail call i32 @changendian32(i32* %8)
%10 = getelementptr inbounds i8, i8* %0, i64 12
%11 = bitcast i8* %10 to i32*
%12 = tail call i32 @changendian32(i32* %11)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pr(int /*<<< orphan*/);
int /*<<< orphan*/ sym(char *);
void addString(char *s) { pr(sym(s)); }


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

x86 assembly (clang, -O2):
<addString>:
push   %rax
call   1040 <sym@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <pr@plt>

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

LLVM IR (-O2):
define void @addString(i8* %0) {
%2 = tail call i32 @sym(i8* %0)
%3 = tail call i32 @pr(i32 %2)
ret void
}
/* Variables and functions */
int *malloc(int);
void *cpy(void *e) {
  int o = *((int *)e);
  int *c = malloc(sizeof(int));
  *c = o;
  return (void *)c;
}


x86 assembly (clang, -O0):
<cpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpy>:
push   %rbx
mov    (%rdi),%ebx
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %ebx,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define i8* @cpy(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
store i32 %7, i32* %3
%8 = call i32* @malloc(i32 4)
store i32* %8, i32** %4
%9 = load i32, i32* %3
%10 = load i32*, i32** %4
store i32 %9, i32* %10
%11 = load i32*, i32** %4
%12 = bitcast i32* %11 to i8*
ret i8* %12
}

LLVM IR (-O2):
define noalias i8* @cpy(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32* @malloc(i32 4)
store i32 %3, i32* %4
%5 = bitcast i32* %4 to i8*
ret i8* %5
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
void fprint_lcall(FILE *stream, uint8_t addr16_high, uint8_t addr16_low) {
  fprintf(stream,
          "LCALL "
          "0x%04X"
          "                    ",
          (addr16_high << 8) + addr16_low);
}


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

x86 assembly (clang, -O2):
<fprint_lcall>:
shl    $0x8,%esi
add    %esi,%edx
lea    0xee4(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"LCALL 0x%04X \00"
define void @fprint_lcall(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %5
%9 = shl i32 %8, 8
%10 = load i32, i32* %6
%11 = add nsw i32 %9, %10
%12 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"LCALL 0x%04X \00"
define void @fprint_lcall(i32* nocapture %0, i32 %1, i32 %2) {
%4 = shl i32 %1, 8
%5 = add nsw i32 %4, %2
%6 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}
char hex2char(int i) {
  if (i < 10) {
    return '0' + i;
  } else {
    return 'a' + (i - 10);
  }
}


x86 assembly (clang, -O0):
<hex2char>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    111f <hex2char+0x1f>
mov    -0x8(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    112b <hex2char+0x2b>
mov    -0x8(%rbp),%eax
sub    $0xa,%eax
add    $0x61,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex2char>:
cmp    $0xa,%edi
mov    $0x30,%ecx
mov    $0x57,%eax
cmovl  %ecx,%eax
add    %dil,%al
ret

LLVM IR (-O0):
define signext i8 @hex2char(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 10
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = add nsw i32 48, %7
%9 = trunc i32 %8 to i8
store i8 %9, i8* %2
br label %15
10: ; preds = %1
%11 = load i32, i32* %3
%12 = sub nsw i32 %11, 10
%13 = add nsw i32 97, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %2
br label %15
15: ; preds = %10, %6
%16 = load i8, i8* %2
ret i8 %16
}

LLVM IR (-O2):
define signext i8 @hex2char(i32 %0) {
%2 = icmp slt i32 %0, 10
%3 = trunc i32 %0 to i8
%4 = select i1 %2, i8 48, i8 87
%5 = add i8 %4, %3
ret i8 %5
}
/* Variables and functions */
long _ftol(double);
long _ftol2(double f) { return _ftol(f); }


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

x86 assembly (clang, -O2):
<_ftol2>:
jmp    1030 <_ftol@plt>

LLVM IR (-O0):
define i64 @_ftol2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i64 @_ftol(double %3)
ret i64 %4
}

LLVM IR (-O2):
define i64 @_ftol2(double %0) {
%2 = tail call i64 @_ftol(double %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void foo2(char *x) {
  printf("foo2 x pre %p\n", x);
  x = x + 1;
  printf("foo2 x post %p\n", x);
}


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

x86 assembly (clang, -O2):
<foo2>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
add    $0x1,%rbx
lea    0xee1(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"foo2 x pre %p\0A\00"
@.str.1 = [16 x i8] c"foo2 x post %p\0A\00"
define void @foo2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 1
store i8* %6, i8** %2
%7 = load i8*, i8** %2
%8 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"foo2 x pre %p\0A\00"
@.str.1 = [16 x i8] c"foo2 x post %p\0A\00"
define void @foo2(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}
/* Type definitions */
struct drunkard {
  int dummy;
};

/* Variables and functions */
scalar_t__ drunkard_rng_chance(struct drunkard *, double);
int /*<<< orphan*/ drunkard_target_random_north_edge(struct drunkard *);
int /*<<< orphan*/ drunkard_target_random_south_edge(struct drunkard *);
void drunkard_target_random_northsouth_edge(struct drunkard *drunk) {
  if (drunkard_rng_chance(drunk, 0.5))
    drunkard_target_random_north_edge(drunk);
  else
    drunkard_target_random_south_edge(drunk);
}


x86 assembly (clang, -O0):
<drunkard_target_random_northsouth_edge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
movsd  0xeb8(%rip),%xmm0
call   1030 <drunkard_rng_chance@plt>
cmp    $0x0,%rax
je     1165 <drunkard_target_random_northsouth_edge+0x35>
mov    -0x8(%rbp),%rdi
call   1050 <drunkard_target_random_north_edge@plt>
jmp    116e <drunkard_target_random_northsouth_edge+0x3e>
mov    -0x8(%rbp),%rdi
call   1040 <drunkard_target_random_south_edge@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drunkard_target_random_northsouth_edge>:
push   %rbx
mov    %rdi,%rbx
movsd  0xec4(%rip),%xmm0
call   1030 <drunkard_rng_chance@plt>
mov    %rbx,%rdi
test   %rax,%rax
je     114f <drunkard_target_random_northsouth_edge+0x1f>
pop    %rbx
jmp    1050 <drunkard_target_random_north_edge@plt>
pop    %rbx
jmp    1040 <drunkard_target_random_south_edge@plt>

LLVM IR (-O0):
%struct.drunkard = type { i32 }
define void @drunkard_target_random_northsouth_edge(%struct.drunkard* %0) {
%2 = alloca %struct.drunkard*
store %struct.drunkard* %0, %struct.drunkard** %2
%3 = load %struct.drunkard*, %struct.drunkard** %2
%4 = call i64 @drunkard_rng_chance(%struct.drunkard* %3, double 5.000000e-01)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load %struct.drunkard*, %struct.drunkard** %2
%8 = call i32 @drunkard_target_random_north_edge(%struct.drunkard* %7)
br label %12
9: ; preds = %1
%10 = load %struct.drunkard*, %struct.drunkard** %2
%11 = call i32 @drunkard_target_random_south_edge(%struct.drunkard* %10)
br label %12
12: ; preds = %9, %6
ret void
}

LLVM IR (-O2):
%struct.drunkard = type { i32 }
define void @drunkard_target_random_northsouth_edge(%struct.drunkard* %0) {
%2 = tail call i64 @drunkard_rng_chance(%struct.drunkard* %0, double 5.000000e-01)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @drunkard_target_random_north_edge(%struct.drunkard* %0)
br label %8
6: ; preds = %1
%7 = tail call i32 @drunkard_target_random_south_edge(%struct.drunkard* %0)
br label %8
8: ; preds = %6, %4
ret void
}
int pvSearch(int alpha, int beta, int depth) {}


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

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

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

LLVM IR (-O2):
define i32 @pvSearch(i32 %0, i32 %1, i32 %2) {
ret i32 undef
}
/* Variables and functions */
int close(int);
int /*<<< orphan*/ printf(char *);
int close_serial(int fd) {
  int flag_close;
  flag_close = close(fd);
  if (flag_close == -1) {
    printf("Close the file failed!\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<close_serial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    114c <close_serial+0x2c>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_serial>:
push   %rax
call   1040 <close@plt>
cmp    $0xffffffff,%eax
jne    1137 <close_serial+0x17>
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Close the file failed!\0A\00"
define i32 @close_serial(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @close(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
ret i32 0
}

LLVM IR (-O2):
@str = [23 x i8] c"Close the file failed!\00"
define i32 @close_serial(i32 %0) {
%2 = tail call i32 @close(i32 %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ foo(int);
void fn_9(int flag) {
  if (flag)
    foo(0);
  foo(1);
}


x86 assembly (clang, -O0):
<fn_9>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112c <fn_9+0x1c>
xor    %edi,%edi
call   1030 <foo@plt>
mov    $0x1,%edi
call   1030 <foo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_9>:
test   %edi,%edi
je     1120 <fn_9+0x10>
push   %rax
xor    %edi,%edi
call   1030 <foo@plt>
add    $0x8,%rsp
mov    $0x1,%edi
jmp    1030 <foo@plt>

LLVM IR (-O0):
define void @fn_9(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @foo(i32 0)
br label %7
7: ; preds = %5, %1
%8 = call i32 @foo(i32 1)
ret void
}

LLVM IR (-O2):
define void @fn_9(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @foo(i32 0)
br label %5
5: ; preds = %3, %1
%6 = tail call i32 @foo(i32 1)
ret void
}
int test_imm_4Cint64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x4C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_4Cint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0x4c,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_4Cint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 32
%6 = and i64 %5, 76
%7 = icmp ne i64 %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_4Cint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 326417514496
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int yaffsfs_IsPathDivider(char ch) {
  const char *str = "/";
  while (*str) {
    if (*str == ch)
      return 1;
    str++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<yaffsfs_IsPathDivider>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
lea    0xeef(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1152 <yaffsfs_IsPathDivider+0x52>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
jne    1141 <yaffsfs_IsPathDivider+0x41>
movl   $0x1,-0x4(%rbp)
jmp    1159 <yaffsfs_IsPathDivider+0x59>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1115 <yaffsfs_IsPathDivider+0x15>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<yaffsfs_IsPathDivider>:
xor    %eax,%eax
cmp    $0x2f,%dil
sete   %al
ret

LLVM IR (-O0):
@.str = [2 x i8] c"/\00"
define i32 @yaffsfs_IsPathDivider(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca i8*
store i8 %0, i8* %3
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %4
br label %5
5: ; preds = %17, %1
%6 = load i8*, i8** %4
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %20
9: ; preds = %5
%10 = load i8*, i8** %4
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %12, %14
br i1 %15, label %16, label %17
16: ; preds = %9
store i32 1, i32* %2
br label %21
17: ; preds = %9
%18 = load i8*, i8** %4
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %4
br label %5
20: ; preds = %5
store i32 0, i32* %2
br label %21
21: ; preds = %20, %16
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @yaffsfs_IsPathDivider(i8 signext %0) {
%2 = icmp eq i8 %0, 47
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void *calloc(size_t, size_t);
void *xcalloc(size_t nmemb, size_t size) {
  void *p;
  if (nmemb == 0)
    nmemb = 1;
  if (size == 0)
    size = 1;
  p = calloc(nmemb, size);
  if (!p)
    abort();
  return p;
}


x86 assembly (clang, -O0):
<xcalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1143 <xcalloc+0x23>
movq   $0x1,-0x8(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1156 <xcalloc+0x36>
movq   $0x1,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1179 <xcalloc+0x59>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xcalloc>:
push   %rax
test   %rdi,%rdi
mov    $0x1,%eax
cmove  %rax,%rdi
test   %rsi,%rsi
cmove  %rax,%rsi
call   1040 <calloc@plt>
test   %rax,%rax
je     1140 <xcalloc+0x20>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @xcalloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store i64 1, i64* %3
br label %9
9: ; preds = %8, %2
%10 = load i64, i64* %4
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %9
store i64 1, i64* %4
br label %13
13: ; preds = %12, %9
%14 = load i64, i64* %3
%15 = load i64, i64* %4
%16 = call i8* @calloc(i64 %14, i64 %15)
store i8* %16, i8** %5
%17 = load i8*, i8** %5
%18 = icmp ne i8* %17, null
br i1 %18, label %21, label %19
19: ; preds = %13
%20 = call i32 (...) @abort()
unreachable
21: ; preds = %13
%22 = load i8*, i8** %5
ret i8* %22
}

LLVM IR (-O2):
define noalias i8* @xcalloc(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, 0
%4 = select i1 %3, i64 1, i64 %0
%5 = icmp eq i64 %1, 0
%6 = select i1 %5, i64 1, i64 %1
%7 = tail call i8* @calloc(i64 %4, i64 %6)
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = tail call i32 (...) @abort()
unreachable
11: ; preds = %2
ret i8* %7
}
/* Type definitions */
struct sfvfs_options {
  int dummy;
};
struct sfvfs_fs {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ sfvfs_closefs(struct sfvfs_fs *);
struct sfvfs_fs *sfvfs_openfs(char const *, struct sfvfs_options *);
extern int sfvfs_makefile(const char *filename, struct sfvfs_options *options) {
  struct sfvfs_fs *sfs;
  sfs = sfvfs_openfs(filename, options);
  sfvfs_closefs(sfs);
  return 0;
}


x86 assembly (clang, -O0):
<sfvfs_makefile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <sfvfs_openfs@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <sfvfs_closefs@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sfvfs_makefile>:
push   %rax
call   1040 <sfvfs_openfs@plt>
mov    %rax,%rdi
call   1030 <sfvfs_closefs@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.sfvfs_options = type { i32 }
%struct.sfvfs_fs = type { i32 }
define i32 @sfvfs_makefile(i8* %0, %struct.sfvfs_options* %1) {
%3 = alloca i8*
%4 = alloca %struct.sfvfs_options*
%5 = alloca %struct.sfvfs_fs*
store i8* %0, i8** %3
store %struct.sfvfs_options* %1, %struct.sfvfs_options** %4
%6 = load i8*, i8** %3
%7 = load %struct.sfvfs_options*, %struct.sfvfs_options** %4
%8 = call %struct.sfvfs_fs* @sfvfs_openfs(i8* %6, %struct.sfvfs_options* %7)
store %struct.sfvfs_fs* %8, %struct.sfvfs_fs** %5
%9 = load %struct.sfvfs_fs*, %struct.sfvfs_fs** %5
%10 = call i32 @sfvfs_closefs(%struct.sfvfs_fs* %9)
ret i32 0
}

LLVM IR (-O2):
%struct.sfvfs_options = type { i32 }
%struct.sfvfs_fs = type { i32 }
define i32 @sfvfs_makefile(i8* %0, %struct.sfvfs_options* %1) {
%3 = tail call %struct.sfvfs_fs* @sfvfs_openfs(i8* %0, %struct.sfvfs_options* %1)
%4 = tail call i32 @sfvfs_closefs(%struct.sfvfs_fs* %3)
ret i32 0
}
void dummy_func1(void) {}


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

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

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

LLVM IR (-O2):
define void @dummy_func1() {
ret void
}
int test_imm_07uint16_mem(unsigned short *val) {
  return ((*val) & (-0x07 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_07uint16_mem>:
movzwl (%rdi),%eax
test   $0xfff9,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_07uint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, -7
%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_07uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -7
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int xmlUCSIsOriya(int code) { return (((code >= 0x0B00) && (code <= 0x0B7F))); }


x86 assembly (clang, -O0):
<xmlUCSIsOriya>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0xb00,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsOriya+0x26>
cmpl   $0xb7f,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsOriya>:
and    $0xffffff80,%edi
xor    %eax,%eax
cmp    $0xb00,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @xmlUCSIsOriya(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 2816
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 2943
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @xmlUCSIsOriya(i32 %0) {
%2 = and i32 %0, -128
%3 = icmp eq i32 %2, 2816
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() { printf("Hello, World!"); }


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

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

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

LLVM IR (-O2):
@.str = [14 x i8] c"Hello, World!\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void mp_squh(int n, int radix, int in[], int out[], int nfft, double outfft[],
             int ip[], double w[]) {
  void mp_mul_i2d(int n, int radix, int nfft, int shift, int in[],
                  double dout[]);
  void mp_mul_csqu(int nfft, double d1[], int ip[], double w[]);
  void mp_mul_d2i(int n, int radix, int nfft, double din[], int out[]);
  mp_mul_i2d(n, radix, nfft, 0, in, outfft);
  mp_mul_csqu(nfft, outfft, ip, w);
  mp_mul_d2i(n, radix, nfft, outfft, out);
}


x86 assembly (clang, -O0):
<mp_squh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x10(%rbp),%r8
mov    -0x28(%rbp),%r9
xor    %ecx,%ecx
call   1030 <mp_mul_i2d@plt>
mov    -0x1c(%rbp),%edi
mov    -0x28(%rbp),%rsi
mov    0x10(%rbp),%rdx
mov    0x18(%rbp),%rcx
call   1040 <mp_mul_csqu@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x28(%rbp),%rcx
mov    -0x18(%rbp),%r8
call   1050 <mp_mul_d2i@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp_squh>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%rbx
mov    %r8d,%ebp
mov    %rcx,(%rsp)
mov    %rdx,%r8
mov    %esi,%r15d
mov    %edi,%r12d
mov    0x40(%rsp),%r13
mov    0x48(%rsp),%r14
mov    %ebp,%edx
xor    %ecx,%ecx
call   1030 <mp_mul_i2d@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r13,%rdx
mov    %r14,%rcx
call   1040 <mp_mul_csqu@plt>
mov    %r12d,%edi
mov    %r15d,%esi
mov    %ebp,%edx
mov    %rbx,%rcx
mov    (%rsp),%r8
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <mp_mul_d2i@plt>

LLVM IR (-O0):
define void @mp_squh(i32 %0, i32 %1, i32* %2, i32* %3, i32 %4, double* %5, i32* %6, double* %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32
%14 = alloca double*
%15 = alloca i32*
%16 = alloca double*
store i32 %0, i32* %9
store i32 %1, i32* %10
store i32* %2, i32** %11
store i32* %3, i32** %12
store i32 %4, i32* %13
store double* %5, double** %14
store i32* %6, i32** %15
store double* %7, double** %16
%17 = load i32, i32* %9
%18 = load i32, i32* %10
%19 = load i32, i32* %13
%20 = load i32*, i32** %11
%21 = load double*, double** %14
%22 = load i32, i32* %13
%23 = load double*, double** %14
%24 = load i32*, i32** %15
%25 = load double*, double** %16
%26 = load i32, i32* %9
%27 = load i32, i32* %10
%28 = load i32, i32* %13
%29 = load double*, double** %14
%30 = load i32*, i32** %12
ret void
}

LLVM IR (-O2):
define void @mp_squh(i32 %0, i32 %1, i32* %2, i32* %3, i32 %4, double* %5, i32* %6, double* %7) {
tail call void @mp_mul_i2d(i32 %0, i32 %1, i32 %4, i32 0, i32* %2, double* %5)
tail call void @mp_mul_csqu(i32 %4, double* %5, i32* %6, double* %7)
tail call void @mp_mul_d2i(i32 %0, i32 %1, i32 %4, double* %5, i32* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void print_usage() {
  printf("usage: seq_convert <in> <out> [line-wrap]\n"
         "  Output file must end with: fa|fq|fa.gz|fq.gz|sam|bam\n"
         "  If line-wrap value is given, lines are wrapped.\n");
  exit(EXIT_FAILURE);
}


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

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [148 x i8] c"usage: seq_convert <in> <out> [line-wrap]\0A Output file must end with: fa|fq|fa.gz|fq.gz|sam|bam\0A If line-wrap value is given, lines are wrapped.\0A\00"
@EXIT_FAILURE = global i32 0
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_FAILURE
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@str = [147 x i8] c"usage: seq_convert <in> <out> [line-wrap]\0A Output file must end with: fa|fq|fa.gz|fq.gz|sam|bam\0A If line-wrap value is given, lines are wrapped.\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([147 x i8], [147 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_FAILURE
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ _assertEquals_unsigned_int(int /*<<< orphan*/,
                                              int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ getAllocationCount();
void testAllocationCount() {
  _assertEquals_unsigned_int(
      0, getAllocationCount(),
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/jasonxhill/okavangoc/refs/heads/master/test/"
      "TestMemoryPool.c",
      16);
}


x86 assembly (clang, -O0):
<testAllocationCount>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <getAllocationCount@plt>
mov    %eax,%esi
xor    %edi,%edi
lea    0xeca(%rip),%rdx
mov    $0x10,%ecx
call   1030 <_assertEquals_unsigned_int@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testAllocationCount>:
push   %rax
xor    %eax,%eax
call   1040 <getAllocationCount@plt>
lea    0xed1(%rip),%rdx
xor    %edi,%edi
mov    %eax,%esi
mov    $0x10,%ecx
pop    %rax
jmp    1030 <_assertEquals_unsigned_int@plt>

LLVM IR (-O0):
@.str = [151 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jasonxhill/okavangoc/refs/heads/master/test/TestMemoryPool.c\00"
define void @testAllocationCount() {
%1 = call i32 (...) @getAllocationCount()
%2 = call i32 @_assertEquals_unsigned_int(i32 0, i32 %1, i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 16)
ret void
}

LLVM IR (-O2):
@.str = [151 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jasonxhill/okavangoc/refs/heads/master/test/TestMemoryPool.c\00"
define void @testAllocationCount() {
%1 = tail call i32 (...) @getAllocationCount()
%2 = tail call i32 @_assertEquals_unsigned_int(i32 0, i32 %1, i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 16)
ret void
}
int isatty(int fildes) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @isatty(i32 %0) {
ret i32 1
}
float get_scrollbar_y1(const struct Tracker_Windows *window,
                       const struct WBlocks *wblock) {
  return 2.0;
}


x86 assembly (clang, -O0):
<get_scrollbar_y1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  0xeec(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_scrollbar_y1>:
movss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
%struct.Tracker_Windows = type opaque
%struct.WBlocks = type opaque
define float @get_scrollbar_y1(%struct.Tracker_Windows* %0, %struct.WBlocks* %1) {
%3 = alloca %struct.Tracker_Windows*
%4 = alloca %struct.WBlocks*
store %struct.Tracker_Windows* %0, %struct.Tracker_Windows** %3
store %struct.WBlocks* %1, %struct.WBlocks** %4
ret float 2.000000e+00
}

LLVM IR (-O2):
%struct.Tracker_Windows = type opaque
%struct.WBlocks = type opaque
define float @get_scrollbar_y1(%struct.Tracker_Windows* nocapture readnone %0, %struct.WBlocks* nocapture readnone %1) {
ret float 2.000000e+00
}
/* Variables and functions */
unsigned long ROTR(unsigned long, int);
unsigned long int S2(unsigned long int x) {
  return (ROTR(x, 2) ^ ROTR(x, 13) ^ ROTR(x, 22));
}


x86 assembly (clang, -O0):
<S2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2,%esi
call   1030 <ROTR@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xd,%esi
call   1030 <ROTR@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
xor    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x16,%esi
call   1030 <ROTR@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
xor    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<S2>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
mov    $0x2,%esi
call   1030 <ROTR@plt>
mov    %rax,%r14
mov    %r15,%rdi
mov    $0xd,%esi
call   1030 <ROTR@plt>
mov    %rax,%rbx
xor    %r14,%rbx
mov    %r15,%rdi
mov    $0x16,%esi
call   1030 <ROTR@plt>
xor    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @S2(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @ROTR(i64 %3, i32 2)
%5 = load i64, i64* %2
%6 = call i64 @ROTR(i64 %5, i32 13)
%7 = xor i64 %4, %6
%8 = load i64, i64* %2
%9 = call i64 @ROTR(i64 %8, i32 22)
%10 = xor i64 %7, %9
ret i64 %10
}

LLVM IR (-O2):
define i64 @S2(i64 %0) {
%2 = tail call i64 @ROTR(i64 %0, i32 2)
%3 = tail call i64 @ROTR(i64 %0, i32 13)
%4 = xor i64 %3, %2
%5 = tail call i64 @ROTR(i64 %0, i32 22)
%6 = xor i64 %4, %5
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int main(int argc, char *argv[]) {
  float f = 7;
  printf("%.2f\n", f);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"%.2f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float 7.000000e+00)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
scalar_t__ fork();
int /*<<< orphan*/ fork_test(scalar_t__);
int /*<<< orphan*/ system(char *);
int /*<<< orphan*/ wait(int *);
int main(int argc, char *argv[]) {
  pid_t f1;
  int st;
  f1 = fork();
  fork_test(f1);
  if (f1 > 0) {
    wait(&st);
  }
  system("ps -ef | grep marsud");
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1060 <fork@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <fork_test@plt>
cmpq   $0x0,-0x18(%rbp)
jle    117e <main+0x3e>
lea    -0x1c(%rbp),%rdi
call   1050 <wait@plt>
lea    0xe7b(%rip),%rdi
call   1030 <system@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1060 <fork@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <fork_test@plt>
test   %rbx,%rbx
jle    1166 <main+0x26>
lea    0xc(%rsp),%rdi
call   1050 <wait@plt>
lea    0xe93(%rip),%rdi
call   1030 <system@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"ps -ef | grep marsud\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i64 (...) @fork()
store i64 %8, i64* %6
%9 = load i64, i64* %6
%10 = call i32 @fork_test(i64 %9)
%11 = load i64, i64* %6
%12 = icmp sgt i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = call i32 @wait(i32* %7)
br label %15
15: ; preds = %13, %2
%16 = call i32 @system(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [21 x i8] c"ps -ef | grep marsud\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i64 (...) @fork()
%6 = tail call i32 @fork_test(i64 %5)
%7 = icmp sgt i64 %5, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @wait(i32* %3)
br label %10
10: ; preds = %8, %2
%11 = call i32 @system(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
char *sha1base64(bitstr, bitcnt)
unsigned char *bitstr;
unsigned long bitcnt;
{ return ((char *)shacomp(1, 3, bitstr, bitcnt)); }


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

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

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

LLVM IR (-O2):
define i8* @sha1base64(i8* %0, i64 %1) {
%3 = tail call i32 (i32, i32, i8*, i64, ...) bitcast (i32 (...)* @shacomp to i32 (i32, i32, i8*, i64, ...)*)(i32 1, i32 3, i8* %0, i64 %1)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
long proc1(long p1) {
  long a = 1;
  return p1 + a * 2;
}


x86 assembly (clang, -O0):
<proc1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
shl    $0x1,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<proc1>:
lea    0x2(%rdi),%rax
ret

LLVM IR (-O0):
define i64 @proc1(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
store i64 1, i64* %3
%4 = load i64, i64* %2
%5 = load i64, i64* %3
%6 = mul nsw i64 %5, 2
%7 = add nsw i64 %4, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @proc1(i64 %0) {
%2 = add nsw i64 %0, 2
ret i64 %2
}
int test_imm_F9uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0xF9 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_F9uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 249
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct tm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ strftime(char *, int, char *, struct tm const *);
char *asctime(const struct tm *t) {
  static char buf[26];
  strftime(buf, 26, "%a %b %d %H:%M:%S %Y\n", t);
  return buf;
}


x86 assembly (clang, -O0):
<asctime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
lea    0x2f19(%rip),%rdi
mov    $0x1a,%esi
lea    0xecd(%rip),%rdx
call   1030 <strftime@plt>
lea    0x2f01(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asctime>:
push   %rbx
mov    %rdi,%rcx
lea    0x2f25(%rip),%rbx
lea    0xede(%rip),%rdx
mov    %rbx,%rdi
mov    $0x1a,%esi
call   1030 <strftime@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@asctime.buf = internal global [26 x i8] zeroinitializer
@.str = [22 x i8] c"%a %b %d %H:%M:%S %Y\0A\00"
define i8* @asctime(%struct.tm* %0) {
%2 = alloca %struct.tm*
store %struct.tm* %0, %struct.tm** %2
%3 = load %struct.tm*, %struct.tm** %2
%4 = call i32 @strftime(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @asctime.buf, i64 0, i64 0), i32 26, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), %struct.tm* %3)
ret i8* getelementptr inbounds ([26 x i8], [26 x i8]* @asctime.buf, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@asctime.buf = internal global [26 x i8] zeroinitializer
@.str = [22 x i8] c"%a %b %d %H:%M:%S %Y\0A\00"
define i8* @asctime(%struct.tm* %0) {
%2 = tail call i32 @strftime(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @asctime.buf, i64 0, i64 0), i32 26, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), %struct.tm* %0)
ret i8* getelementptr inbounds ([26 x i8], [26 x i8]* @asctime.buf, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x1b() {
  Assert_real((isdigit(27) == 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_isdigit.c",
              140, ("isdigit should be 0 for 0x1b"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0x1b>:
push   %rax
mov    $0x1b,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x8c,%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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0x1b\00"
define void @t_isdigit_0x1b() {
%1 = call i64 @isdigit(i32 27)
%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 140, 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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0x1b\00"
define void @t_isdigit_0x1b() {
%1 = tail call i64 @isdigit(i32 27)
%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 140, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned char HexValue(char ch) {
  if ((ch >= '0') && (ch <= '9'))
    return ch - '0';
  ch |= 0x20;
  if ((ch >= 'a') && (ch <= 'f'))
    return ch - 'a' + 10;
  return 0;
}


x86 assembly (clang, -O0):
<HexValue>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x30,%eax
jl     1133 <HexValue+0x33>
movsbl -0x2(%rbp),%eax
cmp    $0x39,%eax
jg     1133 <HexValue+0x33>
movsbl -0x2(%rbp),%eax
sub    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    116d <HexValue+0x6d>
movsbl -0x2(%rbp),%eax
or     $0x20,%eax
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x61,%eax
jl     1169 <HexValue+0x69>
movsbl -0x2(%rbp),%eax
cmp    $0x66,%eax
jg     1169 <HexValue+0x69>
movsbl -0x2(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %al,-0x1(%rbp)
jmp    116d <HexValue+0x6d>
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<HexValue>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%al
jb     111d <HexValue+0x1d>
or     $0x20,%dil
lea    -0x61(%rdi),%eax
add    $0xa9,%dil
xor    %ecx,%ecx
cmp    $0x6,%al
movzbl %dil,%eax
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define zeroext i8 @HexValue(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %16
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 48
%15 = trunc i32 %14 to i8
store i8 %15, i8* %2
br label %35
16: ; preds = %7, %1
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = or i32 %18, 32
%20 = trunc i32 %19 to i8
store i8 %20, i8* %3
%21 = load i8, i8* %3
%22 = sext i8 %21 to i32
%23 = icmp sge i32 %22, 97
br i1 %23, label %24, label %34
24: ; preds = %16
%25 = load i8, i8* %3
%26 = sext i8 %25 to i32
%27 = icmp sle i32 %26, 102
br i1 %27, label %28, label %34
28: ; preds = %24
%29 = load i8, i8* %3
%30 = sext i8 %29 to i32
%31 = sub nsw i32 %30, 97
%32 = add nsw i32 %31, 10
%33 = trunc i32 %32 to i8
store i8 %33, i8* %2
br label %35
34: ; preds = %24, %16
store i8 0, i8* %2
br label %35
35: ; preds = %34, %28, %11
%36 = load i8, i8* %2
ret i8 %36
}

LLVM IR (-O2):
define zeroext i8 @HexValue(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
br i1 %3, label %10, label %4
4: ; preds = %1
%5 = or i8 %0, 32
%6 = add i8 %5, -97
%7 = icmp ult i8 %6, 6
%8 = add i8 %5, -87
%9 = select i1 %7, i8 %8, i8 0
br label %10
10: ; preds = %1, %4
%11 = phi i8 [ %9, %4 ], [ %2, %1 ]
ret i8 %11
}
void g_option_context_free() {}


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

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

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

LLVM IR (-O2):
define void @g_option_context_free() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_array_ref();
int main(void) { test_array_ref(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @test_array_ref()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_array_ref()
ret i32 0
}