xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;
typedef int /*<<< orphan*/ key;

/* Variables and functions */
int /*<<< orphan*/ rgph_u32_xxh32s_data(int /*<<< orphan*/ const *, size_t,
                                        uintptr_t);
uint32_t rgph_u32_xxh32s_u16a(const uint16_t *key, size_t len, uintptr_t seed) {
  const uint8_t *arg = ((const uint8_t *)(const char *)(key));
  return rgph_u32_xxh32s_data(arg, len * sizeof(key[0]), seed);
}


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

x86 assembly (clang, -O2):
<rgph_u32_xxh32s_u16a>:
shl    $0x2,%rsi
jmp    1030 <rgph_u32_xxh32s_data@plt>

LLVM IR (-O0):
define i32 @rgph_u32_xxh32s_u16a(i32* %0, i64 %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i32*
store i32* %0, i32** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%8 = load i32*, i32** %4
%9 = bitcast i32* %8 to i8*
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %7
%11 = load i32*, i32** %7
%12 = load i64, i64* %5
%13 = mul i64 %12, 4
%14 = load i64, i64* %6
%15 = call i32 @rgph_u32_xxh32s_data(i32* %11, i64 %13, i64 %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @rgph_u32_xxh32s_u16a(i32* %0, i64 %1, i64 %2) {
%4 = shl i64 %1, 2
%5 = tail call i32 @rgph_u32_xxh32s_data(i32* %0, i64 %4, i64 %2)
ret i32 %5
}
int copysingl(singl, num)
int singl, num;
{
  int copy, i;
  copy = mkstate(0);
  for (i = 1; i <= num; ++i)
    copy = link_machines(copy, dupmachine(singl));
  return (copy);
}


x86 assembly (clang, -O0):
<copysingl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %edi,%edi
mov    $0x0,%al
call   1030 <mkstate@plt>
mov    %eax,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     118a <copysingl+0x5a>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1040 <dupmachine@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
mov    $0x0,%al
call   1050 <link_machines@plt>
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1151 <copysingl+0x21>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copysingl>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %edi,%r14d
xor    %edi,%edi
xor    %eax,%eax
call   1030 <mkstate@plt>
mov    %eax,%ebp
test   %ebx,%ebx
jle    116c <copysingl+0x3c>
nopl   0x0(%rax,%rax,1)
mov    %r14d,%edi
xor    %eax,%eax
call   1040 <dupmachine@plt>
mov    %ebp,%edi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <link_machines@plt>
mov    %eax,%ebp
add    $0xffffffff,%ebx
jne    1150 <copysingl+0x20>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @copysingl(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = call i32 (i32, ...) bitcast (i32 (...)* @mkstate to i32 (i32, ...)*)(i32 0)
store i32 %7, i32* %5
store i32 1, i32* %6
br label %8
8: ; preds = %17, %2
%9 = load i32, i32* %6
%10 = load i32, i32* %4
%11 = icmp sle i32 %9, %10
br i1 %11, label %12, label %20
12: ; preds = %8
%13 = load i32, i32* %5
%14 = load i32, i32* %3
%15 = call i32 (i32, ...) bitcast (i32 (...)* @dupmachine to i32 (i32, ...)*)(i32 %14)
%16 = call i32 (i32, i32, ...) bitcast (i32 (...)* @link_machines to i32 (i32, i32, ...)*)(i32 %13, i32 %15)
store i32 %16, i32* %5
br label %17
17: ; preds = %12
%18 = load i32, i32* %6
%19 = add nsw i32 %18, 1
store i32 %19, i32* %6
br label %8
20: ; preds = %8
%21 = load i32, i32* %5
ret i32 %21
}

LLVM IR (-O2):
define i32 @copysingl(i32 %0, i32 %1) {
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @mkstate to i32 (i32, ...)*)(i32 0)
%4 = icmp slt i32 %1, 1
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i32 [ %10, %5 ], [ 1, %2 ]
%7 = phi i32 [ %9, %5 ], [ %3, %2 ]
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @dupmachine to i32 (i32, ...)*)(i32 %0)
%9 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @link_machines to i32 (i32, i32, ...)*)(i32 %7, i32 %8)
%10 = add nuw i32 %6, 1
%11 = icmp eq i32 %6, %1
br i1 %11, label %12, label %5
12: ; preds = %5, %2
%13 = phi i32 [ %3, %2 ], [ %9, %5 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ Z_DEFAULT_COMPRESSION;
int /*<<< orphan*/ Z_NULL;
int /*<<< orphan*/ deflateInit(int /*<<< orphan*/, int /*<<< orphan*/);
int main() {
  deflateInit(Z_NULL, Z_DEFAULT_COMPRESSION);
  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),%edi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
call   1030 <deflateInit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
mov    0x2ebf(%rip),%rax
mov    (%rax),%esi
call   1030 <deflateInit@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@Z_NULL = global i32 0
@Z_DEFAULT_COMPRESSION = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @Z_NULL
%3 = load i32, i32* @Z_DEFAULT_COMPRESSION
%4 = call i32 @deflateInit(i32 %2, i32 %3)
ret i32 0
}

