xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;
typedef int /*<<< orphan*/ mbstate_t;

/* Variables and functions */
int /*<<< orphan*/ mbrtowc(int /*<<< orphan*/ *, char const *, size_t,
                           int /*<<< orphan*/ *);
void uninitvar_mbrtowc(void) {
  wchar_t *pwc;
  const char *pmb;
  size_t max;
  mbstate_t *ps;
  (void)mbrtowc(pwc, pmb, max, ps);
}


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

x86 assembly (clang, -O2):
<uninitvar_mbrtowc>:
jmp    1030 <mbrtowc@plt>

LLVM IR (-O0):
define void @uninitvar_mbrtowc() {
%1 = alloca i32*
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i32*
%5 = load i32*, i32** %1
%6 = load i8*, i8** %2
%7 = load i64, i64* %3
%8 = load i32*, i32** %4
%9 = call i32 @mbrtowc(i32* %5, i8* %6, i64 %7, i32* %8)
ret void
}

LLVM IR (-O2):
define void @uninitvar_mbrtowc() {
%1 = tail call i32 @mbrtowc(i32* undef, i8* undef, i64 undef, i32* undef)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *progname) {
  fprintf(stderr, "%s <node-id>\n", progname);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
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    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [14 x i8] c"%s <node-id>\0A\00"
define void @usage(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 ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [14 x i8] c"%s <node-id>\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
void ex5() {}


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

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

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

LLVM IR (-O2):
define void @ex5() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ e_stx();
int /*<<< orphan*/ e_writeback();
int /*<<< orphan*/ e_zpy();
void e_stx_zpy() {
  e_zpy();
  e_stx();
  e_writeback();
}


x86 assembly (clang, -O0):
<e_stx_zpy>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <e_zpy@plt>
mov    $0x0,%al
call   1040 <e_stx@plt>
mov    $0x0,%al
call   1030 <e_writeback@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<e_stx_zpy>:
push   %rax
xor    %eax,%eax
call   1050 <e_zpy@plt>
xor    %eax,%eax
call   1040 <e_stx@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <e_writeback@plt>

LLVM IR (-O0):
define void @e_stx_zpy() {
%1 = call i32 (...) @e_zpy()
%2 = call i32 (...) @e_stx()
%3 = call i32 (...) @e_writeback()
ret void
}

LLVM IR (-O2):
define void @e_stx_zpy() {
%1 = tail call i32 (...) @e_zpy()
%2 = tail call i32 (...) @e_stx()
%3 = tail call i32 (...) @e_writeback()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ verify_trace(char *);
int main(int argc, char **argv) {
  if (argc >= 2) {
    verify_trace(argv[1]);
  } else {
    printf("%s export.txt\n", argv[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)
cmpl   $0x2,-0x8(%rbp)
jl     1152 <main+0x32>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <verify_trace@plt>
jmp    1165 <main+0x45>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jl     1131 <main+0x11>
mov    0x8(%rsi),%rdi
call   1040 <verify_trace@plt>
jmp    1140 <main+0x20>
mov    (%rsi),%rsi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"%s export.txt\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 = load i32, i32* %4
%7 = icmp sge i32 %6, 2
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @verify_trace(i8* %11)
br label %18
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 0
%16 = load i8*, i8** %15
%17 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %16)
br label %18
18: ; preds = %13, %8
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s export.txt\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @verify_trace(i8* %6)
br label %11
8: ; preds = %2
%9 = load i8*, i8** %1
%10 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %8, %4
ret i32 0
}
/* Type definitions */
struct openpgp_fingerprint {
  int dummy;
};
struct onak_dbctx {
  int dummy;
};

/* Variables and functions */
int keyring_delete_key(struct onak_dbctx *dbctx, struct openpgp_fingerprint *fp,
                       bool intrans) {
  return 1;
}


x86 assembly (clang, -O0):
<keyring_delete_key>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.onak_dbctx = type { i32 }
%struct.openpgp_fingerprint = type { i32 }
define i32 @keyring_delete_key(%struct.onak_dbctx* %0, %struct.openpgp_fingerprint* %1, i32 %2) {
%4 = alloca %struct.onak_dbctx*
%5 = alloca %struct.openpgp_fingerprint*
%6 = alloca i32
store %struct.onak_dbctx* %0, %struct.onak_dbctx** %4
store %struct.openpgp_fingerprint* %1, %struct.openpgp_fingerprint** %5
store i32 %2, i32* %6
ret i32 1
}

LLVM IR (-O2):
%struct.onak_dbctx = type { i32 }
%struct.openpgp_fingerprint = type { i32 }
define i32 @keyring_delete_key(%struct.onak_dbctx* nocapture readnone %0, %struct.openpgp_fingerprint* nocapture readnone %1, i32 %2) {
ret i32 1
}
/* Variables and functions */
char const *ucnv_getDefaultName();
const char *__hs_ucnv_getDefaultName(void) { return ucnv_getDefaultName(); }


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

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

LLVM IR (-O0):
define i8* @__hs_ucnv_getDefaultName() {
%1 = call i8* (...) @ucnv_getDefaultName()
ret i8* %1
}

LLVM IR (-O2):
define i8* @__hs_ucnv_getDefaultName() {
%1 = tail call i8* (...) @ucnv_getDefaultName()
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print(int *array) {
  int i;
  for (i = 0; i < 4096; i++)
    printf("%d ", array[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x1000,-0xc(%rbp)
jge    1157 <print+0x47>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <print+0x13>
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
lea    0xed1(%rip),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    $0x1000,%rbx
jne    1140 <print+0x20>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @print(i32* nocapture %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = load i32, i32* %4
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = add nuw nsw i64 %3, 1
%8 = icmp eq i64 %7, 4096
br i1 %8, label %9, label %2
9: ; preds = %2
%10 = tail call i32 @putchar(i32 10)
ret void
}
int radix_tree_is_indirect_ptr(void *ptr) {
  return (int)((unsigned long)ptr & 1);
}


x86 assembly (clang, -O0):
<radix_tree_is_indirect_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<radix_tree_is_indirect_ptr>:
mov    %rdi,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @radix_tree_is_indirect_ptr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = and i64 %4, 1
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @radix_tree_is_indirect_ptr(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = and i32 %3, 1
ret i32 %4
}
void RTTestSubF(void) {}


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

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

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

LLVM IR (-O2):
define void @RTTestSubF() {
ret void
}
void RAWToRGB24() {}


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

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

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

LLVM IR (-O2):
define void @RAWToRGB24() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PHT(unsigned char *);
int /*<<< orphan*/ SHUF(unsigned char *, unsigned char *);
void LT(unsigned char b[16], unsigned char b2[16]) {
  PHT(b);
  SHUF(b, b2);
  PHT(b2);
  SHUF(b2, b);
  PHT(b);
  SHUF(b, b2);
  PHT(b2);
}


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

x86 assembly (clang, -O2):
<LT>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <PHT@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <SHUF@plt>
mov    %r14,%rdi
call   1030 <PHT@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <SHUF@plt>
mov    %rbx,%rdi
call   1030 <PHT@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <SHUF@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <PHT@plt>

LLVM IR (-O0):
define void @LT(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 = call i32 @PHT(i8* %5)
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 @SHUF(i8* %7, i8* %8)
%10 = load i8*, i8** %4
%11 = call i32 @PHT(i8* %10)
%12 = load i8*, i8** %4
%13 = load i8*, i8** %3
%14 = call i32 @SHUF(i8* %12, i8* %13)
%15 = load i8*, i8** %3
%16 = call i32 @PHT(i8* %15)
%17 = load i8*, i8** %3
%18 = load i8*, i8** %4
%19 = call i32 @SHUF(i8* %17, i8* %18)
%20 = load i8*, i8** %4
%21 = call i32 @PHT(i8* %20)
ret void
}

LLVM IR (-O2):
define void @LT(i8* %0, i8* %1) {
%3 = tail call i32 @PHT(i8* %0)
%4 = tail call i32 @SHUF(i8* %0, i8* %1)
%5 = tail call i32 @PHT(i8* %1)
%6 = tail call i32 @SHUF(i8* %1, i8* %0)
%7 = tail call i32 @PHT(i8* %0)
%8 = tail call i32 @SHUF(i8* %0, i8* %1)
%9 = tail call i32 @PHT(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ freopen(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ work();
int main(void) {
  freopen("cash.in", "r", stdin);
  freopen("cash.out", "w", stdout);
  work();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edx
lea    0xec1(%rip),%rdi
lea    0xec2(%rip),%rsi
call   1040 <freopen@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%edx
lea    0xeaf(%rip),%rdi
lea    0xeb1(%rip),%rsi
call   1040 <freopen@plt>
mov    $0x0,%al
call   1030 <work@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edx
lea    0xecf(%rip),%rdi
lea    0xed0(%rip),%rsi
call   1040 <freopen@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edx
lea    0xebd(%rip),%rdi
lea    0xebf(%rip),%rsi
call   1040 <freopen@plt>
xor    %eax,%eax
call   1030 <work@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"cash.in\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [9 x i8] c"cash.out\00"
@.str.3 = [2 x i8] c"w\00"
@stdout = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @stdin
%3 = call i32 @freopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @stdout
%5 = call i32 @freopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 %4)
%6 = call i32 (...) @work()
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"cash.in\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [9 x i8] c"cash.out\00"
@.str.3 = [2 x i8] c"w\00"
@stdout = global i32 0
define i32 @main() {
%1 = load i32, i32* @stdin
%2 = tail call i32 @freopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @stdout
%4 = tail call i32 @freopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 %3)
%5 = tail call i32 (...) @work()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void checkForError(int error) {
  if (error != 0) {
    printf("SSP Error code: %d\n", error);
  }
}


x86 assembly (clang, -O0):
<checkForError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1134 <checkForError+0x24>
mov    -0x4(%rbp),%esi
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkForError>:
test   %edi,%edi
je     1122 <checkForError+0x12>
mov    %edi,%esi
lea    0xee3(%rip),%rdi
jmp    1030 <printf@plt>
ret

LLVM IR (-O0):
@.str = [20 x i8] c"SSP Error code: %d\0A\00"
define void @checkForError(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"SSP Error code: %d\0A\00"
define void @checkForError(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Type definitions */
struct group {
  int dummy;
};
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int getgrgid_r(gid_t gid, struct group *grp, char *buf, size_t buflen,
               struct group **result) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<getgrgid_r>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    0x2eca(%rip),%rax
mov    (%rax),%ecx
mov    0x2eb1(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getgrgid_r>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
%struct.group = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @getgrgid_r(i32 %0, %struct.group* %1, i8* %2, i64 %3, %struct.group** %4) {
%6 = alloca i32
%7 = alloca %struct.group*
%8 = alloca i8*
%9 = alloca i64
%10 = alloca %struct.group**
store i32 %0, i32* %6
store %struct.group* %1, %struct.group** %7
store i8* %2, i8** %8
store i64 %3, i64* %9
store %struct.group** %4, %struct.group*** %10
%11 = load i32, i32* @ENOSYS
store i32 %11, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
%struct.group = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @getgrgid_r(i32 %0, %struct.group* nocapture readnone %1, i8* nocapture readnone %2, i64 %3, %struct.group** nocapture readnone %4) {
%6 = load i32, i32* @ENOSYS
store i32 %6, i32* @errno
ret i32 -1
}
/* Variables and functions */
char *Z_Malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *CopyString(const char *in) {
  char *out;
  out = Z_Malloc(strlen(in) + 1);
  strcpy(out, in);
  return out;
}


x86 assembly (clang, -O0):
<CopyString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <Z_Malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CopyString>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <Z_Malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @CopyString(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @Z_Malloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @CopyString(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @Z_Malloc(i64 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ LCD_Out(int, int, char);
int /*<<< orphan*/ limpamlc();
int /*<<< orphan*/ mostrapenter(char);
int /*<<< orphan*/ sprintf(char, char *);
void frasezero(char plinha, char penter) {
  limpamlc();
  sprintf(plinha, "0: Cha Gelado");
  LCD_Out(1, 2, plinha);
  mostrapenter(penter);
}


x86 assembly (clang, -O0):
<frasezero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    $0x0,%al
call   1030 <limpamlc@plt>
lea    0xe9e(%rip),%rsi
movsbl -0x1(%rbp),%edi
call   1050 <sprintf@plt>
mov    $0x1,%edi
mov    $0x2,%esi
movsbl -0x1(%rbp),%edx
call   1040 <LCD_Out@plt>
movsbl -0x2(%rbp),%edi
call   1060 <mostrapenter@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<frasezero>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <limpamlc@plt>
lea    0xeab(%rip),%rsi
mov    %ebp,%edi
call   1050 <sprintf@plt>
mov    $0x1,%edi
mov    $0x2,%esi
mov    %ebp,%edx
call   1040 <LCD_Out@plt>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1060 <mostrapenter@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"0: Cha Gelado\00"
define void @frasezero(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = call i32 (...) @limpamlc()
%6 = load i8, i8* %3
%7 = call i32 @sprintf(i8 signext %6, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%8 = load i8, i8* %3
%9 = call i32 @LCD_Out(i32 1, i32 2, i8 signext %8)
%10 = load i8, i8* %4
%11 = call i32 @mostrapenter(i8 signext %10)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"0: Cha Gelado\00"
define void @frasezero(i8 signext %0, i8 signext %1) {
%3 = tail call i32 (...) @limpamlc()
%4 = tail call i32 @sprintf(i8 signext %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @LCD_Out(i32 1, i32 2, i8 signext %0)
%6 = tail call i32 @mostrapenter(i8 signext %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ displayBits(unsigned int);
int /*<<< orphan*/ scanf(char *, unsigned int *);
int main() {
  unsigned value;
  scanf("%u", &value);
  value >>= 4;
  displayBits(value);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <scanf@plt>
mov    0x4(%rsp),%edi
shr    $0x4,%edi
mov    %edi,0x4(%rsp)
call   1040 <displayBits@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%u\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = lshr i32 %4, 4
store i32 %5, i32* %1
%6 = call i32 @displayBits(i32 %5)
ret i32 0
}
int count_bits_long(long val) {
  register int i, cnt;
  int total;
  cnt = sizeof(long) * 8;
  for (i = total = 0; i < cnt; i++) {
    if (val & 1)
      total++;
    val >>= 1;
  }
  return total;
}


x86 assembly (clang, -O0):
<count_bits_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x40,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    115e <count_bits_long+0x5e>
mov    -0x8(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     1144 <count_bits_long+0x44>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
sar    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    111d <count_bits_long+0x1d>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_bits_long>:
xor    %eax,%eax
mov    $0x40,%ecx
nopw   0x0(%rax,%rax,1)
mov    %edi,%edx
and    $0x1,%edx
add    %eax,%edx
mov    %edi,%eax
shr    %eax
and    $0x1,%eax
add    %edx,%eax
mov    %edi,%edx
shr    $0x2,%edx
and    $0x1,%edx
add    %eax,%edx
mov    %edi,%eax
shr    $0x3,%eax
and    $0x1,%eax
add    %edx,%eax
sar    $0x4,%rdi
add    $0xfffffffc,%ecx
jne    1110 <count_bits_long+0x10>
ret

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

LLVM IR (-O2):
define i32 @count_bits_long(i64 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %20, %2 ]
%4 = phi i64 [ %0, %1 ], [ %21, %2 ]
%5 = phi i32 [ 0, %1 ], [ %22, %2 ]
%6 = trunc i64 %4 to i32
%7 = and i32 %6, 1
%8 = add nuw nsw i32 %7, %3
%9 = trunc i64 %4 to i32
%10 = lshr i32 %9, 1
%11 = and i32 %10, 1
%12 = add nuw nsw i32 %11, %8
%13 = trunc i64 %4 to i32
%14 = lshr i32 %13, 2
%15 = and i32 %14, 1
%16 = add nuw nsw i32 %15, %12
%17 = trunc i64 %4 to i32
%18 = lshr i32 %17, 3
%19 = and i32 %18, 1
%20 = add nuw nsw i32 %19, %16
%21 = ashr i64 %4, 4
%22 = add nuw nsw i32 %5, 4
%23 = icmp eq i32 %22, 64
br i1 %23, label %24, label %2
24: ; preds = %2
ret i32 %20
}
int test_imm_DFuint16_reg(unsigned short val) {
  return ((val) & (0xDF << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_DFuint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xdf,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_DFuint16_reg>:
test   $0xdf,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_DFuint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 223
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_DFuint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 223
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, unsigned char);
void sprint_mov_Rn(char *str, unsigned char n) {
  sprintf(str, "MOV   A, R%X                     ", n);
}


x86 assembly (clang, -O0):
<sprint_mov_Rn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed3(%rip),%rsi
movzbl -0x9(%rbp),%edx
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sprint_mov_Rn>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"MOV A, R%X \00"
define void @sprint_mov_Rn(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8*, i8** %3
%6 = load i8, i8* %4
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %6)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"MOV A, R%X \00"
define void @sprint_mov_Rn(i8* nocapture writeonly %0, i8 zeroext %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int help(void) {
  printf("\n"
         "                               xlaunch\n"
         "                               *******\n"
         "launches an x11 app and prints the app's X-Window-ID to stdout.\n"
         "\n"
         "to launch firefox and get its X-Window-ID, type:\n"
         " $ xlaunch firefox\n"
         "\n"
         "to launch xterm and get its X-Window-ID, type:\n"
         " $ xlaunch xterm\n"
         "\n");
  exit(0);
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [279 x i8] c"\0A xlaunch\0A *******\0Alaunches an x11 app and prints the app's X-Window-ID to stdout.\0A\0Ato launch firefox and get its X-Window-ID, type:\0A $ xlaunch firefox\0A\0Ato launch xterm and get its X-Window-ID, type:\0A $ xlaunch xterm\0A\0A\00"
define i32 @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([279 x i8], [279 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [278 x i8] c"\0A xlaunch\0A *******\0Alaunches an x11 app and prints the app's X-Window-ID to stdout.\0A\0Ato launch firefox and get its X-Window-ID, type:\0A $ xlaunch firefox\0A\0Ato launch xterm and get its X-Window-ID, type:\0A $ xlaunch xterm\0A\00"
define i32 @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([278 x i8], [278 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ io_config(int);
int /*<<< orphan*/ reset_cntl(int);
int /*<<< orphan*/ system_setup(int /*<<< orphan*/);
int /*<<< orphan*/ test_control(int /*<<< orphan*/);
void gp2021_init(void) {
  io_config(0x301);
  test_control(0);
  system_setup(0);
  reset_cntl(0x0);
  reset_cntl(0x1fff);
}


x86 assembly (clang, -O0):
<gp2021_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x301,%edi
call   1060 <io_config@plt>
xor    %edi,%edi
call   1050 <test_control@plt>
xor    %edi,%edi
call   1030 <system_setup@plt>
xor    %edi,%edi
call   1040 <reset_cntl@plt>
mov    $0x1fff,%edi
call   1040 <reset_cntl@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gp2021_init>:
push   %rax
mov    $0x301,%edi
call   1060 <io_config@plt>
xor    %edi,%edi
call   1050 <test_control@plt>
xor    %edi,%edi
call   1030 <system_setup@plt>
xor    %edi,%edi
call   1040 <reset_cntl@plt>
mov    $0x1fff,%edi
pop    %rax
jmp    1040 <reset_cntl@plt>

LLVM IR (-O0):
define void @gp2021_init() {
%1 = call i32 @io_config(i32 769)
%2 = call i32 @test_control(i32 0)
%3 = call i32 @system_setup(i32 0)
%4 = call i32 @reset_cntl(i32 0)
%5 = call i32 @reset_cntl(i32 8191)
ret void
}

LLVM IR (-O2):
define void @gp2021_init() {
%1 = tail call i32 @io_config(i32 769)
%2 = tail call i32 @test_control(i32 0)
%3 = tail call i32 @system_setup(i32 0)
%4 = tail call i32 @reset_cntl(i32 0)
%5 = tail call i32 @reset_cntl(i32 8191)
ret void
}
int __mp_list(char *f, unsigned long l) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @__mp_list(i8* nocapture readnone %0, i64 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ write(int, char *, int);
void test0_failed() {
  do {
    write(2, "failed...\n", sizeof("failed...\n") - 1);
    exit(2);
  } while (0);
}


x86 assembly (clang, -O0):
<test0_failed>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <test0_failed+0x9>
mov    $0x2,%edi
lea    0xecb(%rip),%rsi
mov    $0xa,%edx
call   1030 <write@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<test0_failed>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0x2,%edi
mov    $0xa,%edx
call   1030 <write@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"failed...\0A\00"
define void @test0_failed() {
br label %1
1: ; preds = %0
%2 = call i32 @write(i32 2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 10)
%3 = call i32 @exit(i32 2)
unreachable
4: ; No predecessors!
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"failed...\0A\00"
define void @test0_failed() {
%1 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 10)
%2 = tail call i32 @exit(i32 2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
void Usage() {
  printf("\nUsage: %s -h -f <filename> [-s <extend size>]"
         " [-n <numwrites>]\n",
         "extend_and_write");
  printf("will create and extend a file, n times.\n\n"
         "<extend size> Size of the extend (Default=1024)\n"
         "<numwrites> Number of writes to be performed "
         "(Default=10240).\n");
  exit(1);
}


x86 assembly (clang, -O0):
<Usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xf0f(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf12(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Usage>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xf02(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf05(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [65 x i8] c"\0AUsage: %s -h -f <filename> [-s <extend size>] [-n <numwrites>]\0A\00"
@.str.1 = [17 x i8] c"extend_and_write\00"
@.str.2 = [152 x i8] c"will create and extend a file, n times.\0A\0A<extend size> Size of the extend (Default=1024)\0A<numwrites> Number of writes to be performed (Default=10240).\0A\00"
define void @Usage() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [65 x i8] c"\0AUsage: %s -h -f <filename> [-s <extend size>] [-n <numwrites>]\0A\00"
@.str.1 = [17 x i8] c"extend_and_write\00"
@str = [151 x i8] c"will create and extend a file, n times.\0A\0A<extend size> Size of the extend (Default=1024)\0A<numwrites> Number of writes to be performed (Default=10240).\00"
define void @Usage() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([151 x i8], [151 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ write(int, char *, int);
int return_verification_int(int result, int exp) {
  if (result != exp) {
    write(1, "Error: return size unexpected", 28 * sizeof(char));
    exit(1);
  }
  return 1;
}


x86 assembly (clang, -O0):
<return_verification_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     115a <return_verification_int+0x3a>
mov    $0x1,%edi
lea    0xeba(%rip),%rsi
mov    $0x1c,%edx
call   1030 <write@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<return_verification_int>:
cmp    %esi,%edi
jne    112a <return_verification_int+0xa>
mov    $0x1,%eax
ret
push   %rax
lea    0xece(%rip),%rsi
mov    $0x1,%edi
mov    $0x1c,%edx
call   1030 <write@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"Error: return size unexpected\00"
define i32 @return_verification_int(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 = icmp ne i32 %5, %6
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = call i32 @write(i32 1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 28)
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %2
ret i32 1
}

LLVM IR (-O2):
@.str = [30 x i8] c"Error: return size unexpected\00"
define i32 @return_verification_int(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 28)
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %2
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int munlock(const void *addr, size_t len) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<munlock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<munlock>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @munlock(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i32, i32* @ENOSYS
%6 = call i32 @__set_errno(i32 %5)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @munlock(i8* nocapture readnone %0, i64 %1) {
%3 = load i32, i32* @ENOSYS
%4 = tail call i32 @__set_errno(i32 %3)
ret i32 -1
}
void ff_hevc_put_hevc_epel_hv32_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_hv32_10_sse4() {
ret void
}
/* Variables and functions */
long double log1p(long double);
long double log1pl(long double a1) { return log1p(a1); }


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

x86 assembly (clang, -O2):
<log1pl>:
jmp    1030 <log1p@plt>

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

LLVM IR (-O2):
define x86_fp80 @log1pl(x86_fp80 %0) {
%2 = tail call x86_fp80 @log1p(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ ft_putstr(char *);
int piece_y(char **);
void print_map(char **map) {
  int i;
  int j;
  j = piece_y(map);
  i = 0;
  while (i < j) {
    ft_putstr(*(map + i));
    ft_putstr("\n");
    i++;
  }
  return;
}


x86 assembly (clang, -O0):
<print_map>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <piece_y@plt>
mov    %eax,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1176 <print_map+0x56>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <ft_putstr@plt>
lea    0xe9d(%rip),%rdi
call   1040 <ft_putstr@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113f <print_map+0x1f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_map>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r15
call   1030 <piece_y@plt>
test   %eax,%eax
jle    115a <print_map+0x3a>
mov    %eax,%r12d
xor    %ebx,%ebx
lea    0xec0(%rip),%r14
mov    (%r15,%rbx,8),%rdi
call   1040 <ft_putstr@plt>
mov    %r14,%rdi
call   1040 <ft_putstr@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print_map+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @print_map(i8** %0) {
%2 = tail call i32 @piece_y(i8** %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %14
4: ; preds = %1
%5 = zext i32 %2 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 @ft_putstr(i8* %9)
%11 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %1
ret void
}
int sascii(char c) { return (int)(c % 128); }


x86 assembly (clang, -O0):
<sascii>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
mov    $0x80,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sascii>:
lea    0x7f(%rdi),%eax
test   %di,%di
cmovns %edi,%eax
and    $0xffffff80,%eax
sub    %eax,%edi
movswl %di,%eax
ret

LLVM IR (-O0):
define i32 @sascii(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = srem i32 %4, 128
ret i32 %5
}

LLVM IR (-O2):
define i32 @sascii(i8 signext %0) {
%2 = sext i8 %0 to i16
%3 = srem i16 %2, 128
%4 = sext i16 %3 to i32
ret i32 %4
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
  int /*<<< orphan*/ st_gid;
  int /*<<< orphan*/ st_uid;
};

/* Variables and functions */
int /*<<< orphan*/ S_ISDIR(int /*<<< orphan*/);
int /*<<< orphan*/ fs_config(char const *, int /*<<< orphan*/, unsigned int *,
                             unsigned int *, int /*<<< orphan*/ *);
void fix_stat(const char *path, struct stat *s) {
  fs_config(path, S_ISDIR(s->st_mode), (unsigned *)&s->st_uid,
            (unsigned *)&s->st_gid, &s->st_mode);
}


x86 assembly (clang, -O0):
<fix_stat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1040 <S_ISDIR@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
mov    -0x10(%rbp),%rdx
add    $0x8,%rdx
mov    -0x10(%rbp),%rcx
add    $0x4,%rcx
mov    -0x10(%rbp),%r8
call   1030 <fs_config@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fix_stat>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    (%rsi),%edi
call   1040 <S_ISDIR@plt>
lea    0x8(%rbx),%rdx
lea    0x4(%rbx),%rcx
mov    %r14,%rdi
mov    %eax,%esi
mov    %rbx,%r8
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fs_config@plt>

LLVM IR (-O0):
%struct.stat = type { i32, i32, i32 }
define void @fix_stat(i8* %0, %struct.stat* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat*
store i8* %0, i8** %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i8*, i8** %3
%6 = load %struct.stat*, %struct.stat** %4
%7 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 0
%8 = load i32, i32* %7
%9 = call i32 @S_ISDIR(i32 %8)
%10 = load %struct.stat*, %struct.stat** %4
%11 = getelementptr inbounds %struct.stat, %struct.stat* %10, i32 0, i32 2
%12 = load %struct.stat*, %struct.stat** %4
%13 = getelementptr inbounds %struct.stat, %struct.stat* %12, i32 0, i32 1
%14 = load %struct.stat*, %struct.stat** %4
%15 = getelementptr inbounds %struct.stat, %struct.stat* %14, i32 0, i32 0
%16 = call i32 @fs_config(i8* %5, i32 %9, i32* %11, i32* %13, i32* %15)
ret void
}

LLVM IR (-O2):
%struct.stat = type { i32, i32, i32 }
define void @fix_stat(i8* %0, %struct.stat* %1) {
%3 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 0
%4 = load i32, i32* %3
%5 = tail call i32 @S_ISDIR(i32 %4)
%6 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 2
%7 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 1
%8 = tail call i32 @fs_config(i8* %0, i32 %5, i32* %6, i32* %7, i32* %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ __read(int, void *, size_t);
ssize_t read(int fd, void *buf, size_t nbytes) {
  return __read(fd, buf, nbytes);
}


x86 assembly (clang, -O0):
<read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <__read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read>:
jmp    1030 <__read@plt>

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

LLVM IR (-O2):
define i32 @read(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @__read(i32 %0, i8* %1, i64 %2)
ret i32 %4
}
int add(int a, int b) { return a - b; }


x86 assembly (clang, -O0):
<add>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<add>:
mov    %edi,%eax
sub    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @add(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}