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

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void write_output(char *output_file, char *output_msg) {
  FILE *file = fopen(output_file, "a");
  fprintf(file, "%s", output_msg);
  fclose(file);
}


x86 assembly (clang, -O0):
<write_output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb5(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xe9f(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_output>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
lea    0xec2(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
call   1040 <fputs@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"a\00"
@.str.1 = [3 x i8] c"%s\00"
define void @write_output(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i32* @fopen(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = load i8*, i8** %4
%10 = call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%11 = load i32*, i32** %5
%12 = call i32 @fclose(i32* %11)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"a\00"
define void @write_output(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @fputs(i8* %1, i32* %3)
%5 = tail call i32 @fclose(i32* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errorMemoria();
int /*<<< orphan*/ printf(char *);
void imprimirErrorTablero(int error) {
  switch (error) {
  case 1:
    printf("El archivo solicitado no existe.\n");
    break;
  case 2:
    printf("Error de Formato.\n");
    break;
  case 3:
    errorMemoria();
    break;
  }
}


x86 assembly (clang, -O0):
<imprimirErrorTablero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x1,%eax
je     1161 <imprimirErrorTablero+0x41>
jmp    113f <imprimirErrorTablero+0x1f>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
je     1172 <imprimirErrorTablero+0x52>
jmp    1150 <imprimirErrorTablero+0x30>
mov    -0x8(%rbp),%eax
sub    $0x3,%eax
je     1183 <imprimirErrorTablero+0x63>
jmp    118a <imprimirErrorTablero+0x6a>
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
jmp    118a <imprimirErrorTablero+0x6a>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
jmp    118a <imprimirErrorTablero+0x6a>
mov    $0x0,%al
call   1040 <errorMemoria@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imprimirErrorTablero>:
cmp    $0x3,%edi
je     113b <imprimirErrorTablero+0x1b>
cmp    $0x2,%edi
je     1142 <imprimirErrorTablero+0x22>
cmp    $0x1,%edi
jne    114e <imprimirErrorTablero+0x2e>
lea    0xedc(%rip),%rdi
jmp    1030 <puts@plt>
xor    %eax,%eax
jmp    1040 <errorMemoria@plt>
lea    0xeb7(%rip),%rdi
jmp    1030 <puts@plt>
ret

LLVM IR (-O0):
@.str = [34 x i8] c"El archivo solicitado no existe.\0A\00"
@.str.1 = [19 x i8] c"Error de Formato.\0A\00"
define void @imprimirErrorTablero(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %10 [
i32 1, label %4
i32 2, label %6
i32 3, label %8
]
4: ; preds = %1
%5 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
br label %10
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
br label %10
8: ; preds = %1
%9 = call i32 (...) @errorMemoria()
br label %10
10: ; preds = %1, %8, %6, %4
ret void
}

LLVM IR (-O2):
@str = [18 x i8] c"Error de Formato.\00"
@str.2 = [33 x i8] c"El archivo solicitado no existe.\00"
define void @imprimirErrorTablero(i32 %0) {
switch i32 %0, label %8 [
i32 1, label %2
i32 2, label %4
i32 3, label %6
]
2: ; preds = %1
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.2, i64 0, i64 0))
br label %8
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
br label %8
6: ; preds = %1
%7 = tail call i32 (...) @errorMemoria()
br label %8
8: ; preds = %1, %6, %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, long, unsigned short, float, double);
int /*<<< orphan*/ system(char *);
int main(int argc, char *argv[]) {
  int a;
  long int b;
  unsigned short int c;
  float d;
  double e;
  a = -30;
  b = -50;
  c = 32;
  d = 3.14;
  e = 1530.284;
  printf("a = %i, b = %li, c = %u\n\nd = %.2f, e = %.3f \n\n", a, b, c, d, e);
  system("PAUSE");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffffe2,-0x14(%rbp)
movq   $0xffffffffffffffce,-0x20(%rbp)
ff
movw   $0x20,-0x22(%rbp)
movss  0xeb5(%rip),%xmm0
movss  %xmm0,-0x28(%rbp)
movsd  0xea0(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x22(%rbp),%ax
movss  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
lea    0xe8b(%rip),%rdi
movzwl %ax,%ecx
call   1040 <printf@plt>
lea    0xeab(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
movss  0xed0(%rip),%xmm0
movsd  0xed0(%rip),%xmm1
mov    $0xffffffe2,%esi
mov    $0xffffffffffffffce,%rdx
mov    $0x20,%ecx
call   1040 <printf@plt>
lea    0xeea(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"a = %i, b = %li, c = %u\0A\0Ad = %.2f, e = %.3f \0A\0A\00"
@.str.1 = [6 x i8] c"PAUSE\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i64
%8 = alloca i16
%9 = alloca float
%10 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 -30, i32* %6
store i64 -50, i64* %7
store i16 32, i16* %8
store float 0x40091EB860000000, float* %9
store double 0x4097E922D0E56042, double* %10
%11 = load i32, i32* %6
%12 = load i64, i64* %7
%13 = load i16, i16* %8
%14 = load float, float* %9
%15 = load double, double* %10
%16 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %11, i64 %12, i16 zeroext %13, float %14, double %15)
%17 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [47 x i8] c"a = %i, b = %li, c = %u\0A\0Ad = %.2f, e = %.3f \0A\0A\00"
@.str.1 = [6 x i8] c"PAUSE\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 -30, i64 -50, i16 zeroext 32, float 0x40091EB860000000, double 0x4097E922D0E56042)
%4 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
char *mktemp(char *template) {
  ;
  if (template) {
    *template = 0;
  }
  return template;
}


x86 assembly (clang, -O0):
<mktemp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     111a <mktemp+0x1a>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mktemp>:
mov    %rdi,%rax
test   %rdi,%rdi
je     110b <mktemp+0xb>
movb   $0x0,(%rax)
ret

LLVM IR (-O0):
define i8* @mktemp(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 %7
5: ; preds = %1
%6 = load i8*, i8** %2
store i8 0, i8* %6
br label %7
7: ; preds = %5, %1
%8 = load i8*, i8** %2
ret i8* %8
}

LLVM IR (-O2):
define i8* @mktemp(i8* returned writeonly %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %4, label %3
3: ; preds = %1
store i8 0, i8* %0
br label %4
4: ; preds = %3, %1
ret i8* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ flockfile(int /*<<< orphan*/ *);
int fseeko_unlocked(int /*<<< orphan*/ *, int /*<<< orphan*/, int);
int /*<<< orphan*/ funlockfile(int /*<<< orphan*/ *);
int fseeko(FILE *file, off_t offset, int whence) {
  flockfile(file);
  int result = fseeko_unlocked(file, offset, whence);
  funlockfile(file);
  return result;
}


x86 assembly (clang, -O0):
<fseeko>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <flockfile@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <fseeko_unlocked@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <funlockfile@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fseeko>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
call   1050 <flockfile@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1040 <fseeko_unlocked@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <funlockfile@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fseeko(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32*, i32** %4
%9 = call i32 @flockfile(i32* %8)
%10 = load i32*, i32** %4
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = call i32 @fseeko_unlocked(i32* %10, i32 %11, i32 %12)
store i32 %13, i32* %7
%14 = load i32*, i32** %4
%15 = call i32 @funlockfile(i32* %14)
%16 = load i32, i32* %7
ret i32 %16
}

LLVM IR (-O2):
define i32 @fseeko(i32* %0, i32 %1, i32 %2) {
%4 = tail call i32 @flockfile(i32* %0)
%5 = tail call i32 @fseeko_unlocked(i32* %0, i32 %1, i32 %2)
%6 = tail call i32 @funlockfile(i32* %0)
ret i32 %5
}
void glGetFramebufferAttachmentParameteriv(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glGetFramebufferAttachmentParameteriv() {
ret void
}
/* Variables and functions */
size_t generateRandomBufferCyclic(char *, size_t const, unsigned short const,
                                  int);
size_t generateRandomBuffer(char *buffer, const size_t size,
                            const unsigned short seed) {
  return generateRandomBufferCyclic(buffer, size, seed, 4096);
}


x86 assembly (clang, -O0):
<generateRandomBuffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dx,%ax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %ax,-0x12(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x1000,%ecx
movzwl -0x12(%rbp),%edx
call   1030 <generateRandomBufferCyclic@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generateRandomBuffer>:
mov    $0x1000,%ecx
jmp    1030 <generateRandomBufferCyclic@plt>

LLVM IR (-O0):
define i64 @generateRandomBuffer(i8* %0, i64 %1, i16 zeroext %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i16
store i8* %0, i8** %4
store i64 %1, i64* %5
store i16 %2, i16* %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = load i16, i16* %6
%10 = call i64 @generateRandomBufferCyclic(i8* %7, i64 %8, i16 zeroext %9, i32 4096)
ret i64 %10
}

LLVM IR (-O2):
define i64 @generateRandomBuffer(i8* %0, i64 %1, i16 zeroext %2) {
%4 = tail call i64 @generateRandomBufferCyclic(i8* %0, i64 %1, i16 zeroext %2, i32 4096)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ output_decimal(int);
int /*<<< orphan*/ output_string(char *);
void output_immediate(int num) {
  output_string("#");
  output_decimal(num);
}


x86 assembly (clang, -O0):
<output_immediate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1040 <output_string@plt>
mov    -0x4(%rbp),%edi
call   1030 <output_decimal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_immediate>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1040 <output_string@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <output_decimal@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"#\00"
define void @output_immediate(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @output_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @output_decimal(i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"#\00"
define void @output_immediate(i32 %0) {
%2 = tail call i32 @output_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @output_decimal(i32 %0)
ret void
}
double about(value, variation)
double value, variation;
{ return (value + (value * random_number(-variation, variation))); }


x86 assembly (clang, -O0):
<about>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x10(%rbp),%xmm1
mov    $0x2,%al
call   1030 <random_number@plt>
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
cvtsi2sd %eax,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<about>:
push   %rax
movsd  %xmm0,(%rsp)
movaps 0xee3(%rip),%xmm0
xorps  %xmm1,%xmm0
mov    $0x2,%al
call   1030 <random_number@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  (%rsp),%xmm1
mulsd  %xmm1,%xmm0
addsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @about(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %3
%7 = load double, double* %4
%8 = fneg double %7
%9 = load double, double* %4
%10 = call i32 (double, double, ...) bitcast (i32 (...)* @random_number to i32 (double, double, ...)*)(double %8, double %9)
%11 = sitofp i32 %10 to double
%12 = call double @llvm.fmuladd.f64(double %6, double %11, double %5)
ret double %12
}

LLVM IR (-O2):
define double @about(double %0, double %1) {
%3 = fneg double %1
%4 = tail call i32 (double, double, ...) bitcast (i32 (...)* @random_number to i32 (double, double, ...)*)(double %3, double %1)
%5 = sitofp i32 %4 to double
%6 = tail call double @llvm.fmuladd.f64(double %0, double %5, double %0)
ret double %6
}
/* Variables and functions */
#define SIGHUP 130
#define SIGINT 129
#define SIGTERM 128
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ restore_hosts_file();
void signal_handler(int sig) {
  switch (sig) {
  case SIGHUP:
    break;
  case SIGINT:
  case SIGTERM:
    restore_hosts_file();
    exit(0);
    break;
  }
}


x86 assembly (clang, -O0):
<signal_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
add    $0xffffff80,%eax
sub    $0x2,%eax
jb     115a <signal_handler+0x3a>
jmp    1142 <signal_handler+0x22>
mov    -0x8(%rbp),%eax
sub    $0x82,%eax
jne    1168 <signal_handler+0x48>
jmp    1155 <signal_handler+0x35>
jmp    1168 <signal_handler+0x48>
mov    $0x0,%al
call   1030 <restore_hosts_file@plt>
xor    %edi,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signal_handler>:
and    $0xfffffffe,%edi
cmp    $0x80,%edi
je     112c <signal_handler+0xc>
ret
push   %rax
xor    %eax,%eax
call   1030 <restore_hosts_file@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @signal_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %8 [
i32 130, label %4
i32 129, label %5
i32 128, label %5
]
4: ; preds = %1
br label %8
5: ; preds = %1, %1
%6 = call i32 (...) @restore_hosts_file()
%7 = call i32 @exit(i32 0)
unreachable
8: ; preds = %1, %4
ret void
}

LLVM IR (-O2):
define void @signal_handler(i32 %0) {
%2 = and i32 %0, -2
%3 = icmp eq i32 %2, 128
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 (...) @restore_hosts_file()
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %1
ret void
}
/* Variables and functions */
int gfarm_hash_default(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
int gfarm_hash_strptr(const void *key, int keylen) {
  const char *const *strptr = key;
  const char *str = *strptr;
  return (gfarm_hash_default(str, strlen(str)));
}


x86 assembly (clang, -O0):
<gfarm_hash_strptr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%esi
call   1040 <gfarm_hash_default@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gfarm_hash_strptr>:
push   %rbx
mov    (%rdi),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <gfarm_hash_default@plt>

LLVM IR (-O0):
define i32 @gfarm_hash_strptr(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i8**
store i8** %8, i8*** %5
%9 = load i8**, i8*** %5
%10 = load i8*, i8** %9
store i8* %10, i8** %6
%11 = load i8*, i8** %6
%12 = load i8*, i8** %6
%13 = call i32 @strlen(i8* %12)
%14 = call i32 @gfarm_hash_default(i8* %11, i32 %13)
ret i32 %14
}

LLVM IR (-O2):
define i32 @gfarm_hash_strptr(i8* nocapture %0, i32 %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = tail call i32 @strlen(i8* %4)
%6 = tail call i32 @gfarm_hash_default(i8* %4, i32 %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void slupek(unsigned int wysokosc) {
  unsigned int i;
  for (i = 0; i < wysokosc; i++) {
    printf("*\n");
  }
}


x86 assembly (clang, -O0):
<slupek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    1148 <slupek+0x38>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <slupek+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slupek>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
je     113d <slupek+0x2d>
mov    %edi,%ebx
lea    0xedf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <puts@plt>
add    $0xffffffff,%ebx
jne    1130 <slupek+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"*\0A\00"
define void @slupek(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %10, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp ult i32 %5, %6
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8
%11 = load i32, i32* %3
%12 = add i32 %11, 1
store i32 %12, i32* %3
br label %4
13: ; preds = %4
ret void
}

LLVM IR (-O2):
@str = [2 x i8] c"*\00"
define void @slupek(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%6 = add nuw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
char *numberToString(int number, char *string) {
  if (string == NULL) {
    return NULL;
  }
  sprintf(string, "%d", number);
  return string;
}


x86 assembly (clang, -O0):
<numberToString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1137 <numberToString+0x27>
movq   $0x0,-0x8(%rbp)
jmp    1152 <numberToString+0x42>
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xebb(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<numberToString>:
push   %rbx
mov    %rsi,%rbx
test   %rsi,%rsi
je     112a <numberToString+0x1a>
mov    %edi,%edx
lea    0xede(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i8* @numberToString(i32 %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = load i8*, i8** %5
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %9
8: ; preds = %2
store i8* null, i8** %3
br label %14
9: ; preds = %2
%10 = load i8*, i8** %5
%11 = load i32, i32* %4
%12 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load i8*, i8** %5
store i8* %13, i8** %3
br label %14
14: ; preds = %9, %8
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i8* @numberToString(i32 %0, i8* writeonly %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @sprintf(i8* %1, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %6
6: ; preds = %2, %4
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_2584() {
  Assert_real((isqrt(2584) == 50),
              "/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",
              1320, ("Integer square root of 2584 should be 50"));
}


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

x86 assembly (clang, -O2):
<t_sqrt_2584>:
push   %rax
mov    $0xa18,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x32,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x528,%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 = [41 x i8] c"Integer square root of 2584 should be 50\00"
define void @t_sqrt_2584() {
%1 = call i32 @isqrt(i32 2584)
%2 = icmp eq i32 %1, 50
%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 1320, i8* getelementptr inbounds ([41 x i8], [41 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 = [41 x i8] c"Integer square root of 2584 should be 50\00"
define void @t_sqrt_2584() {
%1 = tail call i32 @isqrt(i32 2584)
%2 = icmp eq i32 %1, 50
%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 1320, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ apply(char *, char *);
int /*<<< orphan*/ usage();
int main(int cc, char **cv) {
  cc--;
  if (cc == 2) {
    char *c = cv[1];
    char *f = cv[2];
    apply(c, f);
  } else {
    usage();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    1173 <main+0x53>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <apply@plt>
jmp    117a <main+0x5a>
mov    $0x0,%al
call   1040 <usage@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x3,%edi
jne    1135 <main+0x15>
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rsi
call   1030 <apply@plt>
jmp    113c <main+0x1c>
xor    %eax,%eax
call   1040 <usage@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = getelementptr inbounds i8*, i8** %1, i64 2
%8 = load i8*, i8** %7
%9 = tail call i32 @apply(i8* %6, i8* %8)
br label %12
10: ; preds = %2
%11 = tail call i32 (...) @usage()
br label %12
12: ; preds = %10, %4
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sys_vgui(char *, char *);
void sys_gui(char *s) { sys_vgui("%s", s); }


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

x86 assembly (clang, -O2):
<sys_gui>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <sys_vgui@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @sys_gui(i8* %0) {
%2 = tail call i32 @sys_vgui(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int time_t;

/* Variables and functions */
int time(int *);
int test(void) {
  time_t new_time;
  new_time = time(&new_time);
  return (new_time != -1);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1030 <time@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <time@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @test() {
%1 = alloca i32
%2 = call i32 @time(i32* %1)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp ne i32 %3, -1
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @test() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @time(i32* %1)
%4 = icmp ne i32 %3, -1
%5 = zext i1 %4 to i32
ret i32 %5
}
void mystrcpy(char *s, char *t) {
  while ((*s = *t) != '\0') {
    s++;
    t++;
  }
}


x86 assembly (clang, -O0):
<mystrcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     1141 <mystrcpy+0x41>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110c <mystrcpy+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrcpy>:
mov    (%rsi),%al
mov    %al,(%rdi)
test   %al,%al
je     111f <mystrcpy+0x1f>
mov    $0x1,%eax
nopl   (%rax)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <mystrcpy+0x10>
ret

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

LLVM IR (-O2):
define void @mystrcpy(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
store i8 %3, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i8* [ %9, %5 ], [ %1, %2 ]
%7 = phi i8* [ %8, %5 ], [ %0, %2 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = load i8, i8* %9
store i8 %10, i8* %8
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
ret void
}
int count_array(char **arr) {
  char **tmp = arr;
  ;
  while (*tmp)
    tmp++;
  return (tmp - arr);
}


x86 assembly (clang, -O0):
<count_array>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     112f <count_array+0x2f>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <count_array+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
sar    $0x3,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_array>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpq   $0x0,(%rdi)
lea    0x8(%rdi),%rdi
jne    1110 <count_array+0x10>
ret

LLVM IR (-O0):
define i32 @count_array(i8** %0) {
%2 = alloca i8**
%3 = alloca i8**
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
store i8** %4, i8*** %3
br label %5
5: ; preds = %9, %1
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load i8**, i8*** %3
%11 = getelementptr inbounds i8*, i8** %10, i32 1
store i8** %11, i8*** %3
br label %5
12: ; preds = %5
%13 = load i8**, i8*** %3
%14 = load i8**, i8*** %2
%15 = ptrtoint i8** %13 to i64
%16 = ptrtoint i8** %14 to i64
%17 = sub i64 %15, %16
%18 = sdiv exact i64 %17, 8
%19 = trunc i64 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @count_array(i8** %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8** [ %0, %1 ], [ %6, %2 ]
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
%6 = getelementptr inbounds i8*, i8** %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8** %3 to i64
%9 = ptrtoint i8** %0 to i64
%10 = sub i64 %8, %9
%11 = lshr exact i64 %10, 3
%12 = trunc i64 %11 to i32
ret i32 %12
}
void intel_scu_devices_create(void) {}


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

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

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

LLVM IR (-O2):
define void @intel_scu_devices_create() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ charrep(char, int);
int /*<<< orphan*/ printf(char *);
void default_pstate_table_footer(__attribute__((unused)) void *report_data) {
  charrep('-', 64);
  printf("\n\n");
}


x86 assembly (clang, -O0):
<default_pstate_table_footer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x2d,%edi
mov    $0x40,%esi
call   1040 <charrep@plt>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<default_pstate_table_footer>:
push   %rax
mov    $0x2d,%edi
mov    $0x40,%esi
call   1040 <charrep@plt>
lea    0xec9(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [2 x i8] c"\0A\00"
define void @default_pstate_table_footer(i8* nocapture readnone %0) {
%2 = tail call i32 @charrep(i8 signext 45, i32 64)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int realtek_mst_i2c_spi_read_register(int, int, int /*<<< orphan*/ *);
int realtek_mst_i2c_spi_select_indexed_register(int, int /*<<< orphan*/);
int realtek_mst_i2c_spi_read_indexed_register(int fd, uint16_t address,
                                              uint8_t *val) {
  int ret = 0;
  ret |= realtek_mst_i2c_spi_select_indexed_register(fd, address);
  ret |= realtek_mst_i2c_spi_read_register(fd, 0xF5, val);
  return ret;
}


x86 assembly (clang, -O0):
<realtek_mst_i2c_spi_read_indexed_register>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <realtek_mst_i2c_spi_select_indexed_register@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    $0xf5,%esi
call   1030 <realtek_mst_i2c_spi_read_register@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<realtek_mst_i2c_spi_read_indexed_register>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %edi,%ebp
call   1040 <realtek_mst_i2c_spi_select_indexed_register@plt>
mov    %eax,%ebx
mov    %ebp,%edi
mov    $0xf5,%esi
mov    %r14,%rdx
call   1030 <realtek_mst_i2c_spi_read_register@plt>
or     %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @realtek_mst_i2c_spi_read_indexed_register(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32* %2, i32** %6
store i32 0, i32* %7
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = call i32 @realtek_mst_i2c_spi_select_indexed_register(i32 %8, i32 %9)
%11 = load i32, i32* %7
%12 = or i32 %11, %10
store i32 %12, i32* %7
%13 = load i32, i32* %4
%14 = load i32*, i32** %6
%15 = call i32 @realtek_mst_i2c_spi_read_register(i32 %13, i32 245, i32* %14)
%16 = load i32, i32* %7
%17 = or i32 %16, %15
store i32 %17, i32* %7
%18 = load i32, i32* %7
ret i32 %18
}

LLVM IR (-O2):
define i32 @realtek_mst_i2c_spi_read_indexed_register(i32 %0, i32 %1, i32* %2) {
%4 = tail call i32 @realtek_mst_i2c_spi_select_indexed_register(i32 %0, i32 %1)
%5 = tail call i32 @realtek_mst_i2c_spi_read_register(i32 %0, i32 245, i32* %2)
%6 = or i32 %5, %4
ret i32 %6
}
unsigned xrop3_62_1_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;
  unsigned stk3;
  unsigned stk4;
  stk4 = ~S;
  stk3 = D & stk4;
  stk2 = T | stk3;
  stk1 = S ^ stk2;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_62_1_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    -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
and    -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_62_1_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%edx
shl    $0x8,%edx
or     %esi,%edx
not    %ecx
mov    %edi,%eax
xor    $0xff,%eax
or     %edx,%eax
and    %ecx,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_62_1_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
%10 = alloca i32
%11 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 8
%15 = load i8, i8* %3
%16 = zext i8 %15 to i32
%17 = or i32 %14, %16
store i32 %17, i32* %6
%18 = load i8, i8* %4
%19 = zext i8 %18 to i32
%20 = shl i32 %19, 8
%21 = load i8, i8* %4
%22 = zext i8 %21 to i32
%23 = or i32 %20, %22
store i32 %23, i32* %7
%24 = load i32, i32* %6
%25 = xor i32 %24, -1
store i32 %25, i32* %11
%26 = load i32, i32* %5
%27 = load i32, i32* %11
%28 = and i32 %26, %27
store i32 %28, i32* %10
%29 = load i32, i32* %7
%30 = load i32, i32* %10
%31 = or i32 %29, %30
store i32 %31, i32* %9
%32 = load i32, i32* %6
%33 = load i32, i32* %9
%34 = xor i32 %32, %33
store i32 %34, i32* %8
%35 = load i32, i32* %8
%36 = load i32, i32* %6
%37 = xor i32 %36, -1
%38 = and i32 %35, %37
%39 = load i32, i32* %5
%40 = load i32, i32* %6
%41 = and i32 %39, %40
%42 = or i32 %38, %41
ret i32 %42
}

LLVM IR (-O2):
define i32 @xrop3_62_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %4, -1
%8 = xor i32 %3, 255
%9 = or i32 %6, %8
%10 = and i32 %9, %7
%11 = or i32 %10, %3
ret i32 %11
}
int base128_handles_dots() { return 0; }


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

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

LLVM IR (-O0):
define i32 @base128_handles_dots() {
ret i32 0
}

LLVM IR (-O2):
define i32 @base128_handles_dots() {
ret i32 0
}
void disable_relaxed(void) {}


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

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

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

LLVM IR (-O2):
define void @disable_relaxed() {
ret void
}
/* Variables and functions */
int yaffs_unmount2(char const *, int /*<<< orphan*/);
int yaffs_unmount(const char *path) { return yaffs_unmount2(path, 0); }


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

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

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

LLVM IR (-O2):
define i32 @yaffs_unmount(i8* %0) {
%2 = tail call i32 @yaffs_unmount2(i8* %0, i32 0)
ret i32 %2
}
/* Type definitions */
struct udp {
  int dummy;
};
struct packet {
  int dummy;
};

/* Variables and functions */
scalar_t__ IPPROTO_UDP;
scalar_t__ packet_echoed_ip_protocol(struct packet *);
scalar_t__ packet_echoed_layer4_header(struct packet *);
struct udp *packet_echoed_udp_header(struct packet *packet) {
  if (packet_echoed_ip_protocol(packet) == IPPROTO_UDP)
    return (struct udp *)(packet_echoed_layer4_header(packet));
  return NULL;
}


x86 assembly (clang, -O0):
<packet_echoed_udp_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <packet_echoed_ip_protocol@plt>
mov    0x2e9c(%rip),%rcx
cmp    (%rcx),%rax
jne    1157 <packet_echoed_udp_header+0x37>
mov    -0x10(%rbp),%rdi
call   1030 <packet_echoed_layer4_header@plt>
mov    %rax,-0x8(%rbp)
jmp    115f <packet_echoed_udp_header+0x3f>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<packet_echoed_udp_header>:
push   %rbx
mov    %rdi,%rbx
call   1040 <packet_echoed_ip_protocol@plt>
mov    0x2ea8(%rip),%rcx
cmp    (%rcx),%rax
jne    113f <packet_echoed_udp_header+0x1f>
mov    %rbx,%rdi
call   1030 <packet_echoed_layer4_header@plt>
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.udp = type { i32 }
%struct.packet = type { i32 }
@IPPROTO_UDP = global i64 0
define %struct.udp* @packet_echoed_udp_header(%struct.packet* %0) {
%2 = alloca %struct.udp*
%3 = alloca %struct.packet*
store %struct.packet* %0, %struct.packet** %3
%4 = load %struct.packet*, %struct.packet** %3
%5 = call i64 @packet_echoed_ip_protocol(%struct.packet* %4)
%6 = load i64, i64* @IPPROTO_UDP
%7 = icmp eq i64 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load %struct.packet*, %struct.packet** %3
%10 = call i64 @packet_echoed_layer4_header(%struct.packet* %9)
%11 = inttoptr i64 %10 to %struct.udp*
store %struct.udp* %11, %struct.udp** %2
br label %13
12: ; preds = %1
store %struct.udp* null, %struct.udp** %2
br label %13
13: ; preds = %12, %8
%14 = load %struct.udp*, %struct.udp** %2
ret %struct.udp* %14
}

LLVM IR (-O2):
%struct.udp = type { i32 }
%struct.packet = type { i32 }
@IPPROTO_UDP = global i64 0
define %struct.udp* @packet_echoed_udp_header(%struct.packet* %0) {
%2 = tail call i64 @packet_echoed_ip_protocol(%struct.packet* %0)
%3 = load i64, i64* @IPPROTO_UDP
%4 = icmp eq i64 %2, %3
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = tail call i64 @packet_echoed_layer4_header(%struct.packet* %0)
%7 = inttoptr i64 %6 to %struct.udp*
br label %8
8: ; preds = %1, %5
%9 = phi %struct.udp* [ %7, %5 ], [ null, %1 ]
ret %struct.udp* %9
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int isgraph(int c __attribute__((__unused__))) { abort(); }


x86 assembly (clang, -O0):
<isgraph>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<isgraph>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @isgraph(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define i32 @isgraph(i32 %0) {
%2 = tail call i32 (...) @abort()
unreachable
}
int test_imm_DCint16_reg(short val) {
  return ((val) & (0xDC << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_DCint16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 220
%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_DCint16_reg(i16 signext %0) {
%2 = and i16 %0, 220
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_usage(const char *prog_name) {
  printf("OVERVIEW: %s [OPTIONS] KEY\n\n", prog_name);
  printf("OPTIONS:\n"
         "-f DB.CDB\tCDB database to open.\n"
         "-v\t\tBe verbose.\n"
         "-h\t\tShow this help screen.\n");
}


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

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee4(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"OVERVIEW: %s [OPTIONS] KEY\0A\0A\00"
@.str.1 = [85 x i8] c"OPTIONS:\0A-f DB.CDB\09CDB database to open.\0A-v\09\09Be verbose.\0A-h\09\09Show this help screen.\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"OVERVIEW: %s [OPTIONS] KEY\0A\0A\00"
@str = [84 x i8] c"OPTIONS:\0A-f DB.CDB\09CDB database to open.\0A-v\09\09Be verbose.\0A-h\09\09Show this help screen.\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([84 x i8], [84 x i8]* @str, i64 0, i64 0))
ret void
}
void ft_striter(char *s, void (*f)(char *)) {
  int i;
  i = 0;
  while (s[i] != '\0') {
    (*f)(&(s[i]));
    i++;
  }
}


x86 assembly (clang, -O0):
<ft_striter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     114b <ft_striter+0x4b>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdi
movslq -0x14(%rbp),%rcx
add    %rcx,%rdi
call   *%rax
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <ft_striter+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_striter>:
push   %r14
push   %rbx
push   %rax
cmpb   $0x0,(%rdi)
je     1120 <ft_striter+0x20>
mov    %rsi,%r14
mov    %rdi,%rbx
nop
mov    %rbx,%rdi
call   *%r14
cmpb   $0x0,0x1(%rbx)
lea    0x1(%rbx),%rbx
jne    1110 <ft_striter+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @ft_striter(i8* %0, void (i8*)* nocapture %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %8, %5 ], [ 0, %2 ]
%7 = phi i8* [ %9, %5 ], [ %0, %2 ]
tail call void %1(i8* %7)
%8 = add nuw i64 %6, 1
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
ret void
}