xunge/DecIR huggingface dataset:
/* Variables and functions */
size_t len(char *s) {
  if (s == NULL)
    return 0;
  char *offset = s;
  while (*s++ != '\0')
    ;
  return s - offset - 1;
}


x86 assembly (clang, -O0):
<len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1120 <len+0x20>
movq   $0x0,-0x8(%rbp)
jmp    115b <len+0x5b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1148 <len+0x48>
jmp    1128 <len+0x28>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    %rcx,%rax
sub    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<len>:
test   %rdi,%rdi
je     111f <len+0x1f>
mov    $0xffffffffffffffff,%rcx
nopl   0x0(%rax)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <len+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @len(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i8* [ %5, %3 ], [ %0, %1 ]
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %4
%7 = icmp eq i8 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3
%9 = ptrtoint i8* %5 to i64
%10 = ptrtoint i8* %0 to i64
%11 = xor i64 %10, -1
%12 = add i64 %9, %11
br label %13
13: ; preds = %1, %8
%14 = phi i64 [ %12, %8 ], [ 0, %1 ]
ret i64 %14
}
int _isupper(int c) {
  if (c >= 'A' && c <= 'Z')
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<_isupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x41,-0x8(%rbp)
jl     1127 <_isupper+0x27>
cmpl   $0x5a,-0x8(%rbp)
jg     1127 <_isupper+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <_isupper+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_isupper>:
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @_isupper(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ cl_mem;
typedef int /*<<< orphan*/ cl_int;

/* Variables and functions */
int /*<<< orphan*/ syscall(int, int, unsigned int *);
cl_int clSetMemObjectDestructorCallback(cl_mem memobj,
                                        void (*pfn_notify)(cl_mem memobj,
                                                           void *user_data),
                                        void *user_data) {
  unsigned int sys_args[3];
  sys_args[0] = (unsigned int)memobj;
  sys_args[1] = (unsigned int)pfn_notify;
  sys_args[2] = (unsigned int)user_data;
  return (cl_int)syscall(325, 1023, sys_args);
}


x86 assembly (clang, -O0):
<clSetMemObjectDestructorCallback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %eax,-0x1c(%rbp)
lea    -0x24(%rbp),%rdx
mov    $0x145,%edi
mov    $0x3ff,%esi
call   1030 <syscall@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clSetMemObjectDestructorCallback>:
sub    $0x18,%rsp
mov    %edi,0xc(%rsp)
mov    %esi,0x10(%rsp)
mov    %edx,0x14(%rsp)
lea    0xc(%rsp),%rdx
mov    $0x145,%edi
mov    $0x3ff,%esi
call   1030 <syscall@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @clSetMemObjectDestructorCallback(i64 %0, void (i64, i8*)* %1, i8* %2) {
%4 = alloca i64
%5 = alloca void (i64, i8*)*
%6 = alloca i8*
%7 = alloca [3 x i32]
store i64 %0, i64* %4
store void (i64, i8*)* %1, void (i64, i8*)** %5
store i8* %2, i8** %6
%8 = load i64, i64* %4
%9 = trunc i64 %8 to i32
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %7, i64 0, i64 0
store i32 %9, i32* %10
%11 = load void (i64, i8*)*, void (i64, i8*)** %5
%12 = ptrtoint void (i64, i8*)* %11 to i32
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %7, i64 0, i64 1
store i32 %12, i32* %13
%14 = load i8*, i8** %6
%15 = ptrtoint i8* %14 to i32
%16 = getelementptr inbounds [3 x i32], [3 x i32]* %7, i64 0, i64 2
store i32 %15, i32* %16
%17 = getelementptr inbounds [3 x i32], [3 x i32]* %7, i64 0, i64 0
%18 = call i32 @syscall(i32 325, i32 1023, i32* %17)
ret i32 %18
}

LLVM IR (-O2):
define i32 @clSetMemObjectDestructorCallback(i64 %0, void (i64, i8*)* %1, i8* %2) {
%4 = alloca [3 x i32]
%5 = bitcast [3 x i32]* %4 to i8*
%6 = trunc i64 %0 to i32
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 0
store i32 %6, i32* %7
%8 = ptrtoint void (i64, i8*)* %1 to i64
%9 = trunc i64 %8 to i32
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 1
store i32 %9, i32* %10
%11 = ptrtoint i8* %2 to i64
%12 = trunc i64 %11 to i32
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 2
store i32 %12, i32* %13
%14 = call i32 @syscall(i32 325, i32 1023, i32* %7)
ret i32 %14
}
/* Type definitions */
struct Var {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pA(char *, char const *, char const *, char const *);
void __func_sub_ptr(struct Var *avar, const char *areg, const char *lreg,
                    const char *rreg) {
  pA("%s = %s - %s;", areg, lreg, rreg);
}


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

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

LLVM IR (-O0):
%struct.Var = type { i32 }
@.str = [14 x i8] c"%s = %s - %s;\00"
define void @__func_sub_ptr(%struct.Var* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca %struct.Var*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store %struct.Var* %0, %struct.Var** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %6
%10 = load i8*, i8** %7
%11 = load i8*, i8** %8
%12 = call i32 @pA(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10, i8* %11)
ret void
}

LLVM IR (-O2):
%struct.Var = type { i32 }
@.str = [14 x i8] c"%s = %s - %s;\00"
define void @__func_sub_ptr(%struct.Var* nocapture readnone %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @pA(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/
UpnpResponse_MediaServer_ContentDirectory_GetSortCapabilities(void *, char *);
int /*<<< orphan*/ printf(char *);
void UpnpMediaServer_ContentDirectory_GetSortCapabilities(void *upnptoken) {
  printf("Invoke: UpnpMediaServer_ContentDirectory_GetSortCapabilities();\r\n");
  UpnpResponse_MediaServer_ContentDirectory_GetSortCapabilities(
      upnptoken, "Sample String");
}


x86 assembly (clang, -O0):
<UpnpMediaServer_ContentDirectory_GetSortCapabilities>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeff(%rip),%rsi
call   1030 <UpnpResponse_MediaServer_ContentDirectory_GetSortCapabilities@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UpnpMediaServer_ContentDirectory_GetSortCapabilities>:
push   %rbx
mov    %rdi,%rbx
lea    0xee3(%rip),%rdi
call   1040 <puts@plt>
lea    0xec9(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <UpnpResponse_MediaServer_ContentDirectory_GetSortCapabilities@plt>

LLVM IR (-O0):
@.str = [66 x i8] c"Invoke: UpnpMediaServer_ContentDirectory_GetSortCapabilities();\0D\0A\00"
@.str.1 = [14 x i8] c"Sample String\00"
define void @UpnpMediaServer_ContentDirectory_GetSortCapabilities(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @UpnpResponse_MediaServer_ContentDirectory_GetSortCapabilities(i8* %4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [14 x i8] c"Sample String\00"
@str = [65 x i8] c"Invoke: UpnpMediaServer_ContentDirectory_GetSortCapabilities();\0D\00"
define void @UpnpMediaServer_ContentDirectory_GetSortCapabilities(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @UpnpResponse_MediaServer_ContentDirectory_GetSortCapabilities(i8* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "USAGE: test_real_symmetric_eigen a11 a21 a22 a31 a32 a33\n");
  fprintf(stderr, "Compare to: http://www.akiti.ca/Eig3RSSolv.html\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf0b(%rip),%rsi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [58 x i8] c"USAGE: test_real_symmetric_eigen a11 a21 a22 a31 a32 a33\0A\00"
@.str.1 = [49 x i8] c"Compare to: http://www.akiti.ca/Eig3RSSolv.html\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [58 x i8] c"USAGE: test_real_symmetric_eigen a11 a21 a22 a31 a32 a33\0A\00"
@.str.1 = [49 x i8] c"Compare to: http://www.akiti.ca/Eig3RSSolv.html\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
scalar_t__ pthread_mutex_trylock(int /*<<< orphan*/ *);
int lock_mutex(pthread_mutex_t *mtx) {
  if (pthread_mutex_trylock(mtx) == 0) {
    return 0;
  } else {
    return -1;
  }
}


x86 assembly (clang, -O0):
<lock_mutex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <pthread_mutex_trylock@plt>
cmp    $0x0,%rax
jne    113b <lock_mutex+0x2b>
movl   $0x0,-0x4(%rbp)
jmp    1142 <lock_mutex+0x32>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lock_mutex>:
push   %rax
call   1030 <pthread_mutex_trylock@plt>
neg    %rax
sbb    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @lock_mutex(i32* %0) {
%2 = tail call i64 @pthread_mutex_trylock(i32* %0)
%3 = icmp ne i64 %2, 0
%4 = sext i1 %3 to i32
ret i32 %4
}
void glutPostWindowOverlayRedisplay(int ID) {}


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

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

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

LLVM IR (-O2):
define void @glutPostWindowOverlayRedisplay(i32 %0) {
ret void
}
int main() {
  int a[3] = {1, 2, 3};
  a[0] = a[2];
  return a[0];
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    0xeee(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xeec(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.a = [3 x i32] [i32 1, i32 2, i32 3]
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i32]
store i32 0, i32* %1
%3 = bitcast [3 x i32]* %2 to i8*
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%5 = load i32, i32* %4
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
store i32 %5, i32* %6
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
ret i32 3
}
void set_le16(void *p, unsigned n) {
  ((unsigned char *)p)[1] = (unsigned char)(n >> 8);
  ((unsigned char *)p)[0] = (unsigned char)n;
}


x86 assembly (clang, -O0):
<set_le16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x8,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_le16>:
mov    %si,(%rdi)
ret

LLVM IR (-O0):
define void @set_le16(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = lshr i32 %5, 8
%7 = trunc i32 %6 to i8
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 1
store i8 %7, i8* %9
%10 = load i32, i32* %4
%11 = trunc i32 %10 to i8
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i64 0
store i8 %11, i8* %13
ret void
}

LLVM IR (-O2):
define void @set_le16(i8* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 8
%4 = trunc i32 %3 to i8
%5 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %4, i8* %5
%6 = trunc i32 %1 to i8
store i8 %6, i8* %0
ret void
}
/* Variables and functions */
int assert(char *);
int strLen(char str[]) {
  return assert(str), *str == '\0' ? 0 : strLen(str + 1) + 1;
}


x86 assembly (clang, -O0):
<strLen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    114f <strLen+0x2f>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    1162 <strLen+0x42>
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
call   1040 <strLen@plt>
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strLen>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <assert@plt>
cmpb   $0x0,(%r14)
je     1149 <strLen+0x39>
add    $0x1,%r14
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
mov    %rax,%rbx
lea    (%r14,%rax,1),%rdi
call   1030 <assert@plt>
lea    0x1(%rbx),%rax
cmpb   $0x0,(%r14,%rbx,1)
jne    1130 <strLen+0x20>
jmp    114b <strLen+0x3b>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @strLen(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %1, %5
%6 = phi i8* [ %8, %5 ], [ %0, %1 ]
%7 = phi i32 [ %9, %5 ], [ 0, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = add nuw nsw i32 %7, 1
%10 = tail call i32 @assert(i8* %8)
%11 = load i8, i8* %8
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %1
%14 = phi i32 [ 0, %1 ], [ %9, %5 ]
ret i32 %14
}
int cmd_tftp(char *arg_list[], int n) {
  sw_printf("\nstart run %s...\n\n\r", __func__);
  return 0;
}


x86 assembly (clang, -O0):
<cmd_tftp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeda(%rip),%rdi
lea    0xee7(%rip),%rsi
mov    $0x0,%al
call   1030 <sw_printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [20 x i8] c"\0Astart run %s...\0A\0A\0D\00"
@__func__.cmd_tftp = [9 x i8] c"cmd_tftp\00"
define i32 @cmd_tftp(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
store i8** %0, i8*** %3
store i32 %1, i32* %4
%5 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @sw_printf to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.cmd_tftp, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"\0Astart run %s...\0A\0A\0D\00"
@__func__.cmd_tftp = [9 x i8] c"cmd_tftp\00"
define i32 @cmd_tftp(i8** nocapture readnone %0, i32 %1) {
%3 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @sw_printf to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.cmd_tftp, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void __stack_chk_fail(void) {
  assert(!"FATAL: finally reached __stack_chk_fail()\n");
}


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

x86 assembly (clang, -O2):
<__stack_chk_fail>:
xor    %edi,%edi
jmp    1030 <assert@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"FATAL: finally reached __stack_chk_fail()\0A\00"
define void @__stack_chk_fail() {
%1 = call i32 @assert(i32 0)
ret void
}

LLVM IR (-O2):
define void @__stack_chk_fail() {
%1 = tail call i32 @assert(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, unsigned int);
void OpenFieldSet(char *cLabel, unsigned uWidth) {
  printf("<fieldset><legend><b>%s</b></legend><table width=%u%%>\n", cLabel,
         uWidth);
}


x86 assembly (clang, -O0):
<OpenFieldSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OpenFieldSet>:
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"<fieldset><legend><b>%s</b></legend><table width=%u%%>\0A\00"
define void @OpenFieldSet(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [56 x i8] c"<fieldset><legend><b>%s</b></legend><table width=%u%%>\0A\00"
define void @OpenFieldSet(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret void
}
double suma(double valor1, double valor2) {
  double valor3;
  valor3 = valor1 + valor2;
  return valor3;
}


x86 assembly (clang, -O0):
<suma>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<suma>:
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @suma(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = load double, double* %4
%8 = fadd double %6, %7
store double %8, double* %5
%9 = load double, double* %5
ret double %9
}

LLVM IR (-O2):
define double @suma(double %0, double %1) {
%3 = fadd double %0, %1
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ AND_();
int /*<<< orphan*/ c64_memAbsoluteAddrX();
void AND_absx(void) {
  c64_memAbsoluteAddrX();
  AND_();
}


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

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

LLVM IR (-O0):
define void @AND_absx() {
%1 = call i32 (...) @c64_memAbsoluteAddrX()
%2 = call i32 (...) @AND_()
ret void
}

LLVM IR (-O2):
define void @AND_absx() {
%1 = tail call i32 (...) @c64_memAbsoluteAddrX()
%2 = tail call i32 (...) @AND_()
ret void
}
/* Variables and functions */
double rgamma(double);
double rbeta(double u, double v) {
  double r;
  r = rgamma(u);
  return (r / (r + rgamma(v)));
}


x86 assembly (clang, -O0):
<rbeta>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <rgamma@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <rgamma@plt>
movsd  -0x28(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x20(%rbp),%xmm0
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rbeta>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
call   1030 <rgamma@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <rgamma@plt>
movsd  0x8(%rsp),%xmm1
addsd  %xmm1,%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @rbeta(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = call double @rgamma(double %6)
store double %7, double* %5
%8 = load double, double* %5
%9 = load double, double* %5
%10 = load double, double* %4
%11 = call double @rgamma(double %10)
%12 = fadd double %9, %11
%13 = fdiv double %8, %12
ret double %13
}

LLVM IR (-O2):
define double @rbeta(double %0, double %1) {
%3 = tail call double @rgamma(double %0)
%4 = tail call double @rgamma(double %1)
%5 = fadd double %3, %4
%6 = fdiv double %3, %5
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0xb9() {
  Assert_real((isupper(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_isupper.c",
              930, ("isupper should be 0 for 0xb9"));
}


x86 assembly (clang, -O0):
<t_isupper_0xb9>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb9,%edi
call   1030 <isupper@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_isupper_0xb9>:
push   %rax
mov    $0xb9,%edi
call   1030 <isupper@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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xb9\00"
define void @t_isupper_0xb9() {
%1 = call i64 @isupper(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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xb9\00"
define void @t_isupper_0xb9() {
%1 = tail call i64 @isupper(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
}
double str2ra(in)
char *in;
{
  double ra;
  ra = str2dec(in);
  if (strsrch(in, ":"))
    ra = ra * 15.0;
  return (ra);
}


x86 assembly (clang, -O0):
<str2ra>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <str2dec@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x0,%al
call   1030 <strsrch@plt>
cmp    $0x0,%eax
je     116d <str2ra+0x4d>
movsd  0xe9d(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str2ra>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <str2dec@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
lea    0xec8(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <strsrch@plt>
test   %eax,%eax
je     115e <str2ra+0x3e>
movsd  0x8(%rsp),%xmm0
mulsd  0xea4(%rip),%xmm0
jmp    1164 <str2ra+0x44>
movsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c":\00"
define double @str2ra(i8* %0) {
%2 = alloca i8*
%3 = alloca double
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @str2dec to i32 (i8*, ...)*)(i8* %4)
%6 = sitofp i32 %5 to double
store double %6, double* %3
%7 = load i8*, i8** %2
%8 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @strsrch to i32 (i8*, i8*, ...)*)(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load double, double* %3
%12 = fmul double %11, 1.500000e+01
store double %12, double* %3
br label %13
13: ; preds = %10, %1
%14 = load double, double* %3
ret double %14
}

LLVM IR (-O2):
@.str = [2 x i8] c":\00"
define double @str2ra(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @str2dec to i32 (i8*, ...)*)(i8* %0)
%3 = sitofp i32 %2 to double
%4 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @strsrch to i32 (i8*, i8*, ...)*)(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i32 %4, 0
%6 = fmul double %3, 1.500000e+01
%7 = select i1 %5, double %3, double %6
ret double %7
}
void null_handle(int _) {}


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

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

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

LLVM IR (-O2):
define void @null_handle(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void iptables_clear() {
  system("iptables -D FORWARD 1");
  system("iptables -D FORWARD 1");
}


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

x86 assembly (clang, -O2):
<iptables_clear>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <system@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <system@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"iptables -D FORWARD 1\00"
define void @iptables_clear() {
%1 = call i32 @system(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"iptables -D FORWARD 1\00"
define void @iptables_clear() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret void
}
void foo(void) { (volatile int){1} + (volatile int){2}; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movl   $0x1,-0x4(%rsp)
mov    -0x4(%rsp),%eax
movl   $0x2,-0x8(%rsp)
mov    -0x8(%rsp),%eax
ret

LLVM IR (-O0):
define void @foo() {
%1 = alloca i32
%2 = alloca i32
store i32 1, i32* %1
%3 = load volatile i32, i32* %1
store i32 2, i32* %2
%4 = load volatile i32, i32* %2
%5 = add nsw i32 %3, %4
ret void
}

LLVM IR (-O2):
define void @foo() {
%1 = alloca i32
%2 = alloca i32
store i32 1, i32* %1
%3 = load volatile i32, i32* %1
store i32 2, i32* %2
%4 = load volatile i32, i32* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EVT_exit();
int /*<<< orphan*/ PM_fatalError(char *);
void _EVT_abort(int signal) {
  EVT_exit();
  PM_fatalError("Unhandled exception!");
}


x86 assembly (clang, -O0):
<_EVT_abort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <EVT_exit@plt>
lea    0xec7(%rip),%rdi
call   1030 <PM_fatalError@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_EVT_abort>:
push   %rax
xor    %eax,%eax
call   1040 <EVT_exit@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1030 <PM_fatalError@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Unhandled exception!\00"
define void @_EVT_abort(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @EVT_exit()
%4 = call i32 @PM_fatalError(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Unhandled exception!\00"
define void @_EVT_abort(i32 %0) {
%2 = tail call i32 (...) @EVT_exit()
%3 = tail call i32 @PM_fatalError(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0xfa() {
  Assert_real((isdigit(250) == 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",
              1255, ("isdigit should be 0 for 0xfa"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0xfa>:
push   %rax
mov    $0xfa,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4e7,%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 0xfa\00"
define void @t_isdigit_0xfa() {
%1 = call i64 @isdigit(i32 250)
%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 1255, 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 0xfa\00"
define void @t_isdigit_0xfa() {
%1 = tail call i64 @isdigit(i32 250)
%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 1255, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void pstrcat(char *s, char *t) {
  while (*s++)
    ;
  s--;
  while ((*s++ = *t++))
    ;
}


x86 assembly (clang, -O0):
<pstrcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1129 <pstrcat+0x29>
jmp    110c <pstrcat+0xc>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     1164 <pstrcat+0x64>
jmp    1135 <pstrcat+0x35>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pstrcat>:
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1100 <pstrcat>
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,-0x1(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <pstrcat+0x10>
ret

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

LLVM IR (-O2):
define void @pstrcat(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %5, %3 ]
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %4
%7 = icmp eq i8 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %8
%9 = phi i8* [ %13, %8 ], [ %4, %3 ]
%10 = phi i8* [ %11, %8 ], [ %1, %3 ]
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %10
%13 = getelementptr inbounds i8, i8* %9, i64 1
store i8 %12, i8* %9
%14 = icmp eq i8 %12, 0
br i1 %14, label %15, label %8
15: ; preds = %8
ret void
}
unsigned long long rdtsc(void) {
  unsigned long long result;
  __asm__ volatile(".byte 0x0F, 0x31" : "=A"(result));
  return result;
}


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

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

LLVM IR (-O0):
define i64 @rdtsc() {
%1 = alloca i64
%2 = call i64 asm sideeffect ".byte 0x0F, 0x31", "=A,~{dirflag},~{fpsr},~{flags}"()
store i64 %2, i64* %1
%3 = load i64, i64* %1
ret i64 %3
}

LLVM IR (-O2):
define i64 @rdtsc() {
%1 = tail call i64 asm sideeffect ".byte 0x0F, 0x31", "=A,~{dirflag},~{fpsr},~{flags}"()
ret i64 %1
}
void __DELETE_java_lang_Long(void *me, void *client_data) {}


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

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

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

LLVM IR (-O2):
define void @__DELETE_java_lang_Long(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bcm2835_write(int, int /*<<< orphan*/);
int bcm2835_rng_exit(void) {
  bcm2835_write(((0 + 0x104000) + 0x0), 0);
  return 0;
}


x86 assembly (clang, -O0):
<bcm2835_rng_exit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x104000,%edi
xor    %esi,%esi
call   1030 <bcm2835_write@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bcm2835_rng_exit>:
push   %rax
mov    $0x104000,%edi
xor    %esi,%esi
call   1030 <bcm2835_write@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @bcm2835_rng_exit() {
%1 = call i32 @bcm2835_write(i32 1064960, i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @bcm2835_rng_exit() {
%1 = tail call i32 @bcm2835_write(i32 1064960, i32 0)
ret i32 0
}
double dot_prod(double *u, double *v) {
  return u[0] * v[0] + u[1] * v[1] + u[2] * v[2];
}


x86 assembly (clang, -O0):
<dot_prod>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dot_prod>:
movsd  0x8(%rdi),%xmm0
mulsd  0x8(%rsi),%xmm0
movsd  (%rdi),%xmm1
mulsd  (%rsi),%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rdi),%xmm0
mulsd  0x10(%rsi),%xmm0
addsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @dot_prod(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = getelementptr inbounds double, double* %0, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = fmul double %6, %8
%10 = tail call double @llvm.fmuladd.f64(double %3, double %4, double %9)
%11 = getelementptr inbounds double, double* %0, i64 2
%12 = load double, double* %11
%13 = getelementptr inbounds double, double* %1, i64 2
%14 = load double, double* %13
%15 = tail call double @llvm.fmuladd.f64(double %12, double %14, double %10)
ret double %15
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void catch_hup(int sig_num) {
  printf("Received a SIGHUP, inside the handler now\n");
}


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

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

LLVM IR (-O0):
@.str = [43 x i8] c"Received a SIGHUP, inside the handler now\0A\00"
define void @catch_hup(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [42 x i8] c"Received a SIGHUP, inside the handler now\00"
define void @catch_hup(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ color(int);
int /*<<< orphan*/ draw(double, double, double);
int /*<<< orphan*/ move(double, double, double);
void axes() {
  color(3);
  move(0.0, 0.0, 0.0);
  draw(4.0, 0.0, 0.0);
  move(0.0, 0.0, 0.0);
  draw(0.0, 4.0, 0.0);
  move(0.0, 0.0, 0.0);
  draw(0.0, 0.0, 4.0);
}


x86 assembly (clang, -O0):
<axes>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1040 <color@plt>
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1050 <move@plt>
movsd  0xeac(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   1030 <draw@plt>
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1050 <move@plt>
xorps  %xmm2,%xmm2
movsd  0xe88(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <draw@plt>
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1050 <move@plt>
xorps  %xmm1,%xmm1
movsd  0xe67(%rip),%xmm2
movaps %xmm1,%xmm0
call   1030 <draw@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<axes>:
push   %rax
mov    $0x3,%edi
call   1040 <color@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1050 <move@plt>
movsd  0xeaf(%rip),%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1030 <draw@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1050 <move@plt>
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
movsd  0xe88(%rip),%xmm1
call   1030 <draw@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1050 <move@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movsd  0xe67(%rip),%xmm2
pop    %rax
jmp    1030 <draw@plt>

LLVM IR (-O0):
define void @axes() {
%1 = call i32 @color(i32 3)
%2 = call i32 @move(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%3 = call i32 @draw(double 4.000000e+00, double 0.000000e+00, double 0.000000e+00)
%4 = call i32 @move(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%5 = call i32 @draw(double 0.000000e+00, double 4.000000e+00, double 0.000000e+00)
%6 = call i32 @move(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%7 = call i32 @draw(double 0.000000e+00, double 0.000000e+00, double 4.000000e+00)
ret void
}

LLVM IR (-O2):
define void @axes() {
%1 = tail call i32 @color(i32 3)
%2 = tail call i32 @move(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%3 = tail call i32 @draw(double 4.000000e+00, double 0.000000e+00, double 0.000000e+00)
%4 = tail call i32 @move(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%5 = tail call i32 @draw(double 0.000000e+00, double 4.000000e+00, double 0.000000e+00)
%6 = tail call i32 @move(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%7 = tail call i32 @draw(double 0.000000e+00, double 0.000000e+00, double 4.000000e+00)
ret void
}
int Kit_CubeContains(unsigned uLarge, unsigned uSmall) {
  return (uLarge & uSmall) == uSmall;
}


x86 assembly (clang, -O0):
<Kit_CubeContains>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Kit_CubeContains>:
not    %edi
xor    %eax,%eax
test   %edi,%esi
sete   %al
ret

LLVM IR (-O0):
define i32 @Kit_CubeContains(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = and i32 %5, %6
%8 = load i32, i32* %4
%9 = icmp eq i32 %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @Kit_CubeContains(i32 %0, i32 %1) {
%3 = and i32 %1, %0
%4 = icmp eq i32 %3, %1
%5 = zext i1 %4 to i32
ret i32 %5
}
int FloatAsInt(float f) {
  int temp;
  *(float *)&temp = f;
  return temp;
}


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

x86 assembly (clang, -O2):
<FloatAsInt>:
movd   %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @FloatAsInt(float %0) {
%2 = alloca float
%3 = alloca i32
store float %0, float* %2
%4 = load float, float* %2
%5 = bitcast i32* %3 to float*
store float %4, float* %5
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @FloatAsInt(float %0) {
%2 = bitcast float %0 to i32
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ inb(int);
int /*<<< orphan*/ outb(int, int);
void vgahw_screen_disable(void) {
  inb(0x3da);
  outb(0x00, 0x3c0);
}


x86 assembly (clang, -O0):
<vgahw_screen_disable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3da,%edi
call   1040 <inb@plt>
xor    %edi,%edi
mov    $0x3c0,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vgahw_screen_disable>:
push   %rax
mov    $0x3da,%edi
call   1040 <inb@plt>
xor    %edi,%edi
mov    $0x3c0,%esi
pop    %rax
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @vgahw_screen_disable() {
%1 = call i32 @inb(i32 986)
%2 = call i32 @outb(i32 0, i32 960)
ret void
}

LLVM IR (-O2):
define void @vgahw_screen_disable() {
%1 = tail call i32 @inb(i32 986)
%2 = tail call i32 @outb(i32 0, i32 960)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strchr(char *, char);
int symchar(char c) {
  static char *special = "()[]'\";`,\\| \f\n\r\t\v";
  return !strchr(special, c);
}


x86 assembly (clang, -O0):
<symchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    0x2f03(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1030 <strchr@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<symchar>:
push   %rax
mov    %edi,%esi
lea    0xee6(%rip),%rdi
call   1030 <strchr@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@symchar.special = internal global i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i32 0, i32 0)
@.str = [18 x i8] c"()[]'\22;`,\\| \0C\0A\0D\09\0B\00"
define i32 @symchar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8*, i8** @symchar.special
%4 = load i8, i8* %2
%5 = call i32 @strchr(i8* %3, i8 signext %4)
%6 = icmp ne i32 %5, 0
%7 = xor i1 %6, true
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
@.str = [18 x i8] c"()[]'\22;`,\\| \0C\0A\0D\09\0B\00"
define i32 @symchar(i8 signext %0) {
%2 = tail call i32 @strchr(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8 signext %0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}