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

/* Variables and functions */
int /*<<< orphan*/ _sha256_be32dec(unsigned char const *);
void be32dec_vect(uint32_t *dst, const unsigned char *src, size_t len) {
  size_t i;
  for (i = 0; i < len / 4; i++) {
    dst[i] = _sha256_be32dec(src + i * 4);
  }
}


x86 assembly (clang, -O0):
<be32dec_vect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
shr    $0x2,%rcx
cmp    %rcx,%rax
jae    1173 <be32dec_vect+0x63>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
call   1030 <_sha256_be32dec@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112c <be32dec_vect+0x1c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<be32dec_vect>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
cmp    $0x4,%rdx
jb     1149 <be32dec_vect+0x39>
mov    %rdx,%r14
mov    %rsi,%r12
mov    %rdi,%r15
shr    $0x2,%r14
xor    %ebx,%ebx
nopl   (%rax)
mov    %r12,%rdi
call   1030 <_sha256_be32dec@plt>
mov    %eax,(%r15,%rbx,4)
add    $0x1,%rbx
add    $0x4,%r12
cmp    %rbx,%r14
jne    1130 <be32dec_vect+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @be32dec_vect(i32* %0, i8* %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
store i32* %0, i32** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
store i64 0, i64* %7
br label %8
8: ; preds = %22, %3
%9 = load i64, i64* %7
%10 = load i64, i64* %6
%11 = udiv i64 %10, 4
%12 = icmp ult i64 %9, %11
br i1 %12, label %13, label %25
13: ; preds = %8
%14 = load i8*, i8** %5
%15 = load i64, i64* %7
%16 = mul i64 %15, 4
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = call i32 @_sha256_be32dec(i8* %17)
%19 = load i32*, i32** %4
%20 = load i64, i64* %7
%21 = getelementptr inbounds i32, i32* %19, i64 %20
store i32 %18, i32* %21
br label %22
22: ; preds = %13
%23 = load i64, i64* %7
%24 = add i64 %23, 1
store i64 %24, i64* %7
br label %8
25: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @be32dec_vect(i32* nocapture writeonly %0, i8* %1, i64 %2) {
%4 = icmp ult i64 %2, 4
br i1 %4, label %15, label %5
5: ; preds = %3
%6 = lshr i64 %2, 2
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ %13, %7 ], [ 0, %5 ]
%9 = shl i64 %8, 2
%10 = getelementptr inbounds i8, i8* %1, i64 %9
%11 = tail call i32 @_sha256_be32dec(i8* %10)
%12 = getelementptr inbounds i32, i32* %0, i64 %8
store i32 %11, i32* %12
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %15, label %7
15: ; preds = %7, %3
ret void
}
/* Type definitions */
typedef int uint32_t;
typedef int int32_t;

/* Variables and functions */
__attribute__((always_)) uint32_t __PKHBT(uint32_t val1, uint32_t val2,
                                          uint32_t val3) {
  return ((((int32_t)(val1) << 0) & (int32_t)0x0000FFFF) |
          (((int32_t)(val2) << val3) & (int32_t)0xFFFF0000));
}


