xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ zsim_heartbeat();
int /*<<< orphan*/ zsim_roi_begin();
int /*<<< orphan*/ zsim_roi_end();
int main() {
  printf("C test\n");
  zsim_roi_begin();
  zsim_heartbeat();
  zsim_roi_end();
  printf("C test done\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1060 <zsim_roi_begin@plt>
xor    %eax,%eax
call   1050 <zsim_heartbeat@plt>
xor    %eax,%eax
call   1040 <zsim_roi_end@plt>
lea    0xe9e(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [7 x i8] c"C test\00"
@str.2 = [12 x i8] c"C test done\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @zsim_roi_begin()
%3 = tail call i32 (...) @zsim_heartbeat()
%4 = tail call i32 (...) @zsim_roi_end()
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
char *_strstr_word(char const *, char const *, int /*<<< orphan*/,
                   int /*<<< orphan*/, int /*<<< orphan*/);
char *strstr_word(const char *haystack, const char *needle) {
  return _strstr_word(haystack, needle, 0, 0, 0);
}


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

x86 assembly (clang, -O2):
<strstr_word>:
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <_strstr_word@plt>

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

LLVM IR (-O2):
define i8* @strstr_word(i8* %0, i8* %1) {
%3 = tail call i8* @_strstr_word(i8* %0, i8* %1, i32 0, i32 0, i32 0)
ret i8* %3
}
void mainats_prelude() { return; }


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

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

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

LLVM IR (-O2):
define void @mainats_prelude() {
ret void
}
/* Variables and functions */
void *memcpy(void *, void const *, size_t);
void *gcc_implicit_memcpy(void *dest, const void *src, size_t len) {
  return memcpy(dest, src, len);
}


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

x86 assembly (clang, -O2):
<gcc_implicit_memcpy>:
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define i8* @gcc_implicit_memcpy(i8* returned writeonly %0, i8* nocapture %1, i64 %2) {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 %2, i1 false)
ret i8* %0
}
int test_imm_F7int64_lowword_mem(long long *val) {
  return ((*val) & (0xF7 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_F7int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 247
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ funAreaOfCircle();
int main() {
  funAreaOfCircle();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @funAreaOfCircle()
ret i32 0
}
int cbchar(unsigned char c) {
  int b;
  for (b = 0; c; c >>= 1)
    b += c & 1;
  return b;
}


x86 assembly (clang, -O0):
<cbchar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
cmpb   $0x0,-0x1(%rbp)
je     1137 <cbchar+0x37>
movzbl -0x1(%rbp),%eax
and    $0x1,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x1,%eax
mov    %al,-0x1(%rbp)
jmp    1111 <cbchar+0x11>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbchar>:
xor    %eax,%eax
test   %edi,%edi
je     1124 <cbchar+0x24>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
mov    %edi,%edx
and    $0x1,%dl
movzbl %dl,%edx
add    %edx,%eax
shr    %cl
cmp    $0x1,%dil
mov    %ecx,%edi
ja     1110 <cbchar+0x10>
ret

LLVM IR (-O0):
define i32 @cbchar(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
store i32 0, i32* %3
br label %4
4: ; preds = %13, %1
%5 = load i8, i8* %2
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %18
7: ; preds = %4
%8 = load i8, i8* %2
%9 = zext i8 %8 to i32
%10 = and i32 %9, 1
%11 = load i32, i32* %3
%12 = add nsw i32 %11, %10
store i32 %12, i32* %3
br label %13
13: ; preds = %7
%14 = load i8, i8* %2
%15 = zext i8 %14 to i32
%16 = ashr i32 %15, 1
%17 = trunc i32 %16 to i8
store i8 %17, i8* %2
br label %4
18: ; preds = %4
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @cbchar(i8 zeroext %0) {
%2 = icmp eq i8 %0, 0
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = phi i8 [ %9, %3 ], [ %0, %1 ]
%6 = and i8 %5, 1
%7 = zext i8 %6 to i32
%8 = add nuw nsw i32 %4, %7
%9 = lshr i8 %5, 1
%10 = icmp ult i8 %5, 2
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ _IO(unsigned char, int);
long ioctl(int, int /*<<< orphan*/);
long get_clock_value(int fd_spec) { return ioctl(fd_spec, _IO('u', 8)); }


x86 assembly (clang, -O0):
<get_clock_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x75,%edi
mov    $0x8,%esi
call   1030 <_IO@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
call   1040 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_clock_value>:
push   %rbx
mov    %edi,%ebx
mov    $0x75,%edi
mov    $0x8,%esi
call   1030 <_IO@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <ioctl@plt>

LLVM IR (-O0):
define i64 @get_clock_value(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_IO(i8 zeroext 117, i32 8)
%5 = call i64 @ioctl(i32 %3, i32 %4)
ret i64 %5
}

LLVM IR (-O2):
define i64 @get_clock_value(i32 %0) {
%2 = tail call i32 @_IO(i8 zeroext 117, i32 8)
%3 = tail call i64 @ioctl(i32 %0, i32 %2)
ret i64 %3
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int get_seed(int *seed) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(997, seed, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<get_seed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x3e5,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_seed>:
mov    %rdi,%rsi
mov    $0x3e5,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @get_seed(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32* %0, i32** %2
%6 = load i32*, i32** %2
%7 = load i32*, i32** %3
%8 = load double*, double** %5
%9 = call i32 @_ada_use_c2phc4c(i32 997, i32* %6, i32* %7, double* %8, i32 0)
store i32 %9, i32* %4
%10 = load i32, i32* %4
ret i32 %10
}

LLVM IR (-O2):
define i32 @get_seed(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc4c(i32 997, i32* %0, i32* undef, double* undef, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
int *malloc(int);
int test6(void) {
  int i, sum = 0;
  int *tab4;
  tab4 = malloc(20 * sizeof(int));
  free(tab4);
  for (i = 0; i < 21; i++) {
    sum += tab4[i];
  }
  return sum;
}


x86 assembly (clang, -O0):
<test6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
mov    $0x50,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x15,-0x4(%rbp)
jge    1176 <test6+0x56>
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    114d <test6+0x2d>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test6>:
push   %rbx
mov    $0x50,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <free@plt>
movdqu 0x44(%rbx),%xmm0
movdqu 0x4(%rbx),%xmm1
movdqu 0x14(%rbx),%xmm2
movdqu 0x24(%rbx),%xmm3
paddd  %xmm0,%xmm3
movdqu 0x34(%rbx),%xmm0
paddd  %xmm2,%xmm0
paddd  %xmm3,%xmm0
pshufd $0xee,%xmm0,%xmm2
paddd  %xmm0,%xmm2
pshufd $0x55,%xmm2,%xmm0
paddd  %xmm2,%xmm0
movd   %xmm0,%ecx
pshufd $0xee,%xmm1,%xmm0
paddd  %xmm1,%xmm0
pshufd $0x55,%xmm0,%xmm1
paddd  %xmm0,%xmm1
movd   %xmm1,%eax
add    %ecx,%eax
add    (%rbx),%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @test6() {
%1 = tail call i32* @malloc(i32 80)
%2 = tail call i32 @free(i32* %1)
%3 = load i32, i32* %1
%4 = getelementptr inbounds i32, i32* %1, i64 1
%5 = bitcast i32* %4 to <4 x i32>*
%6 = load <4 x i32>, <4 x i32>* %5
%7 = getelementptr inbounds i32, i32* %1, i64 5
%8 = bitcast i32* %7 to <16 x i32>*
%9 = load <16 x i32>, <16 x i32>* %8
%10 = call i32 @llvm.vector.reduce.add.v16i32(<16 x i32> %9)
%11 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %6)
%12 = add nsw i32 %10, %11
%13 = add nsw i32 %12, %3
ret i32 %13
}
void rop3_169_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T | S;
  stk1 = *D ^ stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_169_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_169_1_0>:
or     %esi,%edx
mov    (%rdi),%al
xor    %al,%dl
or     %sil,%dl
not    %dl
and    %sil,%al
or     %dl,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_169_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %6
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = or i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %8
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = xor i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = xor i32 %23, -1
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = zext i8 %26 to i32
%28 = load i8, i8* %5
%29 = zext i8 %28 to i32
%30 = xor i32 %29, -1
%31 = and i32 %27, %30
%32 = load i8*, i8** %4
%33 = load i8, i8* %32
%34 = zext i8 %33 to i32
%35 = load i8, i8* %5
%36 = zext i8 %35 to i32
%37 = and i32 %34, %36
%38 = or i32 %31, %37
%39 = trunc i32 %38 to i8
%40 = load i8*, i8** %4
store i8 %39, i8* %40
ret void
}

LLVM IR (-O2):
define void @rop3_169_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = or i8 %2, %1
%5 = load i8, i8* %0
%6 = xor i8 %5, %4
%7 = or i8 %6, %1
%8 = xor i8 %7, -1
%9 = and i8 %5, %1
%10 = or i8 %9, %8
store i8 %10, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GPIO_Clr(int);
void SPI_BeginTransfer(int csBitId) { GPIO_Clr(csBitId); }


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

x86 assembly (clang, -O2):
<SPI_BeginTransfer>:
jmp    1030 <GPIO_Clr@plt>

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

LLVM IR (-O2):
define void @SPI_BeginTransfer(i32 %0) {
%2 = tail call i32 @GPIO_Clr(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shmem_longlong_and_to_all(long long *target, long long *source,
                                      int nreduce, int PE_start,
                                      int logPE_stride, int PE_size,
                                      long long *pWrk, long *pSync) {
  printf("\nOpenSHMEM Analyzer\n");
}


x86 assembly (clang, -O0):
<shmem_longlong_and_to_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define void @shmem_longlong_and_to_all(i64* nocapture readnone %0, i64* nocapture readnone %1, i32 %2, i32 %3, i32 %4, i32 %5, i64* nocapture readnone %6, i64* nocapture readnone %7) {
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int close(int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *);
int CloseSocket(int socket) {
  int ret = 0;
  if ((ret = close(socket)) == 0) {
    printf("Socket closed sucessfully.\n");
  } else {
    perror("Close socket failed");
  }
  return (ret);
}


x86 assembly (clang, -O0):
<CloseSocket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jne    1167 <CloseSocket+0x37>
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
jmp    1173 <CloseSocket+0x43>
lea    0xeae(%rip),%rdi
call   1050 <perror@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CloseSocket>:
push   %rbx
call   1040 <close@plt>
mov    %eax,%ebx
test   %eax,%eax
jne    114c <CloseSocket+0x1c>
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
pop    %rbx
ret
lea    0xead(%rip),%rdi
call   1050 <perror@plt>
jmp    1148 <CloseSocket+0x18>

LLVM IR (-O0):
@.str = [28 x i8] c"Socket closed sucessfully.\0A\00"
@.str.1 = [20 x i8] c"Close socket failed\00"
define i32 @CloseSocket(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = call i32 @close(i32 %4)
store i32 %5, i32* %3
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %11
9: ; preds = %1
%10 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %7
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
@.str.1 = [20 x i8] c"Close socket failed\00"
@str = [27 x i8] c"Socket closed sucessfully.\00"
define i32 @CloseSocket(i32 %0) {
%2 = tail call i32 @close(i32 %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
br label %8
6: ; preds = %1
%7 = tail call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ __u_char;

/* Variables and functions */
int /*<<< orphan*/ _IO(int, int);
int /*<<< orphan*/ ioctl(int, int /*<<< orphan*/);
__u_char cbmarch_parallel_burst_read(int f) { return ioctl(f, _IO(0xcb, 17)); }


x86 assembly (clang, -O0):
<cbmarch_parallel_burst_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0xcb,%edi
mov    $0x11,%esi
call   1030 <_IO@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
call   1040 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbmarch_parallel_burst_read>:
push   %rbx
mov    %edi,%ebx
mov    $0xcb,%edi
mov    $0x11,%esi
call   1030 <_IO@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <ioctl@plt>

LLVM IR (-O0):
define i32 @cbmarch_parallel_burst_read(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_IO(i32 203, i32 17)
%5 = call i32 @ioctl(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @cbmarch_parallel_burst_read(i32 %0) {
%2 = tail call i32 @_IO(i32 203, i32 17)
%3 = tail call i32 @ioctl(i32 %0, i32 %2)
ret i32 %3
}
int iscolon(int c) { return (c == ':'); }


x86 assembly (clang, -O0):
<iscolon>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x3a,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iscolon>:
xor    %eax,%eax
cmp    $0x3a,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @iscolon(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 58
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @iscolon(i32 %0) {
%2 = icmp eq i32 %0, 58
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ atomic_read_barrier();
void membar_consumer(void) { atomic_read_barrier(); }


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

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

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

LLVM IR (-O2):
define void @membar_consumer() {
%1 = tail call i32 (...) @atomic_read_barrier()
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t swap32(uint32_t x) {
  return (((x & 0x000000ffu) << 24) | ((x & 0x0000ff00u) << 8) |
          ((x & 0x00ff0000u) >> 8) | ((x & 0xff000000u) >> 24));
}


x86 assembly (clang, -O0):
<swap32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
shl    $0x18,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff0000,%ecx
shr    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff000000,%ecx
shr    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @swap32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = shl i32 %4, 24
%6 = load i32, i32* %2
%7 = and i32 %6, 65280
%8 = shl i32 %7, 8
%9 = or i32 %5, %8
%10 = load i32, i32* %2
%11 = and i32 %10, 16711680
%12 = lshr i32 %11, 8
%13 = or i32 %9, %12
%14 = load i32, i32* %2
%15 = and i32 %14, -16777216
%16 = lshr i32 %15, 24
%17 = or i32 %13, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @swap32(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
/* Type definitions */
struct stream {
  int dummy;
};

/* Variables and functions */
int decode_cancel(unsigned char const *, struct stream *);
int decode_cancel_format_3(const unsigned char *pkt, struct stream *stream) {
  return decode_cancel(pkt, stream);
}


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

x86 assembly (clang, -O2):
<decode_cancel_format_3>:
jmp    1030 <decode_cancel@plt>

LLVM IR (-O0):
%struct.stream = type { i32 }
define i32 @decode_cancel_format_3(i8* %0, %struct.stream* %1) {
%3 = alloca i8*
%4 = alloca %struct.stream*
store i8* %0, i8** %3
store %struct.stream* %1, %struct.stream** %4
%5 = load i8*, i8** %3
%6 = load %struct.stream*, %struct.stream** %4
%7 = call i32 @decode_cancel(i8* %5, %struct.stream* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.stream = type { i32 }
define i32 @decode_cancel_format_3(i8* %0, %struct.stream* %1) {
%3 = tail call i32 @decode_cancel(i8* %0, %struct.stream* %1)
ret i32 %3
}
void no_menu() {}


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

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

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

LLVM IR (-O2):
define void @no_menu() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
void writegiftail() { putchar(0x3b); }


x86 assembly (clang, -O0):
<writegiftail>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3b,%edi
call   1030 <putchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<writegiftail>:
mov    $0x3b,%edi
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @writegiftail() {
%1 = call i32 @putchar(i32 59)
ret void
}

LLVM IR (-O2):
define void @writegiftail() {
%1 = tail call i32 @putchar(i32 59)
ret void
}
int iio_trigger_attach_poll_func(struct iio_trigger *trig,
                                 struct iio_poll_func *pf) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.iio_trigger = type opaque
%struct.iio_poll_func = type opaque
define i32 @iio_trigger_attach_poll_func(%struct.iio_trigger* nocapture readnone %0, %struct.iio_poll_func* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void IF_crC(void) { printf("\n"); }


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

x86 assembly (clang, -O2):
<IF_crC>:
mov    $0xa,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @IF_crC() {
%1 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn46() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn46");
  return result;
}


x86 assembly (clang, -O0):
<fn46>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1e,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn46>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fn46\00"
define i8* @fn46() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = add nsw i32 20, %3
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 20
%9 = add nsw i32 30, %8
%10 = call i8* @realloc(i8* %6, i32 %9)
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"fn46\00"
define i8* @fn46() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}
double test_expm1(double x) { return __builtin_expm1(x); }


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

x86 assembly (clang, -O2):
<test_expm1>:
jmp    1030 <expm1@plt>

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

LLVM IR (-O2):
define double @test_expm1(double %0) {
%2 = tail call double @expm1(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ matNd_getRow(double *, double const *, int const, int);
void mat4d_getRow(double result[4], const double m[16], const int row) {
  matNd_getRow(result, m, row, 4);
}


x86 assembly (clang, -O0):
<mat4d_getRow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x4,%ecx
call   1030 <matNd_getRow@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mat4d_getRow>:
mov    $0x4,%ecx
jmp    1030 <matNd_getRow@plt>

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

LLVM IR (-O2):
define void @mat4d_getRow(double* %0, double* %1, i32 %2) {
%4 = tail call i32 @matNd_getRow(double* %0, double* %1, i32 %2, i32 4)
ret void
}
void mcurses_refresh() { asm("int $3;"); }


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

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

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

LLVM IR (-O2):
define void @mcurses_refresh() {
tail call void asm sideeffect "int $$3;", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void foo614() {}


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

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

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

LLVM IR (-O2):
define void @foo614() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_79() {
  Assert_real((isqrt(79) == 8),
              "/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/stdlib/isqrt.c",
              400, ("Integer square root of 79 should be 8"));
}


x86 assembly (clang, -O0):
<t_sqrt_79>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4f,%edi
call   1030 <isqrt@plt>
cmp    $0x8,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x190,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_79>:
push   %rax
mov    $0x4f,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x8,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x190,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 79 should be 8\00"
define void @t_sqrt_79() {
%1 = call i32 @isqrt(i32 79)
%2 = icmp eq i32 %1, 8
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 400, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 79 should be 8\00"
define void @t_sqrt_79() {
%1 = tail call i32 @isqrt(i32 79)
%2 = icmp eq i32 %1, 8
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 400, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}
char *_Locale_messages_name(const void *__DUMMY_PAR1, char *__DUMMY_PAR) {
  return 0;
}


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

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

LLVM IR (-O0):
define i8* @_Locale_messages_name(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @_Locale_messages_name(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* null
}
/* Type definitions */
struct msgbuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *msgbuf_put_uninit(struct msgbuf *, size_t);
void *msgbuf_put_zeros(struct msgbuf *b, size_t size) {
  void *dst = msgbuf_put_uninit(b, size);
  memset(dst, 0, size);
  return dst;
}


x86 assembly (clang, -O0):
<msgbuf_put_zeros>:
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 <msgbuf_put_uninit@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msgbuf_put_zeros>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1040 <msgbuf_put_uninit@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.msgbuf = type { i32 }
define i8* @msgbuf_put_zeros(%struct.msgbuf* %0, i64 %1) {
%3 = alloca %struct.msgbuf*
%4 = alloca i64
%5 = alloca i8*
store %struct.msgbuf* %0, %struct.msgbuf** %3
store i64 %1, i64* %4
%6 = load %struct.msgbuf*, %struct.msgbuf** %3
%7 = load i64, i64* %4
%8 = call i8* @msgbuf_put_uninit(%struct.msgbuf* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = load i64, i64* %4
%11 = call i32 @memset(i8* %9, i32 0, i64 %10)
%12 = load i8*, i8** %5
ret i8* %12
}

LLVM IR (-O2):
%struct.msgbuf = type { i32 }
define i8* @msgbuf_put_zeros(%struct.msgbuf* %0, i64 %1) {
%3 = tail call i8* @msgbuf_put_uninit(%struct.msgbuf* %0, i64 %1)
%4 = tail call i32 @memset(i8* %3, i32 0, i64 %1)
ret i8* %3
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned short width;
};
struct TYPE_4__ {
  TYPE_1__ max_logical_extent;
};
typedef TYPE_2__ XFontSetExtents;

/* Variables and functions */
void set_XFontSetExtents_max_logical_extent_width(void *_p, unsigned short _v) {
  ((XFontSetExtents *)_p)->max_logical_extent.width = (unsigned short)_v;
}


x86 assembly (clang, -O0):
<set_XFontSetExtents_max_logical_extent_width>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    -0x8(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XFontSetExtents_max_logical_extent_width>:
mov    %si,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i16 }
define void @set_XFontSetExtents_max_logical_extent_width(i8* %0, i16 zeroext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i16 %5, i16* %9
ret void
}

LLVM IR (-O2):
define void @set_XFontSetExtents_max_logical_extent_width(i8* nocapture writeonly %0, i16 zeroext %1) {
%3 = bitcast i8* %0 to i16*
store i16 %1, i16* %3
ret void
}
void avcodec_encode_audio2() {}


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

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

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

LLVM IR (-O2):
define void @avcodec_encode_audio2() {
ret void
}
void NullTextL(struct ADrawTag *ctx __attribute__((unused)),
               unsigned int x __attribute__((unused)),
               unsigned int y __attribute__((unused)),
               const char *string __attribute__((unused)),
               const char *url __attribute__((unused))) {}


x86 assembly (clang, -O0):
<NullTextL>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.ADrawTag = type opaque
define void @NullTextL(%struct.ADrawTag* %0, i32 %1, i32 %2, i8* %3, i8* %4) {
%6 = alloca %struct.ADrawTag*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
store %struct.ADrawTag* %0, %struct.ADrawTag** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i8* %4, i8** %10
ret void
}

LLVM IR (-O2):
%struct.ADrawTag = type opaque
define void @NullTextL(%struct.ADrawTag* nocapture %0, i32 %1, i32 %2, i8* nocapture %3, i8* nocapture %4) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ describe(char *);
int /*<<< orphan*/ endDescribe();
int /*<<< orphan*/ matrix_alloc_asserts();
int /*<<< orphan*/ matrix_pixel_test();
void test_matrix() {
  describe("Matrice d'affichage");
  matrix_alloc_asserts();
  matrix_pixel_test();
  endDescribe();
}


x86 assembly (clang, -O0):
<test_matrix>:
push   %rbp
mov    %rsp,%rbp
lea    0xeb5(%rip),%rdi
call   1060 <describe@plt>
mov    $0x0,%al
call   1050 <matrix_alloc_asserts@plt>
mov    $0x0,%al
call   1040 <matrix_pixel_test@plt>
mov    $0x0,%al
call   1030 <endDescribe@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_matrix>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1060 <describe@plt>
xor    %eax,%eax
call   1050 <matrix_alloc_asserts@plt>
xor    %eax,%eax
call   1040 <matrix_pixel_test@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <endDescribe@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Matrice d'affichage\00"
define void @test_matrix() {
%1 = call i32 @describe(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @matrix_alloc_asserts()
%3 = call i32 (...) @matrix_pixel_test()
%4 = call i32 (...) @endDescribe()
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Matrice d'affichage\00"
define void @test_matrix() {
%1 = tail call i32 @describe(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @matrix_alloc_asserts()
%3 = tail call i32 (...) @matrix_pixel_test()
%4 = tail call i32 (...) @endDescribe()
ret void
}
/* Type definitions */
struct cnt_deque_iterator {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cnt_deque_freemem(struct cnt_deque_iterator *);
void cnt_deque_iterator_free(struct cnt_deque_iterator *iter) {
  if (iter) {
    cnt_deque_freemem(iter);
  }
}


x86 assembly (clang, -O0):
<cnt_deque_iterator_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <cnt_deque_iterator_free+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <cnt_deque_freemem@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cnt_deque_iterator_free>:
test   %rdi,%rdi
je     111a <cnt_deque_iterator_free+0xa>
jmp    1030 <cnt_deque_freemem@plt>
ret

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

LLVM IR (-O2):
%struct.cnt_deque_iterator = type { i32 }
define void @cnt_deque_iterator_free(%struct.cnt_deque_iterator* %0) {
%2 = icmp eq %struct.cnt_deque_iterator* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @cnt_deque_freemem(%struct.cnt_deque_iterator* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
scalar_t__ strlen(char const *);
int str_length(const char *str) { return (int)strlen(str); }


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

x86 assembly (clang, -O2):
<str_length>:
jmp    1030 <strlen@plt>

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

LLVM IR (-O2):
define i32 @str_length(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
unsigned xrop3_171_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = T | S;
  stk2 = ~stk2;
  stk1 = D | stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_171_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_171_0_0>:
mov    %edi,%eax
or     %esi,%eax
shl    $0x8,%eax
not    %eax
ret

LLVM IR (-O0):
define i32 @xrop3_171_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %7
%23 = load i32, i32* %6
%24 = or i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %9
%26 = xor i32 %25, -1
store i32 %26, i32* %9
%27 = load i32, i32* %5
%28 = load i32, i32* %9
%29 = or i32 %27, %28
store i32 %29, i32* %8
%30 = load i32, i32* %8
ret i32 %30
}

LLVM IR (-O2):
define i32 @xrop3_171_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = or i8 %1, %0
%4 = zext i8 %3 to i32
%5 = shl nuw nsw i32 %4, 8
%6 = xor i32 %5, -1
ret i32 %6
}
/* Type definitions */
struct Graph {
  int dummy;
};

/* Variables and functions */
struct Graph *create_graph(int);
int /*<<< orphan*/ get_fire_list(int, double, struct Graph *);
int /*<<< orphan*/ set_emp_info(struct Graph *);
int /*<<< orphan*/ set_heirarchy(struct Graph *);
void main() {
  int V = 14;
  struct Graph *graph = create_graph(V);
  set_emp_info(graph);
  set_heirarchy(graph);
  get_fire_list(1, 0.5, graph);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xe,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <create_graph@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <set_emp_info@plt>
mov    -0x10(%rbp),%rdi
call   1060 <set_heirarchy@plt>
mov    -0x10(%rbp),%rsi
mov    $0x1,%edi
movsd  0xe82(%rip),%xmm0
call   1030 <get_fire_list@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xe,%edi
call   1050 <create_graph@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <set_emp_info@plt>
mov    %rbx,%rdi
call   1060 <set_heirarchy@plt>
movsd  0xe9a(%rip),%xmm0
mov    $0x1,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <get_fire_list@plt>

LLVM IR (-O0):
%struct.Graph = type { i32 }
define void @main() {
%1 = alloca i32
%2 = alloca %struct.Graph*
store i32 14, i32* %1
%3 = load i32, i32* %1
%4 = call %struct.Graph* @create_graph(i32 %3)
store %struct.Graph* %4, %struct.Graph** %2
%5 = load %struct.Graph*, %struct.Graph** %2
%6 = call i32 @set_emp_info(%struct.Graph* %5)
%7 = load %struct.Graph*, %struct.Graph** %2
%8 = call i32 @set_heirarchy(%struct.Graph* %7)
%9 = load %struct.Graph*, %struct.Graph** %2
%10 = call i32 @get_fire_list(i32 1, double 5.000000e-01, %struct.Graph* %9)
ret void
}

LLVM IR (-O2):
%struct.Graph = type { i32 }
define void @main() {
%1 = tail call %struct.Graph* @create_graph(i32 14)
%2 = tail call i32 @set_emp_info(%struct.Graph* %1)
%3 = tail call i32 @set_heirarchy(%struct.Graph* %1)
%4 = tail call i32 @get_fire_list(i32 1, double 5.000000e-01, %struct.Graph* %1)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int, unsigned char);
void fprint_mov_Rn_to_direct(FILE *stream, unsigned char n, uint8_t direct) {
  fprintf(stream,
          "MOV   "
          "0x%02X"
          ", R%X                  ",
          direct, n);
}


x86 assembly (clang, -O0):
<fprint_mov_Rn_to_direct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
lea    0xecd(%rip),%rsi
movzbl -0x9(%rbp),%ecx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fprint_mov_Rn_to_direct>:
mov    %esi,%ecx
lea    0xee7(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"MOV 0x%02X, R%X \00"
define void @fprint_mov_Rn_to_direct(i32* %0, i8 zeroext %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8
%6 = alloca i32
store i32* %0, i32** %4
store i8 %1, i8* %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %6
%9 = load i8, i8* %5
%10 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %8, i8 zeroext %9)
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"MOV 0x%02X, R%X \00"
define void @fprint_mov_Rn_to_direct(i32* nocapture %0, i8 zeroext %1, i32 %2) {
%4 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %2, i8 zeroext %1)
ret void
}