xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ isspace(char const);
const char *ltrim(const char *str) {
  while (isspace(*str))
    str++;
  return str;
}


x86 assembly (clang, -O0):
<ltrim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1143 <ltrim+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <ltrim+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ltrim>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <ltrim+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @ltrim(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
int ft_tolower(int c) {
  if ('A' <= c && c <= 'Z')
    return (c | ('A' ^ 'a'));
  else
    return (c);
}


x86 assembly (clang, -O0):
<ft_tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    $0x41,%eax
cmp    -0x8(%rbp),%eax
jg     112d <ft_tolower+0x2d>
cmpl   $0x5a,-0x8(%rbp)
jg     112d <ft_tolower+0x2d>
mov    -0x8(%rbp),%eax
or     $0x20,%eax
mov    %eax,-0x4(%rbp)
jmp    1133 <ft_tolower+0x33>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_tolower>:
lea    -0x41(%rdi),%ecx
mov    %edi,%eax
or     $0x20,%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @ft_tolower(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 65, %4
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 90
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = or i32 %10, 32
store i32 %11, i32* %2
br label %14
12: ; preds = %6, %1
%13 = load i32, i32* %3
store i32 %13, i32* %2
br label %14
14: ; preds = %12, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @ft_tolower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = or i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
void megaInit(void) {
  { out_i$nit(); }
}


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

x86 assembly (clang, -O2):
<megaInit>:
xor    %eax,%eax
jmp    1030 <out_i$nit@plt>

LLVM IR (-O0):
define void @megaInit() {
%1 = call i32 (...) @"out_i$nit"()
ret void
}

LLVM IR (-O2):
define void @megaInit() {
%1 = tail call i32 (...) @"out_i$nit"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int printUsage(char *name) {
  printf("usage: %s [-d | --debug] [-a <int> | --attempts <int>] [-h |"
         " --help]\n"
         "-d, --debug        print correct answer at the beginning\n"
         "-a, --attempts     set maximum attempts for the game\n"
         "-h, --help         print this help and quit.\n",
         name);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [225 x i8] c"usage: %s [-d | --debug] [-a <int> | --attempts <int>] [-h | --help]\0A-d, --debug print correct answer at the beginning\0A-a, --attempts set maximum attempts for the game\0A-h, --help print this help and quit.\0A\00"
define i32 @printUsage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([225 x i8], [225 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [225 x i8] c"usage: %s [-d | --debug] [-a <int> | --attempts <int>] [-h | --help]\0A-d, --debug print correct answer at the beginning\0A-a, --attempts set maximum attempts for the game\0A-h, --help print this help and quit.\0A\00"
define i32 @printUsage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([225 x i8], [225 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void FunctionWithArrayParam(int a[]) { printf("%d\n", sizeof(a)); }


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

x86 assembly (clang, -O2):
<FunctionWithArrayParam>:
lea    0xee9(%rip),%rdi
mov    $0x8,%esi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @FunctionWithArrayParam(i32* nocapture readnone %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 8)
ret void
}
/* Variables and functions */
int setTXfrequency(char *, int);
int setTXchannel(char *name, int channel) {
  int freq = (float)((2412 + ((channel - 1) * 5)));
  return setTXfrequency(name, freq);
}


x86 assembly (clang, -O0):
<setTXchannel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
imul   $0x5,%eax,%eax
add    $0x96c,%eax
cvtsi2ss %eax,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1030 <setTXfrequency@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setTXchannel>:
lea    (%rsi,%rsi,4),%eax
add    $0x967,%eax
cvtsi2ss %eax,%xmm0
cvttss2si %xmm0,%esi
jmp    1030 <setTXfrequency@plt>

LLVM IR (-O0):
define i32 @setTXchannel(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = sub nsw i32 %6, 1
%8 = mul nsw i32 %7, 5
%9 = add nsw i32 2412, %8
%10 = sitofp i32 %9 to float
%11 = fptosi float %10 to i32
store i32 %11, i32* %5
%12 = load i8*, i8** %3
%13 = load i32, i32* %5
%14 = call i32 @setTXfrequency(i8* %12, i32 %13)
ret i32 %14
}

LLVM IR (-O2):
define i32 @setTXchannel(i8* %0, i32 %1) {
%3 = mul i32 %1, 5
%4 = add i32 %3, 2407
%5 = sitofp i32 %4 to float
%6 = fptosi float %5 to i32
%7 = tail call i32 @setTXfrequency(i8* %0, i32 %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *ident, const char *message) {
  if (message != NULL)
    fprintf(stderr, "error: %s\n", message);
  fprintf(stderr, "usage: %s -c command\n", ident);
  exit(EX_USAGE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1154 <usage+0x34>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xeb1(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xea3(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rbx
test   %rsi,%rsi
je     1141 <usage+0x21>
mov    %rsi,%rdx
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"error: %s\0A\00"
@.str.1 = [22 x i8] c"usage: %s -c command\0A\00"
@EX_USAGE = global i32 0
define void @usage(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i32, i32* @stderr
%9 = load i8*, i8** %4
%10 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %7, %2
%12 = load i32, i32* @stderr
%13 = load i8*, i8** %3
%14 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* %13)
%15 = load i32, i32* @EX_USAGE
%16 = call i32 @exit(i32 %15)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"error: %s\0A\00"
@.str.1 = [22 x i8] c"usage: %s -c command\0A\00"
@EX_USAGE = global i32 0
define void @usage(i8* %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %7
7: ; preds = %4, %2
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%10 = load i32, i32* @EX_USAGE
%11 = tail call i32 @exit(i32 %10)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ test_compression();
int /*<<< orphan*/ test_encoding();
int main(void) {
  test_compression();
  test_encoding();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_compression()
%2 = tail call i32 (...) @test_encoding()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ my_put_nbr(int);
void my_putnbstr(int *array, int size) {
  int i;
  i = 0;
  while (i < size) {
    my_put_nbr(array[i]);
    ++i;
  }
  return;
}


x86 assembly (clang, -O0):
<my_putnbstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1150 <my_putnbstr+0x40>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <my_put_nbr@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <my_putnbstr+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_putnbstr>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1142 <my_putnbstr+0x32>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,4),%edi
call   1030 <my_put_nbr@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <my_putnbstr+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @my_putnbstr(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 @my_put_nbr(i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
int test_imm_FBuint16_reg(unsigned short val) {
  return ((val) & (-0xFB << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_FBuint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffff05,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_FBuint16_reg>:
test   $0xff05,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_FBuint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -251
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ unlink(char *);
void uninstall_pgxc_ctl_bash(char *path) {
  if (path)
    unlink(path);
}


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

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

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

LLVM IR (-O2):
define void @uninstall_pgxc_ctl_bash(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @unlink(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
scalar_t__ floor(float);
__attribute__((const)) int iroundf(float x) { return (int)floor(x + 0.5f); }


x86 assembly (clang, -O0):
<iroundf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xedb(%rip),%xmm0
addss  -0x4(%rbp),%xmm0
call   1030 <floor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iroundf>:
addss  0xee8(%rip),%xmm0
jmp    1030 <floor@plt>

LLVM IR (-O0):
define i32 @iroundf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fadd float %3, 5.000000e-01
%5 = call i64 @floor(float %4)
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @iroundf(float %0) {
%2 = fadd float %0, 5.000000e-01
%3 = tail call i64 @floor(float %2)
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Forward declarations */
typedef struct TYPE_12__ TYPE_6__;
typedef struct TYPE_11__ TYPE_5__;
typedef struct TYPE_10__ TYPE_4__;
typedef struct TYPE_9__ TYPE_3__;
typedef struct TYPE_8__ TYPE_2__;
typedef struct TYPE_7__ TYPE_1__;

/* Type definitions */
struct TYPE_12__ {
  int member_0;
  int member_1;
};
struct TYPE_11__ {
  int member_0;
  int member_1;
};
struct TYPE_10__ {
  int member_1;
  int /*<<< orphan*/ member_0;
};
struct TYPE_9__ {
  int member_0;
  int /*<<< orphan*/ member_1;
};
struct TYPE_8__ {
  int member_0;
  int /*<<< orphan*/ member_1;
};
struct TYPE_7__ {
  int member_1;
  int /*<<< orphan*/ member_0;
};

/* Variables and functions */
int **queensAttacktheKing(int **, int, int *, int *, int, int *, int **);
int main() {
  int **queens = {{0, 1}, {1, 0}, {4, 0}, {0, 4}, {3, 3}, {2, 4}};
  int *king = {0, 0};
  int queensSize = 6;
  int queensColSize = 2;
  int *returnSize;
  int **returnColumnSizes;
  int **ret = queensAttacktheKing(queens, queensSize, &queensColSize, king, 1,
                                  returnSize, returnColumnSizes);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0x6,-0x1c(%rbp)
movl   $0x2,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%rcx
mov    -0x28(%rbp),%r9
mov    -0x30(%rbp),%rax
lea    -0x20(%rbp),%rdx
mov    $0x1,%r8d
mov    %rax,(%rsp)
call   1030 <queensAttacktheKing@plt>
mov    %rax,-0x38(%rbp)
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0x2,0x14(%rsp)
lea    0x14(%rsp),%rdx
xor    %edi,%edi
mov    $0x6,%esi
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1030 <queensAttacktheKing@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32**
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32**
%8 = alloca i32**
store i32 0, i32* %1
store i32** null, i32*** %2
store i32* null, i32** %3
store i32 6, i32* %4
store i32 2, i32* %5
%9 = load i32**, i32*** %2
%10 = load i32, i32* %4
%11 = load i32*, i32** %3
%12 = load i32*, i32** %6
%13 = load i32**, i32*** %7
%14 = call i32** @queensAttacktheKing(i32** %9, i32 %10, i32* %5, i32* %11, i32 1, i32* %12, i32** %13)
store i32** %14, i32*** %8
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 2, i32* %1
%3 = call i32** @queensAttacktheKing(i32** null, i32 6, i32* %1, i32* null, i32 1, i32* undef, i32** undef)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xfa() {
  Assert_real((isprint(250) == 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_isprint.c",
              1255, ("isprint should be 0 for 0xfa"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0xfa>:
push   %rax
mov    $0xfa,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4e7,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xfa\00"
define void @t_isprint_0xfa() {
%1 = call i64 @isprint(i32 250)
%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 1255, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xfa\00"
define void @t_isprint_0xfa() {
%1 = tail call i64 @isprint(i32 250)
%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 1255, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int foo(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @foo() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x6f() {
  Assert_real((isascii(111)),
              "/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_isascii.c",
              560, ("isascii should be 1 for o"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0x6f>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x230,%edx
jmp    1030 <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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for o\00"
define void @t_isascii_0x6f() {
%1 = call i32 @isascii(i32 111)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 560, 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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for o\00"
define void @t_isascii_0x6f() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 560, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ i_handler();
void input_check_state(void) { i_handler(); }


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

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

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

LLVM IR (-O2):
define void @input_check_state() {
%1 = tail call i32 (...) @i_handler()
ret void
}
/* Variables and functions */
char const *strstr(char const *, char const *);
bool hasprefix(const char *s, const char *p) { return s == strstr(s, p); }


x86 assembly (clang, -O0):
<hasprefix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strstr@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hasprefix>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @hasprefix(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** %3
%7 = load i8*, i8** %4
%8 = call i8* @strstr(i8* %6, i8* %7)
%9 = icmp eq i8* %5, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @hasprefix(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = tail call i32 @strncmp(i8* %0, i8* %1, i64 %3)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
void swap_ptr(void **x, void **y) {
  void *t = *x;
  *x = *y;
  *y = t;
  return;
}


x86 assembly (clang, -O0):
<swap_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @swap_ptr(i8** %0, i8** %1) {
%3 = alloca i8**
%4 = alloca i8**
%5 = alloca i8*
store i8** %0, i8*** %3
store i8** %1, i8*** %4
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
store i8* %7, i8** %5
%8 = load i8**, i8*** %4
%9 = load i8*, i8** %8
%10 = load i8**, i8*** %3
store i8* %9, i8** %10
%11 = load i8*, i8** %5
%12 = load i8**, i8*** %4
store i8* %11, i8** %12
ret void
}

LLVM IR (-O2):
define void @swap_ptr(i8** nocapture %0, i8** nocapture %1) {
%3 = load i8*, i8** %0
%4 = load i8*, i8** %1
store i8* %4, i8** %0
store i8* %3, i8** %1
ret void
}
/* Variables and functions */
scalar_t__ lrint(double);
long lrintf(float x) { return (long)lrint((double)x); }


x86 assembly (clang, -O0):
<lrintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1030 <lrint@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lrintf>:
cvtss2sd %xmm0,%xmm0
jmp    1030 <lrint@plt>

LLVM IR (-O0):
define i64 @lrintf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = call i64 @lrint(double %4)
ret i64 %5
}

LLVM IR (-O2):
define i64 @lrintf(float %0) {
%2 = fpext float %0 to double
%3 = tail call i64 @lrint(double %2)
ret i64 %3
}
/* Type definitions */
typedef int int16_t;

/* Variables and functions */
double tmp007_reg_to_temp(int16_t reg) { return (reg >> 2) * 0.03125f; }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x2,%eax
cvtsi2ss %eax,%xmm0
movss  0xee7(%rip),%xmm1
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
sar    $0x2,%edi
cvtsi2ss %edi,%xmm0
mulss  0xef1(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @tmp007_reg_to_temp(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 2
%5 = sitofp i32 %4 to float
%6 = fmul float %5, 3.125000e-02
%7 = fpext float %6 to double
ret double %7
}

LLVM IR (-O2):
define double @tmp007_reg_to_temp(i32 %0) {
%2 = ashr i32 %0, 2
%3 = sitofp i32 %2 to float
%4 = fmul float %3, 3.125000e-02
%5 = fpext float %4 to double
ret double %5
}
yyPrintOpaque(i) long i;
{ printf("<<%ld>>", i); }


x86 assembly (clang, -O0):
<yyPrintOpaque>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yyPrintOpaque>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"<<%ld>>\00"
define i32 @yyPrintOpaque(i64 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 %0)
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
uint64_t read_uint64_t(void **data, uint16_t *size) {
  assert(*size >= sizeof(uint64_t));
  *size -= sizeof(uint64_t);
  return *(*(uint64_t **)data)++;
}


x86 assembly (clang, -O0):
<read_uint64_t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq (%rax),%rax
cmp    $0x4,%rax
setae  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
movslq (%rax),%rcx
sub    $0x4,%rcx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,(%rcx)
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_uint64_t>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
xor    %edi,%edi
cmpl   $0x4,(%rsi)
setae  %dil
call   1030 <assert@plt>
addl   $0xfffffffc,(%rbx)
mov    (%r14),%rax
lea    0x4(%rax),%rcx
mov    %rcx,(%r14)
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @read_uint64_t(i8** %0, i32* %1) {
%3 = alloca i8**
%4 = alloca i32*
store i8** %0, i8*** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = load i32, i32* %5
%7 = sext i32 %6 to i64
%8 = icmp uge i64 %7, 4
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = load i32*, i32** %4
%12 = load i32, i32* %11
%13 = sext i32 %12 to i64
%14 = sub i64 %13, 4
%15 = trunc i64 %14 to i32
store i32 %15, i32* %11
%16 = load i8**, i8*** %3
%17 = bitcast i8** %16 to i32**
%18 = load i32*, i32** %17
%19 = getelementptr inbounds i32, i32* %18, i32 1
store i32* %19, i32** %17
%20 = load i32, i32* %18
ret i32 %20
}

LLVM IR (-O2):
define i32 @read_uint64_t(i8** nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = icmp ugt i32 %3, 3
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = load i32, i32* %1
%8 = add i32 %7, -4
store i32 %8, i32* %1
%9 = bitcast i8** %0 to i32**
%10 = load i32*, i32** %9
%11 = getelementptr inbounds i32, i32* %10, i64 1
store i32* %11, i32** %9
%12 = load i32, i32* %10
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ kbd_arch_keyname_to_keynum(char *);
int /*<<< orphan*/ keyboard_keysym_undef(int /*<<< orphan*/);
char *strtok(int /*<<< orphan*/ *, char *);
void keyboard_keyword_undef(void) {
  char *key;
  key = strtok(NULL, " \t");
  keyboard_keysym_undef(kbd_arch_keyname_to_keynum(key));
}


x86 assembly (clang, -O0):
<keyboard_keyword_undef>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
lea    0xebd(%rip),%rsi
call   1050 <strtok@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <kbd_arch_keyname_to_keynum@plt>
mov    %eax,%edi
call   1040 <keyboard_keysym_undef@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<keyboard_keyword_undef>:
push   %rax
lea    0xec8(%rip),%rsi
xor    %edi,%edi
call   1050 <strtok@plt>
mov    %rax,%rdi
call   1030 <kbd_arch_keyname_to_keynum@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <keyboard_keysym_undef@plt>

LLVM IR (-O0):
@.str = [3 x i8] c" \09\00"
define void @keyboard_keyword_undef() {
%1 = alloca i8*
%2 = call i8* @strtok(i32* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @kbd_arch_keyname_to_keynum(i8* %3)
%5 = call i32 @keyboard_keysym_undef(i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c" \09\00"
define void @keyboard_keyword_undef() {
%1 = tail call i8* @strtok(i32* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @kbd_arch_keyname_to_keynum(i8* %1)
%3 = tail call i32 @keyboard_keysym_undef(i32 %2)
ret void
}
int print_memory(char *mem, int len) { return 0; }


x86 assembly (clang, -O0):
<print_memory>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @print_memory(i8* nocapture readnone %0, i32 %1) {
ret i32 0
}
int get_line_length(char line[]) { return sizeof(line) / sizeof(char); }


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

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

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

LLVM IR (-O2):
define i32 @get_line_length(i8* nocapture readnone %0) {
ret i32 8
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void ClearProgress(void) {
  fprintf(stderr, "                \b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
}


x86 assembly (clang, -O0):
<ClearProgress>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ClearProgress>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c" \08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\00"
define void @ClearProgress() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c" \08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\08\00"
define void @ClearProgress() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}
void pure_f(void) {}


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

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

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

LLVM IR (-O2):
define void @pure_f() {
ret void
}
/* Variables and functions */
float cosf(float);
float __ocl_native_cos_float(float src) { return cosf(src); }


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

x86 assembly (clang, -O2):
<__ocl_native_cos_float>:
jmp    1030 <cosf@plt>

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

LLVM IR (-O2):
define float @__ocl_native_cos_float(float %0) {
%2 = tail call float @cosf(float %0)
ret float %2
}
/* Type definitions */
struct whoami_args_info {
  int dummy;
};

/* Variables and functions */
int whoami_cmdline_parser2(int, char **, struct whoami_args_info *,
                           int /*<<< orphan*/, int, int);
int whoami_cmdline_parser(int argc, char **argv,
                          struct whoami_args_info *args_info) {
  return whoami_cmdline_parser2(argc, argv, args_info, 0, 1, 1);
}


x86 assembly (clang, -O0):
<whoami_cmdline_parser>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
mov    $0x1,%r9d
mov    %r9d,%r8d
call   1030 <whoami_cmdline_parser2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<whoami_cmdline_parser>:
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
jmp    1030 <whoami_cmdline_parser2@plt>

LLVM IR (-O0):
%struct.whoami_args_info = type { i32 }
define i32 @whoami_cmdline_parser(i32 %0, i8** %1, %struct.whoami_args_info* %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.whoami_args_info*
store i32 %0, i32* %4
store i8** %1, i8*** %5
store %struct.whoami_args_info* %2, %struct.whoami_args_info** %6
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = load %struct.whoami_args_info*, %struct.whoami_args_info** %6
%10 = call i32 @whoami_cmdline_parser2(i32 %7, i8** %8, %struct.whoami_args_info* %9, i32 0, i32 1, i32 1)
ret i32 %10
}

LLVM IR (-O2):
%struct.whoami_args_info = type { i32 }
define i32 @whoami_cmdline_parser(i32 %0, i8** %1, %struct.whoami_args_info* %2) {
%4 = tail call i32 @whoami_cmdline_parser2(i32 %0, i8** %1, %struct.whoami_args_info* %2, i32 0, i32 1, i32 1)
ret i32 %4
}
int hashInt(int num) {
  int ret = (num / 10 * 3 + num % 10) % 29;
  return (ret == 13 ? 19 : (ret + (num / 10 * 12)) % 19);
}


x86 assembly (clang, -O0):
<hashInt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
imul   $0x3,%eax,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0xc(%rbp),%eax
add    %edx,%eax
mov    $0x1d,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
cmpl   $0xd,-0x8(%rbp)
jne    114a <hashInt+0x4a>
mov    $0x13,%edx
mov    %edx,-0x10(%rbp)
jmp    1170 <hashInt+0x70>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
imul   $0xc,%ecx,%ecx
add    %ecx,%eax
mov    $0x13,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashInt>:
movslq %edi,%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x2,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%edx
lea    (%rcx,%rcx,1),%esi
lea    (%rsi,%rsi,4),%esi
sub    %esi,%eax
add    %edx,%eax
movslq %eax,%rdx
imul   $0xffffffff8d3dcb09,%rdx,%rax
shr    $0x20,%rax
add    %edx,%eax
mov    %eax,%esi
shr    $0x1f,%esi
sar    $0x4,%eax
add    %esi,%eax
lea    (%rax,%rax,8),%esi
lea    (%rsi,%rsi,2),%esi
add    %eax,%esi
add    %eax,%esi
sub    %esi,%edx
mov    $0x13,%eax
cmp    $0xd,%edx
je     117b <hashInt+0x7b>
lea    (%rcx,%rcx,2),%eax
lea    (%rdx,%rax,4),%eax
cltq
imul   $0x6bca1af3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,8),%edx
lea    (%rcx,%rdx,2),%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @hashInt(i32 %0) {
%2 = sdiv i32 %0, 10
%3 = mul nsw i32 %2, 3
%4 = srem i32 %0, 10
%5 = add nsw i32 %3, %4
%6 = srem i32 %5, 29
%7 = icmp eq i32 %6, 13
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = mul nsw i32 %2, 12
%10 = add nsw i32 %6, %9
%11 = srem i32 %10, 19
br label %12
12: ; preds = %1, %8
%13 = phi i32 [ %11, %8 ], [ 19, %1 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shmem_int_add(int *target, int value, int pe) {
  printf("\nOpenSHMEM Analyzer\n");
}


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0AOpenSHMEM Analyzer\0A\00"
define void @shmem_int_add(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 = 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_int_add(i32* nocapture readnone %0, i32 %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
void RTAvloGCPhysRemove(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ STDIN_FILENO;
int /*<<< orphan*/ read(int /*<<< orphan*/, char *, int /*<<< orphan*/);
char *read_ptr();
int /*<<< orphan*/ read_size();
void do_write() {
  char *addr = read_ptr();
  uint32_t size = read_size();
  read(STDIN_FILENO, addr, size);
}


x86 assembly (clang, -O0):
<do_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <read_ptr@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <read_size@plt>
mov    %eax,-0xc(%rbp)
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <read@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_write>:
push   %rbx
xor    %eax,%eax
call   1050 <read_ptr@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <read_size@plt>
mov    0x2e97(%rip),%rcx
mov    (%rcx),%edi
mov    %rbx,%rsi
mov    %eax,%edx
pop    %rbx
jmp    1040 <read@plt>

LLVM IR (-O0):
@STDIN_FILENO = global i32 0
define void @do_write() {
%1 = alloca i8*
%2 = alloca i32
%3 = call i8* (...) @read_ptr()
store i8* %3, i8** %1
%4 = call i32 (...) @read_size()
store i32 %4, i32* %2
%5 = load i32, i32* @STDIN_FILENO
%6 = load i8*, i8** %1
%7 = load i32, i32* %2
%8 = call i32 @read(i32 %5, i8* %6, i32 %7)
ret void
}

LLVM IR (-O2):
@STDIN_FILENO = global i32 0
define void @do_write() {
%1 = tail call i8* (...) @read_ptr()
%2 = tail call i32 (...) @read_size()
%3 = load i32, i32* @STDIN_FILENO
%4 = tail call i32 @read(i32 %3, i8* %1, i32 %2)
ret void
}
void RandomFunc(unsigned char input[1], unsigned char output[1]) {
  unsigned char state[1];
  unsigned char local1;
  {
    state[0UL] = (input[0UL] + 914778474UL) - (unsigned char)183;
    local1 = 0UL;
    while (local1 < 1UL) {
      state[0UL] += state[0UL];
      local1++;
    }
    output[0UL] = state[0UL] - 554263832UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
add    $0x3686696a,%rax
sub    $0xb7,%rax
mov    %al,-0x11(%rbp)
movb   $0x0,-0x12(%rbp)
movzbl -0x12(%rbp),%eax
cmp    $0x1,%rax
jae    114e <RandomFunc+0x4e>
movzbl -0x11(%rbp),%ecx
movzbl -0x11(%rbp),%eax
add    %ecx,%eax
mov    %al,-0x11(%rbp)
mov    -0x12(%rbp),%al
add    $0x1,%al
mov    %al,-0x12(%rbp)
jmp    1126 <RandomFunc+0x26>
movzbl -0x11(%rbp),%eax
sub    $0x21096518,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    (%rdi),%al
add    %al,%al
add    $0x4e,%al
mov    %al,(%rsi)
ret

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

LLVM IR (-O2):
define void @RandomFunc(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = shl i8 %3, 1
%5 = add i8 %4, 78
store i8 %5, i8* %1
ret void
}
/* Type definitions */
typedef scalar_t__ uint16_t;
struct trace_seq {
  int dummy;
};

/* Variables and functions */
unsigned long long process___le16_to_cpup(struct trace_seq *s,
                                          unsigned long long *args) {
  uint16_t *val = (uint16_t *)(unsigned long)args[0];
  return val ? (long long)(*val) : 0;
}


x86 assembly (clang, -O0):
<process___le16_to_cpup>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1132 <process___le16_to_cpup+0x32>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
jmp    113d <process___le16_to_cpup+0x3d>
xor    %eax,%eax
mov    %rax,-0x20(%rbp)
jmp    113d <process___le16_to_cpup+0x3d>
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<process___le16_to_cpup>:
mov    (%rsi),%rax
test   %rax,%rax
je     110c <process___le16_to_cpup+0xc>
mov    (%rax),%rax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.trace_seq = type { i32 }
define i64 @process___le16_to_cpup(%struct.trace_seq* %0, i64* %1) {
%3 = alloca %struct.trace_seq*
%4 = alloca i64*
%5 = alloca i64*
store %struct.trace_seq* %0, %struct.trace_seq** %3
store i64* %1, i64** %4
%6 = load i64*, i64** %4
%7 = getelementptr inbounds i64, i64* %6, i64 0
%8 = load i64, i64* %7
%9 = inttoptr i64 %8 to i64*
store i64* %9, i64** %5
%10 = load i64*, i64** %5
%11 = icmp ne i64* %10, null
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = load i64*, i64** %5
%14 = load i64, i64* %13
br label %16
15: ; preds = %2
br label %16
16: ; preds = %15, %12
%17 = phi i64 [ %14, %12 ], [ 0, %15 ]
ret i64 %17
}

LLVM IR (-O2):
%struct.trace_seq = type { i32 }
define i64 @process___le16_to_cpup(%struct.trace_seq* nocapture readnone %0, i64* nocapture %1) {
%3 = load i64, i64* %1
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = inttoptr i64 %3 to i64*
%7 = load i64, i64* %6
br label %8
8: ; preds = %2, %5
%9 = phi i64 [ %7, %5 ], [ 0, %2 ]
ret i64 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int _m_pextrw(int /*<<< orphan*/, int);
int foo(__m64 i) { return _m_pextrw(i, 2); }


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

x86 assembly (clang, -O2):
<foo>:
mov    $0x2,%esi
jmp    1030 <_m_pextrw@plt>

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = tail call i32 @_m_pextrw(i32 %0, i32 2)
ret i32 %2
}
/* Variables and functions */
int close(int);
__attribute__((weak)) int vdb_close(int i) { return close(i); }


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

x86 assembly (clang, -O2):
<vdb_close>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define weak i32 @vdb_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}