xunge/DecIR huggingface dataset:
int switch1(int a) {
  switch (a) {
  case 1:
    return 11;
  case 33:
    return 333;
  case 55:
    return 55;
  default:
    return -1;
  }
}


x86 assembly (clang, -O0):
<switch1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x1,%eax
je     113d <switch1+0x3d>
jmp    111b <switch1+0x1b>
mov    -0xc(%rbp),%eax
sub    $0x21,%eax
je     1149 <switch1+0x49>
jmp    112c <switch1+0x2c>
mov    -0xc(%rbp),%eax
sub    $0x37,%eax
je     1155 <switch1+0x55>
jmp    1161 <switch1+0x61>
movl   $0xb,-0x4(%rbp)
jmp    1168 <switch1+0x68>
movl   $0x14d,-0x4(%rbp)
jmp    1168 <switch1+0x68>
movl   $0x37,-0x4(%rbp)
jmp    1168 <switch1+0x68>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<switch1>:
cmp    $0x1,%edi
je     1115 <switch1+0x15>
cmp    $0x37,%edi
je     111b <switch1+0x1b>
cmp    $0x21,%edi
jne    1121 <switch1+0x21>
mov    $0x14d,%eax
ret
mov    $0xb,%eax
ret
mov    $0x37,%eax
ret
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @switch1(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %8 [
i32 1, label %5
i32 33, label %6
i32 55, label %7
]
5: ; preds = %1
store i32 11, i32* %2
br label %9
6: ; preds = %1
store i32 333, i32* %2
br label %9
7: ; preds = %1
store i32 55, i32* %2
br label %9
8: ; preds = %1
store i32 -1, i32* %2
br label %9
9: ; preds = %8, %7, %6, %5
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @switch1(i32 %0) {
switch i32 %0, label %4 [
i32 1, label %5
i32 33, label %2
i32 55, label %3
]
2: ; preds = %1
br label %5
3: ; preds = %1
br label %5
4: ; preds = %1
br label %5
5: ; preds = %1, %4, %3, %2
%6 = phi i32 [ -1, %4 ], [ 55, %3 ], [ 333, %2 ], [ 11, %1 ]
ret i32 %6
}
/* Variables and functions */
char *ey_basename(char const *);
char *strchr(char *, int /*<<< orphan*/);
char *strrchr(char *, char);
char *ey_fileextension(const char *filename) {
  char *b = ey_basename(filename);
  char *e = strrchr(b, '.');
  return e ? e : strchr(b, 0);
}


x86 assembly (clang, -O0):
<ey_fileextension>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <ey_basename@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2e,%esi
call   1040 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1173 <ey_fileextension+0x43>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1182 <ey_fileextension+0x52>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1030 <strchr@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ey_fileextension>:
push   %rbx
call   1050 <ey_basename@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x2e,%esi
call   1040 <strrchr@plt>
test   %rax,%rax
je     114d <ey_fileextension+0x1d>
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <strlen@plt>
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @ey_fileextension(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i8* @ey_basename(i8* %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = call i8* @strrchr(i8* %7, i8 signext 46)
store i8* %8, i8** %4
%9 = load i8*, i8** %4
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %13
11: ; preds = %1
%12 = load i8*, i8** %4
br label %16
13: ; preds = %1
%14 = load i8*, i8** %3
%15 = call i8* @strchr(i8* %14, i32 0)
br label %16
16: ; preds = %13, %11
%17 = phi i8* [ %12, %11 ], [ %15, %13 ]
ret i8* %17
}

LLVM IR (-O2):
define i8* @ey_fileextension(i8* %0) {
%2 = tail call i8* @ey_basename(i8* %0)
%3 = tail call i8* @strrchr(i8* dereferenceable(1) %2, i8 signext 46)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = tail call i64 @strlen(i8* dereferenceable(1) %2)
%7 = getelementptr i8, i8* %2, i64 %6
br label %8
8: ; preds = %1, %5
%9 = phi i8* [ %7, %5 ], [ %3, %1 ]
ret i8* %9
}
/* Variables and functions */
char *__real_setlocale(int, char const *);
char *__wrap_setlocale(int category, const char *locale) {
  if (locale == NULL) {
    static const char C_LOCALE[] = "C";
    return (char *)C_LOCALE;
  }
  return __real_setlocale(category, locale);
}


x86 assembly (clang, -O0):
<__wrap_setlocale>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    113a <__wrap_setlocale+0x2a>
lea    0xecf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    114a <__wrap_setlocale+0x3a>
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1030 <__real_setlocale@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__wrap_setlocale>:
test   %rsi,%rsi
je     111a <__wrap_setlocale+0xa>
jmp    1030 <__real_setlocale@plt>
lea    0xedf(%rip),%rax
ret

LLVM IR (-O0):
@__wrap_setlocale.C_LOCALE = internal constant [2 x i8] c"C\00"
define i8* @__wrap_setlocale(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* getelementptr inbounds ([2 x i8], [2 x i8]* @__wrap_setlocale.C_LOCALE, i64 0, i64 0), i8** %3
br label %13
9: ; preds = %2
%10 = load i32, i32* %4
%11 = load i8*, i8** %5
%12 = call i8* @__real_setlocale(i32 %10, i8* %11)
store i8* %12, i8** %3
br label %13
13: ; preds = %9, %8
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@__wrap_setlocale.C_LOCALE = internal constant [2 x i8] c"C\00"
define i8* @__wrap_setlocale(i32 %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i8* @__real_setlocale(i32 %0, i8* %1)
br label %6
6: ; preds = %2, %4
%7 = phi i8* [ %5, %4 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @__wrap_setlocale.C_LOCALE, i64 0, i64 0), %2 ]
ret i8* %7
}
/* Variables and functions */
int printf(char *, float);
int main(void) {
  int foo = 4;
  int *bar = &foo;
  float f = *bar;
  return printf("%f\n", f);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cvtsi2ssl (%rax),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0xeed(%rip),%rdi
movss  0xee1(%rip),%xmm0
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float 4.000000e+00)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ __extendsfdf2(long);
long __fixdfsi(int /*<<< orphan*/);
long __fixsfsi(long a1) { return __fixdfsi(__extendsfdf2(a1)); }


x86 assembly (clang, -O0):
<__fixsfsi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1140 <__extendsfdf2>
mov    %eax,%edi
call   1030 <__fixdfsi@plt>
add    $0x10,%rsp
pop    %rbp
ret
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)

x86 assembly (clang, -O2):
<__fixsfsi>:
push   %rax
call   1120 <__extendsfdf2>
mov    %eax,%edi
pop    %rax
jmp    1030 <__fixdfsi@plt>
xchg   %ax,%ax

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

LLVM IR (-O2):
define i64 @__fixsfsi(i64 %0) {
%2 = tail call i32 @__extendsfdf2(i64 %0)
%3 = tail call i64 @__fixdfsi(i32 %2)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ cuadrado(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf_s(char *, int *);
int /*<<< orphan*/ system(char *);
int main() {
  int num;
  printf("Dame un parametro para determinar el nombre de lado del cuadrado: ");
  scanf_s("%i", &num);
  cuadrado(num);
  system("pause");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
lea    0xee1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <scanf_s@plt>
mov    -0x8(%rbp),%edi
call   1050 <cuadrado@plt>
lea    0xecc(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
lea    0xeef(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf_s@plt>
mov    0x4(%rsp),%edi
call   1050 <cuadrado@plt>
lea    0xed8(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [67 x i8] c"Dame un parametro para determinar el nombre de lado del cuadrado: \00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf_s(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @cuadrado(i32 %5)
%7 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [67 x i8] c"Dame un parametro para determinar el nombre de lado del cuadrado: \00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf_s(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @cuadrado(i32 %5)
%7 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ requestor;
};
struct TYPE_4__ {
  TYPE_1__ xselection;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xselection_requestor(void *_p) {
  return (unsigned long)((XEvent *)_p)->xselection.requestor;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i64 @get_XEvent_xselection_requestor(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @get_XEvent_xselection_requestor(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t _be_16(uint16_t s) {
  uint16_t ret = s;
  ret = (s >> 8) & 0x00ffU;
  ret += (s << 8) & 0xff00U;
  return ret;
}


x86 assembly (clang, -O0):
<_be_16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
and    $0xff00,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_be_16>:
rol    $0x8,%di
movzwl %di,%eax
ret

LLVM IR (-O0):
define i32 @_be_16(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
store i32 %4, i32* %3
%5 = load i32, i32* %2
%6 = ashr i32 %5, 8
%7 = and i32 %6, 255
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = shl i32 %8, 8
%10 = and i32 %9, 65280
%11 = load i32, i32* %3
%12 = add i32 %11, %10
store i32 %12, i32* %3
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @_be_16(i32 %0) {
%2 = trunc i32 %0 to i16
%3 = tail call i16 @llvm.bswap.i16(i16 %2)
%4 = zext i16 %3 to i32
ret i32 %4
}
void send_server_list(struct bufferevent *bev) { (void)bev; }


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

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

LLVM IR (-O0):
%struct.bufferevent = type opaque
define void @send_server_list(%struct.bufferevent* %0) {
%2 = alloca %struct.bufferevent*
store %struct.bufferevent* %0, %struct.bufferevent** %2
%3 = load %struct.bufferevent*, %struct.bufferevent** %2
ret void
}

LLVM IR (-O2):
%struct.bufferevent = type opaque
define void @send_server_list(%struct.bufferevent* nocapture %0) {
ret void
}
void mac_real(const float *x, const float *h, float *y) {
  y[0] += x[0] * h[0];
  y[1] += x[1] * h[0];
}


x86 assembly (clang, -O0):
<mac_real>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movss  0x4(%rax),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mac_real>:
movss  (%rdi),%xmm0
mulss  (%rsi),%xmm0
addss  (%rdx),%xmm0
movss  %xmm0,(%rdx)
movss  0x4(%rdi),%xmm0
mulss  (%rsi),%xmm0
addss  0x4(%rdx),%xmm0
movss  %xmm0,0x4(%rdx)
ret

LLVM IR (-O0):
define void @mac_real(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float*, float** %4
%8 = getelementptr inbounds float, float* %7, i64 0
%9 = load float, float* %8
%10 = load float*, float** %5
%11 = getelementptr inbounds float, float* %10, i64 0
%12 = load float, float* %11
%13 = load float*, float** %6
%14 = getelementptr inbounds float, float* %13, i64 0
%15 = load float, float* %14
%16 = call float @llvm.fmuladd.f32(float %9, float %12, float %15)
store float %16, float* %14
%17 = load float*, float** %4
%18 = getelementptr inbounds float, float* %17, i64 1
%19 = load float, float* %18
%20 = load float*, float** %5
%21 = getelementptr inbounds float, float* %20, i64 0
%22 = load float, float* %21
%23 = load float*, float** %6
%24 = getelementptr inbounds float, float* %23, i64 1
%25 = load float, float* %24
%26 = call float @llvm.fmuladd.f32(float %19, float %22, float %25)
store float %26, float* %24
ret void
}

LLVM IR (-O2):
define void @mac_real(float* nocapture %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %0
%5 = load float, float* %1
%6 = load float, float* %2
%7 = tail call float @llvm.fmuladd.f32(float %4, float %5, float %6)
store float %7, float* %2
%8 = getelementptr inbounds float, float* %0, i64 1
%9 = load float, float* %8
%10 = load float, float* %1
%11 = getelementptr inbounds float, float* %2, i64 1
%12 = load float, float* %11
%13 = tail call float @llvm.fmuladd.f32(float %9, float %10, float %12)
store float %13, float* %11
ret void
}
/* Variables and functions */
float __nv_coshf(float);
float coshf(float __a) { return __nv_coshf(__a); }


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

x86 assembly (clang, -O2):
<coshf>:
jmp    1030 <__nv_coshf@plt>

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

LLVM IR (-O2):
define float @coshf(float %0) {
%2 = tail call float @__nv_coshf(float %0)
ret float %2
}
int test_imm_79uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x79 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_79uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 519691042816
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
void read_line(char *buffer) {
  fgets(buffer, 256, stdin);
  if (buffer == NULL) {
    fprintf(stderr, "*** craSh: failed to read line from stdin ***\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<read_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea1(%rip),%rax
mov    (%rax),%edx
mov    $0x100,%esi
call   1030 <fgets@plt>
cmpq   $0x0,-0x8(%rbp)
jne    117d <read_line+0x4d>
mov    0x2e73(%rip),%rax
mov    (%rax),%edi
lea    0xe92(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_line>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ead(%rip),%rax
mov    (%rax),%edx
mov    $0x100,%esi
call   1030 <fgets@plt>
test   %rbx,%rbx
je     114e <read_line+0x1e>
pop    %rbx
ret
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
lea    0xea2(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stdin = global i32 0
@stderr = global i32 0
@.str = [47 x i8] c"*** craSh: failed to read line from stdin ***\0A\00"
define void @read_line(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @stdin
%5 = call i32 @fgets(i8* %3, i32 256, i32 %4)
%6 = load i8*, i8** %2
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %1
ret void
}

LLVM IR (-O2):
@stdin = global i32 0
@stderr = global i32 0
@.str = [47 x i8] c"*** craSh: failed to read line from stdin ***\0A\00"
define void @read_line(i8* %0) {
%2 = load i32, i32* @stdin
%3 = tail call i32 @fgets(i8* %0, i32 256, i32 %2)
%4 = icmp eq i8* %0, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %1
ret void
}
unsigned int hashf_string(const void *keyarg) {
  register const unsigned char *key;
  register unsigned int h;
  register unsigned char c;
  key = keyarg;
  for (h = 0; (c = *key++);)
    ((h) = 0x63c63cd9 * (h) + 0x9c39c33d + (c));
  return (h);
}


x86 assembly (clang, -O0):
<hashf_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    %al,-0x15(%rbp)
cmp    $0x0,%al
je     114d <hashf_string+0x4d>
imul   $0x63c63cd9,-0x14(%rbp),%eax
add    $0x9c39c33d,%eax
movzbl -0x15(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <hashf_string+0x17>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashf_string>:
mov    (%rdi),%cl
test   %cl,%cl
je     112c <hashf_string+0x2c>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
imul   $0x63c63cd9,%eax,%eax
movzbl %cl,%ecx
add    %ecx,%eax
add    $0x9c39c33d,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hashf_string+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hashf_string(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %13, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i32 [ %12, %4 ], [ 0, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = mul i32 %7, 1673936089
%10 = add i32 %9, -1673936067
%11 = zext i8 %5 to i32
%12 = add i32 %10, %11
%13 = load i8, i8* %8
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i32 [ 0, %1 ], [ %12, %4 ]
ret i32 %16
}
/* Type definitions */
struct sip_msg {
  int dummy;
};
struct fis_param {
  int dummy;
};

/* Variables and functions */
int ops_pushto_avp(struct sip_msg *, struct fis_param *, struct fis_param *);
int w_pushto_avps(struct sip_msg *msg, char *destination, char *param) {
  return ops_pushto_avp(msg, (struct fis_param *)destination,
                        (struct fis_param *)param);
}


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

x86 assembly (clang, -O2):
<w_pushto_avps>:
jmp    1030 <ops_pushto_avp@plt>

LLVM IR (-O0):
%struct.sip_msg = type { i32 }
%struct.fis_param = type { i32 }
define i32 @w_pushto_avps(%struct.sip_msg* %0, i8* %1, i8* %2) {
%4 = alloca %struct.sip_msg*
%5 = alloca i8*
%6 = alloca i8*
store %struct.sip_msg* %0, %struct.sip_msg** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load %struct.sip_msg*, %struct.sip_msg** %4
%8 = load i8*, i8** %5
%9 = bitcast i8* %8 to %struct.fis_param*
%10 = load i8*, i8** %6
%11 = bitcast i8* %10 to %struct.fis_param*
%12 = call i32 @ops_pushto_avp(%struct.sip_msg* %7, %struct.fis_param* %9, %struct.fis_param* %11)
ret i32 %12
}

LLVM IR (-O2):
%struct.sip_msg = type { i32 }
%struct.fis_param = type { i32 }
define i32 @w_pushto_avps(%struct.sip_msg* %0, i8* %1, i8* %2) {
%4 = bitcast i8* %1 to %struct.fis_param*
%5 = bitcast i8* %2 to %struct.fis_param*
%6 = tail call i32 @ops_pushto_avp(%struct.sip_msg* %0, %struct.fis_param* %4, %struct.fis_param* %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ arm_parith_op();
int /*<<< orphan*/ arm_parith_qdsub(int /*<<< orphan*/);
void arm_qdsub() { arm_parith_qdsub(arm_parith_op()); }


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

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

LLVM IR (-O0):
define void @arm_qdsub() {
%1 = call i32 (...) @arm_parith_op()
%2 = call i32 @arm_parith_qdsub(i32 %1)
ret void
}

LLVM IR (-O2):
define void @arm_qdsub() {
%1 = tail call i32 (...) @arm_parith_op()
%2 = tail call i32 @arm_parith_qdsub(i32 %1)
ret void
}
int hostapd_init_wps_complete(struct hostapd_data *hapd) { return 0; }


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

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

LLVM IR (-O0):
%struct.hostapd_data = type opaque
define i32 @hostapd_init_wps_complete(%struct.hostapd_data* %0) {
%2 = alloca %struct.hostapd_data*
store %struct.hostapd_data* %0, %struct.hostapd_data** %2
ret i32 0
}

LLVM IR (-O2):
%struct.hostapd_data = type opaque
define i32 @hostapd_init_wps_complete(%struct.hostapd_data* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ putchar(char);
main() {
  char c1, c2;
  printf("Please insert two charaters:\n");
  c1 = getchar();
  getchar();
  c2 = getchar();
  printf("You entered:\n");
  putchar(c1);
  printf("\n");
  putchar(c2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1050 <getchar@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0x2(%rbp)
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
movsbl -0x1(%rbp),%edi
call   1030 <putchar@plt>
lea    0xeaf(%rip),%rdi
call   1040 <printf@plt>
movsbl -0x2(%rbp),%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xec6(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %eax,%ebp
lea    0xebe(%rip),%rdi
call   1040 <puts@plt>
movsbl %bl,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movsbl %bpl,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Please insert two charaters:\0A\00"
@.str.1 = [14 x i8] c"You entered:\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i8
%3 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%4 = call signext i8 (...) @getchar()
store i8 %4, i8* %1
%5 = call signext i8 (...) @getchar()
%6 = call signext i8 (...) @getchar()
store i8 %6, i8* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%8 = load i8, i8* %1
%9 = call i32 @putchar(i8 signext %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%11 = load i8, i8* %2
%12 = call i32 @putchar(i8 signext %11)
ret i32 0
}

LLVM IR (-O2):
@str = [29 x i8] c"Please insert two charaters:\00"
@str.3 = [13 x i8] c"You entered:\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%2 = tail call signext i8 (...) @getchar()
%3 = tail call signext i8 (...) @getchar()
%4 = tail call signext i8 (...) @getchar()
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.3, i64 0, i64 0))
%6 = tail call i32 @putchar(i8 signext %2)
%7 = tail call i32 bitcast (i32 (i8)* @putchar to i32 (i32)*)(i32 10)
%8 = tail call i32 @putchar(i8 signext %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int chown(const char __attribute__((unused)) * path,
          uid_t __attribute__((unused)) owner,
          gid_t __attribute__((unused)) group) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @chown(i8* nocapture readnone %0, i32 %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void clear_scene() { printf("\e[1;1H\e[2J"); }


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

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

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

LLVM IR (-O2):
@.str = [11 x i8] c"\1B[1;1H\1B[2J\00"
define void @clear_scene() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
void NV21ToRGB24Row_NEON() {}


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

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

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

LLVM IR (-O2):
define void @NV21ToRGB24Row_NEON() {
ret void
}
int *freq_2_from_input(char one_byte) {
  static int a[2];
  for (int i = 0; i < 2; ++i) {
    a[i] = 400 + (unsigned char)((one_byte >> (4 - (i * 4))) & 0xF) * 200;
  }
  return a;
}


x86 assembly (clang, -O0):
<freq_2_from_input>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    115c <freq_2_from_input+0x5c>
movsbl -0x1(%rbp),%eax
mov    -0x8(%rbp),%edx
shl    $0x2,%edx
mov    $0x4,%ecx
sub    %edx,%ecx
sar    %cl,%eax
and    $0xf,%eax
movzbl %al,%eax
imul   $0xc8,%eax,%edx
add    $0x190,%edx
movslq -0x8(%rbp),%rcx
lea    0x2ed9(%rip),%rax
mov    %edx,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1111 <freq_2_from_input+0x11>
lea    0x2ec1(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<freq_2_from_input>:
movzbl %dil,%eax
shr    $0x4,%eax
imul   $0xc8,%eax,%eax
add    $0x190,%eax
mov    %eax,0x2f0c(%rip)
lea    0x2f05(%rip),%rax
and    $0xf,%edi
imul   $0xc8,%edi,%ecx
add    $0x190,%ecx
mov    %ecx,0x2ef4(%rip)
ret

LLVM IR (-O0):
@freq_2_from_input.a = internal global [2 x i32] zeroinitializer
define i32* @freq_2_from_input(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
store i32 0, i32* %3
br label %4
4: ; preds = %22, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 2
br i1 %6, label %7, label %25
7: ; preds = %4
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = load i32, i32* %3
%11 = mul nsw i32 %10, 4
%12 = sub nsw i32 4, %11
%13 = ashr i32 %9, %12
%14 = and i32 %13, 15
%15 = trunc i32 %14 to i8
%16 = zext i8 %15 to i32
%17 = mul nsw i32 %16, 200
%18 = add nsw i32 400, %17
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [2 x i32], [2 x i32]* @freq_2_from_input.a, i64 0, i64 %20
store i32 %18, i32* %21
br label %22
22: ; preds = %7
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1
store i32 %24, i32* %3
br label %4
25: ; preds = %4
ret i32* getelementptr inbounds ([2 x i32], [2 x i32]* @freq_2_from_input.a, i64 0, i64 0)
}

LLVM IR (-O2):
@freq_2_from_input.a = internal global [2 x i32] zeroinitializer
define i32* @freq_2_from_input(i8 signext %0) {
%2 = zext i8 %0 to i32
%3 = lshr i32 %2, 4
%4 = mul nuw nsw i32 %3, 200
%5 = add nuw nsw i32 %4, 400
store i32 %5, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @freq_2_from_input.a, i64 0, i64 0)
%6 = and i32 %2, 15
%7 = mul nuw nsw i32 %6, 200
%8 = add nuw nsw i32 %7, 400
store i32 %8, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @freq_2_from_input.a, i64 0, i64 1)
ret i32* getelementptr inbounds ([2 x i32], [2 x i32]* @freq_2_from_input.a, i64 0, i64 0)
}
int execute_ssetmask() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_ssetmask() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x04() {
  Assert_real((islower(4) == 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_islower.c",
              25, ("islower should be 0 for 0x04"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x04>:
push   %rax
mov    $0x4,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x19,%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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x04\00"
define void @t_islower_0x04() {
%1 = call i64 @islower(i32 4)
%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 25, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x04\00"
define void @t_islower_0x04() {
%1 = tail call i64 @islower(i32 4)
%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 25, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ S_IFREG;
int /*<<< orphan*/ label_context_clear();
int label_context_set(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ write_env_file(char const *, char **);
int write_env_file_label(const char *fname, char **l) {
  int r;
  r = label_context_set(fname, S_IFREG);
  if (r < 0)
    return r;
  write_env_file(fname, l);
  label_context_clear();
  return r;
}


x86 assembly (clang, -O0):
<write_env_file_label>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2e9d(%rip),%rax
mov    (%rax),%esi
call   1050 <label_context_set@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    116a <write_env_file_label+0x3a>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1184 <write_env_file_label+0x54>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <write_env_file@plt>
mov    $0x0,%al
call   1040 <label_context_clear@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_env_file_label>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    0x2ea6(%rip),%rax
mov    (%rax),%esi
call   1050 <label_context_set@plt>
mov    %eax,%ebx
test   %eax,%eax
js     1161 <write_env_file_label+0x31>
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <write_env_file@plt>
xor    %eax,%eax
call   1040 <label_context_clear@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@S_IFREG = global i32 0
define i32 @write_env_file_label(i8* %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i32
store i8* %0, i8** %4
store i8** %1, i8*** %5
%7 = load i8*, i8** %4
%8 = load i32, i32* @S_IFREG
%9 = call i32 @label_context_set(i8* %7, i32 %8)
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = load i32, i32* %6
store i32 %13, i32* %3
br label %20
14: ; preds = %2
%15 = load i8*, i8** %4
%16 = load i8**, i8*** %5
%17 = call i32 @write_env_file(i8* %15, i8** %16)
%18 = call i32 (...) @label_context_clear()
%19 = load i32, i32* %6
store i32 %19, i32* %3
br label %20
20: ; preds = %14, %12
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
@S_IFREG = global i32 0
define i32 @write_env_file_label(i8* %0, i8** %1) {
%3 = load i32, i32* @S_IFREG
%4 = tail call i32 @label_context_set(i8* %0, i32 %3)
%5 = icmp slt i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = tail call i32 @write_env_file(i8* %0, i8** %1)
%8 = tail call i32 (...) @label_context_clear()
br label %9
9: ; preds = %2, %6
ret i32 %4
}
int ceph_fscache_register(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ceph_fscache_register() {
ret i32 0
}
void check_latencytop() {}


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

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

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

LLVM IR (-O2):
define void @check_latencytop() {
ret void
}
int do_207() { return 207; }


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

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

LLVM IR (-O0):
define i32 @do_207() {
ret i32 207
}

LLVM IR (-O2):
define i32 @do_207() {
ret i32 207
}
/* Variables and functions */
int /*<<< orphan*/ div_num(unsigned int, int *, int *, int *);
int /*<<< orphan*/ printf(char *, int, int, int);
int main(void) {
  unsigned int num = 0x29387200;
  int first, second, third;
  div_num(num, &first, &second, &third);
  printf("%d %d %d\n", first, second, third);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x29387200,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
lea    -0x14(%rbp),%rcx
call   1040 <div_num@plt>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
mov    $0x29387200,%edi
call   1040 <div_num@plt>
mov    0x14(%rsp),%esi
mov    0x10(%rsp),%edx
mov    0xc(%rsp),%ecx
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"%d %d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @div_num(i32 691565056, i32* %1, i32* %2, i32* %3)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9, i32 %10)
ret i32 0
}
int main(void) {
  int i = 0;
  while (1) {
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    %eax,-0x8(%rbp)
jmp    1112 <main+0x12>

x86 assembly (clang, -O2):
<main>:
jmp    1100 <main>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %0, %3
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
store i32 %5, i32* %2
br label %3
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Type definitions */
struct in_addr {
  int dummy;
};
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ mjt_ntop4(struct in_addr *, char *, int);
const char *udns_ntoa(struct in_addr addr) {
  static char buf[4 * 4];
  mjt_ntop4(&addr, buf, sizeof(buf));
  return buf;
}


x86 assembly (clang, -O0):
<udns_ntoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
lea    0x2f1a(%rip),%rsi
mov    $0x10,%edx
call   1030 <mjt_ntop4@plt>
lea    0x2f09(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<udns_ntoa>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,0x8(%rsp)
lea    0x2f20(%rip),%rbx
lea    0x8(%rsp),%rdi
mov    %rbx,%rsi
mov    $0x10,%edx
call   1030 <mjt_ntop4@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.in_addr = type { i32 }
@udns_ntoa.buf = internal global [16 x i8] zeroinitializer
define i8* @udns_ntoa(i32 %0) {
%2 = alloca %struct.in_addr
%3 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %2, i32 0, i32 0
store i32 %0, i32* %3
%4 = call i32 @mjt_ntop4(%struct.in_addr* %2, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @udns_ntoa.buf, i64 0, i64 0), i32 16)
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @udns_ntoa.buf, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.in_addr = type { i32 }
@udns_ntoa.buf = internal global [16 x i8] zeroinitializer
define i8* @udns_ntoa(i32 %0) {
%2 = alloca %struct.in_addr
%3 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %2, i64 0, i32 0
store i32 %0, i32* %3
%4 = call i32 @mjt_ntop4(%struct.in_addr* %2, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @udns_ntoa.buf, i64 0, i64 0), i32 16)
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @udns_ntoa.buf, i64 0, i64 0)
}
/* Variables and functions */
int strlen(char const *);
int write(int, char const *, int);
int serialport_write(int fd, const char *str) {
  int len = strlen(str);
  int n = write(fd, str, len);
  if (n != len)
    return -1;
  return n;
}


x86 assembly (clang, -O0):
<serialport_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <write@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
je     1165 <serialport_write+0x45>
movl   $0xffffffff,-0x4(%rbp)
jmp    116b <serialport_write+0x4b>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serialport_write>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %edi,%r14d
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %eax,%ebp
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
cmp    %ebp,%eax
mov    $0xffffffff,%ecx
cmovne %ecx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @serialport_write(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @write(i32 %0, i8* %1, i32 %3)
%5 = icmp eq i32 %4, %3
%6 = select i1 %5, i32 %4, i32 -1
ret i32 %6
}
void plugin_exit_uname(void) {}


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

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

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

LLVM IR (-O2):
define void @plugin_exit_uname() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGCHLD;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ daemon(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ signal(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ smtp_ser();
int main(void) {
  daemon(0, 0);
  signal(SIGCHLD, SIG_IGN);
  smtp_ser();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %esi,%esi
mov    %esi,%edi
call   1040 <daemon@plt>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
mov    0x2e88(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
mov    $0x0,%al
call   1050 <smtp_ser@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1040 <daemon@plt>
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
mov    0x2e96(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
xor    %eax,%eax
call   1050 <smtp_ser@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SIGCHLD = global i32 0
@SIG_IGN = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @daemon(i32 0, i32 0)
%3 = load i32, i32* @SIGCHLD
%4 = load i32, i32* @SIG_IGN
%5 = call i32 @signal(i32 %3, i32 %4)
%6 = call i32 (...) @smtp_ser()
ret i32 0
}

LLVM IR (-O2):
@SIGCHLD = global i32 0
@SIG_IGN = global i32 0
define i32 @main() {
%1 = tail call i32 @daemon(i32 0, i32 0)
%2 = load i32, i32* @SIGCHLD
%3 = load i32, i32* @SIG_IGN
%4 = tail call i32 @signal(i32 %2, i32 %3)
%5 = tail call i32 (...) @smtp_ser()
ret i32 0
}
/* Type definitions */
struct arglist {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void custom_custom(const struct arglist *adesc, FILE *hfile) {}


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

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

LLVM IR (-O0):
%struct.arglist = type { i32 }
define void @custom_custom(%struct.arglist* %0, i32* %1) {
%3 = alloca %struct.arglist*
%4 = alloca i32*
store %struct.arglist* %0, %struct.arglist** %3
store i32* %1, i32** %4
ret void
}

LLVM IR (-O2):
%struct.arglist = type { i32 }
define void @custom_custom(%struct.arglist* nocapture %0, i32* nocapture %1) {
ret void
}