xunge/DecIR huggingface dataset:
/* Variables and functions */
size_t strlen(char *);
char *basename(char *path) {
  size_t len;
  len = strlen(path);
  while (len--) {
    if (path[len] == '/')
      return path + len + 1;
  }
  return path;
}


x86 assembly (clang, -O0):
<basename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x18(%rbp)
cmp    $0x0,%rax
je     1171 <basename+0x61>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
jne    116c <basename+0x5c>
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1179 <basename+0x69>
jmp    1129 <basename+0x19>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basename>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rax,%rcx
nopl   0x0(%rax)
sub    $0x1,%rcx
jb     1137 <basename+0x27>
cmpb   $0x2f,-0x1(%rbx,%rax,1)
mov    %rcx,%rax
jne    1120 <basename+0x10>
add    %rcx,%rbx
add    $0x1,%rbx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @basename(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
br label %3
3: ; preds = %7, %1
%4 = phi i64 [ %2, %1 ], [ %5, %7 ]
%5 = add i64 %4, -1
%6 = icmp eq i64 %4, 0
br i1 %6, label %13, label %7
7: ; preds = %3
%8 = getelementptr inbounds i8, i8* %0, i64 %5
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 47
br i1 %10, label %11, label %3
11: ; preds = %7
%12 = getelementptr inbounds i8, i8* %0, i64 %4
br label %13
13: ; preds = %3, %11
%14 = phi i8* [ %12, %11 ], [ %0, %3 ]
ret i8* %14
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long above;
};
typedef TYPE_1__ XConfigureRequestEvent;

