xunge/DecIR huggingface dataset:
void builtinType(_Bool B, char C, unsigned char UC, signed char SC, short S,
                 unsigned short US, signed short SS, int I, unsigned int UI,
                 signed int SI, long L, unsigned long UL, signed long SL,
                 long long LL, unsigned long long ULL, signed long long SLL,
                 float F, double D, long double LD) {}


x86 assembly (clang, -O0):
<builtinType>:
push   %rbp
mov    %rsp,%rbp
mov    %r8d,-0x40(%rbp)
mov    %ecx,%eax
mov    -0x40(%rbp),%ecx
mov    %eax,-0x3c(%rbp)
mov    %edx,%eax
mov    -0x3c(%rbp),%edx
mov    %eax,-0x38(%rbp)
mov    %esi,%eax
mov    -0x38(%rbp),%esi
mov    %eax,-0x34(%rbp)
mov    %edi,%r8d
mov    -0x34(%rbp),%edi
mov    %r9w,%ax
fldt   0x60(%rbp)
mov    0x58(%rbp),%r9
mov    0x50(%rbp),%r9
mov    0x48(%rbp),%r9
mov    0x40(%rbp),%r9
mov    0x38(%rbp),%r9
mov    0x30(%rbp),%r9
mov    0x28(%rbp),%r9d
mov    0x20(%rbp),%r9d
mov    0x18(%rbp),%r9d
mov    0x10(%rbp),%r9w
and    $0x1,%r8b
mov    %r8b,-0x1(%rbp)
mov    %dil,-0x2(%rbp)
mov    %sil,-0x3(%rbp)
mov    %dl,-0x4(%rbp)
mov    %cx,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movsd  %xmm1,-0x18(%rbp)
fstpt  -0x30(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @builtinType(i1 zeroext %0, i8 signext %1, i8 zeroext %2, i8 signext %3, i16 signext %4, i16 zeroext %5, i16 signext %6, i32 %7, i32 %8, i32 %9, i64 %10, i64 %11, i64 %12, i64 %13, i64 %14, i64 %15, float %16, double %17, x86_fp80 %18) {
%20 = alloca i8
%21 = alloca i8
%22 = alloca i8
%23 = alloca i8
%24 = alloca i16
%25 = alloca i16
%26 = alloca i16
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i64
%31 = alloca i64
%32 = alloca i64
%33 = alloca i64
%34 = alloca i64
%35 = alloca i64
%36 = alloca float
%37 = alloca double
%38 = alloca x86_fp80
%39 = zext i1 %0 to i8
store i8 %39, i8* %20
store i8 %1, i8* %21
store i8 %2, i8* %22
store i8 %3, i8* %23
store i16 %4, i16* %24
store i16 %5, i16* %25
store i16 %6, i16* %26
store i32 %7, i32* %27
store i32 %8, i32* %28
store i32 %9, i32* %29
store i64 %10, i64* %30
store i64 %11, i64* %31
store i64 %12, i64* %32
store i64 %13, i64* %33
store i64 %14, i64* %34
store i64 %15, i64* %35
store float %16, float* %36
store double %17, double* %37
store x86_fp80 %18, x86_fp80* %38
ret void
}

LLVM IR (-O2):
define void @builtinType(i1 zeroext %0, i8 signext %1, i8 zeroext %2, i8 signext %3, i16 signext %4, i16 zeroext %5, i16 signext %6, i32 %7, i32 %8, i32 %9, i64 %10, i64 %11, i64 %12, i64 %13, i64 %14, i64 %15, float %16, double %17, x86_fp80 %18) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ two();
void one() { two(); }


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

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

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

LLVM IR (-O2):
define void @one() {
%1 = tail call i32 (...) @two()
ret void
}
void funcFor(int a) {
  char c = 'a';
  int i;
  for (i = 0; i < a; i++) {
    c++;
    if (c == 'c') {
      continue;
    }
    if (c == 'z') {
      break;
    }
  }
}


x86 assembly (clang, -O0):
<funcFor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movb   $0x61,-0x5(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    115d <funcFor+0x5d>
mov    -0x5(%rbp),%al
add    $0x1,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x63,%eax
jne    1138 <funcFor+0x38>
jmp    114f <funcFor+0x4f>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jne    114a <funcFor+0x4a>
jmp    115d <funcFor+0x5d>
jmp    114f <funcFor+0x4f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1112 <funcFor+0x12>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @funcFor(i32 %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca i32
store i32 %0, i32* %2
store i8 97, i8* %3
store i32 0, i32* %4
br label %5
5: ; preds = %22, %1
%6 = load i32, i32* %4
%7 = load i32, i32* %2
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %25
9: ; preds = %5
%10 = load i8, i8* %3
%11 = add i8 %10, 1
store i8 %11, i8* %3
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 99
br i1 %14, label %15, label %16
15: ; preds = %9
br label %22
16: ; preds = %9
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 122
br i1 %19, label %20, label %21
20: ; preds = %16
br label %25
21: ; preds = %16
br label %22
22: ; preds = %21, %15
%23 = load i32, i32* %4
%24 = add nsw i32 %23, 1
store i32 %24, i32* %4
br label %5
25: ; preds = %20, %5
ret void
}

LLVM IR (-O2):
define void @funcFor(i32 %0) {
ret void
}
void foo542() {}


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

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

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

LLVM IR (-O2):
define void @foo542() {
ret void
}
/* Variables and functions */
int strlen(char const *);
int write_socket(int, char const *, int);
int write_socket_len(int fd, const char *buf) {
  int len;
  len = strlen(buf);
  if (write_socket(fd, buf, len) < len)
    return (0);
  return (1);
}


x86 assembly (clang, -O0):
<write_socket_len>:
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_socket@plt>
cmp    -0x14(%rbp),%eax
jge    115f <write_socket_len+0x3f>
movl   $0x0,-0x4(%rbp)
jmp    1166 <write_socket_len+0x46>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_socket_len>:
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_socket@plt>
xor    %ecx,%ecx
cmp    %ebp,%eax
setge  %cl
mov    %ecx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @write_socket_len(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @write_socket(i32 %0, i8* %1, i32 %3)
%5 = icmp sge i32 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int strlen(const char *s) {
  int length = 0;
  while (s[length])
    length++;
  return length;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     112f <strlen+0x2f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ delay(int);
int /*<<< orphan*/ mbus_remote_register_write(int, int, int);
int /*<<< orphan*/ set_pmu_sar_override(int);
void set_pmu_img(void) {
  mbus_remote_register_write(0x8, 0x1A,
                             ((1 << 13) | (6 << 9) | (6 << 5) | (16)));
  delay(200);
  mbus_remote_register_write(0x8, 0x1A,
                             ((1 << 13) | (7 << 9) | (7 << 5) | (22)));
  delay(200);
  mbus_remote_register_write(0x8, 0x16,
                             ((0 << 19) | (0 << 18) | (0 << 17) | (3 << 14) |
                              (1 << 13) | (7 << 9) | (7 << 5) | (22)));
  delay(200);
  set_pmu_sar_override(47);
}


x86 assembly (clang, -O0):
<set_pmu_img>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8,%edi
mov    $0x1a,%esi
mov    $0x2cd0,%edx
call   1050 <mbus_remote_register_write@plt>
mov    $0xc8,%edi
call   1040 <delay@plt>
mov    $0x8,%edi
mov    $0x1a,%esi
mov    $0x2ef6,%edx
call   1050 <mbus_remote_register_write@plt>
mov    $0xc8,%edi
call   1040 <delay@plt>
mov    $0x8,%edi
mov    $0x16,%esi
mov    $0xeef6,%edx
call   1050 <mbus_remote_register_write@plt>
mov    $0xc8,%edi
call   1040 <delay@plt>
mov    $0x2f,%edi
call   1030 <set_pmu_sar_override@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_pmu_img>:
push   %rax
mov    $0x8,%edi
mov    $0x1a,%esi
mov    $0x2cd0,%edx
call   1050 <mbus_remote_register_write@plt>
mov    $0xc8,%edi
call   1040 <delay@plt>
mov    $0x8,%edi
mov    $0x1a,%esi
mov    $0x2ef6,%edx
call   1050 <mbus_remote_register_write@plt>
mov    $0xc8,%edi
call   1040 <delay@plt>
mov    $0x8,%edi
mov    $0x16,%esi
mov    $0xeef6,%edx
call   1050 <mbus_remote_register_write@plt>
mov    $0xc8,%edi
call   1040 <delay@plt>
mov    $0x2f,%edi
pop    %rax
jmp    1030 <set_pmu_sar_override@plt>

LLVM IR (-O0):
define void @set_pmu_img() {
%1 = call i32 @mbus_remote_register_write(i32 8, i32 26, i32 11472)
%2 = call i32 @delay(i32 200)
%3 = call i32 @mbus_remote_register_write(i32 8, i32 26, i32 12022)
%4 = call i32 @delay(i32 200)
%5 = call i32 @mbus_remote_register_write(i32 8, i32 22, i32 61174)
%6 = call i32 @delay(i32 200)
%7 = call i32 @set_pmu_sar_override(i32 47)
ret void
}

LLVM IR (-O2):
define void @set_pmu_img() {
%1 = tail call i32 @mbus_remote_register_write(i32 8, i32 26, i32 11472)
%2 = tail call i32 @delay(i32 200)
%3 = tail call i32 @mbus_remote_register_write(i32 8, i32 26, i32 12022)
%4 = tail call i32 @delay(i32 200)
%5 = tail call i32 @mbus_remote_register_write(i32 8, i32 22, i32 61174)
%6 = tail call i32 @delay(i32 200)
%7 = tail call i32 @set_pmu_sar_override(i32 47)
ret void
}
unsigned xrop3_68_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 = ~D;
  stk1 = S & stk2;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


x86 assembly (clang, -O0):
<xrop3_68_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    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
and    -0x18(%rbp),%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_68_0_1>:
mov    %edi,%eax
shl    $0x8,%eax
not    %edi
and    %esi,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_68_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* %5
%23 = xor i32 %22, -1
store i32 %23, i32* %9
%24 = load i32, i32* %6
%25 = load i32, i32* %9
%26 = and i32 %24, %25
store i32 %26, i32* %8
%27 = load i32, i32* %8
%28 = load i32, i32* %6
%29 = and i32 %27, %28
%30 = load i32, i32* %8
%31 = load i32, i32* %7
%32 = xor i32 %31, -1
%33 = and i32 %30, %32
%34 = or i32 %29, %33
%35 = load i32, i32* %7
%36 = load i32, i32* %6
%37 = xor i32 %36, -1
%38 = and i32 %35, %37
%39 = load i32, i32* %5
%40 = and i32 %38, %39
%41 = or i32 %34, %40
ret i32 %41
}

LLVM IR (-O2):
define i32 @xrop3_68_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = zext i8 %1 to i32
%6 = xor i32 %3, -1
%7 = and i32 %6, %5
%8 = or i32 %7, %4
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int _usage(void) {
  fputs("Usage: "
        "tail"
        " [-f][-c number|-n number][file]\n",
        stderr);
  return 1;
}


x86 assembly (clang, -O0):
<_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_usage>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [45 x i8] c"Usage: tail [-f][-c number|-n number][file]\0A\00"
@stderr = global i32 0
define i32 @_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}

LLVM IR (-O2):
@.str = [45 x i8] c"Usage: tail [-f][-c number|-n number][file]\0A\00"
@stderr = global i32 0
define i32 @_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}
float gal_to_l(float value) { return value * 3.785411784f; }


x86 assembly (clang, -O0):
<gal_to_l>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<gal_to_l>:
mulss  0xef8(%rip),%xmm0
ret

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

LLVM IR (-O2):
define float @gal_to_l(float %0) {
%2 = fmul float %0, 0x400E488600000000
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0x25() {
  Assert_real((isalnum(37) == 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_isalnum.c",
              190, ("isalnum should be 0 for %"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0x25>:
push   %rax
mov    $0x25,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xbe,%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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 0 for %\00"
define void @t_isalnum_0x25() {
%1 = call i64 @isalnum(i32 37)
%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 190, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 0 for %\00"
define void @t_isalnum_0x25() {
%1 = tail call i64 @isalnum(i32 37)
%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 190, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn35() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn35");
  return result;
}


x86 assembly (clang, -O0):
<fn35>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1e,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn35>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fn35\00"
define i8* @fn35() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = add nsw i32 20, %3
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 20
%9 = add nsw i32 30, %8
%10 = call i8* @realloc(i8* %6, i32 %9)
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"fn35\00"
define i8* @fn35() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}
/* Variables and functions */
int buncrypt_string_base64(char *, char *, int /*<<< orphan*/, char const *);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ strlen(char *);
int decryptstring(char *st, const char *key) {
  int res = buncrypt_string_base64(st, st, strlen(st), key);
  if (res == 0)
    strcpy(st, "");
  return res;
}


x86 assembly (clang, -O0):
<decryptstring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
mov    -0x10(%rbp),%rcx
call   1040 <buncrypt_string_base64@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1189 <decryptstring+0x59>
mov    -0x8(%rbp),%rdi
lea    0xe7c(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x14(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decryptstring>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbp
mov    %rdi,%rbx
call   1050 <strlen@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
mov    %rbp,%rcx
call   1040 <buncrypt_string_base64@plt>
mov    %eax,%ebp
test   %eax,%eax
jne    1163 <decryptstring+0x33>
lea    0xea5(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @decryptstring(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %3
%8 = load i8*, i8** %3
%9 = call i32 @strlen(i8* %8)
%10 = load i8*, i8** %4
%11 = call i32 @buncrypt_string_base64(i8* %6, i8* %7, i32 %9, i8* %10)
store i32 %11, i32* %5
%12 = load i32, i32* %5
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %2
%15 = load i8*, i8** %3
%16 = call i32 @strcpy(i8* %15, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
br label %17
17: ; preds = %14, %2
%18 = load i32, i32* %5
ret i32 %18
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @decryptstring(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @buncrypt_string_base64(i8* %0, i8* %0, i32 %3, i8* %1)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %2
ret i32 %4
}
int test_imm_89uint16_mem(unsigned short *val) {
  return ((*val) & (-0x89 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_89uint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xffffff77,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_89uint16_mem>:
movzwl (%rdi),%eax
test   $0xff77,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_89uint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, -137
%7 = icmp ne i32 %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_89uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -137
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ memcpy(char *, char *, int);
char *s_dupl_sudoku(char *sudoku) {
  char *dupl = malloc(81);
  memcpy(dupl, sudoku, 81);
  return dupl;
}


x86 assembly (clang, -O0):
<s_dupl_sudoku>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x51,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x51,%edx
call   1030 <memcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_dupl_sudoku>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x51,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    $0x51,%edx
call   1030 <memcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @s_dupl_sudoku(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = call i8* @malloc(i32 81)
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = load i8*, i8** %2
%7 = call i32 @memcpy(i8* %5, i8* %6, i32 81)
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
define i8* @s_dupl_sudoku(i8* %0) {
%2 = tail call dereferenceable_or_null(81) i8* @malloc(i32 81)
%3 = tail call i32 @memcpy(i8* %2, i8* %0, i32 81)
ret i8* %2
}
/* Variables and functions */
int rand();
int uniform(int min, int max) {
  int range = max - min;
  return min + rand() % range;
}


x86 assembly (clang, -O0):
<uniform>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cltd
idivl  -0xc(%rbp)
mov    -0x10(%rbp),%eax
add    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uniform>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
sub    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @uniform(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %3
%10 = call i32 (...) @rand()
%11 = load i32, i32* %5
%12 = srem i32 %10, %11
%13 = add nsw i32 %9, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @uniform(i32 %0, i32 %1) {
%3 = sub nsw i32 %1, %0
%4 = tail call i32 (...) @rand()
%5 = srem i32 %4, %3
%6 = add nsw i32 %5, %0
ret i32 %6
}
/* Type definitions */
struct msghdr {
  int dummy;
};
struct __uportsys_msghdr {
  int dummy;
};
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ __uportsys_sendmsg(int, struct __uportsys_msghdr const *,
                                      int, int /*<<< orphan*/ *);
int /*<<< orphan*/ errno;
ssize_t sendmsg(int sd, const struct msghdr *msg, int flags) {
  return __uportsys_sendmsg(sd, (const struct __uportsys_msghdr *)msg, flags,
                            &errno);
}


x86 assembly (clang, -O0):
<sendmsg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    0x2ead(%rip),%rcx
call   1030 <__uportsys_sendmsg@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendmsg>:
mov    0x2ec9(%rip),%rcx
jmp    1030 <__uportsys_sendmsg@plt>

LLVM IR (-O0):
%struct.msghdr = type { i32 }
%struct.__uportsys_msghdr = type { i32 }
@errno = global i32 0
define i32 @sendmsg(i32 %0, %struct.msghdr* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.msghdr*
%6 = alloca i32
store i32 %0, i32* %4
store %struct.msghdr* %1, %struct.msghdr** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load %struct.msghdr*, %struct.msghdr** %5
%9 = bitcast %struct.msghdr* %8 to %struct.__uportsys_msghdr*
%10 = load i32, i32* %6
%11 = call i32 @__uportsys_sendmsg(i32 %7, %struct.__uportsys_msghdr* %9, i32 %10, i32* @errno)
ret i32 %11
}

LLVM IR (-O2):
%struct.msghdr = type { i32 }
%struct.__uportsys_msghdr = type { i32 }
@errno = global i32 0
define i32 @sendmsg(i32 %0, %struct.msghdr* %1, i32 %2) {
%4 = bitcast %struct.msghdr* %1 to %struct.__uportsys_msghdr*
%5 = tail call i32 @__uportsys_sendmsg(i32 %0, %struct.__uportsys_msghdr* %4, i32 %2, i32* @errno)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ handle_41(int /*<<< orphan*/);
int gen_41() {
  handle_41(0);
  return 0;
}


x86 assembly (clang, -O0):
<gen_41>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <handle_41@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_41>:
push   %rax
xor    %edi,%edi
call   1030 <handle_41@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @gen_41() {
%1 = call i32 @handle_41(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @gen_41() {
%1 = tail call i32 @handle_41(i32 0)
ret i32 0
}
/* Variables and functions */
float M_PI;
float get_pi() { return M_PI; }


x86 assembly (clang, -O0):
<get_pi>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
movss  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_pi>:
mov    0x2ee1(%rip),%rax
movss  (%rax),%xmm0
ret

LLVM IR (-O0):
@M_PI = global float 0.000000e+00
define float @get_pi() {
%1 = load float, float* @M_PI
ret float %1
}

LLVM IR (-O2):
@M_PI = global float 0.000000e+00
define float @get_pi() {
%1 = load float, float* @M_PI
ret float %1
}
void reverse(int *a, int from, int to) {
  int t;
  for (; from < to; ++from, --to) {
    t = a[from];
    a[from] = a[to];
    a[to] = t;
  }
}


x86 assembly (clang, -O0):
<reverse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1163 <reverse+0x63>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    110e <reverse+0xe>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse>:
cmp    %edx,%esi
jge    112e <reverse+0x2e>
movslq %esi,%rax
movslq %edx,%rcx
add    $0x1,%rax
xchg   %ax,%ax
mov    -0x4(%rdi,%rax,4),%edx
mov    (%rdi,%rcx,4),%esi
mov    %esi,-0x4(%rdi,%rax,4)
mov    %edx,(%rdi,%rcx,4)
add    $0xffffffffffffffff,%rcx
lea    0x1(%rax),%rdx
cmp    %rcx,%rax
mov    %rdx,%rax
jl     1110 <reverse+0x10>
ret

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

LLVM IR (-O2):
define void @reverse(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %18
5: ; preds = %3
%6 = sext i32 %1 to i64
%7 = sext i32 %2 to i64
br label %8
8: ; preds = %5, %8
%9 = phi i64 [ %7, %5 ], [ %16, %8 ]
%10 = phi i64 [ %6, %5 ], [ %15, %8 ]
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = getelementptr inbounds i32, i32* %0, i64 %9
%14 = load i32, i32* %13
store i32 %14, i32* %11
store i32 %12, i32* %13
%15 = add nsw i64 %10, 1
%16 = add nsw i64 %9, -1
%17 = icmp slt i64 %15, %16
br i1 %17, label %8, label %18
18: ; preds = %8, %3
ret void
}
/* Type definitions */
struct object {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ print_closure_dmg(int /*<<< orphan*/ *, struct object *);
void write_closure_to_dmg(struct object *obj, char const *filename) {
  FILE *f = fopen(filename, "w");
  print_closure_dmg(f, obj);
  fclose(f);
}


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

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

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

LLVM IR (-O2):
%struct.object = type { i32 }
@.str = [2 x i8] c"w\00"
define void @write_closure_to_dmg(%struct.object* %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @print_closure_dmg(i32* %3, %struct.object* %0)
%5 = tail call i32 @fclose(i32* %3)
ret void
}
char *strdup(str)
register const char *str;
{
  char *p;
  p = (char *)malloc(strlen(str) + 1);
  return strcpy(p, str);
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add i64 %5, 1
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i8* @strcpy(i8* %8, i8* %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @strdup(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add i64 %2, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = tail call i8* @strcpy(i8* dereferenceable(1) %4, i8* dereferenceable(1) %0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ send_data(int, float *, int);
void send_float(int socket, float x) {
  float y;
  y = (float)x;
  send_data(socket, &y, sizeof(float));
}


x86 assembly (clang, -O0):
<send_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x4(%rbp),%edi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
call   1030 <send_data@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_float>:
push   %rax
movss  %xmm0,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <send_data@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @send_float(i32 %0, float %1) {
%3 = alloca float
%4 = bitcast float* %3 to i8*
store float %1, float* %3
%5 = call i32 @send_data(i32 %0, float* %3, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ yyparse();
int main(void) {
  yyparse();
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @yyparse()
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void *uDMAControlBaseGet(uint32_t ui32Base) {
  ;
  return ((void *)(*((volatile unsigned long *)(ui32Base + 0x00000008))));
}


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

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

LLVM IR (-O0):
define i8* @uDMAControlBaseGet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 8
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @uDMAControlBaseGet(i64 %0) {
%2 = add nsw i64 %0, 8
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Variables and functions */
double dpmpar(int const);
double cdflib_dpmpar(const int *i) { return dpmpar(*i); }


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

x86 assembly (clang, -O2):
<cdflib_dpmpar>:
mov    (%rdi),%edi
jmp    1030 <dpmpar@plt>

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

LLVM IR (-O2):
define double @cdflib_dpmpar(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call double @dpmpar(i32 %2)
ret double %3
}
/* Variables and functions */
int towlower(int);
int towupper(int);
int casefold(int k) {
  int c = towupper(k);
  return c == k ? towlower(k) : c;
}


x86 assembly (clang, -O0):
<casefold>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <towupper@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jne    1152 <casefold+0x32>
mov    -0x4(%rbp),%edi
call   1030 <towlower@plt>
mov    %eax,-0xc(%rbp)
jmp    1158 <casefold+0x38>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<casefold>:
push   %rbx
mov    %edi,%ebx
call   1040 <towupper@plt>
cmp    %ebx,%eax
jne    1134 <casefold+0x14>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <towlower@plt>
pop    %rbx
ret

LLVM IR (-O0):
define i32 @casefold(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @towupper(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = icmp eq i32 %6, %7
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i32, i32* %2
%11 = call i32 @towlower(i32 %10)
br label %14
12: ; preds = %1
%13 = load i32, i32* %3
br label %14
14: ; preds = %12, %9
%15 = phi i32 [ %11, %9 ], [ %13, %12 ]
ret i32 %15
}

LLVM IR (-O2):
define i32 @casefold(i32 %0) {
%2 = tail call i32 @towupper(i32 %0)
%3 = icmp eq i32 %2, %0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @towlower(i32 %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ %2, %1 ]
ret i32 %7
}
/* Variables and functions */
float cosf(float);
void __hv_cos_f(float bIn, float *bOut) { *bOut = cosf(bIn); }


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

x86 assembly (clang, -O2):
<__hv_cos_f>:
push   %rbx
mov    %rdi,%rbx
call   1030 <cosf@plt>
movss  %xmm0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @__hv_cos_f(float %0, float* nocapture writeonly %1) {
%3 = tail call float @cosf(float %0)
store float %3, float* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ calcbin(int);
int /*<<< orphan*/ pr();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num;
  while (1) {
    printf("Dwste enan thetiko akeraio arithmo: ");
    scanf(" %d", &num);
    (num < 0) ? pr() : calcbin(num);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jge    1181 <main+0x41>
mov    $0x0,%al
call   1040 <pr@plt>
jmp    1189 <main+0x49>
mov    -0x8(%rbp),%edi
call   1050 <calcbin@plt>
jmp    114f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xeb0(%rip),%r14
lea    0xece(%rip),%r15
lea    0xc(%rsp),%rbx
jmp    1165 <main+0x25>
xchg   %ax,%ax
call   1050 <calcbin@plt>
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    0xc(%rsp),%edi
test   %edi,%edi
jns    1160 <main+0x20>
xor    %eax,%eax
call   1040 <pr@plt>
jmp    1165 <main+0x25>

LLVM IR (-O0):
@.str = [37 x i8] c"Dwste enan thetiko akeraio arithmo: \00"
@.str.1 = [4 x i8] c" %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %0, %13
%4 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %3
%9 = call i32 (...) @pr()
br label %13
10: ; preds = %3
%11 = load i32, i32* %2
%12 = call i32 @calcbin(i32 %11)
br label %13
13: ; preds = %10, %8
%14 = phi i32 [ %9, %8 ], [ %12, %10 ]
br label %3
}

LLVM IR (-O2):
@.str = [37 x i8] c"Dwste enan thetiko akeraio arithmo: \00"
@.str.1 = [4 x i8] c" %d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
br label %3
3: ; preds = %12, %0
%4 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %3
%9 = call i32 (...) @pr()
br label %12
10: ; preds = %3
%11 = call i32 @calcbin(i32 %6)
br label %12
12: ; preds = %10, %8
br label %3
}
int true() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @true() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr,
          "USAGE: ./brutehttp Host [Dict]\n  Host : The website hostname. ex: "
          "www.google.com\n  Dict : The dictionary.       ex: dict.txt\n");
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [126 x i8] c"USAGE: ./brutehttp Host [Dict]\0A Host : The website hostname. ex: www.google.com\0A Dict : The dictionary. ex: dict.txt\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([126 x i8], [126 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [126 x i8] c"USAGE: ./brutehttp Host [Dict]\0A Host : The website hostname. ex: www.google.com\0A Dict : The dictionary. ex: dict.txt\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([126 x i8], [126 x i8]* @.str, i64 0, i64 0))
ret void
}
void strupper(s) char *s;
{
  while (*s) {
    *s = (char)toupper(*s);
    s++;
  }
}


x86 assembly (clang, -O0):
<strupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114e <strupper+0x3e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <toupper@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <strupper+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strupper>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1136 <strupper+0x26>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <toupper@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <strupper+0x10>
pop    %rbx
ret

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

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


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

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

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

LLVM IR (-O2):
define void @EVP_CIPHER_CTX_key_length() {
ret void
}
float stdlib_base_identityf(const float x) { return x; }


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

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

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

LLVM IR (-O2):
define float @stdlib_base_identityf(float returned %0) {
ret float %0
}
void test_many_nested_locations(void) {}


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

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

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

LLVM IR (-O2):
define void @test_many_nested_locations() {
ret void
}