x86 assembly (clang, -O0):
<__PKHBT>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x0,%eax
and    $0xffff,%eax
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
and    $0xffff0000,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__PKHBT>:
mov    %edx,%ecx
shl    %cl,%esi
movzwl %di,%eax
and    $0xffff0000,%esi
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @__PKHBT(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 = shl i32 %7, 0
%9 = and i32 %8, 65535
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = shl i32 %10, %11
%13 = and i32 %12, -65536
%14 = or i32 %9, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @__PKHBT(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %0, 65535
%5 = shl i32 %1, %2
%6 = and i32 %5, -65536
%7 = or i32 %6, %4
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int link(char *, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  if (argc < 3) {
    fprintf(stderr, "Usage:link name newname");
    _exit(0);
  }
  return link(argv[1], argv[2]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    116c <main+0x3c>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
lea    0xea0(%rip),%rsi
call   1040 <fprintf@plt>
xor    %edi,%edi
call   1030 <_exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1050 <link@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jle    1144 <main+0x14>
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rsi
pop    %rax
jmp    1050 <link@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
lea    0xeac(%rip),%rsi
call   1040 <fprintf@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Usage:link name newname\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 3
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @_exit(i32 0)
unreachable
12: ; preds = %2
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 2
%18 = load i8*, i8** %17
%19 = call i32 @link(i8* %15, i8* %18)
ret i32 %19
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Usage:link name newname\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @_exit(i32 0)
unreachable
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = getelementptr inbounds i8*, i8** %1, i64 2
%12 = load i8*, i8** %11
%13 = tail call i32 @link(i8* %10, i8* %12)
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_unpacklo_epi32(int /*<<< orphan*/, int /*<<< orphan*/);
__m128i test_mm_unpacklo_epi32(__m128i A, __m128i B) {
  return _mm_unpacklo_epi32(A, B);
}


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

x86 assembly (clang, -O2):
<test_mm_unpacklo_epi32>:
jmp    1030 <_mm_unpacklo_epi32@plt>

LLVM IR (-O0):
define i32 @test_mm_unpacklo_epi32(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @_mm_unpacklo_epi32(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_unpacklo_epi32(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_unpacklo_epi32(i32 %0, i32 %1)
ret i32 %3
}
int musbgm_init() { return (-1); }


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

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

LLVM IR (-O0):
define i32 @musbgm_init() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @musbgm_init() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ CloseWindow();
void CloseAllWindows() {
  int n;
  for (n = 0; n < 16; n++)
    CloseWindow();
}


x86 assembly (clang, -O0):
<CloseAllWindows>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    113e <CloseAllWindows+0x2e>
mov    $0x0,%al
call   1030 <CloseWindow@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <CloseAllWindows+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CloseAllWindows>:
push   %rax
xor    %eax,%eax
call   1030 <CloseWindow@plt>
xor    %eax,%eax
call   1030 <CloseWindow@plt>
xor    %eax,%eax
call   1030 <CloseWindow@plt>
xor    %eax,%eax
call   1030 <CloseWindow@plt>
xor    %eax,%eax
call   1030 <CloseWindow@plt>
xor    %eax,%eax
call   1030 <CloseWindow@plt>
xor    %eax,%eax
call   1030 <CloseWindow@plt>
xor    %eax,%eax
call   1030 <CloseWindow@plt>
xor    %eax,%eax
call   1030 <CloseWindow@plt>
xor    %eax,%eax
call   1030 <CloseWindow@plt>
xor    %eax,%eax
call   1030 <CloseWindow@plt>
xor    %eax,%eax
call   1030 <CloseWindow@plt>
xor    %eax,%eax
call   1030 <CloseWindow@plt>
xor    %eax,%eax
call   1030 <CloseWindow@plt>
xor    %eax,%eax
call   1030 <CloseWindow@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <CloseWindow@plt>

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

LLVM IR (-O2):
define void @CloseAllWindows() {
%1 = tail call i32 (...) @CloseWindow()
%2 = tail call i32 (...) @CloseWindow()
%3 = tail call i32 (...) @CloseWindow()
%4 = tail call i32 (...) @CloseWindow()
%5 = tail call i32 (...) @CloseWindow()
%6 = tail call i32 (...) @CloseWindow()
%7 = tail call i32 (...) @CloseWindow()
%8 = tail call i32 (...) @CloseWindow()
%9 = tail call i32 (...) @CloseWindow()
%10 = tail call i32 (...) @CloseWindow()
%11 = tail call i32 (...) @CloseWindow()
%12 = tail call i32 (...) @CloseWindow()
%13 = tail call i32 (...) @CloseWindow()
%14 = tail call i32 (...) @CloseWindow()
%15 = tail call i32 (...) @CloseWindow()
%16 = tail call i32 (...) @CloseWindow()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void clear_screen(void) { printf("\n\n"); }


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

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

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

LLVM IR (-O2):
@str = [2 x i8] c"\0A\00"
define void @clear_screen() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ popmatrix();
void popmat_() { popmatrix(); }


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

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

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

LLVM IR (-O2):
define void @popmat_() {
%1 = tail call i32 (...) @popmatrix()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void builtin_quit(__attribute__((unused)) int argc,
                  __attribute__((unused)) char *argv[]) {
  exit(0);
}


x86 assembly (clang, -O0):
<builtin_quit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<builtin_quit>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @builtin_quit(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @builtin_quit(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @exit(i32 0)
unreachable
}
void docell4(void *c, float modulator) {
  (void)c;
  (void)modulator;
}


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

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

LLVM IR (-O0):
define void @docell4(i8* %0, float %1) {
%3 = alloca i8*
%4 = alloca float
store i8* %0, i8** %3
store float %1, float* %4
%5 = load i8*, i8** %3
%6 = load float, float* %4
ret void
}

LLVM IR (-O2):
define void @docell4(i8* nocapture %0, float %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HwFlyingF3Handle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void HwFlyingF3RequestUpdate() { UAVObjRequestUpdate(HwFlyingF3Handle()); }


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

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

LLVM IR (-O0):
define void @HwFlyingF3RequestUpdate() {
%1 = call i32 (...) @HwFlyingF3Handle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @HwFlyingF3RequestUpdate() {
%1 = tail call i32 (...) @HwFlyingF3Handle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ logical(int, int);
void main() { logical(1, 2); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <logical@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%edi
mov    $0x2,%esi
jmp    1030 <logical@plt>

LLVM IR (-O0):
define void @main() {
%1 = call i32 @logical(i32 1, i32 2)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @logical(i32 1, i32 2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ RAND_seed(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fread(char *, int, int, int /*<<< orphan*/ *);
void RAND_init(void) {
  char buf[32];
  FILE *fin = fopen("/dev/random", "rb");
  fread(buf, sizeof(buf), 1, fin);
  fclose(fin);
  RAND_seed(fin, 32);
}


x86 assembly (clang, -O0):
<RAND_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    0xeb1(%rip),%rdi
lea    0xeb6(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x28(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rcx
mov    $0x20,%esi
mov    $0x1,%edx
call   1040 <fread@plt>
mov    -0x28(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x28(%rbp),%rdi
mov    $0x20,%esi
call   1030 <RAND_seed@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RAND_init>:
push   %rbx
sub    $0x20,%rsp
lea    0xeb4(%rip),%rdi
lea    0xeb9(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
mov    %rsp,%rdi
mov    $0x20,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1040 <fread@plt>
mov    %rbx,%rdi
call   1050 <fclose@plt>
mov    %rbx,%rdi
mov    $0x20,%esi
add    $0x20,%rsp
pop    %rbx
jmp    1030 <RAND_seed@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"/dev/random\00"
@.str.1 = [3 x i8] c"rb\00"
define void @RAND_init() {
%1 = alloca [32 x i8]
%2 = alloca i32*
%3 = call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %2
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%5 = load i32*, i32** %2
%6 = call i32 @fread(i8* %4, i32 32, i32 1, i32* %5)
%7 = load i32*, i32** %2
%8 = call i32 @fclose(i32* %7)
%9 = load i32*, i32** %2
%10 = call i32 @RAND_seed(i32* %9, i32 32)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"/dev/random\00"
@.str.1 = [3 x i8] c"rb\00"
define void @RAND_init() {
%1 = alloca [32 x i8]
%2 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%3 = tail call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @fread(i8* %2, i32 32, i32 1, i32* %3)
%5 = tail call i32 @fclose(i32* %3)
%6 = tail call i32 @RAND_seed(i32* %3, i32 32)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ wait(int /*<<< orphan*/);
void handleSIGCHLD(int i) { wait(0); }


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

x86 assembly (clang, -O2):
<handleSIGCHLD>:
xor    %edi,%edi
jmp    1030 <wait@plt>

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

LLVM IR (-O2):
define void @handleSIGCHLD(i32 %0) {
%2 = tail call i32 @wait(i32 0)
ret void
}
/* Variables and functions */
#define EOF 128
int is_op(int c) {
  switch (c) {
  case '<':
  case '>':
  case '-':
  case '+':
  case '.':
  case ',':
  case '[':
  case ']':
    return 1;
  case EOF:
    return EOF;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<is_op>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffd5,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x55,%eax
ja     1148 <is_op+0x48>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x4(%rbp)
jmp    114f <is_op+0x4f>
movl   $0x80,-0x4(%rbp)
jmp    114f <is_op+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_op>:
add    $0xffffffd5,%edi
cmp    $0x55,%edi
ja     1124 <is_op+0x24>
mov    $0x1,%eax
lea    0xeec(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
ret
mov    $0x80,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_op(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 60, label %5
i32 62, label %5
i32 45, label %5
i32 43, label %5
i32 46, label %5
i32 44, label %5
i32 91, label %5
i32 93, label %5
i32 128, label %6
]
5: ; preds = %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %8
6: ; preds = %1
store i32 128, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @is_op(i32 %0) {
switch i32 %0, label %3 [
i32 60, label %4
i32 62, label %4
i32 45, label %4
i32 43, label %4
i32 46, label %4
i32 44, label %4
i32 91, label %4
i32 93, label %4
i32 128, label %2
]
2: ; preds = %1
br label %4
3: ; preds = %1
br label %4
4: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %3, %2
%5 = phi i32 [ 0, %3 ], [ 128, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %5
}
unsigned char unsignedchar_ignoring_signedchar(unsigned char x, signed char y) {
  return x;
}


x86 assembly (clang, -O0):
<unsignedchar_ignoring_signedchar>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i8 @unsignedchar_ignoring_signedchar(i8 zeroext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
ret i8 %5
}

LLVM IR (-O2):
define zeroext i8 @unsignedchar_ignoring_signedchar(i8 returned zeroext %0, i8 signext %1) {
ret i8 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hello "
         "world!\n");
  printf("Hello \0 world!");
  printf("\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed7(%rip),%rdi
call   1040 <puts@plt>
lea    0xebc(%rip),%rdi
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str.1 = [15 x i8] c"Hello \00 world!\00"
@str = [13 x i8] c"Hello world!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @putchar(i32 10)
ret i32 0
}
void gtk_drag_source_set_icon_stock() {}


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

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

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

LLVM IR (-O2):
define void @gtk_drag_source_set_icon_stock() {
ret void
}
/* Variables and functions */
int set_setting(char *, int /*<<< orphan*/);
int disable_setting(char *path) { return set_setting(path, 0); }


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

x86 assembly (clang, -O2):
<disable_setting>:
xor    %esi,%esi
jmp    1030 <set_setting@plt>

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

LLVM IR (-O2):
define i32 @disable_setting(i8* %0) {
%2 = tail call i32 @set_setting(i8* %0, i32 0)
ret i32 %2
}
/* Variables and functions */
int __NONDET__();
int main() {
  int a[32];
  int x = __NONDET__();
  a[x % 32] = 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    $0x0,%al
call   1030 <__NONDET__@plt>
mov    %eax,-0x84(%rbp)
mov    -0x84(%rbp),%eax
mov    $0x20,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
movl   $0x1,-0x80(%rbp,%rax,4)
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca [32 x i32]
%2 = alloca i32
%3 = call i32 (...) @__NONDET__()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = srem i32 %4, 32
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 %6
store i32 1, i32* %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__NONDET__()
ret i32 0
}
int nmdc_char_need_quoting(char c) {
  return (c == 0 || c == 5 || c == 36 || c == 96 || c == 124 || c == 126);
}


x86 assembly (clang, -O0):
<nmdc_char_need_quoting>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x2(%rbp)
je     1171 <nmdc_char_need_quoting+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5,%ecx
mov    %al,-0x2(%rbp)
je     1171 <nmdc_char_need_quoting+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x24,%ecx
mov    %al,-0x2(%rbp)
je     1171 <nmdc_char_need_quoting+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x60,%ecx
mov    %al,-0x2(%rbp)
je     1171 <nmdc_char_need_quoting+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7c,%ecx
mov    %al,-0x2(%rbp)
je     1171 <nmdc_char_need_quoting+0x71>
movsbl -0x1(%rbp),%eax
cmp    $0x7e,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nmdc_char_need_quoting>:
mov    $0x1,%eax
cmp    $0x24,%dil
ja     111f <nmdc_char_need_quoting+0x1f>
movzbl %dil,%ecx
movabs $0x1000000021,%rdx
bt     %rcx,%rdx
jb     112b <nmdc_char_need_quoting+0x2b>
cmp    $0x60,%dil
je     112b <nmdc_char_need_quoting+0x2b>
cmp    $0x7c,%dil
jne    112c <nmdc_char_need_quoting+0x2c>
ret
xor    %eax,%eax
cmp    $0x7e,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @nmdc_char_need_quoting(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 0
br i1 %5, label %26, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 5
br i1 %9, label %26, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 36
br i1 %13, label %26, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 96
br i1 %17, label %26, label %18
18: ; preds = %14
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 124
br i1 %21, label %26, label %22
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 126
br label %26
26: ; preds = %22, %18, %14, %10, %6, %1
%27 = phi i1 [ true, %18 ], [ true, %14 ], [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %25, %22 ]
%28 = zext i1 %27 to i32
ret i32 %28
}

LLVM IR (-O2):
define i32 @nmdc_char_need_quoting(i8 signext %0) {
switch i8 %0, label %2 [
i8 124, label %5
i8 96, label %5
i8 36, label %5
i8 5, label %5
i8 0, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 126
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
void et_drive_follow(int ticks_per_second) {}


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

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

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

LLVM IR (-O2):
define void @et_drive_follow(i32 %0) {
ret void
}
/* Variables and functions */
scalar_t__ ERANGE;
int /*<<< orphan*/ assert(int);
scalar_t__ errno;
scalar_t__ strtol(char *, char **, int);
int parse_int(char *str) {
  char *buf;
  int val = (int)strtol(str, &buf, 10);
  if (val == 0)
    assert(errno != ERANGE);
  return val;
}


x86 assembly (clang, -O0):
<parse_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    $0xa,%edx
call   1040 <strtol@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    116c <parse_int+0x4c>
mov    0x2e86(%rip),%rax
mov    (%rax),%rax
mov    0x2e8c(%rip),%rcx
cmp    (%rcx),%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_int>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rsi
mov    $0xa,%edx
call   1040 <strtol@plt>
mov    %rax,%rbx
test   %ebx,%ebx
jne    115a <parse_int+0x3a>
mov    0x2e96(%rip),%rax
mov    (%rax),%rax
mov    0x2e9c(%rip),%rcx
xor    %edi,%edi
cmp    (%rcx),%rax
setne  %dil
call   1030 <assert@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@errno = global i64 0
@ERANGE = global i64 0
define i32 @parse_int(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strtol(i8* %5, i8** %3, i32 10)
%7 = trunc i64 %6 to i32
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %1
%11 = load i64, i64* @errno
%12 = load i64, i64* @ERANGE
%13 = icmp ne i64 %11, %12
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
br label %16
16: ; preds = %10, %1
%17 = load i32, i32* %4
ret i32 %17
}

LLVM IR (-O2):
@errno = global i64 0
@ERANGE = global i64 0
define i32 @parse_int(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i64 @strtol(i8* %0, i8** %2, i32 10)
%5 = trunc i64 %4 to i32
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = load i64, i64* @errno
%9 = load i64, i64* @ERANGE
%10 = icmp ne i64 %8, %9
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
br label %13
13: ; preds = %7, %1
ret i32 %5
}
int ti_aroon_start(double const *options) { return (int)options[0]; }


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

x86 assembly (clang, -O2):
<ti_aroon_start>:
cvttsd2si (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @ti_aroon_start(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = fptosi double %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @ti_aroon_start(double* nocapture %0) {
%2 = load double, double* %0
%3 = fptosi double %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x4f() {
  Assert_real((isdigit(79) == 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",
              400, ("isdigit should be 0 for O"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0x4f>:
push   %rax
mov    $0x4f,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x190,%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 = [26 x i8] c"isdigit should be 0 for O\00"
define void @t_isdigit_0x4f() {
%1 = call i64 @isdigit(i32 79)
%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 400, 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_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for O\00"
define void @t_isdigit_0x4f() {
%1 = tail call i64 @isdigit(i32 79)
%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 400, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int id(int);
extern int idid(int x) { return id(id(x)); }


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

x86 assembly (clang, -O2):
<idid>:
push   %rax
call   1030 <id@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <id@plt>

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

LLVM IR (-O2):
define i32 @idid(i32 %0) {
%2 = tail call i32 @id(i32 %0)
%3 = tail call i32 @id(i32 %2)
ret i32 %3
}
void outside_scope() { return; }


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

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

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

LLVM IR (-O2):
define void @outside_scope() {
ret void
}
/* Variables and functions */
double log(scalar_t__);
scalar_t__ sqrt(double);
double genasinh(double num) { return (log(num + sqrt(num * num + 1.0))); }


x86 assembly (clang, -O0):
<genasinh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeb3(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  -0x10(%rbp),%xmm0
cvtsi2sd %rax,%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rdi
call   1030 <log@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genasinh>:
push   %rax
movsd  %xmm0,(%rsp)
mulsd  %xmm0,%xmm0
addsd  0xece(%rip),%xmm0
call   1040 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  (%rsp),%xmm0
cvttsd2si %xmm0,%rdi
pop    %rax
jmp    1030 <log@plt>

LLVM IR (-O0):
define double @genasinh(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = call double @llvm.fmuladd.f64(double %4, double %5, double 1.000000e+00)
%7 = call i64 @sqrt(double %6)
%8 = sitofp i64 %7 to double
%9 = fadd double %3, %8
%10 = fptosi double %9 to i64
%11 = call double @log(i64 %10)
ret double %11
}

LLVM IR (-O2):
define double @genasinh(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double %0, double 1.000000e+00)
%3 = tail call i64 @sqrt(double %2)
%4 = sitofp i64 %3 to double
%5 = fadd double %4, %0
%6 = fptosi double %5 to i64
%7 = tail call double @log(i64 %6)
ret double %7
}
void gtk_text_iter_toggles_tag() {}


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

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

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

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

/* Variables and functions */
size_t vmfile_wlocpos(struct vmfile *);
size_t vmfile_num_elements(struct vmfile *vmb, size_t size_of_element) {
  return vmfile_wlocpos(vmb) / size_of_element;
}


x86 assembly (clang, -O0):
<vmfile_num_elements>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <vmfile_wlocpos@plt>
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vmfile_num_elements>:
push   %rbx
mov    %rsi,%rbx
call   1030 <vmfile_wlocpos@plt>
mov    %rax,%rcx
or     %rbx,%rcx
shr    $0x20,%rcx
je     112c <vmfile_num_elements+0x1c>
xor    %edx,%edx
div    %rbx
pop    %rbx
ret
xor    %edx,%edx
div    %ebx
pop    %rbx
ret

LLVM IR (-O0):
%struct.vmfile = type { i32 }
define i64 @vmfile_num_elements(%struct.vmfile* %0, i64 %1) {
%3 = alloca %struct.vmfile*
%4 = alloca i64
store %struct.vmfile* %0, %struct.vmfile** %3
store i64 %1, i64* %4
%5 = load %struct.vmfile*, %struct.vmfile** %3
%6 = call i64 @vmfile_wlocpos(%struct.vmfile* %5)
%7 = load i64, i64* %4
%8 = udiv i64 %6, %7
ret i64 %8
}

LLVM IR (-O2):
%struct.vmfile = type { i32 }
define i64 @vmfile_num_elements(%struct.vmfile* %0, i64 %1) {
%3 = tail call i64 @vmfile_wlocpos(%struct.vmfile* %0)
%4 = udiv i64 %3, %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int, int);
int setbits(unsigned int, int, int, unsigned int);
main() {
  unsigned x = 0xff;
  unsigned y = 0xf0;
  printf("0x%x,0x%x\n", x, y);
  printf("0x%x,0x%x\n", x, setbits(x, 4, 3, y));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xff,-0x8(%rbp)
movl   $0xf0,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%ecx
mov    $0x4,%esi
mov    $0x3,%edx
call   1040 <setbits@plt>
mov    -0x10(%rbp),%esi
mov    %eax,%edx
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
mov    $0xff,%esi
mov    $0xf0,%edx
call   1030 <printf@plt>
mov    $0xff,%edi
mov    $0x4,%esi
mov    $0x3,%edx
mov    $0xf0,%ecx
call   1040 <setbits@plt>
mov    %rbx,%rdi
mov    $0xff,%esi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"0x%x,0x%x\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 255, i32 240)
%2 = tail call i32 @setbits(i32 255, i32 4, i32 3, i32 240)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 255, i32 %2)
ret i32 0
}
void ff_hevc_put_hevc_epel_hv16_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_hv16_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_list();
int main(int argc, char *argv[]) { test_list(); }


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @test_list()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_list()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ AF_INET;
scalar_t__ inet_ntop(int /*<<< orphan*/, int *, char *, int);
char *zget_ipstring(int ip, char *ipstr) {
  return (char *)(void *)inet_ntop(AF_INET, &ip, ipstr, 16);
}


x86 assembly (clang, -O0):
<zget_ipstring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    -0x4(%rbp),%rsi
mov    $0x10,%ecx
call   1030 <inet_ntop@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zget_ipstring>:
push   %rax
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0x4(%rsp),%rsi
mov    $0x10,%ecx
call   1030 <inet_ntop@plt>
pop    %rcx
ret

LLVM IR (-O0):
@AF_INET = global i32 0
define i8* @zget_ipstring(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* @AF_INET
%6 = load i8*, i8** %4
%7 = call i64 @inet_ntop(i32 %5, i32* %3, i8* %6, i32 16)
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}

LLVM IR (-O2):
@AF_INET = global i32 0
define i8* @zget_ipstring(i32 %0, i8* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* @AF_INET
%5 = call i64 @inet_ntop(i32 %4, i32* %3, i8* %1, i32 16)
%6 = inttoptr i64 %5 to i8*
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int input;
  printf("Enter an integer 1-10:");
  scanf("%d", &input);
  if (input <= 10 && input >= 0) {
    printf("%d", input - 1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0xa,-0x8(%rbp)
jg     1175 <main+0x55>
cmpl   $0x0,-0x8(%rbp)
jl     1175 <main+0x55>
mov    -0x8(%rbp),%esi
sub    $0x1,%esi
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
cmp    $0xa,%esi
ja     115a <main+0x3a>
add    $0xffffffff,%esi
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Enter an integer 1-10:\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 10
br i1 %6, label %7, label %14
7: ; preds = %0
%8 = load i32, i32* %2
%9 = icmp sge i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = load i32, i32* %2
%12 = sub nsw i32 %11, 1
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %12)
br label %14
14: ; preds = %10, %7, %0
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"Enter an integer 1-10:\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = icmp ult i32 %5, 11
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = add nsw i32 %5, -1
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %8)
br label %10
10: ; preds = %7, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x62() {
  Assert_real((iscntrl(98) == 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_iscntrl.c",
              495, ("iscntrl should be 0 for b"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0x62>:
push   %rax
mov    $0x62,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1ef,%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_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for b\00"
define void @t_iscntrl_0x62() {
%1 = call i64 @iscntrl(i32 98)
%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 495, 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_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for b\00"
define void @t_iscntrl_0x62() {
%1 = tail call i64 @iscntrl(i32 98)
%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 495, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ p1putstr(int, char *);
char *strerror(int /*<<< orphan*/);
void p1perror(int fd, char *str) {
  char *p = strerror(errno);
  p1putstr(fd, str);
  p1putstr(fd, " - ");
  p1putstr(fd, p);
  p1putstr(fd, "\n");
}


x86 assembly (clang, -O0):
<p1perror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <p1putstr@plt>
mov    -0x4(%rbp),%edi
lea    0xea9(%rip),%rsi
call   1030 <p1putstr@plt>
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1030 <p1putstr@plt>
mov    -0x4(%rbp),%edi
lea    0xe92(%rip),%rsi
call   1030 <p1putstr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p1perror>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    %rax,%r14
mov    %ebp,%edi
mov    %rbx,%rsi
call   1030 <p1putstr@plt>
lea    0xeb5(%rip),%rsi
mov    %ebp,%edi
call   1030 <p1putstr@plt>
mov    %ebp,%edi
mov    %r14,%rsi
call   1030 <p1putstr@plt>
lea    0xea1(%rip),%rsi
mov    %ebp,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <p1putstr@plt>

LLVM IR (-O0):
@errno = global i32 0
@.str = [4 x i8] c" - \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @p1perror(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i32, i32* @errno
%7 = call i8* @strerror(i32 %6)
store i8* %7, i8** %5
%8 = load i32, i32* %3
%9 = load i8*, i8** %4
%10 = call i32 @p1putstr(i32 %8, i8* %9)
%11 = load i32, i32* %3
%12 = call i32 @p1putstr(i32 %11, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%13 = load i32, i32* %3
%14 = load i8*, i8** %5
%15 = call i32 @p1putstr(i32 %13, i8* %14)
%16 = load i32, i32* %3
%17 = call i32 @p1putstr(i32 %16, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@errno = global i32 0
@.str = [4 x i8] c" - \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @p1perror(i32 %0, i8* %1) {
%3 = load i32, i32* @errno
%4 = tail call i8* @strerror(i32 %3)
%5 = tail call i32 @p1putstr(i32 %0, i8* %1)
%6 = tail call i32 @p1putstr(i32 %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @p1putstr(i32 %0, i8* %4)
%8 = tail call i32 @p1putstr(i32 %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}