/* Variables and functions */
void set_XConfigureRequestEvent_above(void *_p, unsigned long _v) {
  ((XConfigureRequestEvent *)_p)->above = (unsigned long)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XConfigureRequestEvent_above(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
char tolower(char);
char *Q_strlwr(char *str) {
  char *origs = str;
  while (*str) {
    *str = tolower(*str);
    str++;
  }
  return origs;
}


x86 assembly (clang, -O0):
<Q_strlwr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1156 <Q_strlwr+0x46>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1124 <Q_strlwr+0x14>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q_strlwr>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%al
test   %al,%al
je     1146 <Q_strlwr+0x36>
lea    0x1(%r14),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <tolower@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <Q_strlwr+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @Q_strlwr(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call signext i8 @tolower(i8 signext %5)
store i8 %7, i8* %6
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void putc(int c) { outb(0xE9, c); }


x86 assembly (clang, -O0):
<putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0xe9,%edi
call   1030 <outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putc>:
mov    %edi,%esi
mov    $0xe9,%edi
jmp    1030 <outb@plt>

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

LLVM IR (-O2):
define void @putc(i32 %0) {
%2 = tail call i32 @outb(i32 233, i32 %0)
ret void
}
void EVP_get_pw_prompt(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_get_pw_prompt() {
ret void
}
/* Type definitions */
typedef char *uint64_t;

/* Variables and functions */
uint64_t ROL64_31(uint64_t x) {
  __asm__("rolq $31, %0" : "=r"(x) : "0"(x));
  return x;
}


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

x86 assembly (clang, -O2):
<ROL64_31>:
mov    %rdi,%rax
rol    $0x1f,%rax
ret

LLVM IR (-O0):
define i8* @ROL64_31(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* asm "rolq $$31, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
ret i8* %5
}

LLVM IR (-O2):
define i8* @ROL64_31(i8* readnone %0) {
%2 = tail call i8* asm "rolq $$31, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_event_source_get_io_revents(void *s, uint32_t *revents) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_event_source_get_io_revents>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    0x2ecb(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_event_source_get_io_revents>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_event_source_get_io_revents(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_event_source_get_io_revents(i8* nocapture readnone %0, i32* nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
int bmk_cpu_intr_ack(void) {
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<bmk_cpu_intr_ack>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <bmk_cpu_intr_ack+0x9>
jmp    1109 <bmk_cpu_intr_ack+0x9>

x86 assembly (clang, -O2):
<bmk_cpu_intr_ack>:
jmp    1100 <bmk_cpu_intr_ack>

LLVM IR (-O0):
define i32 @bmk_cpu_intr_ack() {
br label %1
1: ; preds = %1, %0
br label %1
}

LLVM IR (-O2):
define i32 @bmk_cpu_intr_ack() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ RTLD_LAZY;
int /*<<< orphan*/ *dlopen(char *, int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
int main(void) {
  if (dlopen("nodlopenmod.so", RTLD_LAZY) != NULL) {
    puts("opening \"nodlopenmod.so\" succeeded, FAIL");
    return 1;
  }
  puts("opening \"nodlopenmod.so\" failed, OK");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%esi
lea    0xec1(%rip),%rdi
call   1040 <dlopen@plt>
cmp    $0x0,%rax
je     1166 <main+0x46>
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
movl   $0x1,-0x4(%rbp)
jmp    1179 <main+0x59>
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1040 <dlopen@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
lea    0xef3(%rip),%rax
lea    0xec3(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"nodlopenmod.so\00"
@RTLD_LAZY = global i32 0
@.str.1 = [41 x i8] c"opening \22nodlopenmod.so\22 succeeded, FAIL\00"
@.str.2 = [36 x i8] c"opening \22nodlopenmod.so\22 failed, OK\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @RTLD_LAZY
%3 = call i32* @dlopen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = icmp ne i32* %3, null
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @puts(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %1
br label %9
7: ; preds = %0
%8 = call i32 @puts(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %1
br label %9
9: ; preds = %7, %5
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@.str = [15 x i8] c"nodlopenmod.so\00"
@RTLD_LAZY = global i32 0
@.str.1 = [41 x i8] c"opening \22nodlopenmod.so\22 succeeded, FAIL\00"
@.str.2 = [36 x i8] c"opening \22nodlopenmod.so\22 failed, OK\00"
define i32 @main() {
%1 = load i32, i32* @RTLD_LAZY
%2 = tail call i32* @dlopen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = icmp eq i32* %2, null
%4 = select i1 %3, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0)
%5 = xor i1 %3, true
%6 = zext i1 %5 to i32
%7 = tail call i32 @puts(i8* dereferenceable(1) %4)
ret i32 %6
}
int *getNullIfNonNull(void *input) {
  if (input)
    return 0;
  static int x;
  return &x;
}


x86 assembly (clang, -O0):
<getNullIfNonNull>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1120 <getNullIfNonNull+0x20>
movq   $0x0,-0x8(%rbp)
jmp    112b <getNullIfNonNull+0x2b>
lea    0x2efd(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getNullIfNonNull>:
xor    %eax,%eax
test   %rdi,%rdi
lea    0x2f18(%rip),%rcx
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@getNullIfNonNull.x = internal global i32 0
define i32* @getNullIfNonNull(i8* %0) {
%2 = alloca i32*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %7
6: ; preds = %1
store i32* null, i32** %2
br label %8
7: ; preds = %1
store i32* @getNullIfNonNull.x, i32** %2
br label %8
8: ; preds = %7, %6
%9 = load i32*, i32** %2
ret i32* %9
}

LLVM IR (-O2):
@getNullIfNonNull.x = internal global i32 0
define i32* @getNullIfNonNull(i8* readnone %0) {
%2 = icmp eq i8* %0, null
%3 = select i1 %2, i32* @getNullIfNonNull.x, i32* null
ret i32* %3
}
/* Type definitions */
typedef void *u_int64_t;
struct timespec {
  void *tv_nsec;
  void *tv_sec;
};

/* Variables and functions */
void gettimestamp(struct timespec *ts, u_int64_t *vts) {
  ts->tv_sec = vts[0];
  ts->tv_nsec = vts[1];
}


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

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

LLVM IR (-O0):
%struct.timespec = type { i8*, i8* }
define void @gettimestamp(%struct.timespec* %0, i8** %1) {
%3 = alloca %struct.timespec*
%4 = alloca i8**
store %struct.timespec* %0, %struct.timespec** %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = getelementptr inbounds i8*, i8** %5, i64 0
%7 = load i8*, i8** %6
%8 = load %struct.timespec*, %struct.timespec** %3
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %8, i32 0, i32 1
store i8* %7, i8** %9
%10 = load i8**, i8*** %4
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = load %struct.timespec*, %struct.timespec** %3
%14 = getelementptr inbounds %struct.timespec, %struct.timespec* %13, i32 0, i32 0
store i8* %12, i8** %14
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i8*, i8* }
define void @gettimestamp(%struct.timespec* nocapture writeonly %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 1
store i8* %3, i8** %4
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
store i8* %6, i8** %7
ret void
}
void ft_strclr(char *s) {
  int i;
  i = 0;
  while (s[i]) {
    s[i] = '\0';
    i++;
  }
}


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

x86 assembly (clang, -O2):
<ft_strclr>:
cmpb   $0x0,(%rdi)
je     111d <ft_strclr+0x1d>
add    $0x1,%rdi
nopl   0x0(%rax)
movb   $0x0,-0x1(%rdi)
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <ft_strclr+0x10>
ret

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

LLVM IR (-O2):
define void @ft_strclr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %7, %4 ], [ 0, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
store i8 0, i8* %6
%7 = add nuw nsw i64 %5, 1
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XSetStandardProperties() {
  printf("XSetStandardProperties called\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"XSetStandardProperties called\0A\00"
define i32 @XSetStandardProperties() {
%1 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [30 x i8] c"XSetStandardProperties called\00"
define i32 @XSetStandardProperties() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test();
int main(int argc, const char *argv[]) {
  test();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test()
ret i32 0
}
long int _f_lrintl(long double x) {
  long int _result;
  asm("fistpl %0" : "=m"(_result) : "t"(x) : "st");
  return _result;
}


x86 assembly (clang, -O0):
<_f_lrintl>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fistpl -0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_f_lrintl>:
fldt   0x8(%rsp)
fistpl -0x8(%rsp)
mov    -0x8(%rsp),%rax
ret

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

LLVM IR (-O2):
define i64 @_f_lrintl(x86_fp80 %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = load i64, i64* %2
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ base_convert_float_short(short *, float const *, float, int);
void convert_float_short(short *out, const float *in, float scale, int len) {
  base_convert_float_short(out, in, scale, len);
}


x86 assembly (clang, -O0):
<convert_float_short>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movss  -0x14(%rbp),%xmm0
mov    -0x18(%rbp),%edx
call   1030 <base_convert_float_short@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_float_short>:
jmp    1030 <base_convert_float_short@plt>

LLVM IR (-O0):
define void @convert_float_short(i16* %0, float* %1, float %2, i32 %3) {
%5 = alloca i16*
%6 = alloca float*
%7 = alloca float
%8 = alloca i32
store i16* %0, i16** %5
store float* %1, float** %6
store float %2, float* %7
store i32 %3, i32* %8
%9 = load i16*, i16** %5
%10 = load float*, float** %6
%11 = load float, float* %7
%12 = load i32, i32* %8
%13 = call i32 @base_convert_float_short(i16* %9, float* %10, float %11, i32 %12)
ret void
}

LLVM IR (-O2):
define void @convert_float_short(i16* %0, float* %1, float %2, i32 %3) {
%5 = tail call i32 @base_convert_float_short(i16* %0, float* %1, float %2, i32 %3)
ret void
}
/* Variables and functions */
int MV_PlayLoopedVOC(char *, unsigned int, int, int, int, int, int, int, int,
                     unsigned int);
int MV_PlayVOC(char *ptr, unsigned int ptrlength, int pitchoffset, int vol,
               int left, int right, int priority, unsigned int callbackval) {
  int status;
  status = MV_PlayLoopedVOC(ptr, ptrlength, -1, -1, pitchoffset, vol, left,
                            right, priority, callbackval);
  return (status);
}


x86 assembly (clang, -O0):
<MV_PlayVOC>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x48,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
mov    -0x20(%rbp),%ebx
mov    -0x24(%rbp),%r11d
mov    0x10(%rbp),%r10d
mov    0x18(%rbp),%eax
mov    $0xffffffff,%ecx
mov    %ecx,%edx
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1030 <MV_PlayLoopedVOC@plt>
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
add    $0x48,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<MV_PlayVOC>:
push   %rbx
mov    %r9d,%eax
mov    %r8d,%r10d
mov    %ecx,%r9d
mov    %edx,%r8d
mov    0x10(%rsp),%r11d
mov    0x18(%rsp),%ebx
mov    $0xffffffff,%edx
mov    $0xffffffff,%ecx
push   %rbx
push   %r11
push   %rax
push   %r10
call   1030 <MV_PlayLoopedVOC@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @MV_PlayVOC(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
store i8* %0, i8** %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i32 %6, i32* %15
store i32 %7, i32* %16
%18 = load i8*, i8** %9
%19 = load i32, i32* %10
%20 = load i32, i32* %11
%21 = load i32, i32* %12
%22 = load i32, i32* %13
%23 = load i32, i32* %14
%24 = load i32, i32* %15
%25 = load i32, i32* %16
%26 = call i32 @MV_PlayLoopedVOC(i8* %18, i32 %19, i32 -1, i32 -1, i32 %20, i32 %21, i32 %22, i32 %23, i32 %24, i32 %25)
store i32 %26, i32* %17
%27 = load i32, i32* %17
ret i32 %27
}

LLVM IR (-O2):
define i32 @MV_PlayVOC(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = tail call i32 @MV_PlayLoopedVOC(i8* %0, i32 %1, i32 -1, i32 -1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7)
ret i32 %9
}
int ld_blg_mr2(long double *a1, long double a2) {
  return !(__builtin_islessgreater(*a1, a2));
}


x86 assembly (clang, -O0):
<ld_blg_mr2>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
mov    %rdi,-0x8(%rbp)
fstpt  -0x20(%rbp)
mov    -0x8(%rbp),%rax
fldt   (%rax)
fldt   -0x20(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_blg_mr2>:
fldt   0x8(%rsp)
fldt   (%rdi)
xor    %eax,%eax
fucomip %st(1),%st
fstp   %st(0)
sete   %al
ret

LLVM IR (-O0):
define i32 @ld_blg_mr2(x86_fp80* %0, x86_fp80 %1) {
%3 = alloca x86_fp80*
%4 = alloca x86_fp80
store x86_fp80* %0, x86_fp80** %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80*, x86_fp80** %3
%6 = load x86_fp80, x86_fp80* %5
%7 = load x86_fp80, x86_fp80* %4
%8 = fcmp one x86_fp80 %6, %7
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @ld_blg_mr2(x86_fp80* nocapture %0, x86_fp80 %1) {
%3 = load x86_fp80, x86_fp80* %0
%4 = fcmp ueq x86_fp80 %3, %1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int rand();
void *malloc(size_t size) {
  (void)size;
  void *result =
      (void *)(unsigned long long)(0x40000000ull |
                                   (unsigned long long)(rand() &
                                                        0x1fffffffull));
  return result;
}


x86 assembly (clang, -O0):
<malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cltq
and    $0x1fffffff,%rax
or     $0x40000000,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<malloc>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
and    $0x1fffffff,%eax
or     $0x40000000,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i32 (...) @rand()
%6 = sext i32 %5 to i64
%7 = and i64 %6, 536870911
%8 = or i64 1073741824, %7
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %3
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
define i8* @malloc(i64 %0) {
%2 = tail call i32 (...) @rand()
%3 = and i32 %2, 536870911
%4 = or i32 %3, 1073741824
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
ret i8* %6
}
/* Variables and functions */
char *strchr(char *, char);
int /*<<< orphan*/ viderStdin();
void purger(char *c) {
  char *fin = strchr(c, '\n');
  if (fin) {
    *fin = 0;
  } else {
    viderStdin();
  }
}


x86 assembly (clang, -O0):
<purger>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1155 <purger+0x35>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
jmp    115c <purger+0x3c>
mov    $0x0,%al
call   1040 <viderStdin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<purger>:
push   %rax
mov    $0xa,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1135 <purger+0x15>
movb   $0x0,(%rax)
pop    %rax
ret
xor    %eax,%eax
pop    %rcx
jmp    1040 <viderStdin@plt>

LLVM IR (-O0):
define void @purger(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strchr(i8* %4, i8 signext 10)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i8*, i8** %3
store i8 0, i8* %9
br label %12
10: ; preds = %1
%11 = call i32 (...) @viderStdin()
br label %12
12: ; preds = %10, %8
ret void
}

LLVM IR (-O2):
define void @purger(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 10)
%3 = icmp eq i8* %2, null
br i1 %3, label %5, label %4
4: ; preds = %1
store i8 0, i8* %2
br label %7
5: ; preds = %1
%6 = tail call i32 (...) @viderStdin()
br label %7
7: ; preds = %5, %4
ret void
}
/* Variables and functions */
int listen(int, int);
int AMCSocketListen(int socketId, int pendingLimit) {
  return listen(socketId, pendingLimit);
}


x86 assembly (clang, -O0):
<AMCSocketListen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <listen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AMCSocketListen>:
jmp    1030 <listen@plt>

LLVM IR (-O0):
define i32 @AMCSocketListen(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 = call i32 @listen(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @AMCSocketListen(i32 %0, i32 %1) {
%3 = tail call i32 @listen(i32 %0, i32 %1)
ret i32 %3
}
int util_isalpha(char c) {
  return ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'));
}


x86 assembly (clang, -O0):
<util_isalpha>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     1129 <util_isalpha+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5a,%ecx
mov    %al,-0x2(%rbp)
jle    114e <util_isalpha+0x4e>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x61,%ecx
mov    %al,-0x3(%rbp)
jl     1148 <util_isalpha+0x48>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
setle  %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_isalpha>:
and    $0xdf,%dil
add    $0xbf,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @util_isalpha(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 90
br i1 %9, label %20, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 97
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 122
br label %18
18: ; preds = %14, %10
%19 = phi i1 [ false, %10 ], [ %17, %14 ]
br label %20
20: ; preds = %18, %6
%21 = phi i1 [ true, %6 ], [ %19, %18 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @util_isalpha(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char const *argv[]) {
  printf("Hello, World!");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [14 x i8] c"Hello, World!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void pnpmat_j_to_ko(int j, int *k, int *o) {
  *k = j >> 6;
  *o = j & 63;
}


x86 assembly (clang, -O0):
<pnpmat_j_to_ko>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%ecx
sar    $0x6,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
and    $0x3f,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<pnpmat_j_to_ko>:
mov    %edi,%eax
sar    $0x6,%eax
mov    %eax,(%rsi)
and    $0x3f,%edi
mov    %edi,(%rdx)
ret

LLVM IR (-O0):
define void @pnpmat_j_to_ko(i32 %0, i32* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32, i32* %4
%8 = ashr i32 %7, 6
%9 = load i32*, i32** %5
store i32 %8, i32* %9
%10 = load i32, i32* %4
%11 = and i32 %10, 63
%12 = load i32*, i32** %6
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @pnpmat_j_to_ko(i32 %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2) {
%4 = ashr i32 %0, 6
store i32 %4, i32* %1
%5 = and i32 %0, 63
store i32 %5, i32* %2
ret void
}
unsigned int IdentityHash(void *i1) {
  int i = *(int *)i1;
  if (i < 0)
    return -i;
  else
    return i;
}


x86 assembly (clang, -O0):
<IdentityHash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1128 <IdentityHash+0x28>
xor    %eax,%eax
sub    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    112e <IdentityHash+0x2e>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IdentityHash>:
mov    (%rdi),%ecx
mov    %ecx,%eax
neg    %eax
cmovs  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @IdentityHash(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @llvm.abs.i32(i32 %3, i1 true)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x96() {
  Assert_real((isdigit(150) == 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",
              755, ("isdigit should be 0 for 0x96"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0x96>:
push   %rax
mov    $0x96,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2f3,%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 0x96\00"
define void @t_isdigit_0x96() {
%1 = call i64 @isdigit(i32 150)
%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 755, 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 0x96\00"
define void @t_isdigit_0x96() {
%1 = tail call i64 @isdigit(i32 150)
%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 755, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct _mgmt_tempadd_rsp {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct _mgmt_tempadd_rsp *);
void mgmt_tempadd_rsp_free(struct _mgmt_tempadd_rsp *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<mgmt_tempadd_rsp_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct._mgmt_tempadd_rsp = type { i32 }
define void @mgmt_tempadd_rsp_free(%struct._mgmt_tempadd_rsp* nocapture %0) {
%2 = tail call i32 @free(%struct._mgmt_tempadd_rsp* %0)
ret void
}
/* Variables and functions */
scalar_t__ endst();
int /*<<< orphan*/ expression();
int /*<<< orphan*/ mnem_modstk(int /*<<< orphan*/);
int /*<<< orphan*/ mnem_ret();
doreturn() {
  if (endst() == 0)
    expression();
  mnem_modstk(0);
  mnem_ret();
}


x86 assembly (clang, -O0):
<doreturn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <endst@plt>
cmp    $0x0,%rax
jne    1160 <doreturn+0x20>
mov    $0x0,%al
call   1040 <expression@plt>
xor    %edi,%edi
call   1030 <mnem_modstk@plt>
mov    $0x0,%al
call   1050 <mnem_ret@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doreturn>:
push   %rax
xor    %eax,%eax
call   1060 <endst@plt>
test   %rax,%rax
jne    1154 <doreturn+0x14>
xor    %eax,%eax
call   1040 <expression@plt>
xor    %edi,%edi
call   1030 <mnem_modstk@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <mnem_ret@plt>

LLVM IR (-O0):
define i32 @doreturn() {
%1 = alloca i32
%2 = call i64 (...) @endst()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @expression()
br label %6
6: ; preds = %4, %0
%7 = call i32 @mnem_modstk(i32 0)
%8 = call i32 (...) @mnem_ret()
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
define i32 @doreturn() {
%1 = tail call i64 (...) @endst()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @expression()
br label %5
5: ; preds = %3, %0
%6 = tail call i32 @mnem_modstk(i32 0)
%7 = tail call i32 (...) @mnem_ret()
ret i32 undef
}
void INT_Excep_TPU8_TGI8B(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_TPU8_TGI8B() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ close(int);
int open(char *, int /*<<< orphan*/);
bool is_root() {
  int fd = open("/etc/shadow", O_RDONLY);
  if (fd == -1)
    return false;
  close(fd);
  return true;
}


x86 assembly (clang, -O0):
<is_root>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
lea    0xec8(%rip),%rdi
call   1040 <open@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    1156 <is_root+0x36>
movl   $0x0,-0x4(%rbp)
jmp    1165 <is_root+0x45>
mov    -0x8(%rbp),%edi
call   1030 <close@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_root>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1040 <open@plt>
cmp    $0xffffffff,%eax
je     1149 <is_root+0x29>
mov    %eax,%edi
call   1030 <close@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"/etc/shadow\00"
@O_RDONLY = global i32 0
define i32 @is_root() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* @O_RDONLY
%4 = call i32 @open(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 0, i32* %1
br label %11
8: ; preds = %0
%9 = load i32, i32* %2
%10 = call i32 @close(i32 %9)
store i32 1, i32* %1
br label %11
11: ; preds = %8, %7
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@.str = [12 x i8] c"/etc/shadow\00"
@O_RDONLY = global i32 0
define i32 @is_root() {
%1 = load i32, i32* @O_RDONLY
%2 = tail call i32 @open(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = icmp eq i32 %2, -1
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 @close(i32 %2)
br label %6
6: ; preds = %0, %4
%7 = phi i32 [ 1, %4 ], [ 0, %0 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ nocall(char *);
void acceptctl(void) { nocall("acceptctl"); }


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"acceptctl\00"
define void @acceptctl() {
%1 = call i32 @nocall(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"acceptctl\00"
define void @acceptctl() {
%1 = tail call i32 @nocall(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *calloc(int, int);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *Requete_Message(char *message) {
  char *Requete;
  char *req_mess = calloc(1400, sizeof(char));
  sprintf(req_mess, "4,%s", message);
  Requete = calloc((strlen(req_mess) + 1), sizeof(char));
  strcpy(Requete, req_mess);
  return Requete;
}


x86 assembly (clang, -O0):
<Requete_Message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x578,%edi
mov    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe92(%rip),%rsi
call   1060 <sprintf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%edi
add    $0x1,%edi
mov    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Requete_Message>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
mov    $0x578,%edi
mov    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,%r15
lea    0xe9f(%rip),%rsi
mov    %rax,%rdi
mov    %r14,%rdx
call   1060 <sprintf@plt>
mov    %r15,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
mov    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"4,%s\00"
define i8* @Requete_Message(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
%5 = call i8* @calloc(i32 1400, i32 1)
store i8* %5, i8** %4
%6 = load i8*, i8** %4
%7 = load i8*, i8** %2
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i8*, i8** %4
%10 = call i32 @strlen(i8* %9)
%11 = add nsw i32 %10, 1
%12 = call i8* @calloc(i32 %11, i32 1)
store i8* %12, i8** %3
%13 = load i8*, i8** %3
%14 = load i8*, i8** %4
%15 = call i32 @strcpy(i8* %13, i8* %14)
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
@.str = [5 x i8] c"4,%s\00"
define i8* @Requete_Message(i8* %0) {
%2 = tail call dereferenceable_or_null(1400) i8* @calloc(i32 1400, i32 1)
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %2, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @strlen(i8* %2)
%5 = add nsw i32 %4, 1
%6 = tail call i8* @calloc(i32 %5, i32 1)
%7 = tail call i32 @strcpy(i8* %6, i8* %2)
ret i8* %6
}
/* Variables and functions */
int look_for_symbol(void *, char *);
int detect_pthreads(void *handle) {
  return look_for_symbol(handle, "pthread_create");
}


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

x86 assembly (clang, -O2):
<detect_pthreads>:
lea    0xee9(%rip),%rsi
jmp    1030 <look_for_symbol@plt>

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

LLVM IR (-O2):
@.str = [15 x i8] c"pthread_create\00"
define i32 @detect_pthreads(i8* %0) {
%2 = tail call i32 @look_for_symbol(i8* %0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
void sc_0(unsigned char *s) {
  int i;
  for (i = 0; i < 32; i++) {
    s[i] = 0;
  }
}


x86 assembly (clang, -O0):
<sc_0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x20,-0xc(%rbp)
jge    1133 <sc_0+0x33>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <sc_0+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sc_0>:
xorps  %xmm0,%xmm0
movups %xmm0,0x10(%rdi)
movups %xmm0,(%rdi)
ret

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

LLVM IR (-O2):
define void @sc_0(i8* nocapture writeonly %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ __set_BASEPRI(int /*<<< orphan*/);
void __basepriRestoreMem(uint8_t *val) { __set_BASEPRI(*val); }


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

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

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

LLVM IR (-O2):
define void @__basepriRestoreMem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @__set_BASEPRI(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, short);
int main() {
  short sh = 2;
  printf("%d\n", sh);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16 signext 2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ RedisModule_Free(void *);
void MemAllocFree(void *value) { RedisModule_Free(value); }


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

x86 assembly (clang, -O2):
<MemAllocFree>:
jmp    1030 <RedisModule_Free@plt>

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

LLVM IR (-O2):
define void @MemAllocFree(i8* %0) {
%2 = tail call i32 @RedisModule_Free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ msgErro(char *);
void erroFechaPar() { msgErro("Faltou fechar os parenteses!"); }


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

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

LLVM IR (-O0):
@.str = [29 x i8] c"Faltou fechar os parenteses!\00"
define void @erroFechaPar() {
%1 = call i32 @msgErro(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"Faltou fechar os parenteses!\00"
define void @erroFechaPar() {
%1 = tail call i32 @msgErro(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret void
}