xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ show_float(float);
int /*<<< orphan*/ show_int(int);
int /*<<< orphan*/ show_pointer(int *);
void test_show_bytes(int val) {
  int ival = val;
  float fval = (float)val;
  int *pval = &val;
  show_int(ival);
  show_float(fval);
  show_pointer(pval);
}


x86 assembly (clang, -O0):
<test_show_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <show_int@plt>
movss  -0xc(%rbp),%xmm0
call   1030 <show_float@plt>
mov    -0x18(%rbp),%rdi
call   1050 <show_pointer@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_show_bytes>:
push   %rax
mov    %edi,0x4(%rsp)
cvtsi2ss %edi,%xmm0
movss  %xmm0,(%rsp)
call   1040 <show_int@plt>
movss  (%rsp),%xmm0
call   1030 <show_float@plt>
lea    0x4(%rsp),%rdi
call   1050 <show_pointer@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @test_show_bytes(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = alloca i32*
store i32 %0, i32* %2
%6 = load i32, i32* %2
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = sitofp i32 %7 to float
store float %8, float* %4
store i32* %2, i32** %5
%9 = load i32, i32* %3
%10 = call i32 @show_int(i32 %9)
%11 = load float, float* %4
%12 = call i32 @show_float(float %11)
%13 = load i32*, i32** %5
%14 = call i32 @show_pointer(i32* %13)
ret void
}