LLVM IR (-O2):
@Z_NULL = global i32 0
@Z_DEFAULT_COMPRESSION = global i32 0
define i32 @main() {
%1 = load i32, i32* @Z_NULL
%2 = load i32, i32* @Z_DEFAULT_COMPRESSION
%3 = tail call i32 @deflateInit(i32 %1, i32 %2)
ret i32 0
}
void CRYPTOAesEcbFinish(void) {
  (*((volatile unsigned long *)(0x40024000 + 0x00000700))) = 0x00000000;
  (*((volatile unsigned long *)(0x40024000 + 0x00000550))) = 0x00000000;
}


x86 assembly (clang, -O0):
<CRYPTOAesEcbFinish>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40024700,%eax
movq   $0x0,(%rax)
mov    $0x40024550,%eax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<CRYPTOAesEcbFinish>:
movq   $0x0,0x40024700
movq   $0x0,0x40024550
ret

LLVM IR (-O0):
define void @CRYPTOAesEcbFinish() {
store volatile i64 0, i64* inttoptr (i64 1073891072 to i64*)
store volatile i64 0, i64* inttoptr (i64 1073890640 to i64*)
ret void
}

LLVM IR (-O2):
define void @CRYPTOAesEcbFinish() {
store volatile i64 0, i64* inttoptr (i64 1073891072 to i64*)
store volatile i64 0, i64* inttoptr (i64 1073890640 to i64*)
ret void
}
/* Variables and functions */
int atoin(char *);
int /*<<< orphan*/ printf(char *, int);
void main() {
  int a = atoin("1234");
  printf("%d", a);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <atoin@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"1234\00"
@.str.1 = [3 x i8] c"%d\00"
define void @main() {
%1 = tail call i32 @atoin(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_resolve_wait(void *resolve, uint64_t timeout_usec) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_resolve_wait>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
mov    0x2ecc(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_resolve_wait(i8* nocapture readnone %0, i32 %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ analyze_cards(int *, int *);
int /*<<< orphan*/ print_result();
int /*<<< orphan*/ read_cards(int *, int *);
int main(void) {
  int num_in_rank[13];
  int num_in_suit[4];
  for (;;) {
    read_cards(num_in_rank, num_in_suit);
    analyze_cards(num_in_rank, num_in_suit);
    print_result();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1030 <read_cards@plt>
lea    -0x40(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1050 <analyze_cards@plt>
mov    $0x0,%al
call   1040 <print_result@plt>
jmp    113f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x48,%rsp
lea    0x10(%rsp),%r14
mov    %rsp,%rbx
nop
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <read_cards@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <analyze_cards@plt>
xor    %eax,%eax
call   1040 <print_result@plt>
jmp    1140 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [13 x i32]
%3 = alloca [4 x i32]
store i32 0, i32* %1
br label %4
4: ; preds = %4, %0
%5 = getelementptr inbounds [13 x i32], [13 x i32]* %2, i64 0, i64 0
%6 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%7 = call i32 @read_cards(i32* %5, i32* %6)
%8 = getelementptr inbounds [13 x i32], [13 x i32]* %2, i64 0, i64 0
%9 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%10 = call i32 @analyze_cards(i32* %8, i32* %9)
%11 = call i32 (...) @print_result()
br label %4
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [13 x i32]
%2 = alloca [4 x i32]
%3 = bitcast [13 x i32]* %1 to i8*
%4 = bitcast [4 x i32]* %2 to i8*
%5 = getelementptr inbounds [13 x i32], [13 x i32]* %1, i64 0, i64 0
%6 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
br label %7
7: ; preds = %7, %0
%8 = call i32 @read_cards(i32* %5, i32* %6)
%9 = call i32 @analyze_cards(i32* %5, i32* %6)
%10 = call i32 (...) @print_result()
br label %7
}
/* Type definitions */
typedef int /*<<< orphan*/ r;

/* Variables and functions */
int /*<<< orphan*/ memcpy(size_t *, void const *, int);
size_t S_LD_SZT(const void *a) {
  size_t r;
  memcpy(&r, a, sizeof(r));
  return r;
}


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

x86 assembly (clang, -O2):
<S_LD_SZT>:
push   %rax
mov    %rdi,%rsi
mov    %rsp,%rdi
mov    $0x8,%edx
call   1030 <memcpy@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @S_LD_SZT(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @memcpy(i64* %3, i8* %4, i32 8)
%6 = load i64, i64* %3
ret i64 %6
}

LLVM IR (-O2):
define i64 @S_LD_SZT(i8* %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = call i32 @memcpy(i64* %2, i8* %0, i32 8)
%5 = load i64, i64* %2
ret i64 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
FILE *fdopen(int fd, const char *mode) {
  fprintf(stderr, "Warning: fdopen() unimplemented\n");
  return NULL;
}


x86 assembly (clang, -O0):
<fdopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
lea    0xed1(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdopen>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"Warning: fdopen() unimplemented\0A\00"
define i32* @fdopen(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret i32* null
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"Warning: fdopen() unimplemented\0A\00"
define noalias i32* @fdopen(i32 %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret i32* null
}
/* Variables and functions */
int type1(int *, int /*<<< orphan*/, int /*<<< orphan*/);
int Type(int *msgvec) { return (type1(msgvec, 0, 0)); }


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

x86 assembly (clang, -O2):
<Type>:
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <type1@plt>

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

LLVM IR (-O2):
define i32 @Type(i32* %0) {
%2 = tail call i32 @type1(i32* %0, i32 0, i32 0)
ret i32 %2
}
/* Type definitions */
struct dbuf_s {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ dbuf_destroy(struct dbuf_s *);
int /*<<< orphan*/ dbuf_write(struct dbuf_s *, int /*<<< orphan*/ *);
void dbuf_write_and_destroy(struct dbuf_s *dbuf, FILE *dest) {
  dbuf_write(dbuf, dest);
  dbuf_destroy(dbuf);
}


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

x86 assembly (clang, -O2):
<dbuf_write_and_destroy>:
push   %rbx
mov    %rdi,%rbx
call   1040 <dbuf_write@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <dbuf_destroy@plt>

LLVM IR (-O0):
%struct.dbuf_s = type { i32 }
define void @dbuf_write_and_destroy(%struct.dbuf_s* %0, i32* %1) {
%3 = alloca %struct.dbuf_s*
%4 = alloca i32*
store %struct.dbuf_s* %0, %struct.dbuf_s** %3
store i32* %1, i32** %4
%5 = load %struct.dbuf_s*, %struct.dbuf_s** %3
%6 = load i32*, i32** %4
%7 = call i32 @dbuf_write(%struct.dbuf_s* %5, i32* %6)
%8 = load %struct.dbuf_s*, %struct.dbuf_s** %3
%9 = call i32 @dbuf_destroy(%struct.dbuf_s* %8)
ret void
}

LLVM IR (-O2):
%struct.dbuf_s = type { i32 }
define void @dbuf_write_and_destroy(%struct.dbuf_s* %0, i32* %1) {
%3 = tail call i32 @dbuf_write(%struct.dbuf_s* %0, i32* %1)
%4 = tail call i32 @dbuf_destroy(%struct.dbuf_s* %0)
ret void
}
void test_libsym2_3(void) {}


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

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

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

LLVM IR (-O2):
define void @test_libsym2_3() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t fwrite(char const *, size_t, int, int /*<<< orphan*/ *);
size_t strlen(char const *);
size_t Mem_FwriteStr(const char *str, FILE *fp) {
  size_t len = strlen(str), nbytes;
  nbytes = fwrite(str, len, sizeof(*str), fp);
  return nbytes;
}


x86 assembly (clang, -O0):
<Mem_FwriteStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rcx
mov    $0x1,%edx
call   1040 <fwrite@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mem_FwriteStr>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
mov    $0x1,%edx
mov    %r14,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fwrite@plt>

LLVM IR (-O0):
define i64 @Mem_FwriteStr(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %3
store i32* %1, i32** %4
%7 = load i8*, i8** %3
%8 = call i64 @strlen(i8* %7)
store i64 %8, i64* %5
%9 = load i8*, i8** %3
%10 = load i64, i64* %5
%11 = load i32*, i32** %4
%12 = call i64 @fwrite(i8* %9, i64 %10, i32 1, i32* %11)
store i64 %12, i64* %6
%13 = load i64, i64* %6
ret i64 %13
}

LLVM IR (-O2):
define i64 @Mem_FwriteStr(i8* nocapture %0, i32* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @fwrite(i8* %0, i64 %3, i32 1, i32* %1)
ret i64 %4
}
void nfs_client_return_layouts(struct nfs_client *clp) {}


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

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

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

LLVM IR (-O2):
%struct.nfs_client = type opaque
define void @nfs_client_return_layouts(%struct.nfs_client* nocapture %0) {
ret void
}
void gtk_about_dialog_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_about_dialog_get_type() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mayret(int);
__attribute__((no, noclone)) void tailcall(int x) { mayret(x); }


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

x86 assembly (clang, -O2):
<tailcall>:
jmp    1030 <mayret@plt>

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

LLVM IR (-O2):
define void @tailcall(i32 %0) {
%2 = tail call i32 @mayret(i32 %0)
ret void
}
/* Type definitions */
typedef int pid_t;
typedef int /*<<< orphan*/ cmd;

/* Variables and functions */
int errno;
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ snprintf(char *, int, char *, int);
int system(char *);
void print_status_vm_values(pid_t pid) {
  char cmd[1024];
  snprintf(cmd, sizeof(cmd), "grep Vm /proc/%d/status", pid);
  int rc = system(cmd);
  printf("system() returned %d (%d)\n", rc, errno);
}


x86 assembly (clang, -O0):
<print_status_vm_values>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x4(%rbp),%ecx
mov    $0x400,%esi
lea    0xeac(%rip),%rdx
call   1050 <snprintf@plt>
lea    -0x410(%rbp),%rdi
call   1030 <system@plt>
mov    %eax,-0x414(%rbp)
mov    -0x414(%rbp),%esi
mov    0x2e68(%rip),%rax
mov    (%rax),%edx
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_status_vm_values>:
push   %rbx
sub    $0x400,%rsp
mov    %edi,%ecx
lea    0xebf(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x400,%esi
call   1050 <snprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
mov    0x2e80(%rip),%rcx
mov    (%rcx),%edx
lea    0xeaf(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"grep Vm /proc/%d/status\00"
@.str.1 = [27 x i8] c"system() returned %d (%d)\0A\00"
@errno = global i32 0
define void @print_status_vm_values(i32 %0) {
%2 = alloca i32
%3 = alloca [1024 x i8]
%4 = alloca i32
store i32 %0, i32* %2
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%6 = load i32, i32* %2
%7 = call i32 @snprintf(i8* %5, i32 1024, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%9 = call i32 @system(i8* %8)
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = load i32, i32* @errno
%12 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %10, i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"grep Vm /proc/%d/status\00"
@.str.1 = [27 x i8] c"system() returned %d (%d)\0A\00"
@errno = global i32 0
define void @print_status_vm_values(i32 %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @snprintf(i8* %3, i32 1024, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = call i32 @system(i8* %3)
%6 = load i32, i32* @errno
%7 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32 %6)
ret void
}
/* Variables and functions */
int bitwidth(int);
int rrotate(int x, int n) {
  int y = ~(~0 << n);
  y &= x;
  x >>= n;
  int w = bitwidth(x);
  y <<= w;
  return y | x;
}


x86 assembly (clang, -O0):
<rrotate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
sar    %cl,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <bitwidth@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%eax
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
or     -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rrotate>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ecx
mov    %edi,%ebx
mov    $0xffffffff,%ebp
shl    %cl,%ebp
not    %ebp
and    %edi,%ebp
sar    %cl,%ebx
mov    %ebx,%edi
call   1030 <bitwidth@plt>
mov    %eax,%ecx
shl    %cl,%ebp
or     %ebx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @rrotate(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = shl i32 -1, %7
%9 = xor i32 %8, -1
store i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = load i32, i32* %5
%12 = and i32 %11, %10
store i32 %12, i32* %5
%13 = load i32, i32* %4
%14 = load i32, i32* %3
%15 = ashr i32 %14, %13
store i32 %15, i32* %3
%16 = load i32, i32* %3
%17 = call i32 @bitwidth(i32 %16)
store i32 %17, i32* %6
%18 = load i32, i32* %6
%19 = load i32, i32* %5
%20 = shl i32 %19, %18
store i32 %20, i32* %5
%21 = load i32, i32* %5
%22 = load i32, i32* %3
%23 = or i32 %21, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @rrotate(i32 %0, i32 %1) {
%3 = shl nsw i32 -1, %1
%4 = xor i32 %3, -1
%5 = and i32 %4, %0
%6 = ashr i32 %0, %1
%7 = tail call i32 @bitwidth(i32 %6)
%8 = shl i32 %5, %7
%9 = or i32 %8, %6
ret i32 %9
}
void eb_jisx0208_to_euc(out_string, in_string) char *out_string;
const char *in_string;
{
  unsigned char *out_p = (unsigned char *)out_string;
  const unsigned char *in_p = (unsigned char *)in_string;
  while (*in_p != '\0')
    *out_p++ = ((*in_p++) | 0x80);
  *out_p = '\0';
}


x86 assembly (clang, -O0):
<eb_jisx0208_to_euc>:
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,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x0,%eax
je     115b <eb_jisx0208_to_euc+0x5b>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movzbl (%rax),%eax
or     $0x80,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    111c <eb_jisx0208_to_euc+0x1c>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<eb_jisx0208_to_euc>:
mov    (%rsi),%al
test   %al,%al
je     1123 <eb_jisx0208_to_euc+0x23>
add    $0x1,%rsi
nopw   0x0(%rax,%rax,1)
or     $0x80,%al
mov    %al,(%rdi)
add    $0x1,%rdi
movzbl (%rsi),%eax
add    $0x1,%rsi
test   %al,%al
jne    1110 <eb_jisx0208_to_euc+0x10>
movb   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @eb_jisx0208_to_euc(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %12, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %1, %2 ]
%8 = phi i8* [ %11, %5 ], [ %0, %2 ]
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = or i8 %6, -128
%11 = getelementptr inbounds i8, i8* %8, i64 1
store i8 %10, i8* %8
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %2
%15 = phi i8* [ %0, %2 ], [ %11, %5 ]
store i8 0, i8* %15
ret void
}
unsigned long long ft_ullongmax(unsigned long long n1, unsigned long long n2) {
  return ((n1 > n2) ? n1 : n2);
}


x86 assembly (clang, -O0):
<ft_ullongmax>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jbe    1127 <ft_ullongmax+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <ft_ullongmax+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_ullongmax>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmova  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @ft_ullongmax(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp ugt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @ft_ullongmax(i64 %0, i64 %1) {
%3 = icmp ugt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ initArgs(char **);
void freeArgs(char *args[]) {
  free(args[0]);
  initArgs(args);
}


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

x86 assembly (clang, -O2):
<freeArgs>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <initArgs@plt>

LLVM IR (-O0):
define void @freeArgs(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = getelementptr inbounds i8*, i8** %3, i64 0
%5 = load i8*, i8** %4
%6 = call i32 @free(i8* %5)
%7 = load i8**, i8*** %2
%8 = call i32 @initArgs(i8** %7)
ret void
}

LLVM IR (-O2):
define void @freeArgs(i8** %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @free(i8* %2)
%4 = tail call i32 @initArgs(i8** %0)
ret void
}
void __div0(void) {}


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

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

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

LLVM IR (-O2):
define void @__div0() {
ret void
}
int comp(const void *a, const void *b) {
  if (*(char *)a == *(char *)b)
    return 0;
  else if (*(char *)a < *(char *)b)
    return -1;
  else
    return 1;
}


x86 assembly (clang, -O0):
<comp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    112e <comp+0x2e>
movl   $0x0,-0x4(%rbp)
jmp    1157 <comp+0x57>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jge    1150 <comp+0x50>
movl   $0xffffffff,-0x4(%rbp)
jmp    1157 <comp+0x57>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comp>:
mov    (%rdi),%al
xor    %ecx,%ecx
xor    %edx,%edx
cmp    (%rsi),%al
setge  %dl
lea    -0x1(%rdx,%rdx,1),%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @comp(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = icmp eq i8 %3, %4
%6 = icmp slt i8 %3, %4
%7 = select i1 %6, i32 -1, i32 1
%8 = select i1 %5, i32 0, i32 %7
ret i32 %8
}
/* Type definitions */
typedef int int32_t;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int16_t fxdpt_32_to_16_bits(const int32_t x) {
  if (0x10 < 0x10000)
    return (int16_t)(x / (0x10000 / 0x10));
  else
    return (int16_t)(x * (0x10 / 0x10000));
}


x86 assembly (clang, -O0):
<fxdpt_32_to_16_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x1000,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<fxdpt_32_to_16_bits>:
lea    0xfff(%rdi),%eax
test   %edi,%edi
cmovns %edi,%eax
sar    $0xc,%eax
ret

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

LLVM IR (-O2):
define i32 @fxdpt_32_to_16_bits(i32 %0) {
%2 = sdiv i32 %0, 4096
ret i32 %2
}
/* Variables and functions */
scalar_t__ mkdir(char const *, unsigned int);
int iposix_mkdir(const char *dir, unsigned int mode) {
  return mkdir(dir, mode) == 0;
}


x86 assembly (clang, -O0):
<iposix_mkdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <mkdir@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iposix_mkdir>:
push   %rax
call   1030 <mkdir@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @iposix_mkdir(i8* nocapture %0, i32 %1) {
%3 = tail call i64 @mkdir(i8* %0, i32 %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
unsigned long int unsignedlongint_ignoring_signedlonglong(unsigned long int x,
                                                          signed long long y) {
  return x;
}


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

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

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

LLVM IR (-O2):
define i64 @unsignedlongint_ignoring_signedlonglong(i64 returned %0, i64 %1) {
ret i64 %0
}
/* Type definitions */
struct pattern {
  int dummy;
};

/* Variables and functions */
int accurate_approxlib(int, int, int, int /*<<< orphan*/ *);
int offset(int, int /*<<< orphan*/, int, int);
int autohelperowl_vital_apat35(struct pattern *patt, int transformation,
                               int move, int color, int action) {
  int A;
  (void)patt;
  (void)color;
  (void)action;
  A = offset(-1, 0, move, transformation);
  return accurate_approxlib(A, (1 + 2 - (color)), 20, NULL) == 2;
}


x86 assembly (clang, -O0):
<autohelperowl_vital_apat35>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1030 <offset@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
mov    $0x3,%esi
sub    -0x14(%rbp),%esi
mov    $0x14,%edx
xor    %eax,%eax
mov    %eax,%ecx
call   1040 <accurate_approxlib@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<autohelperowl_vital_apat35>:
push   %rbx
mov    %ecx,%ebx
mov    %esi,%ecx
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1030 <offset@plt>
mov    $0x3,%esi
sub    %ebx,%esi
mov    %eax,%edi
mov    $0x14,%edx
xor    %ecx,%ecx
call   1040 <accurate_approxlib@plt>
xor    %ecx,%ecx
cmp    $0x2,%eax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.pattern = type { i32 }
define i32 @autohelperowl_vital_apat35(%struct.pattern* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.pattern*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store %struct.pattern* %0, %struct.pattern** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load %struct.pattern*, %struct.pattern** %6
%13 = load i32, i32* %9
%14 = load i32, i32* %10
%15 = load i32, i32* %8
%16 = load i32, i32* %7
%17 = call i32 @offset(i32 -1, i32 0, i32 %15, i32 %16)
store i32 %17, i32* %11
%18 = load i32, i32* %11
%19 = load i32, i32* %9
%20 = sub nsw i32 3, %19
%21 = call i32 @accurate_approxlib(i32 %18, i32 %20, i32 20, i32* null)
%22 = icmp eq i32 %21, 2
%23 = zext i1 %22 to i32
ret i32 %23
}

LLVM IR (-O2):
%struct.pattern = type { i32 }
define i32 @autohelperowl_vital_apat35(%struct.pattern* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @offset(i32 -1, i32 0, i32 %2, i32 %1)
%7 = sub nsw i32 3, %3
%8 = tail call i32 @accurate_approxlib(i32 %6, i32 %7, i32 20, i32* null)
%9 = icmp eq i32 %8, 2
%10 = zext i1 %9 to i32
ret i32 %10
}
double SG_Timer(void) { return 0; }


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

x86 assembly (clang, -O2):
<SG_Timer>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @SG_Timer() {
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @SG_Timer() {
ret double 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ GetProcessHeap();
void *HeapAlloc(int /*<<< orphan*/, int /*<<< orphan*/, unsigned int);
void *malloc(unsigned int bytes) {
  return HeapAlloc(GetProcessHeap(), 0, bytes);
}


x86 assembly (clang, -O0):
<malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <GetProcessHeap@plt>
mov    %eax,%edi
mov    -0x4(%rbp),%edx
xor    %esi,%esi
call   1040 <HeapAlloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<malloc>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <GetProcessHeap@plt>
mov    %eax,%edi
xor    %esi,%esi
mov    %ebx,%edx
pop    %rbx
jmp    1040 <HeapAlloc@plt>

LLVM IR (-O0):
define i8* @malloc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @GetProcessHeap()
%4 = load i32, i32* %2
%5 = call i8* @HeapAlloc(i32 %3, i32 0, i32 %4)
ret i8* %5
}

LLVM IR (-O2):
define i8* @malloc(i32 %0) {
%2 = tail call i32 (...) @GetProcessHeap()
%3 = tail call i8* @HeapAlloc(i32 %2, i32 0, i32 %0)
ret i8* %3
}
/* Type definitions */
struct ECALC_TOKEN {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct ECALC_TOKEN *);
void ecalc_memman_free(struct ECALC_TOKEN *tok) { free(tok); }


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

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

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

LLVM IR (-O2):
%struct.ECALC_TOKEN = type { i32 }
define void @ecalc_memman_free(%struct.ECALC_TOKEN* nocapture %0) {
%2 = tail call i32 @free(%struct.ECALC_TOKEN* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  if (n < 0) {
    printf("The number is negative.\n");
  } else {
    printf("The number is positive.\n");
  }
  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   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jge    115a <main+0x3a>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
jmp    1166 <main+0x46>
lea    0xebb(%rip),%rdi
call   1030 <printf@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   1040 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
lea    0xedd(%rip),%rax
lea    0xebe(%rip),%rdi
cmovs  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [25 x i8] c"The number is negative.\0A\00"
@.str.2 = [25 x i8] c"The number is positive.\0A\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 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
br label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [24 x i8] c"The number is positive.\00"
@str.3 = [24 x i8] c"The number is negative.\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 = icmp slt i32 %4, 0
%6 = select i1 %5, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @str.3, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0)
%7 = call i32 @puts(i8* dereferenceable(1) %6)
ret i32 0
}
/* Type definitions */
struct stack_st_OPENSSL_STRING {
  int dummy;
};
typedef int /*<<< orphan*/ OPENSSL_STACK;

/* Variables and functions */
int /*<<< orphan*/ OPENSSL_sk_sort(int /*<<< orphan*/ *);
void sk_OPENSSL_STRING_sort(struct stack_st_OPENSSL_STRING *sk) {
  OPENSSL_sk_sort((OPENSSL_STACK *)sk);
}


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

x86 assembly (clang, -O2):
<sk_OPENSSL_STRING_sort>:
jmp    1030 <OPENSSL_sk_sort@plt>

LLVM IR (-O0):
%struct.stack_st_OPENSSL_STRING = type { i32 }
define void @sk_OPENSSL_STRING_sort(%struct.stack_st_OPENSSL_STRING* %0) {
%2 = alloca %struct.stack_st_OPENSSL_STRING*
store %struct.stack_st_OPENSSL_STRING* %0, %struct.stack_st_OPENSSL_STRING** %2
%3 = load %struct.stack_st_OPENSSL_STRING*, %struct.stack_st_OPENSSL_STRING** %2
%4 = bitcast %struct.stack_st_OPENSSL_STRING* %3 to i32*
%5 = call i32 @OPENSSL_sk_sort(i32* %4)
ret void
}

LLVM IR (-O2):
%struct.stack_st_OPENSSL_STRING = type { i32 }
define void @sk_OPENSSL_STRING_sort(%struct.stack_st_OPENSSL_STRING* %0) {
%2 = getelementptr %struct.stack_st_OPENSSL_STRING, %struct.stack_st_OPENSSL_STRING* %0, i64 0, i32 0
%3 = tail call i32 @OPENSSL_sk_sort(i32* %2)
ret void
}
void glLoadMatrixf(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glLoadMatrixf() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *strdup(char const *);
char *SetString(char **ppchDestination, const char *szOriginal) {
  if (*ppchDestination)
    free(*ppchDestination);
  *ppchDestination = szOriginal ? strdup(szOriginal) : NULL;
  return *ppchDestination;
}


x86 assembly (clang, -O0):
<SetString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     114a <SetString+0x2a>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
cmpq   $0x0,-0x10(%rbp)
je     1167 <SetString+0x47>
mov    -0x10(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x18(%rbp)
jmp    1172 <SetString+0x52>
xor    %eax,%eax
mov    %rax,-0x18(%rbp)
jmp    1172 <SetString+0x52>
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetString>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1137 <SetString+0x17>
call   1030 <free@plt>
test   %rbx,%rbx
je     1146 <SetString+0x26>
mov    %rbx,%rdi
call   1040 <strdup@plt>
jmp    1148 <SetString+0x28>
xor    %eax,%eax
mov    %rax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @SetString(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
store i8** %0, i8*** %3
store i8* %1, i8** %4
%5 = load i8**, i8*** %3
%6 = load i8*, i8** %5
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i8**, i8*** %3
%10 = load i8*, i8** %9
%11 = call i32 @free(i8* %10)
br label %12
12: ; preds = %8, %2
%13 = load i8*, i8** %4
%14 = icmp ne i8* %13, null
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = load i8*, i8** %4
%17 = call i8* @strdup(i8* %16)
br label %19
18: ; preds = %12
br label %19
19: ; preds = %18, %15
%20 = phi i8* [ %17, %15 ], [ null, %18 ]
%21 = load i8**, i8*** %3
store i8* %20, i8** %21
%22 = load i8**, i8*** %3
%23 = load i8*, i8** %22
ret i8* %23
}

LLVM IR (-O2):
define i8* @SetString(i8** nocapture %0, i8* %1) {
%3 = load i8*, i8** %0
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @free(i8* %3)
br label %7
7: ; preds = %5, %2
%8 = icmp eq i8* %1, null
br i1 %8, label %11, label %9
9: ; preds = %7
%10 = tail call i8* @strdup(i8* %1)
br label %11
11: ; preds = %7, %9
%12 = phi i8* [ %10, %9 ], [ null, %7 ]
store i8* %12, i8** %0
ret i8* %12
}
/* Variables and functions */
int /*<<< orphan*/ uart_putc(char);
extern void printf_putc(void *p, char c) { uart_putc(c); }


x86 assembly (clang, -O0):
<printf_putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%edi
call   1030 <uart_putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printf_putc>:
mov    %esi,%edi
jmp    1030 <uart_putc@plt>

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

LLVM IR (-O2):
define void @printf_putc(i8* nocapture readnone %0, i8 signext %1) {
%3 = tail call i32 @uart_putc(i8 signext %1)
ret void
}
void cerosFila(int matriz[][3], int fila, int cols) {
  int i;
  for (i = 0; i < cols; i++) {
    matriz[fila][i] = 0;
  }
}


x86 assembly (clang, -O0):
<cerosFila>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1149 <cerosFila+0x49>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0x14(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1115 <cerosFila+0x15>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cerosFila>:
test   %edx,%edx
jle    1131 <cerosFila+0x21>
push   %rax
movslq %esi,%rax
lea    (%rax,%rax,2),%rax
lea    (%rdi,%rax,4),%rdi
mov    %edx,%edx
shl    $0x2,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @cerosFila([3 x i32]* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %11
5: ; preds = %3
%6 = sext i32 %1 to i64
%7 = getelementptr [3 x i32], [3 x i32]* %0, i64 %6, i64 0
%8 = bitcast i32* %7 to i8*
%9 = zext i32 %2 to i64
%10 = shl nuw nsw i64 %9, 2
br label %11
11: ; preds = %5, %3
ret void
}
/* Variables and functions */
int fact(int);
int /*<<< orphan*/ printf(char *, int);
int main() { printf("%d\n", fact(5)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
call   1040 <fact@plt>
mov    %eax,%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @fact(i32 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
void proc15() {}


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

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

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

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