xunge/DecIR huggingface dataset:
/* Variables and functions */
char foo();
int maxout_in(int paste, char **MATRX) {
  char o = foo();
  return (((int)MATRX[1][2]) * 5) - paste;
}


x86 assembly (clang, -O0):
<maxout_in>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <foo@plt>
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl 0x2(%rax),%eax
imul   $0x5,%eax,%eax
sub    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<maxout_in>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <foo@plt>
mov    0x8(%rbx),%rax
movsbl 0x2(%rax),%eax
lea    (%rax,%rax,4),%eax
sub    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @maxout_in(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = call signext i8 (...) @foo()
store i8 %6, i8* %5
%7 = load i8**, i8*** %4
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8, i8* %9, i64 2
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = mul nsw i32 %12, 5
%14 = load i32, i32* %3
%15 = sub nsw i32 %13, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @maxout_in(i32 %0, i8** nocapture %1) {
%3 = tail call signext i8 (...) @foo()
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8, i8* %5, i64 2
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = mul nsw i32 %8, 5
%10 = sub nsw i32 %9, %0
ret i32 %10
}
float vmax(float a, float b) { return (a > b) ? a : b; }


x86 assembly (clang, -O0):
<vmax>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    112c <vmax+0x2c>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1136 <vmax+0x36>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<vmax>:
maxss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @vmax(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp ogt float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %3
br label %12
10: ; preds = %2
%11 = load float, float* %4
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
ret float %13
}

LLVM IR (-O2):
define float @vmax(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
void M43Reset(void) {}


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

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

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

LLVM IR (-O2):
define void @M43Reset() {
ret void
}
char *sf_get_response_phrase(int status) {
  if (status == 404) {
    return "Not Found";
  }
}


x86 assembly (clang, -O0):
<sf_get_response_phrase>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x194,-0xc(%rbp)
jne    111f <sf_get_response_phrase+0x1f>
lea    0xee5(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sf_get_response_phrase>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Not Found\00"
define i8* @sf_get_response_phrase(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 404
br i1 %5, label %6, label %7
6: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %2
br label %7
7: ; preds = %6, %1
%8 = load i8*, i8** %2
ret i8* %8
}

LLVM IR (-O2):
@.str = [10 x i8] c"Not Found\00"
define i8* @sf_get_response_phrase(i32 %0) {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int CreateReadStringSource(void *, char const *, char const *, size_t, size_t);
int OpenTextSource(void *theEnv, const char *name, const char *str,
                   size_t currentPosition, size_t maximumPosition) {
  if (str == NULL) {
    currentPosition = 0;
    maximumPosition = 0;
  }
  return (CreateReadStringSource(theEnv, name, str, currentPosition,
                                 maximumPosition));
}


x86 assembly (clang, -O0):
<OpenTextSource>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1147 <OpenTextSource+0x37>
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1030 <CreateReadStringSource@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OpenTextSource>:
test   %rdx,%rdx
cmove  %rdx,%rcx
cmove  %rdx,%r8
jmp    1030 <CreateReadStringSource@plt>

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

LLVM IR (-O2):
define i32 @OpenTextSource(i8* %0, i8* %1, i8* %2, i64 %3, i64 %4) {
%6 = icmp eq i8* %2, null
%7 = select i1 %6, i64 0, i64 %3
%8 = select i1 %6, i64 0, i64 %4
%9 = tail call i32 @CreateReadStringSource(i8* %0, i8* %1, i8* %2, i64 %7, i64 %8)
ret i32 %9
}
/* Type definitions */
struct mavl {
  int dummy;
};

/* Variables and functions */
void *mavl_get(struct mavl *, void *);
int /*<<< orphan*/ memcpy(void *, void *, int);
void *mavl_replace_data(struct mavl *t, void *data, int len) {
  void *df = mavl_get(t, data);
  if (!df)
    return NULL;
  memcpy(df, data, len);
  return df;
}


x86 assembly (clang, -O0):
<mavl_replace_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <mavl_get@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    115c <mavl_replace_data+0x3c>
movq   $0x0,-0x8(%rbp)
jmp    1174 <mavl_replace_data+0x54>
mov    -0x28(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1040 <memcpy@plt>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mavl_replace_data>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
call   1030 <mavl_get@plt>
mov    %rax,%rbp
test   %rax,%rax
je     1145 <mavl_replace_data+0x25>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1040 <memcpy@plt>
mov    %rbp,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
%struct.mavl = type { i32 }
define i8* @mavl_replace_data(%struct.mavl* %0, i8* %1, i32 %2) {
%4 = tail call i8* @mavl_get(%struct.mavl* %0, i8* %1)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @memcpy(i8* %4, i8* %1, i32 %2)
br label %8
8: ; preds = %3, %6
ret i8* %4
}
/* Variables and functions */
float renvoi_nombre_reel(char *, int *, int *);
float renvoi_nombre_si_pas_erreur(char *tab, int *position_reel) {
  int erreur = 0;
  float reel = renvoi_nombre_reel(tab, &erreur, position_reel);
  if (erreur == 1 || reel == -1) {
    return -1;
  } else {
    return reel;
  }
}


x86 assembly (clang, -O0):
<renvoi_nombre_si_pas_erreur>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    -0x1c(%rbp),%rsi
call   1030 <renvoi_nombre_reel@plt>
movss  %xmm0,-0x20(%rbp)
cmpl   $0x1,-0x1c(%rbp)
je     1163 <renvoi_nombre_si_pas_erreur+0x53>
movss  -0x20(%rbp),%xmm0
movss  0xeac(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    1175 <renvoi_nombre_si_pas_erreur+0x65>
jp     1175 <renvoi_nombre_si_pas_erreur+0x65>
movss  0xe95(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    117f <renvoi_nombre_si_pas_erreur+0x6f>
movss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<renvoi_nombre_si_pas_erreur>:
push   %rax
mov    %rsi,%rdx
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
call   1030 <renvoi_nombre_reel@plt>
movaps %xmm0,%xmm1
cmpl   $0x1,0x4(%rsp)
movss  0xeca(%rip),%xmm0
je     114f <renvoi_nombre_si_pas_erreur+0x3f>
movaps %xmm1,%xmm2
cmpeqss %xmm0,%xmm2
movaps %xmm2,%xmm3
andnps %xmm1,%xmm3
andps  %xmm0,%xmm2
orps   %xmm3,%xmm2
movaps %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @renvoi_nombre_si_pas_erreur(i8* %0, i32* %1) {
%3 = alloca float
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca float
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32 0, i32* %6
%8 = load i8*, i8** %4
%9 = load i32*, i32** %5
%10 = call float @renvoi_nombre_reel(i8* %8, i32* %6, i32* %9)
store float %10, float* %7
%11 = load i32, i32* %6
%12 = icmp eq i32 %11, 1
br i1 %12, label %16, label %13
13: ; preds = %2
%14 = load float, float* %7
%15 = fcmp oeq float %14, -1.000000e+00
br i1 %15, label %16, label %17
16: ; preds = %13, %2
store float -1.000000e+00, float* %3
br label %19
17: ; preds = %13
%18 = load float, float* %7
store float %18, float* %3
br label %19
19: ; preds = %17, %16
%20 = load float, float* %3
ret float %20
}

LLVM IR (-O2):
define float @renvoi_nombre_si_pas_erreur(i8* %0, i32* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = call float @renvoi_nombre_reel(i8* %0, i32* %3, i32* %1)
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 1
%8 = fcmp oeq float %5, -1.000000e+00
%9 = select i1 %7, i1 true, i1 %8
%10 = select i1 %9, float -1.000000e+00, float %5
ret float %10
}
/* Variables and functions */
int rand();
int num() {
  int res;
  res = rand();
  if (res < 0)
    res = -res;
  res %= 10;
  return res;
}


x86 assembly (clang, -O0):
<num>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1134 <num+0x24>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<num>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
mov    %eax,%ecx
neg    %ecx
cmovns %ecx,%eax
mov    $0xcccccccd,%ecx
imul   %rax,%rcx
shr    $0x23,%rcx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @num() {
%1 = tail call i32 (...) @rand()
%2 = tail call i32 @llvm.abs.i32(i32 %1, i1 true)
%3 = urem i32 %2, 10
ret i32 %3
}
/* Variables and functions */
int geteuid();
int getuid();
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("real uid: %d\n", getuid());
  printf("effective uid: %d\n", geteuid());
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <getuid@plt>
mov    %eax,%esi
lea    0xebc(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <geteuid@plt>
mov    %eax,%esi
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <getuid@plt>
lea    0xec1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <geteuid@plt>
lea    0xeba(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"real uid: %d\0A\00"
@.str.1 = [19 x i8] c"effective uid: %d\0A\00"
define i32 @main() {
%1 = call i32 (...) @getuid()
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 (...) @geteuid()
%4 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"real uid: %d\0A\00"
@.str.1 = [19 x i8] c"effective uid: %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getuid()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @geteuid()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}
void hs21(double *p, double *x, int m, int n, void *data) {
  x[0] = p[0] / 10.0;
  x[1] = p[1];
}


x86 assembly (clang, -O0):
<hs21>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xeda(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<hs21>:
movsd  (%rdi),%xmm0
divsd  0xef4(%rip),%xmm0
movsd  %xmm0,(%rsi)
movsd  0x8(%rdi),%xmm0
movsd  %xmm0,0x8(%rsi)
ret

LLVM IR (-O0):
define void @hs21(double* %0, double* %1, i32 %2, i32 %3, i8* %4) {
%6 = alloca double*
%7 = alloca double*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
store double* %0, double** %6
store double* %1, double** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i8* %4, i8** %10
%11 = load double*, double** %6
%12 = getelementptr inbounds double, double* %11, i64 0
%13 = load double, double* %12
%14 = fdiv double %13, 1.000000e+01
%15 = load double*, double** %7
%16 = getelementptr inbounds double, double* %15, i64 0
store double %14, double* %16
%17 = load double*, double** %6
%18 = getelementptr inbounds double, double* %17, i64 1
%19 = load double, double* %18
%20 = load double*, double** %7
%21 = getelementptr inbounds double, double* %20, i64 1
store double %19, double* %21
ret void
}

LLVM IR (-O2):
define void @hs21(double* nocapture %0, double* nocapture writeonly %1, i32 %2, i32 %3, i8* nocapture readnone %4) {
%6 = load double, double* %0
%7 = fdiv double %6, 1.000000e+01
store double %7, double* %1
%8 = getelementptr inbounds double, double* %0, i64 1
%9 = load double, double* %8
%10 = getelementptr inbounds double, double* %1, i64 1
store double %9, double* %10
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _SC_PAGESIZE;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
long sysconf(int /*<<< orphan*/);
size_t get_native_page_size(void) {
  long sz;
  sz = sysconf(_SC_PAGESIZE);
  if (sz < 0) {
    perror("failed to get native page size");
    exit(1);
  }
  return (size_t)sz;
}


x86 assembly (clang, -O0):
<get_native_page_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    116b <get_native_page_size+0x3b>
lea    0xea4(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_native_page_size>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
call   1040 <sysconf@plt>
test   %rax,%rax
js     1146 <get_native_page_size+0x16>
pop    %rcx
ret
lea    0xeb3(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@_SC_PAGESIZE = global i32 0
@.str = [31 x i8] c"failed to get native page size\00"
define i64 @get_native_page_size() {
%1 = alloca i64
%2 = load i32, i32* @_SC_PAGESIZE
%3 = call i64 @sysconf(i32 %2)
store i64 %3, i64* %1
%4 = load i64, i64* %1
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = call i32 @perror(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 1)
unreachable
9: ; preds = %0
%10 = load i64, i64* %1
ret i64 %10
}

LLVM IR (-O2):
@_SC_PAGESIZE = global i32 0
@.str = [31 x i8] c"failed to get native page size\00"
define i64 @get_native_page_size() {
%1 = load i32, i32* @_SC_PAGESIZE
%2 = tail call i64 @sysconf(i32 %1)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = tail call i32 @perror(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %0
ret i64 %2
}
void gtk_file_chooser_dialog_get_type() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ LittleEndianReadU64(int /*<<< orphan*/ const *);
double LittleEndianReadF64(const uint8_t *bytes) {
  union {
    double f64;
    uint64_t u64;
  } u;
  u.u64 = LittleEndianReadU64(bytes);
  return u.f64;
}


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

x86 assembly (clang, -O2):
<LittleEndianReadF64>:
push   %rax
call   1030 <LittleEndianReadU64@plt>
mov    %eax,%eax
movq   %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
%union.anon = type { double }
define double @LittleEndianReadF64(i32* %0) {
%2 = alloca i32*
%3 = alloca %union.anon
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @LittleEndianReadU64(i32* %4)
%6 = bitcast %union.anon* %3 to i32*
store i32 %5, i32* %6
%7 = bitcast %union.anon* %3 to double*
%8 = load double, double* %7
ret double %8
}

LLVM IR (-O2):
define double @LittleEndianReadF64(i32* %0) {
%2 = tail call i32 @LittleEndianReadU64(i32* %0)
%3 = zext i32 %2 to i64
%4 = bitcast i64 %3 to double
ret double %4
}
/* Variables and functions */
int brk(void *);
int /*<<< orphan*/ putstr(char *);
void brk_warn(void *p) {
  if (brk(p) == -1)
    putstr("unable to return space\n");
}


x86 assembly (clang, -O0):
<brk_warn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <brk@plt>
cmp    $0xffffffff,%eax
jne    114a <brk_warn+0x2a>
lea    0xebb(%rip),%rdi
call   1040 <putstr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<brk_warn>:
push   %rax
call   1030 <brk@plt>
cmp    $0xffffffff,%eax
je     112d <brk_warn+0xd>
pop    %rax
ret
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1040 <putstr@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"unable to return space\0A\00"
define void @brk_warn(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @brk(i8* %3)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @putstr(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"unable to return space\0A\00"
define void @brk_warn(i8* %0) {
%2 = tail call i32 @brk(i8* %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @putstr(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ReadInTestCase4(int);
int /*<<< orphan*/ SendInTestCase4(int);
void Receiver(int *key) {
  int count;
  int key1 = key[0];
  int key2 = key[1];
  for (count = 0; count < 2; count++) {
    ReadInTestCase4(key1);
    SendInTestCase4(key2);
  }
}


x86 assembly (clang, -O0):
<Receiver>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
jge    116e <Receiver+0x4e>
mov    -0x10(%rbp),%edi
call   1040 <ReadInTestCase4@plt>
mov    -0x14(%rbp),%edi
call   1030 <SendInTestCase4@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1146 <Receiver+0x26>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Receiver>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%ebx
mov    0x4(%rdi),%ebp
mov    %ebx,%edi
call   1040 <ReadInTestCase4@plt>
mov    %ebp,%edi
call   1030 <SendInTestCase4@plt>
mov    %ebx,%edi
call   1040 <ReadInTestCase4@plt>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <SendInTestCase4@plt>

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

LLVM IR (-O2):
define void @Receiver(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = tail call i32 @ReadInTestCase4(i32 %2)
%6 = tail call i32 @SendInTestCase4(i32 %4)
%7 = tail call i32 @ReadInTestCase4(i32 %2)
%8 = tail call i32 @SendInTestCase4(i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ do_condlinrec();
void do_condnestrec(void) { do_condlinrec(); }


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

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

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

LLVM IR (-O2):
define void @do_condnestrec() {
%1 = tail call i32 (...) @do_condlinrec()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
int main() {
  int e = 1;
  f(e);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 1)
ret i32 0
}
xor() {
  call("ccxor");
}


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"ccxor\00"
define i32 @xor() {
%1 = alloca i32
%2 = call i32 (i8*, ...) bitcast (i32 (...)* @call to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [6 x i8] c"ccxor\00"
define i32 @xor() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @call to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ DymosimMessageDymosimSev(int, char *);
int /*<<< orphan*/ sprintf(char *, char *, char const *, double);
void DymosimMessageDoubleSev(int severity, const char *message, double d) {
  char textline[200];
  sprintf(textline, "%.160s %.16G", message, d);
  DymosimMessageDymosimSev(severity, textline);
}


x86 assembly (clang, -O0):
<DymosimMessageDoubleSev>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
lea    -0xe0(%rbp),%rdi
mov    -0x10(%rbp),%rdx
movsd  -0x18(%rbp),%xmm0
lea    0xeb2(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x4(%rbp),%edi
lea    -0xe0(%rbp),%rsi
call   1030 <DymosimMessageDymosimSev@plt>
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DymosimMessageDoubleSev>:
push   %r14
push   %rbx
sub    $0xc8,%rsp
mov    %rsi,%rdx
mov    %edi,%ebx
lea    0xeca(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <sprintf@plt>
mov    %ebx,%edi
mov    %r14,%rsi
call   1030 <DymosimMessageDymosimSev@plt>
add    $0xc8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [13 x i8] c"%.160s %.16G\00"
define void @DymosimMessageDoubleSev(i32 %0, i8* %1, double %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca double
%7 = alloca [200 x i8]
store i32 %0, i32* %4
store i8* %1, i8** %5
store double %2, double* %6
%8 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 0
%9 = load i8*, i8** %5
%10 = load double, double* %6
%11 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %9, double %10)
%12 = load i32, i32* %4
%13 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 0
%14 = call i32 @DymosimMessageDymosimSev(i32 %12, i8* %13)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"%.160s %.16G\00"
define void @DymosimMessageDoubleSev(i32 %0, i8* %1, double %2) {
%4 = alloca [200 x i8]
%5 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%6 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %1, double %2)
%7 = call i32 @DymosimMessageDymosimSev(i32 %0, i8* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ explicit_bzero(char *, int);
void explicit_bzero1_null() {
  char *a = 0;
  explicit_bzero(a, 10);
}


x86 assembly (clang, -O0):
<explicit_bzero1_null>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xa,%esi
call   1030 <explicit_bzero@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<explicit_bzero1_null>:
xor    %edi,%edi
mov    $0xa,%esi
jmp    1030 <explicit_bzero@plt>

LLVM IR (-O0):
define void @explicit_bzero1_null() {
%1 = alloca i8*
store i8* null, i8** %1
%2 = load i8*, i8** %1
%3 = call i32 @explicit_bzero(i8* %2, i32 10)
ret void
}

LLVM IR (-O2):
define void @explicit_bzero1_null() {
%1 = tail call i32 @explicit_bzero(i8* null, i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ symbol_print(void *, char *);
void symbol_print_cb(void *p_void, char *c_key) { symbol_print(p_void, c_key); }


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

x86 assembly (clang, -O2):
<symbol_print_cb>:
jmp    1030 <symbol_print@plt>

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

LLVM IR (-O2):
define void @symbol_print_cb(i8* %0, i8* %1) {
%3 = tail call i32 @symbol_print(i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMR82_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMR82_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMR82_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_3922() {
  Assert_real((isqrt(3922) == 62),
              "/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",
              1350, ("Integer square root of 3922 should be 62"));
}


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

x86 assembly (clang, -O2):
<t_sqrt_3922>:
push   %rax
mov    $0xf52,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x3e,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x546,%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 3922 should be 62\00"
define void @t_sqrt_3922() {
%1 = call i32 @isqrt(i32 3922)
%2 = icmp eq i32 %1, 62
%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 1350, 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 3922 should be 62\00"
define void @t_sqrt_3922() {
%1 = tail call i32 @isqrt(i32 3922)
%2 = icmp eq i32 %1, 62
%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 1350, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x46() {
  Assert_real((ispunct(70) == 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_ispunct.c",
              355, ("ispunct should be 0 for F"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x46>:
push   %rax
mov    $0x46,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x163,%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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for F\00"
define void @t_ispunct_0x46() {
%1 = call i64 @ispunct(i32 70)
%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 355, 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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for F\00"
define void @t_ispunct_0x46() {
%1 = tail call i64 @ispunct(i32 70)
%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 355, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t do_read_uint32(void *src) {
  uint8_t *d = (uint8_t *)src;
  return (d[0] << 24) | (d[1] << 16) | (d[2] << 8) | d[3];
}


x86 assembly (clang, -O0):
<do_read_uint32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
shl    $0x18,%eax
mov    -0x10(%rbp),%rcx
mov    0x4(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
mov    0x8(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
or     0xc(%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_read_uint32>:
mov    (%rdi),%eax
mov    0x4(%rdi),%ecx
shl    $0x18,%eax
shl    $0x10,%ecx
or     %eax,%ecx
mov    0x8(%rdi),%eax
shl    $0x8,%eax
or     %ecx,%eax
or     0xc(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @do_read_uint32(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
%9 = shl i32 %8, 24
%10 = load i32*, i32** %3
%11 = getelementptr inbounds i32, i32* %10, i64 1
%12 = load i32, i32* %11
%13 = shl i32 %12, 16
%14 = or i32 %9, %13
%15 = load i32*, i32** %3
%16 = getelementptr inbounds i32, i32* %15, i64 2
%17 = load i32, i32* %16
%18 = shl i32 %17, 8
%19 = or i32 %14, %18
%20 = load i32*, i32** %3
%21 = getelementptr inbounds i32, i32* %20, i64 3
%22 = load i32, i32* %21
%23 = or i32 %19, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @do_read_uint32(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = shl i32 %3, 24
%5 = getelementptr inbounds i8, i8* %0, i64 4
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = shl i32 %7, 16
%9 = or i32 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 8
%11 = bitcast i8* %10 to i32*
%12 = load i32, i32* %11
%13 = shl i32 %12, 8
%14 = or i32 %9, %13
%15 = getelementptr inbounds i8, i8* %0, i64 12
%16 = bitcast i8* %15 to i32*
%17 = load i32, i32* %16
%18 = or i32 %14, %17
ret i32 %18
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ by_at(int /*<<< orphan*/);
void and_by_at(uint32_t x) {
  by_at(x);
  and();
}


x86 assembly (clang, -O0):
<and_by_at>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <by_at@plt>
mov    $0x0,%al
call   1030 <and@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<and_by_at>:
push   %rax
call   1040 <by_at@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <and@plt>

LLVM IR (-O0):
define void @and_by_at(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @by_at(i32 %3)
%5 = call i32 (...) @and()
ret void
}

LLVM IR (-O2):
define void @and_by_at(i32 %0) {
%2 = tail call i32 @by_at(i32 %0)
%3 = tail call i32 (...) @and()
ret void
}
/* Variables and functions */
int get_full_year_with_sed(char *, int);
int get_right_two_digits_of_current_year(int optional_current_year) {
  return get_full_year_with_sed("\\(..\\)\\(.*\\)/\\2", optional_current_year);
}


x86 assembly (clang, -O0):
<get_right_two_digits_of_current_year>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <get_full_year_with_sed@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_right_two_digits_of_current_year>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <get_full_year_with_sed@plt>

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

LLVM IR (-O2):
@.str = [16 x i8] c"\\(..\\)\\(.*\\)/\\2\00"
define i32 @get_right_two_digits_of_current_year(i32 %0) {
%2 = tail call i32 @get_full_year_with_sed(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 %2
}
unsigned int CalculateLog2Max256(unsigned int n) {
  unsigned int shift = (((n >> 4) + 0xF) & 0x10) >> 2;
  unsigned int bits = n >> shift;
  unsigned char pair_shift = (((bits >> 2) + 0x3) & 0x4) >> 1;
  shift += pair_shift;
  bits >>= pair_shift;
  shift += bits >> 1;
  shift += (n & 0x10000) >> 12;
  return shift;
}


x86 assembly (clang, -O0):
<CalculateLog2Max256>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x4,%eax
add    $0xf,%eax
and    $0x10,%eax
shr    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x2,%eax
add    $0x3,%eax
and    $0x4,%eax
shr    $0x1,%eax
mov    %al,-0xd(%rbp)
movzbl -0xd(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
movzbl -0xd(%rbp),%ecx
mov    -0xc(%rbp),%eax
shr    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x1,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x10000,%eax
shr    $0xc,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CalculateLog2Max256>:
mov    %edi,%eax
shr    $0x4,%eax
add    $0xf,%eax
shr    $0x2,%eax
and    $0x4,%eax
mov    %edi,%edx
mov    %eax,%ecx
shr    %cl,%edx
mov    %edx,%ecx
shr    $0x2,%cl
add    $0x3,%cl
shr    %cl
and    $0x2,%cl
movzbl %cl,%ecx
shr    %cl,%edx
shr    %edx
shr    $0xc,%edi
and    $0x10,%edi
or     %edi,%eax
or     %ecx,%eax
add    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @CalculateLog2Max256(i32 %0) {
%2 = lshr i32 %0, 4
%3 = add nuw nsw i32 %2, 15
%4 = lshr i32 %3, 2
%5 = and i32 %4, 4
%6 = lshr i32 %0, %5
%7 = trunc i32 %6 to i8
%8 = lshr i8 %7, 2
%9 = add nuw nsw i8 %8, 3
%10 = lshr i8 %9, 1
%11 = and i8 %10, 2
%12 = zext i8 %11 to i32
%13 = lshr i32 %6, %12
%14 = lshr i32 %13, 1
%15 = lshr i32 %0, 12
%16 = and i32 %15, 16
%17 = or i32 %5, %16
%18 = or i32 %17, %12
%19 = add nuw i32 %18, %14
ret i32 %19
}
int execute_getpgid() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_getpgid() {
ret i32 0
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ putchar(int);
void rxWriteConsole(int32_t c) {
  (c > 0) ? putchar((char)c) : printf("\033[2J\033[1;1H");
  if (c == 8) {
    putchar(32);
    putchar(8);
  }
}


x86 assembly (clang, -O0):
<rxWriteConsole>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1145 <rxWriteConsole+0x25>
mov    -0x4(%rbp),%eax
movsbl %al,%edi
call   1030 <putchar@plt>
jmp    1151 <rxWriteConsole+0x31>
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x8,-0x4(%rbp)
jne    116f <rxWriteConsole+0x4f>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x8,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rxWriteConsole>:
push   %rbx
test   %edi,%edi
jle    1149 <rxWriteConsole+0x29>
mov    %edi,%ebx
movsbl %bl,%edi
call   1030 <putchar@plt>
cmp    $0x8,%ebx
jne    1156 <rxWriteConsole+0x36>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x8,%edi
pop    %rbx
jmp    1030 <putchar@plt>
lea    0xeb0(%rip),%rdi
pop    %rbx
jmp    1040 <printf@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"\1B[2J\1B[1;1H\00"
define void @rxWriteConsole(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i32, i32* %2
%7 = trunc i32 %6 to i8
%8 = sext i8 %7 to i32
%9 = call i32 @putchar(i32 %8)
br label %12
10: ; preds = %1
%11 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %5
%13 = phi i32 [ %9, %5 ], [ %11, %10 ]
%14 = load i32, i32* %2
%15 = icmp eq i32 %14, 8
br i1 %15, label %16, label %19
16: ; preds = %12
%17 = call i32 @putchar(i32 32)
%18 = call i32 @putchar(i32 8)
br label %19
19: ; preds = %16, %12
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"\1B[2J\1B[1;1H\00"
define void @rxWriteConsole(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %13
5: ; preds = %1
%6 = shl i32 %0, 24
%7 = ashr exact i32 %6, 24
%8 = tail call i32 @putchar(i32 %7)
%9 = icmp eq i32 %0, 8
br i1 %9, label %10, label %13
10: ; preds = %5
%11 = tail call i32 @putchar(i32 32)
%12 = tail call i32 @putchar(i32 8)
br label %13
13: ; preds = %3, %10, %5
ret void
}
int main(int args, char **argsv) { return 0; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void print_hexdigit(int d) {
  if (d < 0xA)
    putchar('0' + d);
  else
    putchar('A' + d - 0xA);
}


x86 assembly (clang, -O0):
<print_hexdigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    1138 <print_hexdigit+0x28>
mov    -0x4(%rbp),%eax
add    $0x30,%eax
movsbl %al,%edi
call   1030 <putchar@plt>
jmp    1149 <print_hexdigit+0x39>
mov    -0x4(%rbp),%eax
add    $0x41,%eax
sub    $0xa,%eax
movsbl %al,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_hexdigit>:
cmp    $0xa,%edi
mov    $0x30,%eax
mov    $0x37,%ecx
cmovl  %eax,%ecx
add    %dil,%cl
movsbl %cl,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @print_hexdigit(i32 %0) {
%2 = icmp slt i32 %0, 10
%3 = trunc i32 %0 to i8
%4 = select i1 %2, i8 48, i8 55
%5 = add i8 %4, %3
%6 = tail call i32 @putchar(i8 signext %5)
ret void
}
void gtk_entry_get_invisible_char() {}


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

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

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

LLVM IR (-O2):
define void @gtk_entry_get_invisible_char() {
ret void
}
/* Variables and functions */
int PAPI_destroy_eventset(int *);
void PAPIF_DESTROY_EVENTSET(int *EventSet, int *check) {
  *check = PAPI_destroy_eventset(EventSet);
}


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

x86 assembly (clang, -O2):
<PAPIF_DESTROY_EVENTSET>:
push   %rbx
mov    %rsi,%rbx
call   1030 <PAPI_destroy_eventset@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @PAPIF_DESTROY_EVENTSET(i32* %0, i32* nocapture writeonly %1) {
%3 = tail call i32 @PAPI_destroy_eventset(i32* %0)
store i32 %3, i32* %1
ret void
}