xunge/DecIR huggingface dataset:
int ctoken_stream_text_getch(void *fp) {
  char **ptr = (char **)fp;
  if (**ptr == 0)
    return -1;
  return *((*ptr)++);
}


x86 assembly (clang, -O0):
<ctoken_stream_text_getch>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    112f <ctoken_stream_text_getch+0x2f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1146 <ctoken_stream_text_getch+0x46>
mov    -0x18(%rbp),%rcx
mov    (%rcx),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,(%rcx)
movsbl (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctoken_stream_text_getch>:
mov    (%rdi),%rax
cmpb   $0x0,(%rax)
je     1113 <ctoken_stream_text_getch+0x13>
lea    0x1(%rax),%rcx
mov    %rcx,(%rdi)
movsbl (%rax),%eax
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @ctoken_stream_text_getch(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = getelementptr inbounds i8, i8* %3, i64 1
store i8* %7, i8** %2
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
br label %10
10: ; preds = %1, %6
%11 = phi i32 [ %9, %6 ], [ -1, %1 ]
ret i32 %11
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ chr1setBank3(int);
void m65setParamsB003(uint16_t addr, uint8_t val) {
  (void)addr;
  chr1setBank3(val << 10);
}


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

x86 assembly (clang, -O2):
mov    %esi,%edi
shl    $0xa,%edi
jmp    1030 <chr1setBank3@plt>

LLVM IR (-O0):
define void @m65setParamsB003(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 = shl i32 %6, 10
%8 = call i32 @chr1setBank3(i32 %7)
ret void
}

LLVM IR (-O2):
define void @m65setParamsB003(i32 %0, i32 %1) {
%3 = shl i32 %1, 10
%4 = tail call i32 @chr1setBank3(i32 %3)
ret void
}
const char *cpu(void) { return ""; }


x86 assembly (clang, -O0):
<cpu>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpu>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @cpu() {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @cpu() {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ceph_crc32c_func(int /*<<< orphan*/, unsigned char const *,
                                    unsigned int);
uint32_t ceph_crc32c(uint32_t crc, unsigned char const *data, unsigned length) {
  return ceph_crc32c_func(crc, data, length);
}


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

x86 assembly (clang, -O2):
<ceph_crc32c>:
jmp    1030 <ceph_crc32c_func@plt>

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

LLVM IR (-O2):
define i32 @ceph_crc32c(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @ceph_crc32c_func(i32 %0, i8* %1, i32 %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS12;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *ASN1_item_d2i_fp(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                     int /*<<< orphan*/ **);
int /*<<< orphan*/ PKCS12_it;
PKCS12 *d2i_PKCS12_fp(FILE *fp, PKCS12 **p12) {
  return ASN1_item_d2i_fp(&PKCS12_it, fp, p12);
}


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

x86 assembly (clang, -O2):
<d2i_PKCS12_fp>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ec3(%rip),%rdi
jmp    1030 <ASN1_item_d2i_fp@plt>

LLVM IR (-O0):
@PKCS12_it = global i32 0
define i32* @d2i_PKCS12_fp(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* @ASN1_item_d2i_fp(i32* @PKCS12_it, i32* %5, i32** %6)
ret i32* %7
}

LLVM IR (-O2):
@PKCS12_it = global i32 0
define i32* @d2i_PKCS12_fp(i32* %0, i32** %1) {
%3 = tail call i32* @ASN1_item_d2i_fp(i32* @PKCS12_it, i32* %0, i32** %1)
ret i32* %3
}
/* Variables and functions */
int /*<<< orphan*/ CloseVaultDialog(int /*<<< orphan*/);
int /*<<< orphan*/ atoi(char const *);
void MenuCloseVault(const char *key) { CloseVaultDialog(atoi(key)); }


x86 assembly (clang, -O0):
<MenuCloseVault>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <atoi@plt>
mov    %eax,%edi
call   1040 <CloseVaultDialog@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MenuCloseVault>:
push   %rax
call   1030 <atoi@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <CloseVaultDialog@plt>

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

LLVM IR (-O2):
define void @MenuCloseVault(i8* nocapture %0) {
%2 = tail call i32 @atoi(i8* %0)
%3 = tail call i32 @CloseVaultDialog(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *, int);
int /*<<< orphan*/ stderr;
void coucal_fail(const char *exp, const char *file, int line) {
  fprintf(stderr, "assertion '%s' failed at %s:%d\n", exp, file, line);
  abort();
}


x86 assembly (clang, -O0):
<coucal_fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
lea    0xeb1(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<coucal_fail>:
push   %rax
mov    %edx,%r8d
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
lea    0xec6(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"assertion '%s' failed at %s:%d\0A\00"
define void @coucal_fail(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9, i32 %10)
%12 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"assertion '%s' failed at %s:%d\0A\00"
define void @coucal_fail(i8* %0, i8* %1, i32 %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i32 %2)
%6 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
size_t ta_calc_prealloc_elems(size_t nextidx) {
  if (nextidx >= ((size_t)-1) / 2 - 1)
    return (size_t)-1;
  return (nextidx + 1) * 2;
}


x86 assembly (clang, -O0):
<ta_calc_prealloc_elems>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movabs $0x7ffffffffffffffe,%rax
ff ff 7f
cmp    %rax,-0x10(%rbp)
jb     1129 <ta_calc_prealloc_elems+0x29>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
jmp    1139 <ta_calc_prealloc_elems+0x39>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
shl    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ta_calc_prealloc_elems>:
movabs $0x7ffffffffffffffd,%rax
ff ff 7f
cmp    %rax,%rdi
lea    0x2(%rdi,%rdi,1),%rcx
mov    $0xffffffffffffffff,%rax
cmovbe %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @ta_calc_prealloc_elems(i64 %0) {
%2 = icmp ugt i64 %0, 9223372036854775805
%3 = shl i64 %0, 1
%4 = add i64 %3, 2
%5 = select i1 %2, i64 -1, i64 %4
ret i64 %5
}
/* Variables and functions */
char *newDbSerializeDevsDev(int, int, int, char *);
char *newDbSerializeLampsAndPlugs(int MAXBUF, char *buf) {
  return newDbSerializeDevsDev(6, 7, MAXBUF, buf);
}


x86 assembly (clang, -O0):
<newDbSerializeLampsAndPlugs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    $0x6,%edi
mov    $0x7,%esi
call   1030 <newDbSerializeDevsDev@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newDbSerializeLampsAndPlugs>:
mov    %rsi,%rcx
mov    %edi,%edx
mov    $0x6,%edi
mov    $0x7,%esi
jmp    1030 <newDbSerializeDevsDev@plt>

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

LLVM IR (-O2):
define i8* @newDbSerializeLampsAndPlugs(i32 %0, i8* %1) {
%3 = tail call i8* @newDbSerializeDevsDev(i32 6, i32 7, i32 %0, i8* %1)
ret i8* %3
}
/* Variables and functions */
int parse_codenum(void *);
int parse_ue(void *buf) { return parse_codenum(buf); }


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

x86 assembly (clang, -O2):
<parse_ue>:
jmp    1030 <parse_codenum@plt>

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

LLVM IR (-O2):
define i32 @parse_ue(i8* %0) {
%2 = tail call i32 @parse_codenum(i8* %0)
ret i32 %2
}
/* Type definitions */
struct AST_parser {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct AST_parser *);
void del_AST_parser(struct AST_parser *self) {
  free(self);
  return;
}


x86 assembly (clang, -O0):
<del_AST_parser>:
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):
<del_AST_parser>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.AST_parser = type { i32 }
define void @del_AST_parser(%struct.AST_parser* nocapture %0) {
%2 = tail call i32 @free(%struct.AST_parser* %0)
ret void
}
void outline(s) char *s;
{
  char buf[256];
  int i = 0;
  register char *rs;
  rs = s;
  do {
    buf[i] = *rs;
    i++;
  } while (*rs++ != 10);
  buf[i] = '\0';
  printf("%s", buf);
}


x86 assembly (clang, -O0):
<outline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x114(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x120(%rbp)
mov    -0x120(%rbp),%rax
mov    (%rax),%cl
movslq -0x114(%rbp),%rax
mov    %cl,-0x110(%rbp,%rax,1)
mov    -0x114(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x114(%rbp)
mov    -0x120(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x120(%rbp)
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    1134 <outline+0x24>
movslq -0x114(%rbp),%rax
movb   $0x0,-0x110(%rbp,%rax,1)
lea    -0x110(%rbp),%rsi
lea    0xe68(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outline>:
sub    $0x108,%rsp
xor    %eax,%eax
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%ecx
mov    %cl,(%rsp,%rax,1)
add    $0x1,%rax
cmp    $0xa,%cl
jne    1120 <outline+0x10>
mov    %eax,%eax
movb   $0x0,(%rsp,%rax,1)
lea    0xec3(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x108,%rsp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @outline(i8* %0) {
%2 = alloca i8*
%3 = alloca [256 x i8]
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %2
store i32 0, i32* %4
%6 = load i8*, i8** %2
store i8* %6, i8** %5
br label %7
7: ; preds = %15, %1
%8 = load i8*, i8** %5
%9 = load i8, i8* %8
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 %11
store i8 %9, i8* %12
%13 = load i32, i32* %4
%14 = add nsw i32 %13, 1
store i32 %14, i32* %4
br label %15
15: ; preds = %7
%16 = load i8*, i8** %5
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %5
%18 = load i8, i8* %16
%19 = sext i8 %18 to i32
%20 = icmp ne i32 %19, 10
br i1 %20, label %7, label %21
21: ; preds = %15
%22 = load i32, i32* %4
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 %23
store i8 0, i8* %24
%25 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %25)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @outline(i8* nocapture %0) {
%2 = alloca [256 x i8]
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
br label %4
4: ; preds = %4, %1
%5 = phi i64 [ %9, %4 ], [ 0, %1 ]
%6 = phi i8* [ %10, %4 ], [ %0, %1 ]
%7 = load i8, i8* %6
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 %5
store i8 %7, i8* %8
%9 = add nuw i64 %5, 1
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = icmp eq i8 %7, 10
br i1 %11, label %12, label %4
12: ; preds = %4
%13 = and i64 %9, 4294967295
%14 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 %13
store i8 0, i8* %14
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
short test_75_2(short *mem) { return __atomic_fetch_nand(mem + 4, -1, 4); }


x86 assembly (clang, -O0):
<test_75_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x18(%rbp)
movw   $0xffff,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    %cx,-0x10(%rbp)
mov    0x8(%rax),%ax
mov    %ax,-0xe(%rbp)
mov    -0xe(%rbp),%ax
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%dx
mov    %dx,%si
mov    %ax,%dx
mov    %edx,-0x28(%rbp)
and    %esi,%edx
mov    %edx,-0x24(%rbp)
not    %edx
mov    %edx,-0x20(%rbp)
lock cmpxchg %dx,(%rcx)
sete   %cl
mov    %ax,-0x1a(%rbp)
test   $0x1,%cl
mov    %ax,-0xe(%rbp)
jne    116a <test_75_2+0x6a>
jmp    112d <test_75_2+0x2d>
mov    -0x1a(%rbp),%ax
mov    %ax,-0xc(%rbp)
movswl -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_75_2>:
movzwl 0x8(%rdi),%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %eax,%ecx
not    %ecx
lock cmpxchg %cx,0x8(%rdi)
jne    1110 <test_75_2+0x10>
ret

LLVM IR (-O0):
define signext i16 @test_75_2(i16* %0) {
%2 = alloca i16*
%3 = alloca i16
%4 = alloca i16
store i16* %0, i16** %2
%5 = load i16*, i16** %2
%6 = getelementptr inbounds i16, i16* %5, i64 4
store i16 -1, i16* %3
%7 = load i16, i16* %3
%8 = atomicrmw nand i16* %6, i16 %7 acq_rel
store i16 %8, i16* %4
%9 = load i16, i16* %4
ret i16 %9
}

LLVM IR (-O2):
define signext i16 @test_75_2(i16* nocapture %0) {
%2 = getelementptr inbounds i16, i16* %0, i64 4
%3 = atomicrmw nand i16* %2, i16 -1 acq_rel
ret i16 %3
}
int abs(int value) {
  if (value < 0) {
    return value * -1;
  }
  return value;
}


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111d <abs+0x1d>
imul   $0xffffffff,-0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1123 <abs+0x23>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ pthread_exit(void *);
int thread_exit() {
  pthread_exit((void *)0);
  return (0);
}


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

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

LLVM IR (-O0):
define i32 @thread_exit() {
%1 = call i32 @pthread_exit(i8* null)
ret i32 0
}

LLVM IR (-O2):
define i32 @thread_exit() {
%1 = tail call i32 @pthread_exit(i8* null)
ret i32 0
}
char *strcpy(s1, s2)
register char *s1;
register const char *s2;
{
  register char *os1;
  os1 = s1;
  while ((*s1++ = *s2++))
    ;
  return (os1);
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%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     1143 <strcpy+0x43>
jmp    1114 <strcpy+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %6, %3 ]
%5 = phi i8* [ %0, %2 ], [ %8, %3 ]
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = load i8, i8* %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %7, i8* %5
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int *);
int print_addr(int x) {
  printf("%p\n", &x);
  return 0;
}


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

x86 assembly (clang, -O2):
<print_addr>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0xee4(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

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


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

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

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

LLVM IR (-O2):
define void @IBProfileInterval() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(char *);
int main(int argc, char *argv[]) {
  printf("Hello, world!\n");
  for (int i = 1; i < argc; ++i) {
    puts(argv[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
call   1040 <printf@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1174 <main+0x54>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <puts@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1149 <main+0x29>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %edi,%ebp
lea    0xee0(%rip),%rdi
call   1030 <puts@plt>
cmp    $0x2,%ebp
jl     1152 <main+0x42>
mov    %ebp,%ebp
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <puts@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1140 <main+0x30>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, world!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %6
br label %8
8: ; preds = %19, %2
%9 = load i32, i32* %6
%10 = load i32, i32* %4
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %22
12: ; preds = %8
%13 = load i8**, i8*** %5
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
%18 = call i32 @puts(i8* %17)
br label %19
19: ; preds = %12
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 1
store i32 %21, i32* %6
br label %8
22: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"Hello, world!\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%4 = icmp sgt i32 %0, 1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = zext i32 %0 to i64
br label %8
7: ; preds = %8, %2
ret i32 0
8: ; preds = %5, %8
%9 = phi i64 [ 1, %5 ], [ %13, %8 ]
%10 = getelementptr inbounds i8*, i8** %1, i64 %9
%11 = load i8*, i8** %10
%12 = tail call i32 @puts(i8* dereferenceable(1) %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %7, label %8
}
/* Variables and functions */
int gdCompareInt(const void *a, const void *b) {
  return (*(const int *)a) - (*(const int *)b);
}


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

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

LLVM IR (-O0):
define i32 @gdCompareInt(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @gdCompareInt(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0xd5() {
  Assert_real((isupper(213) == 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",
              1070, ("isupper should be 0 for 0xd5"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0xd5>:
push   %rax
mov    $0xd5,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x42e,%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 0xd5\00"
define void @t_isupper_0xd5() {
%1 = call i64 @isupper(i32 213)
%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 1070, 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 0xd5\00"
define void @t_isupper_0xd5() {
%1 = tail call i64 @isupper(i32 213)
%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 1070, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glmDiv3fs(float *, float const *, int /*<<< orphan*/);
int /*<<< orphan*/ glmLength3f(float const *);
void glmNormalize3f(float out[3], const float x[3]) {
  glmDiv3fs(out, x, glmLength3f(x));
}


x86 assembly (clang, -O0):
<glmNormalize3f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <glmLength3f@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <glmDiv3fs@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmNormalize3f>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <glmLength3f@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <glmDiv3fs@plt>

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

LLVM IR (-O2):
define void @glmNormalize3f(float* %0, float* %1) {
%3 = tail call i32 @glmLength3f(float* %1)
%4 = tail call i32 @glmDiv3fs(float* %0, float* %1, i32 %3)
ret void
}
/* Variables and functions */
int memory_report_ext_flags();
scalar_t__ wallet_is_locked();
int wallet_is_paired(void) {
  return wallet_is_locked() || !(memory_report_ext_flags() & 0x00000008);
}


x86 assembly (clang, -O0):
<wallet_is_paired>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <wallet_is_locked@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
jne    1156 <wallet_is_paired+0x36>
mov    $0x0,%al
call   1030 <memory_report_ext_flags@plt>
and    $0x8,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wallet_is_paired>:
push   %rax
xor    %eax,%eax
call   1040 <wallet_is_locked@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <wallet_is_paired+0x17>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <memory_report_ext_flags@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   $0x8,%cl
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @wallet_is_paired() {
%1 = call i64 (...) @wallet_is_locked()
%2 = icmp ne i64 %1, 0
br i1 %2, label %8, label %3
3: ; preds = %0
%4 = call i32 (...) @memory_report_ext_flags()
%5 = and i32 %4, 8
%6 = icmp ne i32 %5, 0
%7 = xor i1 %6, true
br label %8
8: ; preds = %3, %0
%9 = phi i1 [ true, %0 ], [ %7, %3 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @wallet_is_paired() {
%1 = tail call i64 (...) @wallet_is_locked()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %8
3: ; preds = %0
%4 = tail call i32 (...) @memory_report_ext_flags()
%5 = lshr i32 %4, 3
%6 = and i32 %5, 1
%7 = xor i32 %6, 1
br label %8
8: ; preds = %3, %0
%9 = phi i32 [ 1, %0 ], [ %7, %3 ]
ret i32 %9
}
/* Type definitions */
struct opaque_auth {
  int dummy;
};
typedef int /*<<< orphan*/ bool_t;
typedef int /*<<< orphan*/ AUTH;

/* Variables and functions */
int /*<<< orphan*/ TRUE;
bool_t authnone_validate(AUTH *x, struct opaque_auth *x1) {
  (void)x;
  (void)x1;
  return (TRUE);
}


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

x86 assembly (clang, -O2):
<authnone_validate>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
%struct.opaque_auth = type { i32 }
@TRUE = global i32 0
define i32 @authnone_validate(i32* %0, %struct.opaque_auth* %1) {
%3 = alloca i32*
%4 = alloca %struct.opaque_auth*
store i32* %0, i32** %3
store %struct.opaque_auth* %1, %struct.opaque_auth** %4
%5 = load i32*, i32** %3
%6 = load %struct.opaque_auth*, %struct.opaque_auth** %4
%7 = load i32, i32* @TRUE
ret i32 %7
}

LLVM IR (-O2):
%struct.opaque_auth = type { i32 }
@TRUE = global i32 0
define i32 @authnone_validate(i32* nocapture readnone %0, %struct.opaque_auth* nocapture readnone %1) {
%3 = load i32, i32* @TRUE
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xfe() {
  Assert_real((isspace(254) == 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_isspace.c",
              1275, ("isspace should be 0 for 0xfe"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0xfe>:
push   %rax
mov    $0xfe,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4fb,%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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xfe\00"
define void @t_isspace_0xfe() {
%1 = call i64 @isspace(i32 254)
%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 1275, 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xfe\00"
define void @t_isspace_0xfe() {
%1 = tail call i64 @isspace(i32 254)
%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 1275, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int litCmp(int *a, int *b) {
  if (((*a) >> 1) < ((*b) >> 1))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<litCmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
sar    $0x1,%eax
mov    -0x18(%rbp),%rcx
mov    (%rcx),%ecx
sar    $0x1,%ecx
cmp    %ecx,%eax
jge    1132 <litCmp+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1139 <litCmp+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<litCmp>:
mov    (%rdi),%ecx
sar    %ecx
mov    (%rsi),%edx
sar    %edx
xor    %eax,%eax
cmp    %edx,%ecx
setl   %al
ret

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

LLVM IR (-O2):
define i32 @litCmp(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = ashr i32 %3, 1
%5 = load i32, i32* %1
%6 = ashr i32 %5, 1
%7 = icmp slt i32 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ net_send(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, char *, char *, char *);
void irc_topic(char *channel, char *topic) {
  char msg[(512 - 3)];
  snprintf(msg, (512 - 3), "%s %s :%s", "TOPIC", channel, topic);
  net_send(msg);
}


x86 assembly (clang, -O0):
<irc_topic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x210(%rbp),%rdi
mov    -0x8(%rbp),%r8
mov    -0x10(%rbp),%r9
mov    $0x1fd,%esi
lea    0xeb2(%rip),%rdx
lea    0xeb5(%rip),%rcx
call   1030 <snprintf@plt>
lea    -0x210(%rbp),%rdi
call   1040 <net_send@plt>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irc_topic>:
push   %rbx
sub    $0x200,%rsp
mov    %rsi,%r9
mov    %rdi,%r8
lea    0xecb(%rip),%rdx
lea    0xece(%rip),%rcx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1fd,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <net_send@plt>
add    $0x200,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%s %s :%s\00"
@.str.1 = [6 x i8] c"TOPIC\00"
define void @irc_topic(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [509 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [509 x i8], [509 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 @snprintf(i8* %6, i32 509, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %7, i8* %8)
%10 = getelementptr inbounds [509 x i8], [509 x i8]* %5, i64 0, i64 0
%11 = call i32 @net_send(i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%s %s :%s\00"
@.str.1 = [6 x i8] c"TOPIC\00"
define void @irc_topic(i8* %0, i8* %1) {
%3 = alloca [509 x i8]
%4 = getelementptr inbounds [509 x i8], [509 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 509, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %1)
%6 = call i32 @net_send(i8* %4)
ret void
}
/* Variables and functions */
int f181(int *);
int f182(int *p) { return f181(p); }


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

x86 assembly (clang, -O2):
<f182>:
jmp    1030 <f181@plt>

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

LLVM IR (-O2):
define i32 @f182(i32* %0) {
%2 = tail call i32 @f181(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ qikcore(int *, int /*<<< orphan*/, size_t);
int *qiksort(int *a, size_t n) {
  qikcore(a, 0, n - 1);
  return a;
}


x86 assembly (clang, -O0):
<qiksort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
sub    $0x1,%rdx
xor    %esi,%esi
call   1030 <qikcore@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qiksort>:
push   %rbx
mov    %rdi,%rbx
lea    -0x1(%rsi),%rdx
xor    %esi,%esi
call   1030 <qikcore@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i32* @qiksort(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i32*, i32** %3
%6 = load i64, i64* %4
%7 = sub i64 %6, 1
%8 = call i32 @qikcore(i32* %5, i32 0, i64 %7)
%9 = load i32*, i32** %3
ret i32* %9
}

LLVM IR (-O2):
define i32* @qiksort(i32* returned %0, i64 %1) {
%3 = add i64 %1, -1
%4 = tail call i32 @qikcore(i32* %0, i32 0, i64 %3)
ret i32* %0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ show_help();
void operation_help(void) {
  show_help();
  exit(0);
}


x86 assembly (clang, -O0):
<operation_help>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <show_help@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<operation_help>:
push   %rax
xor    %eax,%eax
call   1030 <show_help@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @operation_help() {
%1 = call i32 (...) @show_help()
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @operation_help() {
%1 = tail call i32 (...) @show_help()
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
scalar_t__ expm1(double);
int /*<<< orphan*/ link_failure_expm1();
void test_expm1(double d) {
  if (expm1(d) != expm1(d))
    link_failure_expm1();
}


x86 assembly (clang, -O0):
<test_expm1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <expm1@plt>
mov    %rax,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <expm1@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     115c <test_expm1+0x3c>
mov    $0x0,%al
call   1030 <link_failure_expm1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_expm1>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
call   1040 <expm1@plt>
mov    %rax,%rbx
movsd  0x8(%rsp),%xmm0
call   1040 <expm1@plt>
cmp    %rax,%rbx
jne    1149 <test_expm1+0x29>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1030 <link_failure_expm1@plt>

LLVM IR (-O0):
define void @test_expm1(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i64 @expm1(double %3)
%5 = load double, double* %2
%6 = call i64 @expm1(double %5)
%7 = icmp ne i64 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @link_failure_expm1()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @test_expm1(double %0) {
%2 = tail call i64 @expm1(double %0)
%3 = tail call i64 @expm1(double %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_expm1()
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void sighandler(int sig) { printf("sig %i\n", sig); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"sig %i\0A\00"
define void @sighandler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
int bitInvertAndwith(int sourceWord, int destinationWord) {
  return (~sourceWord) & destinationWord;
}


x86 assembly (clang, -O0):
<bitInvertAndwith>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
and    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitInvertAndwith>:
mov    %edi,%eax
not    %eax
and    %esi,%eax
ret

LLVM IR (-O0):
define i32 @bitInvertAndwith(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 = xor i32 %5, -1
%7 = load i32, i32* %4
%8 = and i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @bitInvertAndwith(i32 %0, i32 %1) {
%3 = xor i32 %0, -1
%4 = and i32 %3, %1
ret i32 %4
}
/* Variables and functions */
int rand();
int poison_random_type() { return rand() % 2; }


x86 assembly (clang, -O0):
<poison_random_type>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<poison_random_type>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
and    $0xfffffffe,%ecx
sub    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @poison_random_type() {
%1 = call i32 (...) @rand()
%2 = srem i32 %1, 2
ret i32 %2
}

LLVM IR (-O2):
define i32 @poison_random_type() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 2
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void fatal(char *txt) {
  fprintf(stderr, "ERROR : %s\n", txt);
  exit(-1);
}


x86 assembly (clang, -O0):
<fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fatal>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"ERROR : %s\0A\00"
define void @fatal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"ERROR : %s\0A\00"
define void @fatal(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 -1)
unreachable
}
/* Type definitions */
typedef float int32_t;

/* Variables and functions */
float ceil(float);
int32_t get_number_of_runs(unsigned long file_length,
                           const int32_t AVAILABLE_MEMORY) {
  int32_t number_of_runs = ceil((float)file_length / AVAILABLE_MEMORY);
  return number_of_runs;
}


x86 assembly (clang, -O0):
<get_number_of_runs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
shr    %rdx
mov    %eax,%ecx
and    $0x1,%ecx
or     %rdx,%rcx
cvtsi2ss %rcx,%xmm0
addss  %xmm0,%xmm0
cvtsi2ss %rax,%xmm1
movss  %xmm1,-0x18(%rbp)
test   %rax,%rax
movss  %xmm0,-0x14(%rbp)
js     115e <get_number_of_runs+0x4e>
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
divss  -0xc(%rbp),%xmm0
call   1030 <ceil@plt>
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_number_of_runs>:
test   %rdi,%rdi
js     111c <get_number_of_runs+0xc>
cvtsi2ss %rdi,%xmm1
jmp    1131 <get_number_of_runs+0x21>
mov    %rdi,%rax
shr    %rax
and    $0x1,%edi
or     %rax,%rdi
cvtsi2ss %rdi,%xmm1
addss  %xmm1,%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
jmp    1030 <ceilf@plt>

LLVM IR (-O0):
define float @get_number_of_runs(i64 %0, float %1) {
%3 = alloca i64
%4 = alloca float
%5 = alloca float
store i64 %0, i64* %3
store float %1, float* %4
%6 = load i64, i64* %3
%7 = uitofp i64 %6 to float
%8 = load float, float* %4
%9 = fdiv float %7, %8
%10 = call float @ceil(float %9)
store float %10, float* %5
%11 = load float, float* %5
ret float %11
}

LLVM IR (-O2):
define float @get_number_of_runs(i64 %0, float %1) {
%3 = uitofp i64 %0 to float
%4 = fdiv float %3, %1
%5 = tail call float @llvm.ceil.f32(float %4)
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hola Zynq\n");
  return 9;
}


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>
mov    $0x9,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [11 x i8] c"Hola Zynq\0A\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 ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 9
}

LLVM IR (-O2):
@str = [10 x i8] c"Hola Zynq\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret i32 9
}