xunge/DecIR huggingface dataset:
/* Variables and functions */
int floor(int);
int GetPindex() {
  int fakeI;
  if (19 % 2 == 1)
    fakeI = (19 + 1) * floor(19 / 2);
  else
    fakeI = (19 + 1) * (19 / 2 - 1);
  return fakeI;
}


x86 assembly (clang, -O0):
<GetPindex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x9,%edi
call   1030 <floor@plt>
imul   $0x14,%eax,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetPindex>:
push   %rax
mov    $0x9,%edi
call   1030 <floor@plt>
shl    $0x2,%eax
lea    (%rax,%rax,4),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @GetPindex() {
%1 = alloca i32
%2 = call i32 @floor(i32 9)
%3 = mul nsw i32 20, %2
store i32 %3, i32* %1
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @GetPindex() {
%1 = tail call i32 @floor(i32 9)
%2 = mul nsw i32 %1, 20
ret i32 %2
}
int main(int argc, char *argv[]) { asm("mov 0x0F, %eax"); }


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
tail call void asm sideeffect "mov 0x0F, %eax", "~{dirflag},~{fpsr},~{flags}"()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ read(int, char **, int);
int main(void) {
  int fd = 42;
  char buf[4];
  ssize_t len;
  len = read(fd, &buf, 4);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%rsi
mov    $0x2a,%edi
mov    $0x4,%edx
call   1030 <read@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [4 x i8]
%4 = alloca i32
store i32 0, i32* %1
store i32 42, i32* %2
%5 = load i32, i32* %2
%6 = bitcast [4 x i8]* %3 to i8**
%7 = call i32 @read(i32 %5, i8** %6, i32 4)
store i32 %7, i32* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [4 x i8]
%2 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%3 = bitcast [4 x i8]* %1 to i8**
%4 = call i32 @read(i32 42, i8** %3, i32 4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int listen(int, int);
int /*<<< orphan*/ perror(char *);
int htxd_listen_socket(int socket_fd) {
  int result;
  result = listen(socket_fd, 10);
  if (result == -1) {
    perror("ERROR: while listening connection. Exiting...");
    exit(1);
  }
  return result;
}


x86 assembly (clang, -O0):
<htxd_listen_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xa,%esi
call   1030 <listen@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    116b <htxd_listen_socket+0x3b>
lea    0xea4(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<htxd_listen_socket>:
push   %rax
mov    $0xa,%esi
call   1030 <listen@plt>
cmp    $0xffffffff,%eax
je     1142 <htxd_listen_socket+0x12>
pop    %rcx
ret
lea    0xeb7(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"ERROR: while listening connection. Exiting...\00"
define i32 @htxd_listen_socket(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @listen(i32 %4, i32 10)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = call i32 @perror(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %1
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
@.str = [46 x i8] c"ERROR: while listening connection. Exiting...\00"
define i32 @htxd_listen_socket(i32 %0) {
%2 = tail call i32 @listen(i32 %0, i32 10)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret i32 %2
}
void foo282() {}


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

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

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

LLVM IR (-O2):
define void @foo282() {
ret void
}
/* Variables and functions */
int printf(char *, int);
int main() {
  int i, sum = 0;
  for (i = 1; i <= 100; i++) {
    printf("%d ", i);
    sum += i;
  }
  return 0 * printf("\n1부터 100까지의 합은 %d입니다.\n", sum);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     115d <main+0x4d>
mov    -0x8(%rbp),%esi
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
mov    -0xc(%rbp),%esi
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
imul   $0x0,%eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
@.str.1 = [43 x i8] c"\0A1\EB\B6\80\ED\84\B0 100\EA\B9\8C\EC\A7\80\EC\9D\98 \ED\95\A9\EC\9D\80 %d\EC\9E\85\EB\8B\88\EB\8B\A4.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
store i32 1, i32* %2
br label %4
4: ; preds = %13, %0
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 100
br i1 %6, label %7, label %16
7: ; preds = %4
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = add nsw i32 %11, %10
store i32 %12, i32* %3
br label %13
13: ; preds = %7
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %4
16: ; preds = %4
%17 = load i32, i32* %3
%18 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 %17)
%19 = mul nsw i32 0, %18
ret i32 %19
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
@.str.1 = [43 x i8] c"\0A1\EB\B6\80\ED\84\B0 100\EA\B9\8C\EC\A7\80\EC\9D\98 \ED\95\A9\EC\9D\80 %d\EC\9E\85\EB\8B\88\EB\8B\A4.\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 1, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 101
br i1 %5, label %6, label %1
6: ; preds = %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 5050)
ret i32 0
}
unsigned char tcp_steg_channel_open() {}


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

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

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

LLVM IR (-O2):
define zeroext i8 @tcp_steg_channel_open() {
ret i8 undef
}
unsigned int get4n(unsigned char *p) {
  return p[0] << 24 | p[1] << 16 | p[2] << 8 | p[3];
}


x86 assembly (clang, -O0):
<get4n>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get4n>:
mov    (%rdi),%eax
bswap  %eax
ret

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

LLVM IR (-O2):
define i32 @get4n(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = shl nuw i32 %3, 24
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %7, 16
%9 = or i32 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 2
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl nuw nsw i32 %12, 8
%14 = or i32 %9, %13
%15 = getelementptr inbounds i8, i8* %0, i64 3
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = or i32 %14, %17
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_tagstruct_get_proplist() {
  printf("NOT IMPLEMENTED:"
         "pa_tagstruct_get_proplist"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [42 x i8] c"NOT IMPLEMENTED:pa_tagstruct_get_proplist\00"
define i32 @pa_tagstruct_get_proplist() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ enginedb();
char const *sqlite3_errmsg(int /*<<< orphan*/);
const char *sql_errmsg() { return sqlite3_errmsg(enginedb()); }


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

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

LLVM IR (-O0):
define i8* @sql_errmsg() {
%1 = call i32 (...) @enginedb()
%2 = call i8* @sqlite3_errmsg(i32 %1)
ret i8* %2
}

LLVM IR (-O2):
define i8* @sql_errmsg() {
%1 = tail call i32 (...) @enginedb()
%2 = tail call i8* @sqlite3_errmsg(i32 %1)
ret i8* %2
}
void INT_Excep_TMR2_OV2I(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_TMR2_OV2I() {
ret void
}
float lerp(const float a, const float b, const float t) {
  return a + (b - a) * t;
}


x86 assembly (clang, -O0):
<lerp>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
movss  -0xc(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<lerp>:
subss  %xmm0,%xmm1
mulss  %xmm2,%xmm1
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @lerp(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = load float, float* %4
%10 = fsub float %8, %9
%11 = load float, float* %6
%12 = call float @llvm.fmuladd.f32(float %10, float %11, float %7)
ret float %12
}

LLVM IR (-O2):
define float @lerp(float %0, float %1, float %2) {
%4 = fsub float %1, %0
%5 = tail call float @llvm.fmuladd.f32(float %4, float %2, float %0)
ret float %5
}
signed long long signedlonglong_ignoring_shortint(signed long long x,
                                                  short int y) {
  return x;
}


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

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

LLVM IR (-O0):
define i64 @signedlonglong_ignoring_shortint(i64 %0, i16 signext %1) {
%3 = alloca i64
%4 = alloca i16
store i64 %0, i64* %3
store i16 %1, i16* %4
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @signedlonglong_ignoring_shortint(i64 returned %0, i16 signext %1) {
ret i64 %0
}
/* Variables and functions */
int /*<<< orphan*/ child();
void call_with_cushion(void) {
  char space[1000];
  space[999] = 1;
  child();
}


x86 assembly (clang, -O0):
<call_with_cushion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movb   $0x1,-0x9(%rbp)
mov    $0x0,%al
call   1030 <child@plt>
add    $0x3f0,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @call_with_cushion() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 999
store i8 1, i8* %2
%3 = call i32 (...) @child()
ret void
}

LLVM IR (-O2):
define void @call_with_cushion() {
%1 = tail call i32 (...) @child()
ret void
}
/* Variables and functions */
int anetReadWidthType(int, char *, int, int, int /*<<< orphan*/);
int catAnetBlockRead(int fd, char *buf, int count) {
  return anetReadWidthType(fd, buf, count, 1, 0);
}


x86 assembly (clang, -O0):
<catAnetBlockRead>:
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    $0x1,%ecx
xor    %r8d,%r8d
call   1030 <anetReadWidthType@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<catAnetBlockRead>:
mov    $0x1,%ecx
xor    %r8d,%r8d
jmp    1030 <anetReadWidthType@plt>

LLVM IR (-O0):
define i32 @catAnetBlockRead(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @anetReadWidthType(i32 %7, i8* %8, i32 %9, i32 1, i32 0)
ret i32 %10
}

LLVM IR (-O2):
define i32 @catAnetBlockRead(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @anetReadWidthType(i32 %0, i8* %1, i32 %2, i32 1, i32 0)
ret i32 %4
}
void start_settings_quick_menu(void) {}


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

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

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

LLVM IR (-O2):
define void @start_settings_quick_menu() {
ret void
}
/* Variables and functions */
char *eStrdup(char *);
char *getExecutableName();
int /*<<< orphan*/ setEtagsMode();
int /*<<< orphan*/ *strstr(char *const, char *const);
int /*<<< orphan*/ verbose(char *);
extern void testEtagsInvocation(void) {
  char *const execName = eStrdup(getExecutableName());
  char *const etags = eStrdup("etags");
  if (strstr(execName, etags) != NULL) {
    verbose("Running in etags mode\n");
    setEtagsMode();
  }
}


x86 assembly (clang, -O0):
<testEtagsInvocation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getExecutableName@plt>
mov    %rax,%rdi
call   1050 <eStrdup@plt>
mov    %rax,-0x8(%rbp)
lea    0xe8e(%rip),%rdi
call   1050 <eStrdup@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1070 <strstr@plt>
cmp    $0x0,%rax
je     11a5 <testEtagsInvocation+0x55>
lea    0xe6d(%rip),%rdi
call   1060 <verbose@plt>
mov    $0x0,%al
call   1040 <setEtagsMode@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testEtagsInvocation>:
push   %rbx
xor    %eax,%eax
call   1030 <getExecutableName@plt>
mov    %rax,%rdi
call   1050 <eStrdup@plt>
mov    %rax,%rbx
lea    0xe96(%rip),%rdi
call   1050 <eStrdup@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1070 <strstr@plt>
test   %rax,%rax
je     1193 <testEtagsInvocation+0x43>
lea    0xe80(%rip),%rdi
call   1060 <verbose@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <setEtagsMode@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"etags\00"
@.str.1 = [23 x i8] c"Running in etags mode\0A\00"
define void @testEtagsInvocation() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i8* (...) @getExecutableName()
%4 = call i8* @eStrdup(i8* %3)
store i8* %4, i8** %1
%5 = call i8* @eStrdup(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i8* %5, i8** %2
%6 = load i8*, i8** %1
%7 = load i8*, i8** %2
%8 = call i32* @strstr(i8* %6, i8* %7)
%9 = icmp ne i32* %8, null
br i1 %9, label %10, label %13
10: ; preds = %0
%11 = call i32 @verbose(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 (...) @setEtagsMode()
br label %13
13: ; preds = %10, %0
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"etags\00"
@.str.1 = [23 x i8] c"Running in etags mode\0A\00"
define void @testEtagsInvocation() {
%1 = tail call i8* (...) @getExecutableName()
%2 = tail call i8* @eStrdup(i8* %1)
%3 = tail call i8* @eStrdup(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32* @strstr(i8* dereferenceable(1) %2, i8* dereferenceable(1) %3)
%5 = icmp eq i32* %4, null
br i1 %5, label %9, label %6
6: ; preds = %0
%7 = tail call i32 @verbose(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 (...) @setEtagsMode()
br label %9
9: ; preds = %6, %0
ret void
}
/* Variables and functions */
int write(int, char *, int);
int chat_server_write(int fd, char buf[], int buflen) {
  int ret;
  if ((ret = write(fd, buf, buflen)) != buflen)
    return -1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<chat_server_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <write@plt>
mov    %eax,-0x18(%rbp)
cmp    -0x14(%rbp),%eax
je     1149 <chat_server_write+0x39>
movl   $0xffffffff,-0x4(%rbp)
jmp    1150 <chat_server_write+0x40>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chat_server_write>:
push   %rbx
mov    %edx,%ebx
call   1030 <write@plt>
xor    %ecx,%ecx
cmp    %ebx,%eax
setne  %cl
neg    %ecx
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @chat_server_write(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @write(i32 %0, i8* %1, i32 %2)
%5 = icmp ne i32 %4, %2
%6 = sext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int strcasecmp(char *, char *);
int strcasecmp_wrapper(char *s1, char *s2, ...) { return strcasecmp(s1, s2); }


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

x86 assembly (clang, -O2):
<strcasecmp_wrapper>:
jmp    1030 <strcasecmp@plt>

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

LLVM IR (-O2):
define i32 @strcasecmp_wrapper(i8* nocapture %0, i8* nocapture %1, ...) {
%3 = tail call i32 @strcasecmp(i8* %0, i8* %1)
ret i32 %3
}
int DB_EndReadSortedIndex_Native(void *db) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @DB_EndReadSortedIndex_Native(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ rmdir(char const *);
int safe_rename(char const *, char const *);
int /*<<< orphan*/ unlink(char const *);
int mutt_put_file_in_place(const char *path, const char *safe_file,
                           const char *safe_dir) {
  int rv;
  rv = safe_rename(safe_file, path);
  unlink(safe_file);
  rmdir(safe_dir);
  return rv;
}


x86 assembly (clang, -O0):
<mutt_put_file_in_place>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <safe_rename@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <unlink@plt>
mov    -0x18(%rbp),%rdi
call   1040 <rmdir@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mutt_put_file_in_place>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    %rbx,%rdi
call   1050 <safe_rename@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <unlink@plt>
mov    %r14,%rdi
call   1040 <rmdir@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @mutt_put_file_in_place(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %5
%9 = load i8*, i8** %4
%10 = call i32 @safe_rename(i8* %8, i8* %9)
store i32 %10, i32* %7
%11 = load i8*, i8** %5
%12 = call i32 @unlink(i8* %11)
%13 = load i8*, i8** %6
%14 = call i32 @rmdir(i8* %13)
%15 = load i32, i32* %7
ret i32 %15
}

LLVM IR (-O2):
define i32 @mutt_put_file_in_place(i8* %0, i8* %1, i8* nocapture %2) {
%4 = tail call i32 @safe_rename(i8* %1, i8* %0)
%5 = tail call i32 @unlink(i8* %1)
%6 = tail call i32 @rmdir(i8* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ FlightPlanStatusHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void FlightPlanStatusUpdated() { UAVObjUpdated(FlightPlanStatusHandle()); }


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

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

LLVM IR (-O0):
define void @FlightPlanStatusUpdated() {
%1 = call i32 (...) @FlightPlanStatusHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @FlightPlanStatusUpdated() {
%1 = tail call i32 (...) @FlightPlanStatusHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
void swap(char **a, char **b) {
  char *temp = *b;
  *b = *a;
  *a = temp;
}


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

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

LLVM IR (-O0):
define void @swap(i8** %0, i8** %1) {
%3 = alloca i8**
%4 = alloca i8**
%5 = alloca i8*
store i8** %0, i8*** %3
store i8** %1, i8*** %4
%6 = load i8**, i8*** %4
%7 = load i8*, i8** %6
store i8* %7, i8** %5
%8 = load i8**, i8*** %3
%9 = load i8*, i8** %8
%10 = load i8**, i8*** %4
store i8* %9, i8** %10
%11 = load i8*, i8** %5
%12 = load i8**, i8*** %3
store i8* %11, i8** %12
ret void
}

LLVM IR (-O2):
define void @swap(i8** nocapture %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = load i8*, i8** %0
store i8* %4, i8** %1
store i8* %3, i8** %0
ret void
}
void rop3_59_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = ~*D;
  stk2 = T | stk3;
  stk1 = S & stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S)) | (*D & S);
}


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

x86 assembly (clang, -O2):
<rop3_59_1_0>:
not    %sil
or     %sil,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_59_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %1, -1
%6 = or i8 %4, %5
store i8 %6, i8* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ perror(char *);
FILE *openFile(char *file, char *mode) {
  FILE *filep = fopen(file, mode);
  if (filep == NULL) {
    perror("Cannot open file");
    exit(EXIT_FAILURE);
  }
  return filep;
}


x86 assembly (clang, -O0):
<openFile>:
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 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1176 <openFile+0x46>
lea    0xe9d(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<openFile>:
push   %rax
call   1030 <fopen@plt>
test   %rax,%rax
je     113d <openFile+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"Cannot open file\00"
@EXIT_FAILURE = global i32 0
define i32* @openFile(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** %4
%8 = call i32* @fopen(i8* %6, i8* %7)
store i32* %8, i32** %5
%9 = load i32*, i32** %5
%10 = icmp eq i32* %9, null
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%13 = load i32, i32* @EXIT_FAILURE
%14 = call i32 @exit(i32 %13)
unreachable
15: ; preds = %2
%16 = load i32*, i32** %5
ret i32* %16
}

LLVM IR (-O2):
@.str = [17 x i8] c"Cannot open file\00"
@EXIT_FAILURE = global i32 0
define noalias i32* @openFile(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %0, i8* %1)
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %2
ret i32* %3
}
/* Type definitions */
struct symbol_list {
  int dummy;
};
struct ptr_list {
  int dummy;
};

/* Variables and functions */
int ptr_list_size(struct ptr_list *);
int symbol_list_size(struct symbol_list *list) {
  return ptr_list_size((struct ptr_list *)(list));
}


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

x86 assembly (clang, -O2):
<symbol_list_size>:
jmp    1030 <ptr_list_size@plt>

LLVM IR (-O0):
%struct.symbol_list = type { i32 }
%struct.ptr_list = type { i32 }
define i32 @symbol_list_size(%struct.symbol_list* %0) {
%2 = alloca %struct.symbol_list*
store %struct.symbol_list* %0, %struct.symbol_list** %2
%3 = load %struct.symbol_list*, %struct.symbol_list** %2
%4 = bitcast %struct.symbol_list* %3 to %struct.ptr_list*
%5 = call i32 @ptr_list_size(%struct.ptr_list* %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.symbol_list = type { i32 }
%struct.ptr_list = type { i32 }
define i32 @symbol_list_size(%struct.symbol_list* %0) {
%2 = bitcast %struct.symbol_list* %0 to %struct.ptr_list*
%3 = tail call i32 @ptr_list_size(%struct.ptr_list* %2)
ret i32 %3
}
/* Variables and functions */
int R(int /*<<< orphan*/);
int /*<<< orphan*/ cudaDeviceSynchronize();
int DeviceSynchronize(void) { return R(cudaDeviceSynchronize()); }


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

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

LLVM IR (-O0):
define i32 @DeviceSynchronize() {
%1 = call i32 (...) @cudaDeviceSynchronize()
%2 = call i32 @R(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
define i32 @DeviceSynchronize() {
%1 = tail call i32 (...) @cudaDeviceSynchronize()
%2 = tail call i32 @R(i32 %1)
ret i32 %2
}
void cmp_drv_i8d_deinit(struct CmpDrvI8d *drv) { (void)drv; }


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

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

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

LLVM IR (-O2):
%struct.CmpDrvI8d = type opaque
define void @cmp_drv_i8d_deinit(%struct.CmpDrvI8d* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0xb9() {
  Assert_real((isdigit(185) == 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",
              930, ("isdigit should be 0 for 0xb9"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0xb9>:
push   %rax
mov    $0xb9,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3a2,%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 0xb9\00"
define void @t_isdigit_0xb9() {
%1 = call i64 @isdigit(i32 185)
%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 930, 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 0xb9\00"
define void @t_isdigit_0xb9() {
%1 = tail call i64 @isdigit(i32 185)
%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 930, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
__attribute__((always_)) const int xisinfl(long double x) {
  return x == __builtin_infl() || x == -__builtin_infl();
}


x86 assembly (clang, -O0):
<xisinfl>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    $0x1,%al
flds   0xeeb(%rip)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
mov    %al,-0x11(%rbp)
jae    113c <xisinfl+0x3c>
jmp    1129 <xisinfl+0x29>
fldt   -0x10(%rbp)
flds   0xed2(%rip)
fucomip %st(1),%st
fstp   %st(0)
setae  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xisinfl>:
fldt   0x8(%rsp)
flds   0xef6(%rip)
fxch   %st(1)
fucomi %st(1),%st
fstp   %st(1)
setae  %al
flds   0xeeb(%rip)
fucomip %st(1),%st
fstp   %st(0)
setae  %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @xisinfl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fcmp oeq x86_fp80 %3, 0xK7FFF8000000000000000
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load x86_fp80, x86_fp80* %2
%7 = fcmp oeq x86_fp80 %6, 0xKFFFF8000000000000000
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 @xisinfl(x86_fp80 %0) {
%2 = fcmp oeq x86_fp80 %0, 0xK7FFF8000000000000000
%3 = fcmp oeq x86_fp80 %0, 0xKFFFF8000000000000000
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
void foo223() {}


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

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

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

LLVM IR (-O2):
define void @foo223() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __fail(char *, char *, char *, int);
neverGetHere2(void) {
  __fail(
      "Shouldn't get here 2", "\"Shouldn't get here 2\"",
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/atsidaev/sdcc-z80-gas/refs/heads/master/"
      "cpctelera/tools/sdcc-3.6.8-r9946/src/support/regression/tests/logic.c",
      32);
  return 0;
}


x86 assembly (clang, -O0):
<neverGetHere2>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xef3(%rip),%rsi
lea    0xf03(%rip),%rdx
mov    $0x20,%ecx
call   1030 <__fail@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<neverGetHere2>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xef6(%rip),%rsi
lea    0xf06(%rip),%rdx
mov    $0x20,%ecx
call   1030 <__fail@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Shouldn't get here 2\00"
@.str.1 = [23 x i8] c"\22Shouldn't get here 2\22\00"
@.str.2 = [200 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/atsidaev/sdcc-z80-gas/refs/heads/master/cpctelera/tools/sdcc-3.6.8-r9946/src/support/regression/tests/logic.c\00"
define i32 @neverGetHere2() {
%1 = call i32 @__fail(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([200 x i8], [200 x i8]* @.str.2, i64 0, i64 0), i32 32)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"Shouldn't get here 2\00"
@.str.1 = [23 x i8] c"\22Shouldn't get here 2\22\00"
@.str.2 = [200 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/atsidaev/sdcc-z80-gas/refs/heads/master/cpctelera/tools/sdcc-3.6.8-r9946/src/support/regression/tests/logic.c\00"
define i32 @neverGetHere2() {
%1 = tail call i32 @__fail(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([200 x i8], [200 x i8]* @.str.2, i64 0, i64 0), i32 32)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ oops(char *);
int onintr() { oops("interrupted."); }


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

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

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

LLVM IR (-O2):
@.str = [13 x i8] c"interrupted.\00"
define i32 @onintr() {
%1 = tail call i32 @oops(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
long __ccaprice_syscall_args_2(long A0, long A1, long A2) {
  unsigned long R;
  __asm__ __volatile__("syscall"
                       : "=a"(R)
                       : "a"(A0), "D"(A1), "S"(A2)
                       : "rcx", "r11", "memory");
  return R;
}


x86 assembly (clang, -O0):
<__ccaprice_syscall_args_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
syscall
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ccaprice_syscall_args_2>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rdx,%rsi
syscall
ret

LLVM IR (-O0):
define i64 @__ccaprice_syscall_args_2(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%8 = load i64, i64* %4
%9 = load i64, i64* %5
%10 = load i64, i64* %6
%11 = call i64 asm sideeffect "syscall", "={ax},{ax},{di},{si},~{rcx},~{r11},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %8, i64 %9, i64 %10)
store i64 %11, i64* %7
%12 = load i64, i64* %7
ret i64 %12
}

LLVM IR (-O2):
define i64 @__ccaprice_syscall_args_2(i64 %0, i64 %1, i64 %2) {
%4 = tail call i64 asm sideeffect "syscall", "={ax},{ax},{di},{si},~{rcx},~{r11},~{memory},~{dirflag},~{fpsr},~{flags}"(i64 %0, i64 %1, i64 %2)
ret i64 %4
}
/* Variables and functions */
int int_pow(int, int);
int geometric_series(int width, int depth) {
  return (width == 1) ? 1 : (1 - (int_pow(width, (depth + 1)))) / (1 - width);
}


x86 assembly (clang, -O0):
<geometric_series>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1135 <geometric_series+0x25>
mov    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    115a <geometric_series+0x4a>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
add    $0x1,%esi
call   1030 <int_pow@plt>
mov    %eax,%ecx
mov    $0x1,%eax
sub    %ecx,%eax
mov    $0x1,%ecx
sub    -0x4(%rbp),%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<geometric_series>:
mov    $0x1,%eax
cmp    $0x1,%edi
je     1139 <geometric_series+0x29>
push   %rbx
mov    %edi,%ebx
add    $0x1,%esi
call   1030 <int_pow@plt>
mov    $0x1,%esi
mov    $0x1,%ecx
sub    %eax,%ecx
sub    %ebx,%esi
mov    %ecx,%eax
cltd
idiv   %esi
pop    %rbx
ret

LLVM IR (-O0):
define i32 @geometric_series(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %8
7: ; preds = %2
br label %17
8: ; preds = %2
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = add nsw i32 %10, 1
%12 = call i32 @int_pow(i32 %9, i32 %11)
%13 = sub nsw i32 1, %12
%14 = load i32, i32* %3
%15 = sub nsw i32 1, %14
%16 = sdiv i32 %13, %15
br label %17
17: ; preds = %8, %7
%18 = phi i32 [ 1, %7 ], [ %16, %8 ]
ret i32 %18
}

LLVM IR (-O2):
define i32 @geometric_series(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = add nsw i32 %1, 1
%6 = tail call i32 @int_pow(i32 %0, i32 %5)
%7 = sub nsw i32 1, %6
%8 = sub nsw i32 1, %0
%9 = sdiv i32 %7, %8
br label %10
10: ; preds = %2, %4
%11 = phi i32 [ %9, %4 ], [ 1, %2 ]
ret i32 %11
}
void yy_1_TableHead(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @yy_1_TableHead(i8* nocapture %0, i32 %1) {
ret void
}
unsigned long lgcd(unsigned long x, unsigned long y) {
  unsigned long r;
  if (y == 0)
    return x;
  while ((r = x % y) != 0)
    x = y, y = r;
  return y;
}


x86 assembly (clang, -O0):
<lgcd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1124 <lgcd+0x24>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1160 <lgcd+0x60>
jmp    1129 <lgcd+0x29>
mov    -0x10(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmp    $0x0,%rdx
je     1158 <lgcd+0x58>
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1129 <lgcd+0x29>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lgcd>:
mov    %rdi,%rax
test   %rsi,%rsi
je     1135 <lgcd+0x35>
mov    %rsi,%rdx
jmp    111d <lgcd+0x1d>
nopl   (%rax)
xor    %edx,%edx
div    %rcx
mov    %rcx,%rax
test   %rdx,%rdx
je     1132 <lgcd+0x32>
mov    %rdx,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
jne    1110 <lgcd+0x10>
xor    %edx,%edx
div    %ecx
jmp    1115 <lgcd+0x15>
mov    %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @lgcd(i64 %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %6, %4 ], [ %0, %2 ]
%6 = phi i64 [ %7, %4 ], [ %1, %2 ]
%7 = urem i64 %5, %6
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i64 [ %0, %2 ], [ %6, %4 ]
ret i64 %10
}
/* Variables and functions */
int Evt_id(void const *);
int Evt_dataError(const void *my) { return (Evt_id(my) & 0x80000000UL) != 0; }


x86 assembly (clang, -O0):
<Evt_dataError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <Evt_id@plt>
cltq
movabs $0x80000000,%rcx
and    %rcx,%rax
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Evt_dataError>:
push   %rax
call   1030 <Evt_id@plt>
shr    $0x1f,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @Evt_dataError(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @Evt_id(i8* %3)
%5 = sext i32 %4 to i64
%6 = and i64 %5, 2147483648
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @Evt_dataError(i8* %0) {
%2 = tail call i32 @Evt_id(i8* %0)
%3 = lshr i32 %2, 31
ret i32 %3
}
int metric_killing(int mu) {
  if (mu == 1 || mu == 3)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<metric_killing>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     111b <metric_killing+0x1b>
cmpl   $0x3,-0x8(%rbp)
jne    1127 <metric_killing+0x27>
movl   $0x0,-0x4(%rbp)
jmp    112e <metric_killing+0x2e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<metric_killing>:
and    $0xfffffffd,%edi
xor    %eax,%eax
cmp    $0x1,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @metric_killing(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 1
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, 3
br i1 %8, label %9, label %10
9: ; preds = %6, %1
store i32 0, i32* %2
br label %11
10: ; preds = %6
store i32 1, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @metric_killing(i32 %0) {
%2 = and i32 %0, -3
%3 = icmp ne i32 %2, 1
%4 = zext i1 %3 to i32
ret i32 %4
}