LLVM IR (-O2):
define void @test_show_bytes(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = sitofp i32 %0 to float
%4 = tail call i32 @show_int(i32 %0)
%5 = tail call i32 @show_float(float %3)
%6 = call i32 @show_pointer(i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int setpgid(int /*<<< orphan*/, int /*<<< orphan*/);
void new_process_group(void) {
  if (setpgid(0, 0) == -1) {
    perror("setpgid");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<new_process_group>:
push   %rbp
mov    %rsp,%rbp
xor    %esi,%esi
mov    %esi,%edi
call   1040 <setpgid@plt>
cmp    $0xffffffff,%eax
jne    115c <new_process_group+0x2c>
lea    0xeb3(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_process_group>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1040 <setpgid@plt>
cmp    $0xffffffff,%eax
je     1141 <new_process_group+0x11>
pop    %rax
ret
lea    0xeb8(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"setpgid\00"
define void @new_process_group() {
%1 = call i32 @setpgid(i32 0, i32 0)
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @exit(i32 1)
unreachable
6: ; preds = %0
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"setpgid\00"
define void @new_process_group() {
%1 = tail call i32 @setpgid(i32 0, i32 0)
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int n;
  for (n = 0; n <= 255; n++) {
    printf("%d, %c \n", n, n);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jg     1153 <main+0x43>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%d, %c \0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 256
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ *display;
};
struct TYPE_4__ {
  TYPE_1__ xreparent;
};
typedef TYPE_2__ XEvent;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
void set_XEvent_xreparent_display(void *_p, void *_v) {
  ((XEvent *)_p)->xreparent.display = (Display *)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xreparent_display>:
mov    %rsi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XEvent_xreparent_display(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ PBKDF2PARAM;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int ASN1_item_i2d(int /*<<< orphan*/ *, unsigned char **, int /*<<< orphan*/ *);
int /*<<< orphan*/ PBKDF2PARAM_it;
int i2d_PBKDF2PARAM(PBKDF2PARAM *a, unsigned char **out) {
  return ASN1_item_i2d((ASN1_VALUE *)a, out, &PBKDF2PARAM_it);
}


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

x86 assembly (clang, -O2):
<i2d_PBKDF2PARAM>:
mov    0x2ed1(%rip),%rdx
jmp    1030 <ASN1_item_i2d@plt>

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

LLVM IR (-O2):
@PBKDF2PARAM_it = global i32 0
define i32 @i2d_PBKDF2PARAM(i32* %0, i8** %1) {
%3 = tail call i32 @ASN1_item_i2d(i32* %0, i8** %1, i32* @PBKDF2PARAM_it)
ret i32 %3
}
int match_str(const char *s, const char *match) {
  while (*match) {
    if (*match++ != *s++)
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<match_str>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1156 <match_str+0x56>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1151 <match_str+0x51>
movl   $0x0,-0x4(%rbp)
jmp    115d <match_str+0x5d>
jmp    110c <match_str+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<match_str>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rax,1),%ecx
test   %cl,%cl
je     1127 <match_str+0x27>
lea    0x1(%rax),%rdx
cmp    (%rdi,%rax,1),%cl
mov    %rdx,%rax
je     1110 <match_str+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @match_str(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %8, %2
%4 = phi i8* [ %0, %2 ], [ %10, %8 ]
%5 = phi i8* [ %1, %2 ], [ %9, %8 ]
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %3
%9 = getelementptr inbounds i8, i8* %5, i64 1
%10 = getelementptr inbounds i8, i8* %4, i64 1
%11 = load i8, i8* %4
%12 = icmp eq i8 %6, %11
br i1 %12, label %3, label %13
13: ; preds = %3, %8
%14 = phi i32 [ 0, %8 ], [ 1, %3 ]
ret i32 %14
}
/* Variables and functions */
long double __remainderl(long double, long double);
long double __dreml(long double x, long double y) { return __remainderl(x, y); }


x86 assembly (clang, -O0):
<__dreml>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <__remainderl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__dreml>:
jmp    1030 <__remainderl@plt>

LLVM IR (-O0):
define x86_fp80 @__dreml(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = call x86_fp80 @__remainderl(x86_fp80 %5, x86_fp80 %6)
ret x86_fp80 %7
}

LLVM IR (-O2):
define x86_fp80 @__dreml(x86_fp80 %0, x86_fp80 %1) {
%3 = tail call x86_fp80 @__remainderl(x86_fp80 %0, x86_fp80 %1)
ret x86_fp80 %3
}
/* Variables and functions */
int /*<<< orphan*/ pdecrypt(char *, char *);
int /*<<< orphan*/ pencrypt(char *, char *);
int main(int argc, char *argv[]) {
  pencrypt("Hello World", "go");
  pdecrypt("NSRZUKUFRR", "go");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeca(%rip),%rdi
lea    0xecf(%rip),%rsi
call   1040 <pencrypt@plt>
lea    0xec6(%rip),%rdi
lea    0xebc(%rip),%rsi
call   1030 <pdecrypt@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rdi
lea    0xedd(%rip),%rbx
mov    %rbx,%rsi
call   1040 <pencrypt@plt>
lea    0xed1(%rip),%rdi
mov    %rbx,%rsi
call   1030 <pdecrypt@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Hello World\00"
@.str.1 = [3 x i8] c"go\00"
@.str.2 = [11 x i8] c"NSRZUKUFRR\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @pencrypt(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @pdecrypt(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hello World\00"
@.str.1 = [3 x i8] c"go\00"
@.str.2 = [11 x i8] c"NSRZUKUFRR\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @pencrypt(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @pdecrypt(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
unsigned int blue(unsigned int x) { return (x >> 8) & 0xff; }


x86 assembly (clang, -O0):
<blue>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<blue>:
mov    %edi,%eax
movzbl %ah,%eax
ret

LLVM IR (-O0):
define i32 @blue(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 8
%5 = and i32 %4, 255
ret i32 %5
}

LLVM IR (-O2):
define i32 @blue(i32 %0) {
%2 = lshr i32 %0, 8
%3 = and i32 %2, 255
ret i32 %3
}
/* Type definitions */
struct LaneDetectorParserInfo {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ LaneDetectorParser_release(struct LaneDetectorParserInfo *);
void LaneDetectorParser_free(struct LaneDetectorParserInfo *args_info) {
  LaneDetectorParser_release(args_info);
}


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

x86 assembly (clang, -O2):
<LaneDetectorParser_free>:
jmp    1030 <LaneDetectorParser_release@plt>

LLVM IR (-O0):
%struct.LaneDetectorParserInfo = type { i32 }
define void @LaneDetectorParser_free(%struct.LaneDetectorParserInfo* %0) {
%2 = alloca %struct.LaneDetectorParserInfo*
store %struct.LaneDetectorParserInfo* %0, %struct.LaneDetectorParserInfo** %2
%3 = load %struct.LaneDetectorParserInfo*, %struct.LaneDetectorParserInfo** %2
%4 = call i32 @LaneDetectorParser_release(%struct.LaneDetectorParserInfo* %3)
ret void
}

LLVM IR (-O2):
%struct.LaneDetectorParserInfo = type { i32 }
define void @LaneDetectorParser_free(%struct.LaneDetectorParserInfo* %0) {
%2 = tail call i32 @LaneDetectorParser_release(%struct.LaneDetectorParserInfo* %0)
ret void
}
/* Variables and functions */
bool is_indent(int c) { return c == ' ' || c == '\t'; }


x86 assembly (clang, -O0):
<is_indent>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1120 <is_indent+0x20>
cmpl   $0x9,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_indent>:
cmp    $0x20,%edi
sete   %al
cmp    $0x9,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_indent(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 32
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 9
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @is_indent(i32 %0) {
%2 = icmp eq i32 %0, 32
%3 = icmp eq i32 %0, 9
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
long _bswap64(long long);
long test_bswap64(long long X) { return _bswap64(X); }


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

x86 assembly (clang, -O2):
<test_bswap64>:
jmp    1030 <_bswap64@plt>

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

LLVM IR (-O2):
define i64 @test_bswap64(i64 %0) {
%2 = tail call i64 @_bswap64(i64 %0)
ret i64 %2
}
/* Variables and functions */
int func1();
int func2();
int main(void) { return !(func1() == 23 && func2() == 42); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <func1@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x17,%ecx
mov    %al,-0x5(%rbp)
jne    1156 <main+0x36>
mov    $0x0,%al
call   1040 <func2@plt>
cmp    $0x2a,%eax
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <func1@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    $0x17,%ecx
jne    1145 <main+0x25>
xor    %eax,%eax
call   1040 <func2@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x2a,%ecx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @func1()
%3 = icmp eq i32 %2, 23
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = call i32 (...) @func2()
%6 = icmp eq i32 %5, 42
br label %7
7: ; preds = %4, %0
%8 = phi i1 [ false, %0 ], [ %6, %4 ]
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @func1()
%2 = icmp eq i32 %1, 23
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i32 (...) @func2()
%5 = icmp ne i32 %4, 42
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 1, %0 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void writeInt(int i) { printf("%i", i); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
define void @writeInt(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
struct strarray {
  int dummy;
};
struct const_strarray {
  int dummy;
};

/* Variables and functions */
size_t strarray_get_count(struct strarray const *);
__attribute__((always_)) size_t
strarray_get_count_c(const struct const_strarray *array) {
  return strarray_get_count((const struct strarray *)array);
}


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

x86 assembly (clang, -O2):
<strarray_get_count_c>:
jmp    1030 <strarray_get_count@plt>

LLVM IR (-O0):
%struct.const_strarray = type { i32 }
%struct.strarray = type { i32 }
define i64 @strarray_get_count_c(%struct.const_strarray* %0) {
%2 = alloca %struct.const_strarray*
store %struct.const_strarray* %0, %struct.const_strarray** %2
%3 = load %struct.const_strarray*, %struct.const_strarray** %2
%4 = bitcast %struct.const_strarray* %3 to %struct.strarray*
%5 = call i64 @strarray_get_count(%struct.strarray* %4)
ret i64 %5
}

LLVM IR (-O2):
%struct.const_strarray = type { i32 }
%struct.strarray = type { i32 }
define i64 @strarray_get_count_c(%struct.const_strarray* %0) {
%2 = bitcast %struct.const_strarray* %0 to %struct.strarray*
%3 = tail call i64 @strarray_get_count(%struct.strarray* %2)
ret i64 %3
}
void foo350() {}


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

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

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

LLVM IR (-O2):
define void @foo350() {
ret void
}
void ipc_send(char *data[]) {}


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

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

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

LLVM IR (-O2):
define void @ipc_send(i8** nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int main(void) { exit(1); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct tbst_table {
  int dummy;
};

/* Variables and functions */
void **tbst_probe(struct tbst_table *, void *);
void *tbst_insert(struct tbst_table *table, void *item) {
  void **p = tbst_probe(table, item);
  return p == NULL || *p == item ? NULL : *p;
}


x86 assembly (clang, -O0):
<tbst_insert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <tbst_probe@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     114d <tbst_insert+0x3d>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
cmp    -0x10(%rbp),%rax
jne    1158 <tbst_insert+0x48>
xor    %eax,%eax
mov    %rax,-0x20(%rbp)
jmp    1163 <tbst_insert+0x53>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tbst_insert>:
push   %rbx
mov    %rsi,%rbx
call   1030 <tbst_probe@plt>
test   %rax,%rax
je     112c <tbst_insert+0x1c>
mov    (%rax),%rcx
xor    %eax,%eax
cmp    %rbx,%rcx
cmovne %rcx,%rax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
%struct.tbst_table = type { i32 }
define i8* @tbst_insert(%struct.tbst_table* %0, i8* %1) {
%3 = tail call i8** @tbst_probe(%struct.tbst_table* %0, i8* %1)
%4 = icmp eq i8** %3, null
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, %1
%8 = select i1 %7, i8* null, i8* %6
br label %9
9: ; preds = %5, %2
%10 = phi i8* [ null, %2 ], [ %8, %5 ]
ret i8* %10
}
int resolve_mark(char mark) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @resolve_mark(i8 signext %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ panic(char *);
void __misaligned_u32(void) { panic("misaligned (__u32 *) in __xchg\n"); }


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

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

LLVM IR (-O0):
@.str = [32 x i8] c"misaligned (__u32 *) in __xchg\0A\00"
define void @__misaligned_u32() {
%1 = call i32 @panic(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"misaligned (__u32 *) in __xchg\0A\00"
define void @__misaligned_u32() {
%1 = tail call i32 @panic(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret void
}
void setupTerm() {}


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

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

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

LLVM IR (-O2):
define void @setupTerm() {
ret void
}
int parade_init(const void *blob) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @parade_init(i8* nocapture readnone %0) {
ret i32 -1
}
__attribute__((__no__)) void
do_nothing_big_hole_dynamic_partial(struct test_big_hole *ptr) {
  if ((unsigned long)ptr > 0x2)
    return;
  else
    return;
}


x86 assembly (clang, -O0):
<do_nothing_big_hole_dynamic_partial>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmp    $0x2,%rax
jbe    111b <do_nothing_big_hole_dynamic_partial+0x1b>
jmp    1120 <do_nothing_big_hole_dynamic_partial+0x20>
jmp    1120 <do_nothing_big_hole_dynamic_partial+0x20>
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.test_big_hole = type opaque
define void @do_nothing_big_hole_dynamic_partial(%struct.test_big_hole* %0) {
%2 = alloca %struct.test_big_hole*
store %struct.test_big_hole* %0, %struct.test_big_hole** %2
%3 = load %struct.test_big_hole*, %struct.test_big_hole** %2
%4 = ptrtoint %struct.test_big_hole* %3 to i64
%5 = icmp ugt i64 %4, 2
br i1 %5, label %6, label %7
6: ; preds = %1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
%struct.test_big_hole = type opaque
define void @do_nothing_big_hole_dynamic_partial(%struct.test_big_hole* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int second(int a) {
  printf("second\n");
  return a + 2;
}


x86 assembly (clang, -O0):
<second>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<second>:
push   %rbx
mov    %edi,%ebx
lea    0xee6(%rip),%rdi
call   1030 <puts@plt>
add    $0x2,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"second\0A\00"
define i32 @second(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 2
ret i32 %5
}

LLVM IR (-O2):
@str = [7 x i8] c"second\00"
define i32 @second(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%3 = add nsw i32 %0, 2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ DivasDoDpc(void *);
void DivasDoRequestDpc(void *pData) { DivasDoDpc(pData); }


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

x86 assembly (clang, -O2):
<DivasDoRequestDpc>:
jmp    1030 <DivasDoDpc@plt>

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

LLVM IR (-O2):
define void @DivasDoRequestDpc(i8* %0) {
%2 = tail call i32 @DivasDoDpc(i8* %0)
ret void
}
/* Variables and functions */
int scanf(char *, int *);
main() {
  int a;
  a = 0;
  a = scanf("%d", &a);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xee0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <scanf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
store i32 %2, i32* %1
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
ret i32 0
}
void INT_Excep_DMAC_DMTEND1(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_DMAC_DMTEND1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x5d() {
  Assert_real((islower(93) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              470, ("islower should be 0 for ]"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x5d>:
push   %rax
mov    $0x5d,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1d6,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for ]\00"
define void @t_islower_0x5d() {
%1 = call i64 @islower(i32 93)
%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 470, 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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for ]\00"
define void @t_islower_0x5d() {
%1 = tail call i64 @islower(i32 93)
%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 470, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int cvmx_coremask_core_on_node(int core) { return (core & ((1 << (7)) - 1)); }


x86 assembly (clang, -O0):
<cvmx_coremask_core_on_node>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x7f,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cvmx_coremask_core_on_node>:
mov    %edi,%eax
and    $0x7f,%eax
ret

LLVM IR (-O0):
define i32 @cvmx_coremask_core_on_node(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 127
ret i32 %4
}

LLVM IR (-O2):
define i32 @cvmx_coremask_core_on_node(i32 %0) {
%2 = and i32 %0, 127
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void ill_handler(int sig) {
  printf("Illegal instruction hit.  Try again.\n");
  exit(0);
}


x86 assembly (clang, -O0):
<ill_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<ill_handler>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"Illegal instruction hit. Try again.\0A\00"
define void @ill_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [37 x i8] c"Illegal instruction hit. Try again.\00"
define void @ill_handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
char *safe_malloc(size_t);
int strlen(char const *);
char *get_string_copy(const char *original) {
  size_t size;
  char *copy;
  size = strlen(original) + 1;
  copy = safe_malloc(size);
  memcpy(copy, original, size);
  return copy;
}


x86 assembly (clang, -O0):
<get_string_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <safe_malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1050 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_string_copy>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1040 <strlen@plt>
add    $0x1,%eax
movslq %eax,%r15
mov    %r15,%rdi
call   1030 <safe_malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1050 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @get_string_copy(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = add nsw i32 %6, 1
%8 = sext i32 %7 to i64
store i64 %8, i64* %3
%9 = load i64, i64* %3
%10 = call i8* @safe_malloc(i64 %9)
store i8* %10, i8** %4
%11 = load i8*, i8** %4
%12 = load i8*, i8** %2
%13 = load i64, i64* %3
%14 = call i32 @memcpy(i8* %11, i8* %12, i64 %13)
%15 = load i8*, i8** %4
ret i8* %15
}

LLVM IR (-O2):
define i8* @get_string_copy(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = sext i32 %3 to i64
%5 = tail call i8* @safe_malloc(i64 %4)
%6 = tail call i32 @memcpy(i8* %5, i8* %0, i64 %4)
ret i8* %5
}
void idle() {
  asm("cli");
  asm("hlt");
}


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

x86 assembly (clang, -O2):
<idle>:
cli
hlt
ret

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

LLVM IR (-O2):
define void @idle() {
tail call void asm sideeffect "cli", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "hlt", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
unsigned char get_bits(unsigned char *regs, int regIndex, int start_bit,
                       int nr_bits) {
  return ((regs[regIndex] >> start_bit) & ((1 << nr_bits) - 1));
}


x86 assembly (clang, -O0):
<get_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x10(%rbp),%ecx
sar    %cl,%eax
mov    -0x14(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
sub    $0x1,%ecx
and    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_bits>:
mov    %ecx,%r8d
mov    %edx,%ecx
movslq %esi,%rax
movzbl (%rdi,%rax,1),%edx
shr    %cl,%edx
mov    $0xffffffff,%eax
mov    %r8d,%ecx
shl    %cl,%eax
not    %eax
and    %edx,%eax
ret

LLVM IR (-O0):
define zeroext i8 @get_bits(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %9, i64 %11
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = load i32, i32* %7
%16 = ashr i32 %14, %15
%17 = load i32, i32* %8
%18 = shl i32 1, %17
%19 = sub nsw i32 %18, 1
%20 = and i32 %16, %19
%21 = trunc i32 %20 to i8
ret i8 %21
}

LLVM IR (-O2):
define zeroext i8 @get_bits(i8* nocapture %0, i32 %1, i32 %2, i32 %3) {
%5 = sext i32 %1 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = lshr i32 %8, %2
%10 = shl nsw i32 -1, %3
%11 = xor i32 %10, -1
%12 = and i32 %9, %11
%13 = trunc i32 %12 to i8
ret i8 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  int a = 'abcde';
  printf("%d\n", a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x62636465,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x62636465,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1650680933)
ret i32 0
}
/* Type definitions */
struct chash {
  int dummy;
};

/* Variables and functions */
void **HashUpdateEntry(struct chash *, char const *);
void *HashGetEntry(struct chash *hash, const char *key) {
  void **v = HashUpdateEntry(hash, key);
  if (v)
    return *v;
  return 0;
}


x86 assembly (clang, -O0):
<HashGetEntry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <HashUpdateEntry@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     114c <HashGetEntry+0x3c>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    1154 <HashGetEntry+0x44>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HashGetEntry>:
push   %rax
call   1030 <HashUpdateEntry@plt>
test   %rax,%rax
je     1120 <HashGetEntry+0x10>
mov    (%rax),%rax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.chash = type { i32 }
define i8* @HashGetEntry(%struct.chash* %0, i8* %1) {
%3 = tail call i8** @HashUpdateEntry(%struct.chash* %0, i8* %1)
%4 = icmp eq i8** %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = load i8*, i8** %3
br label %7
7: ; preds = %2, %5
%8 = phi i8* [ %6, %5 ], [ null, %2 ]
ret i8* %8
}
void textcolor(int white) {}


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

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

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

LLVM IR (-O2):
define void @textcolor(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("Carlos Vilela - Engenharia da Computacao");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [41 x i8] c"Carlos Vilela - Engenharia da Computacao\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [41 x i8] c"Carlos Vilela - Engenharia da Computacao\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void AVCDecodeMappedExpGolomb() {}


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

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

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

LLVM IR (-O2):
define void @AVCDecodeMappedExpGolomb() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x80() {
  Assert_real((isdigit(128) == 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_isdigit.c",
              645, ("isdigit should be 0 for 0x80"));
}


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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0x80\00"
define void @t_isdigit_0x80() {
%1 = tail call i64 @isdigit(i32 128)
%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 645, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
double betnn(mu, dt, t0, t)
double mu, dt, t0, t;
{
  double m1;
  if (mu == .5)
    return (sqrt(dt));
  m1 = 1 - mu;
  return (.5 * pow(dt, m1) / m1);
}


x86 assembly (clang, -O0):
<betnn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeb7(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    116d <betnn+0x4d>
jp     116d <betnn+0x4d>
movsd  -0x18(%rbp),%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x8(%rbp)
jmp    11a7 <betnn+0x87>
movsd  0xe93(%rip),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xe67(%rip),%xmm0
mulsd  %xmm1,%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<betnn>:
push   %rax
ucomisd 0xed7(%rip),%xmm0
jne    1140 <betnn+0x20>
jp     1140 <betnn+0x20>
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jb     116d <betnn+0x4d>
xorps  %xmm0,%xmm0
sqrtsd %xmm1,%xmm0
pop    %rax
ret
movsd  0xec0(%rip),%xmm2
subsd  %xmm0,%xmm2
movsd  %xmm2,(%rsp)
movapd %xmm1,%xmm0
movapd %xmm2,%xmm1
call   1030 <pow@plt>
mulsd  0xe9a(%rip),%xmm0
divsd  (%rsp),%xmm0
pop    %rax
ret
movapd %xmm1,%xmm0
pop    %rax
jmp    1040 <sqrt@plt>

LLVM IR (-O0):
define double @betnn(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
%11 = load double, double* %6
%12 = fcmp oeq double %11, 5.000000e-01
br i1 %12, label %13, label %16
13: ; preds = %4
%14 = load double, double* %7
%15 = call double @sqrt(double %14)
store double %15, double* %5
br label %25
16: ; preds = %4
%17 = load double, double* %6
%18 = fsub double 1.000000e+00, %17
store double %18, double* %10
%19 = load double, double* %7
%20 = load double, double* %10
%21 = call double @pow(double %19, double %20)
%22 = fmul double 5.000000e-01, %21
%23 = load double, double* %10
%24 = fdiv double %22, %23
store double %24, double* %5
br label %25
25: ; preds = %16, %13
%26 = load double, double* %5
ret double %26
}

LLVM IR (-O2):
define double @betnn(double %0, double %1, double %2, double %3) {
%5 = fcmp oeq double %0, 5.000000e-01
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call double @sqrt(double %1)
br label %13
8: ; preds = %4
%9 = fsub double 1.000000e+00, %0
%10 = tail call double @pow(double %1, double %9)
%11 = fmul double %10, 5.000000e-01
%12 = fdiv double %11, %9
br label %13
13: ; preds = %8, %6
%14 = phi double [ %7, %6 ], [ %12, %8 ]
ret double %14
}
int end_of_line(char *str) { return *str == '\0'; }


x86 assembly (clang, -O0):
<end_of_line>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<end_of_line>:
xor    %eax,%eax
cmpb   $0x0,(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @end_of_line(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @end_of_line(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}