xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ gotoxy(int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ waitForAnyKey();
void pauseMenu(void) {
  int i;
  gotoxy(28, 23);
  printf("**Paused**");
  waitForAnyKey();
  gotoxy(28, 23);
  printf("            ");
  return;
}


x86 assembly (clang, -O0):
<pauseMenu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1c,%edi
mov    $0x17,%esi
call   1050 <gotoxy@plt>
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <waitForAnyKey@plt>
mov    $0x1c,%edi
mov    $0x17,%esi
call   1050 <gotoxy@plt>
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pauseMenu>:
push   %rax
mov    $0x1c,%edi
mov    $0x17,%esi
call   1050 <gotoxy@plt>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <waitForAnyKey@plt>
mov    $0x1c,%edi
mov    $0x17,%esi
call   1050 <gotoxy@plt>
lea    0xea2(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"**Paused**\00"
@.str.1 = [13 x i8] c" \00"
define void @pauseMenu() {
%1 = alloca i32
%2 = call i32 @gotoxy(i32 28, i32 23)
%3 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @waitForAnyKey()
%5 = call i32 @gotoxy(i32 28, i32 23)
%6 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"**Paused**\00"
@.str.1 = [13 x i8] c" \00"
define void @pauseMenu() {
%1 = tail call i32 @gotoxy(i32 28, i32 23)
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @waitForAnyKey()
%4 = tail call i32 @gotoxy(i32 28, i32 23)
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct vec3 {
  int dummy;
};

/* Variables and functions */
float vec3_distance(struct vec3 *);
int /*<<< orphan*/ vec3_scale(struct vec3 *, float);
void vec3_normalize(struct vec3 *vec) {
  float distance = vec3_distance(vec);
  if (distance != 0.0) {
    vec3_scale(vec, 1.0f / distance);
  }
}


x86 assembly (clang, -O0):
<vec3_normalize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <vec3_distance@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    115b <vec3_normalize+0x3b>
jp     115b <vec3_normalize+0x3b>
jmp    1171 <vec3_normalize+0x51>
mov    -0x8(%rbp),%rdi
movss  0xe99(%rip),%xmm0
divss  -0xc(%rbp),%xmm0
call   1040 <vec3_scale@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec3_normalize>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec3_distance@plt>
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1133 <vec3_normalize+0x13>
jnp    114b <vec3_normalize+0x2b>
movss  0xec5(%rip),%xmm1
divss  %xmm0,%xmm1
mov    %rbx,%rdi
movaps %xmm1,%xmm0
pop    %rbx
jmp    1040 <vec3_scale@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec3 = type { i32 }
define void @vec3_normalize(%struct.vec3* %0) {
%2 = alloca %struct.vec3*
%3 = alloca float
store %struct.vec3* %0, %struct.vec3** %2
%4 = load %struct.vec3*, %struct.vec3** %2
%5 = call float @vec3_distance(%struct.vec3* %4)
store float %5, float* %3
%6 = load float, float* %3
%7 = fpext float %6 to double
%8 = fcmp une double %7, 0.000000e+00
br i1 %8, label %9, label %14
9: ; preds = %1
%10 = load %struct.vec3*, %struct.vec3** %2
%11 = load float, float* %3
%12 = fdiv float 1.000000e+00, %11
%13 = call i32 @vec3_scale(%struct.vec3* %10, float %12)
br label %14
14: ; preds = %9, %1
ret void
}

LLVM IR (-O2):
%struct.vec3 = type { i32 }
define void @vec3_normalize(%struct.vec3* %0) {
%2 = tail call float @vec3_distance(%struct.vec3* %0)
%3 = fcmp une float %2, 0.000000e+00
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = fdiv float 1.000000e+00, %2
%6 = tail call i32 @vec3_scale(%struct.vec3* %0, float %5)
br label %7
7: ; preds = %4, %1
ret void
}
void USBHostMode(unsigned long ulBase) {
  ;
  (*((volatile unsigned char *)(ulBase + 0x0000041C))) = 0x00000002;
}


x86 assembly (clang, -O0):
<USBHostMode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x2,0x41c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBHostMode>:
movb   $0x2,0x41c(%rdi)
ret

LLVM IR (-O0):
define void @USBHostMode(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 1052
%5 = inttoptr i64 %4 to i8*
store volatile i8 2, i8* %5
ret void
}

LLVM IR (-O2):
define void @USBHostMode(i64 %0) {
%2 = add i64 %0, 1052
%3 = inttoptr i64 %2 to i8*
store volatile i8 2, i8* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ finish();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
int flush() {
  while (!finish())
    ;
  fprintf(stdout, "\n");
  return (0);
}


x86 assembly (clang, -O0):
<flush>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <flush+0x9>
mov    $0x0,%al
call   1030 <finish@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1145 <flush+0x25>
jmp    114a <flush+0x2a>
jmp    1129 <flush+0x9>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
lea    0xea6(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<flush>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <finish@plt>
test   %eax,%eax
je     1130 <flush+0x10>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
lea    0xeb5(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [2 x i8] c"\0A\00"
define i32 @flush() {
br label %1
1: ; preds = %5, %0
%2 = call i32 (...) @finish()
%3 = icmp ne i32 %2, 0
%4 = xor i1 %3, true
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
%7 = load i32, i32* @stdout
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [2 x i8] c"\0A\00"
define i32 @flush() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @finish()
%3 = icmp eq i32 %2, 0
br i1 %3, label %1, label %4
4: ; preds = %1
%5 = load i32, i32* @stdout
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int64_t mul_int64_t(int64_t a, int64_t b) { return a * b; }


x86 assembly (clang, -O0):
<mul_int64_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mul_int64_t>:
mov    %edi,%eax
imul   %esi,%eax
ret

LLVM IR (-O0):
define i32 @mul_int64_t(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 = load i32, i32* %4
%7 = mul nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @mul_int64_t(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
ret i32 %3
}
void rop3_157_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = T | *D;
  stk2 = S & stk3;
  stk1 = *D ^ stk2;
  stk1 = ~stk1;
  *D = stk1;
}


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

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

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

LLVM IR (-O2):
define void @rop3_157_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %4, %2
%6 = and i8 %5, %1
%7 = xor i8 %4, %6
%8 = xor i8 %7, -1
store i8 %8, i8* %0
ret void
}
void main(void) {
  short int ary[5] = {5, 4, 3, 2, 1};
  short int *pi, i;
  unsigned char *pc;
  pc = (unsigned char *)ary;
  i = *(pc + 8);
  pi = ary;
  i = *(pi + 2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0xef5(%rip),%rax
mov    %rax,-0xa(%rbp)
mov    0xef2(%rip),%ax
mov    %ax,-0x2(%rbp)
lea    -0xa(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movzbl 0x8(%rax),%eax
mov    %ax,-0x1a(%rbp)
lea    -0xa(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%ax
mov    %ax,-0x1a(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.ary = [5 x i16] [i16 5, i16 4, i16 3, i16 2, i16 1]
define void @main() {
%1 = alloca [5 x i16]
%2 = alloca i16*
%3 = alloca i16
%4 = alloca i8*
%5 = bitcast [5 x i16]* %1 to i8*
%6 = getelementptr inbounds [5 x i16], [5 x i16]* %1, i64 0, i64 0
%7 = bitcast i16* %6 to i8*
store i8* %7, i8** %4
%8 = load i8*, i8** %4
%9 = getelementptr inbounds i8, i8* %8, i64 8
%10 = load i8, i8* %9
%11 = zext i8 %10 to i16
store i16 %11, i16* %3
%12 = getelementptr inbounds [5 x i16], [5 x i16]* %1, i64 0, i64 0
store i16* %12, i16** %2
%13 = load i16*, i16** %2
%14 = getelementptr inbounds i16, i16* %13, i64 2
%15 = load i16, i16* %14
store i16 %15, i16* %3
ret void
}

LLVM IR (-O2):
define void @main() {
ret void
}
float kyklos(float x) { return 2 * 3.14159 * x; }


x86 assembly (clang, -O0):
<kyklos>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xee6(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<kyklos>:
cvtss2sd %xmm0,%xmm0
mulsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @kyklos(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fmul double 6.283180e+00, %4
%6 = fptrunc double %5 to float
ret float %6
}

LLVM IR (-O2):
define float @kyklos(float %0) {
%2 = fpext float %0 to double
%3 = fmul double %2, 6.283180e+00
%4 = fptrunc double %3 to float
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ xxx();
int /*<<< orphan*/ yyy();
int main2() {
  yyy();
  xxx();
}


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

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

LLVM IR (-O0):
define i32 @main2() {
%1 = alloca i32
%2 = call i32 (...) @yyy()
%3 = call i32 (...) @xxx()
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @main2() {
%1 = tail call i32 (...) @yyy()
%2 = tail call i32 (...) @xxx()
ret i32 undef
}
unsigned char sim_read_byte(int id) { return 0; }


x86 assembly (clang, -O0):
<sim_read_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
movzbl %al,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define zeroext i8 @sim_read_byte(i32 %0) {
ret i8 0
}
int qd_gt_qd_d(const double *a, double b) {
  return (a[0] > b || (a[0] == b && a[1] > 0.0)) ? 1 : 0;
}


x86 assembly (clang, -O0):
<qd_gt_qd_d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    $0x1,%al
ucomisd -0x10(%rbp),%xmm0
mov    %al,-0x11(%rbp)
ja     115f <qd_gt_qd_d+0x5f>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
xor    %eax,%eax
ucomisd -0x10(%rbp),%xmm0
mov    %al,-0x12(%rbp)
jne    1159 <qd_gt_qd_d+0x59>
jp     1159 <qd_gt_qd_d+0x59>
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qd_gt_qd_d>:
movsd  (%rdi),%xmm1
mov    $0x1,%eax
ucomisd %xmm0,%xmm1
ja     1129 <qd_gt_qd_d+0x29>
ucomisd %xmm0,%xmm1
jne    112a <qd_gt_qd_d+0x2a>
jp     112a <qd_gt_qd_d+0x2a>
movsd  0x8(%rdi),%xmm0
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm1,%xmm0
seta   %al
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @qd_gt_qd_d(double* %0, double %1) {
%3 = alloca double*
%4 = alloca double
store double* %0, double** %3
store double %1, double* %4
%5 = load double*, double** %3
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = load double, double* %4
%9 = fcmp ogt double %7, %8
br i1 %9, label %23, label %10
10: ; preds = %2
%11 = load double*, double** %3
%12 = getelementptr inbounds double, double* %11, i64 0
%13 = load double, double* %12
%14 = load double, double* %4
%15 = fcmp oeq double %13, %14
br i1 %15, label %16, label %21
16: ; preds = %10
%17 = load double*, double** %3
%18 = getelementptr inbounds double, double* %17, i64 1
%19 = load double, double* %18
%20 = fcmp ogt double %19, 0.000000e+00
br label %21
21: ; preds = %16, %10
%22 = phi i1 [ false, %10 ], [ %20, %16 ]
br label %23
23: ; preds = %21, %2
%24 = phi i1 [ true, %2 ], [ %22, %21 ]
%25 = zext i1 %24 to i64
%26 = select i1 %24, i32 1, i32 0
ret i32 %26
}

LLVM IR (-O2):
define i32 @qd_gt_qd_d(double* nocapture %0, double %1) {
%3 = load double, double* %0
%4 = fcmp ogt double %3, %1
br i1 %4, label %12, label %5
5: ; preds = %2
%6 = fcmp oeq double %3, %1
br i1 %6, label %7, label %12
7: ; preds = %5
%8 = getelementptr inbounds double, double* %0, i64 1
%9 = load double, double* %8
%10 = fcmp ogt double %9, 0.000000e+00
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %5, %7, %2
%13 = phi i32 [ 1, %2 ], [ 0, %5 ], [ %11, %7 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ aaa(char *);
char *malloc(int);
int main(void) {
  char *x = malloc(10);
  aaa(x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xa,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <aaa@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call dereferenceable_or_null(10) i8* @malloc(i32 10)
%2 = tail call i32 @aaa(i8* %1)
ret i32 0
}
int test_imm_AAint64_midword_reg(long long val) {
  return ((val >> 16) & (0xAA << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_AAint64_midword_reg(i64 %0) {
%2 = and i64 %0, 11141120
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ HD44780_DisplayString(char *);
int /*<<< orphan*/ HD44780_Init();
int /*<<< orphan*/ HD44780_LocationSet(int, int);
void DISPLAY_Init() {
  HD44780_Init();
  HD44780_LocationSet(5 + 6, 0);
  HD44780_DisplayString("rpm");
  HD44780_LocationSet(0, 1);
  HD44780_DisplayString("duty:");
  HD44780_LocationSet(0 + 10, 1);
  HD44780_DisplayString("%");
}


x86 assembly (clang, -O0):
<DISPLAY_Init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <HD44780_Init@plt>
mov    $0xb,%edi
xor    %esi,%esi
call   1050 <HD44780_LocationSet@plt>
lea    0xeb2(%rip),%rdi
call   1030 <HD44780_DisplayString@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1050 <HD44780_LocationSet@plt>
lea    0xe9e(%rip),%rdi
call   1030 <HD44780_DisplayString@plt>
mov    $0xa,%edi
mov    $0x1,%esi
call   1050 <HD44780_LocationSet@plt>
lea    0xe89(%rip),%rdi
call   1030 <HD44780_DisplayString@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DISPLAY_Init>:
push   %rax
xor    %eax,%eax
call   1040 <HD44780_Init@plt>
mov    $0xb,%edi
xor    %esi,%esi
call   1050 <HD44780_LocationSet@plt>
lea    0xeb5(%rip),%rdi
call   1030 <HD44780_DisplayString@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1050 <HD44780_LocationSet@plt>
lea    0xea1(%rip),%rdi
call   1030 <HD44780_DisplayString@plt>
mov    $0xa,%edi
mov    $0x1,%esi
call   1050 <HD44780_LocationSet@plt>
lea    0xe8c(%rip),%rdi
pop    %rax
jmp    1030 <HD44780_DisplayString@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"rpm\00"
@.str.1 = [6 x i8] c"duty:\00"
@.str.2 = [2 x i8] c"%\00"
define void @DISPLAY_Init() {
%1 = call i32 (...) @HD44780_Init()
%2 = call i32 @HD44780_LocationSet(i32 11, i32 0)
%3 = call i32 @HD44780_DisplayString(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @HD44780_LocationSet(i32 0, i32 1)
%5 = call i32 @HD44780_DisplayString(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @HD44780_LocationSet(i32 10, i32 1)
%7 = call i32 @HD44780_DisplayString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"rpm\00"
@.str.1 = [6 x i8] c"duty:\00"
@.str.2 = [2 x i8] c"%\00"
define void @DISPLAY_Init() {
%1 = tail call i32 (...) @HD44780_Init()
%2 = tail call i32 @HD44780_LocationSet(i32 11, i32 0)
%3 = tail call i32 @HD44780_DisplayString(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @HD44780_LocationSet(i32 0, i32 1)
%5 = tail call i32 @HD44780_DisplayString(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @HD44780_LocationSet(i32 10, i32 1)
%7 = tail call i32 @HD44780_DisplayString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}
int wkd_read() {}


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

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

LLVM IR (-O0):
define i32 @wkd_read() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @wkd_read() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ IntDisable(int);
int /*<<< orphan*/ IntUnregister(int);
void I2SIntUnregister(unsigned long ulBase) {
  ;
  IntDisable(68);
  IntUnregister(68);
}


x86 assembly (clang, -O0):
<I2SIntUnregister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x44,%edi
call   1030 <IntDisable@plt>
mov    $0x44,%edi
call   1040 <IntUnregister@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2SIntUnregister>:
push   %rax
mov    $0x44,%edi
call   1030 <IntDisable@plt>
mov    $0x44,%edi
pop    %rax
jmp    1040 <IntUnregister@plt>

LLVM IR (-O0):
define void @I2SIntUnregister(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 @IntDisable(i32 68)
%4 = call i32 @IntUnregister(i32 68)
ret void
}

LLVM IR (-O2):
define void @I2SIntUnregister(i64 %0) {
%2 = tail call i32 @IntDisable(i32 68)
%3 = tail call i32 @IntUnregister(i32 68)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_ints(int, int, int, int);
int main() { print_ints(3, 79, 666, 42); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
mov    $0x4f,%esi
mov    $0x29a,%edx
mov    $0x2a,%ecx
call   1030 <print_ints@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
mov    $0x4f,%esi
mov    $0x29a,%edx
mov    $0x2a,%ecx
call   1030 <print_ints@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @print_ints(i32 3, i32 79, i32 666, i32 42)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @print_ints(i32 3, i32 79, i32 666, i32 42)
ret i32 0
}
void __DELETE_java_security_Permission(void *me, void *client_data) {}


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

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

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

LLVM IR (-O2):
define void @__DELETE_java_security_Permission(i8* nocapture %0, i8* nocapture %1) {
ret void
}
unsigned xrop3_127_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = T & S;
  stk1 = D & stk2;
  stk1 = ~stk1;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


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

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

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

LLVM IR (-O2):
define i32 @xrop3_127_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = and i8 %1, %0
%8 = zext i8 %7 to i32
%9 = xor i32 %8, -1
%10 = and i32 %4, %9
%11 = xor i32 %6, -1
%12 = or i32 %10, %11
%13 = xor i32 %4, -1
%14 = and i32 %13, %5
%15 = or i32 %12, %14
ret i32 %15
}
/* Variables and functions */
int fun_stub_base_4_stub(char, char);
int /*<<< orphan*/ printf(char *, int, ...);
int fun_stub_base_4_call(char a, char b) {
  printf("fun_stub_base_4_call:a = %d, b = %d\n", a, b);
  int x = fun_stub_base_4_stub(a, b);
  printf("fun_stub_base_4_stub return %d\n", x);
  return x;
}


x86 assembly (clang, -O0):
<fun_stub_base_4_call>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%esi
movsbl -0x2(%rbp),%edx
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1(%rbp),%al
movsbl %al,%edi
movsbl -0x2(%rbp),%esi
call   1040 <fun_stub_base_4_stub@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_stub_base_4_call>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xed2(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1040 <fun_stub_base_4_stub@plt>
mov    %eax,%ebx
lea    0xeda(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [37 x i8] c"fun_stub_base_4_call:a = %d, b = %d\0A\00"
@.str.1 = [32 x i8] c"fun_stub_base_4_stub return %d\0A\00"
define i32 @fun_stub_base_4_call(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
%6 = load i8, i8* %3
%7 = sext i8 %6 to i32
%8 = load i8, i8* %4
%9 = sext i8 %8 to i32
%10 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %9)
%11 = load i8, i8* %3
%12 = load i8, i8* %4
%13 = call i32 @fun_stub_base_4_stub(i8 signext %11, i8 signext %12)
store i32 %13, i32* %5
%14 = load i32, i32* %5
%15 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %14)
%16 = load i32, i32* %5
ret i32 %16
}

LLVM IR (-O2):
@.str = [37 x i8] c"fun_stub_base_4_call:a = %d, b = %d\0A\00"
@.str.1 = [32 x i8] c"fun_stub_base_4_stub return %d\0A\00"
define i32 @fun_stub_base_4_call(i8 signext %0, i8 signext %1) {
%3 = sext i8 %0 to i32
%4 = sext i8 %1 to i32
%5 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
%6 = tail call i32 @fun_stub_base_4_stub(i8 signext %0, i8 signext %1)
%7 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 %6
}
/* Type definitions */
struct Foo {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int x = 34;
  int *p = (int *)(void *)(struct Foo *)(char *)&x;
  assert(*p == 34);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x22,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x22,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.Foo = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32 0, i32* %1
store i32 34, i32* %2
%4 = bitcast i32* %2 to i8*
%5 = bitcast i8* %4 to %struct.Foo*
%6 = bitcast %struct.Foo* %5 to i8*
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %3
%8 = load i32*, i32** %3
%9 = load i32, i32* %8
%10 = icmp eq i32 %9, 34
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
extern char *initial_query_users() {
  char *desc = "function per_user_foreign_permissions() {\n"
               "    return [];\n"
               "}\n";
  return desc;
}


x86 assembly (clang, -O0):
<initial_query_users>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [60 x i8] c"function per_user_foreign_permissions() {\0A return [];\0A}\0A\00"
define i8* @initial_query_users() {
%1 = alloca i8*
store i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
ret i8* %2
}

LLVM IR (-O2):
@.str = [60 x i8] c"function per_user_foreign_permissions() {\0A return [];\0A}\0A\00"
define i8* @initial_query_users() {
ret i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int JoystickButton(int);
int AnyJoystickButton() {
  int i;
  int result = 0;
  for (i = 0; i < 4; i++) {
    result = JoystickButton(i);
    if (result != 0)
      break;
  }
  return result;
}


x86 assembly (clang, -O0):
<AnyJoystickButton>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x4,-0x4(%rbp)
jge    115d <AnyJoystickButton+0x4d>
mov    -0x4(%rbp),%edi
call   1030 <JoystickButton@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     114a <AnyJoystickButton+0x3a>
jmp    115d <AnyJoystickButton+0x4d>
jmp    114f <AnyJoystickButton+0x3f>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1126 <AnyJoystickButton+0x16>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AnyJoystickButton>:
push   %rax
xor    %edi,%edi
call   1030 <JoystickButton@plt>
test   %eax,%eax
jne    1138 <AnyJoystickButton+0x28>
mov    $0x1,%edi
call   1030 <JoystickButton@plt>
test   %eax,%eax
jne    1138 <AnyJoystickButton+0x28>
mov    $0x2,%edi
call   1030 <JoystickButton@plt>
test   %eax,%eax
je     113a <AnyJoystickButton+0x2a>
pop    %rcx
ret
mov    $0x3,%edi
pop    %rax
jmp    1030 <JoystickButton@plt>

LLVM IR (-O0):
define i32 @AnyJoystickButton() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %2
store i32 0, i32* %1
br label %3
3: ; preds = %13, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 4
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = load i32, i32* %1
%8 = call i32 @JoystickButton(i32 %7)
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %6
br label %16
12: ; preds = %6
br label %13
13: ; preds = %12
%14 = load i32, i32* %1
%15 = add nsw i32 %14, 1
store i32 %15, i32* %1
br label %3
16: ; preds = %11, %3
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @AnyJoystickButton() {
%1 = tail call i32 @JoystickButton(i32 0)
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %11
3: ; preds = %0
%4 = tail call i32 @JoystickButton(i32 1)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = tail call i32 @JoystickButton(i32 2)
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = tail call i32 @JoystickButton(i32 3)
br label %11
11: ; preds = %9, %6, %3, %0
%12 = phi i32 [ %1, %0 ], [ %4, %3 ], [ %7, %6 ], [ %10, %9 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_193() {
  Assert_real((isqrt(193) == 13),
              "/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",
              970, ("Integer square root of 193 should be 13"));
}


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

x86 assembly (clang, -O2):
<t_sqrt_193>:
push   %rax
mov    $0xc1,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xd,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x3ca,%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 = [40 x i8] c"Integer square root of 193 should be 13\00"
define void @t_sqrt_193() {
%1 = call i32 @isqrt(i32 193)
%2 = icmp eq i32 %1, 13
%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 970, i8* getelementptr inbounds ([40 x i8], [40 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 = [40 x i8] c"Integer square root of 193 should be 13\00"
define void @t_sqrt_193() {
%1 = tail call i32 @isqrt(i32 193)
%2 = icmp eq i32 %1, 13
%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 970, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int get8(unsigned char **head) { return (int)*((*head)++); }


x86 assembly (clang, -O0):
<get8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,(%rcx)
movzbl (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get8>:
mov    (%rdi),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rdi)
movzbl (%rax),%eax
ret

LLVM IR (-O0):
define i32 @get8(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i32 1
store i8* %5, i8** %3
%6 = load i8, i8* %4
%7 = zext i8 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get8(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = getelementptr inbounds i8, i8* %2, i64 1
store i8* %3, i8** %0
%4 = load i8, i8* %2
%5 = zext i8 %4 to i32
ret i32 %5
}
/* Variables and functions */
scalar_t__ isalnum(char);
bool valid_word_char(char ch) { return isalnum(ch) || ch == '_'; }


x86 assembly (clang, -O0):
<valid_word_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    1146 <valid_word_char+0x36>
movsbl -0x1(%rbp),%eax
cmp    $0x5f,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<valid_word_char>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalnum@plt>
test   %rax,%rax
setne  %al
cmp    $0x5f,%bl
sete   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @valid_word_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @isalnum(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 95
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @valid_word_char(i8 signext %0) {
%2 = tail call i64 @isalnum(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = icmp eq i8 %0, 95
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ ofl_group_print(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ *open_memstream(char **, size_t *);
char *ofl_group_to_string(uint32_t group) {
  char *str;
  size_t str_size;
  FILE *stream = open_memstream(&str, &str_size);
  ofl_group_print(stream, group);
  fclose(stream);
  return str;
}


x86 assembly (clang, -O0):
<ofl_group_to_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <open_memstream@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1050 <ofl_group_print@plt>
mov    -0x20(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ofl_group_to_string>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %edi,%ebp
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1030 <open_memstream@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %ebp,%esi
call   1050 <ofl_group_print@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
mov    0x8(%rsp),%rax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @ofl_group_to_string(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32*
store i32 %0, i32* %2
%6 = call i32* @open_memstream(i8** %3, i64* %4)
store i32* %6, i32** %5
%7 = load i32*, i32** %5
%8 = load i32, i32* %2
%9 = call i32 @ofl_group_print(i32* %7, i32 %8)
%10 = load i32*, i32** %5
%11 = call i32 @fclose(i32* %10)
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define i8* @ofl_group_to_string(i32 %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = bitcast i8** %2 to i8*
%5 = bitcast i64* %3 to i8*
%6 = call i32* @open_memstream(i8** %2, i64* %3)
%7 = call i32 @ofl_group_print(i32* %6, i32 %0)
%8 = call i32 @fclose(i32* %6)
%9 = load i8*, i8** %2
ret i8* %9
}
int purgespace(p)
char *p;
{
  int blank;
  char *s;
  blank = 1;
  s = p;
  while (*s != '\0') {
    if (*s != ' ')
      blank = 0;
    s = s + 1;
  };
  if (blank) {
    *p = '\0';
  };
  return (blank);
}


x86 assembly (clang, -O0):
<purgespace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     114f <purgespace+0x4f>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     113e <purgespace+0x3e>
movl   $0x0,-0xc(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1117 <purgespace+0x17>
cmpl   $0x0,-0xc(%rbp)
je     1160 <purgespace+0x60>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<purgespace>:
mov    $0x1,%eax
mov    %rdi,%rcx
jmp    1114 <purgespace+0x14>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rcx
movzbl (%rcx),%edx
cmp    $0x20,%dl
je     1110 <purgespace+0x10>
test   %dl,%dl
je     1124 <purgespace+0x24>
xor    %eax,%eax
jmp    1110 <purgespace+0x10>
test   %eax,%eax
je     112b <purgespace+0x2b>
movb   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define i32 @purgespace(i8* nocapture %0) {
br label %2
2: ; preds = %7, %1
%3 = phi i32 [ 1, %1 ], [ %8, %7 ]
%4 = phi i8* [ %0, %1 ], [ %9, %7 ]
%5 = load i8, i8* %4
switch i8 %5, label %6 [
i8 0, label %10
i8 32, label %7
]
6: ; preds = %2
br label %7
7: ; preds = %2, %6
%8 = phi i32 [ 0, %6 ], [ %3, %2 ]
%9 = getelementptr inbounds i8, i8* %4, i64 1
br label %2
10: ; preds = %2
%11 = icmp eq i32 %3, 0
br i1 %11, label %13, label %12
12: ; preds = %10
store i8 0, i8* %0
br label %13
13: ; preds = %12, %10
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void from_init(void) { puts("called from init"); }


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"called from init\00"
define void @from_init() {
%1 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"called from init\00"
define void @from_init() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void myfree(void *p) {
  if (p) {
    free(p);
  }
}


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

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

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

LLVM IR (-O2):
define void @myfree(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
void leftshiftone(char s[], int n) {
  char t = s[0];
  int i;
  for (i = 1; i < n; i++) {
    s[i - 1] = s[i];
  }
  s[n - 1] = t;
}


x86 assembly (clang, -O0):
<leftshiftone>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0xd(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1150 <leftshiftone+0x50>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111b <leftshiftone+0x1b>
mov    -0xd(%rbp),%dl
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<leftshiftone>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %rdi,%r14
mov    (%rdi),%bpl
cmp    $0x1,%esi
jle    1135 <leftshiftone+0x25>
lea    0x1(%r14),%rsi
add    $0xffffffff,%ebx
mov    %r14,%rdi
mov    %rbx,%rdx
call   1030 <memmove@plt>
jmp    1138 <leftshiftone+0x28>
add    $0xffffffff,%ebx
movslq %ebx,%rax
mov    %bpl,(%r14,%rax,1)
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @leftshiftone(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp sgt i32 %1, 1
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = add nsw i32 %1, -1
br label %11
7: ; preds = %2
%8 = getelementptr i8, i8* %0, i64 1
%9 = add nsw i32 %1, -1
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %5, %7
%12 = phi i32 [ %6, %5 ], [ %9, %7 ]
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %0, i64 %13
store i8 %3, i8* %14
ret void
}
long __attribute__((no)) vlng() { return (long)42; }


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

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

LLVM IR (-O0):
define i64 @vlng() {
ret i64 42
}

LLVM IR (-O2):
define i64 @vlng() {
ret i64 42
}