xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ sched_yield();
void ithread_yield(void) { sched_yield(); }


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

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

LLVM IR (-O0):
define void @ithread_yield() {
%1 = call i32 (...) @sched_yield()
ret void
}

LLVM IR (-O2):
define void @ithread_yield() {
%1 = tail call i32 (...) @sched_yield()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M555_f(char *s) {
  debug("M555_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M555_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M555_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M555_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M555_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M555_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M555_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ memoryManagerReserveDirectMappedRegion(int);
int MemoryManagerReserveAllDirectMappedRegions(void) {
  memoryManagerReserveDirectMappedRegion(0);
  memoryManagerReserveDirectMappedRegion(1);
  memoryManagerReserveDirectMappedRegion(6);
  memoryManagerReserveDirectMappedRegion(5);
  memoryManagerReserveDirectMappedRegion(2);
  return 1;
}


x86 assembly (clang, -O0):
<MemoryManagerReserveAllDirectMappedRegions>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <memoryManagerReserveDirectMappedRegion@plt>
mov    $0x1,%edi
call   1030 <memoryManagerReserveDirectMappedRegion@plt>
mov    $0x6,%edi
call   1030 <memoryManagerReserveDirectMappedRegion@plt>
mov    $0x5,%edi
call   1030 <memoryManagerReserveDirectMappedRegion@plt>
mov    $0x2,%edi
call   1030 <memoryManagerReserveDirectMappedRegion@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<MemoryManagerReserveAllDirectMappedRegions>:
push   %rax
xor    %edi,%edi
call   1030 <memoryManagerReserveDirectMappedRegion@plt>
mov    $0x1,%edi
call   1030 <memoryManagerReserveDirectMappedRegion@plt>
mov    $0x6,%edi
call   1030 <memoryManagerReserveDirectMappedRegion@plt>
mov    $0x5,%edi
call   1030 <memoryManagerReserveDirectMappedRegion@plt>
mov    $0x2,%edi
call   1030 <memoryManagerReserveDirectMappedRegion@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @MemoryManagerReserveAllDirectMappedRegions() {
%1 = call i32 @memoryManagerReserveDirectMappedRegion(i32 0)
%2 = call i32 @memoryManagerReserveDirectMappedRegion(i32 1)
%3 = call i32 @memoryManagerReserveDirectMappedRegion(i32 6)
%4 = call i32 @memoryManagerReserveDirectMappedRegion(i32 5)
%5 = call i32 @memoryManagerReserveDirectMappedRegion(i32 2)
ret i32 1
}

LLVM IR (-O2):
define i32 @MemoryManagerReserveAllDirectMappedRegions() {
%1 = tail call i32 @memoryManagerReserveDirectMappedRegion(i32 0)
%2 = tail call i32 @memoryManagerReserveDirectMappedRegion(i32 1)
%3 = tail call i32 @memoryManagerReserveDirectMappedRegion(i32 6)
%4 = tail call i32 @memoryManagerReserveDirectMappedRegion(i32 5)
%5 = tail call i32 @memoryManagerReserveDirectMappedRegion(i32 2)
ret i32 1
}
void RTManifestDup(void) {}


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

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

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

LLVM IR (-O2):
define void @RTManifestDup() {
ret void
}
int main() {
  _Static_assert(1, "fail");
  struct {
    _Static_assert(1, "fail");
  } x;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.anon = type {}
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.anon
store i32 0, i32* %1
ret i32 0
}

LLVM IR (-O2):
%struct.anon = type {}
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ str_add(char *, char *, int);
int /*<<< orphan*/ str_delete(char *, int, int);
void str_rep(char *S, char *ADD, int n, int m) {
  str_delete(S, n, m);
  str_add(S, ADD, n);
}


x86 assembly (clang, -O0):
<str_rep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1030 <str_delete@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <str_add@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_rep>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %edx,%esi
mov    %ecx,%edx
call   1030 <str_delete@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <str_add@plt>

LLVM IR (-O0):
define void @str_rep(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i32, i32* %7
%11 = load i32, i32* %8
%12 = call i32 @str_delete(i8* %9, i32 %10, i32 %11)
%13 = load i8*, i8** %5
%14 = load i8*, i8** %6
%15 = load i32, i32* %7
%16 = call i32 @str_add(i8* %13, i8* %14, i32 %15)
ret void
}

LLVM IR (-O2):
define void @str_rep(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call i32 @str_delete(i8* %0, i32 %2, i32 %3)
%6 = tail call i32 @str_add(i8* %0, i8* %1, i32 %2)
ret void
}
/* Variables and functions */
scalar_t__ strlen(char *);
int PSWHexStringLength(char *s) { return ((int)(strlen(s) + 1) / 2); }


x86 assembly (clang, -O0):
<PSWHexStringLength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%rax
mov    $0x2,%ecx
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PSWHexStringLength>:
push   %rax
call   1030 <strlen@plt>
mov    %eax,%ecx
add    $0x1,%ecx
shr    $0x1f,%ecx
add    %ecx,%eax
add    $0x1,%eax
sar    %eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @PSWHexStringLength(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strlen(i8* %3)
%5 = add nsw i64 %4, 1
%6 = trunc i64 %5 to i32
%7 = sdiv i32 %6, 2
ret i32 %7
}

LLVM IR (-O2):
define i32 @PSWHexStringLength(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
%4 = add i32 %3, 1
%5 = sdiv i32 %4, 2
ret i32 %5
}
AX0RX1(r0, r1, x0, x1, p0, p1) unsigned short r0, r1;
unsigned short *p0, *p1;
{
  if ((((unsigned short *)10000000)[x0]) <= (p1[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<AX0RX1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movslq -0xc(%rbp),%rcx
mov    $0x989680,%eax
movzwl (%rax,%rcx,2),%eax
mov    -0x20(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movzwl (%rcx,%rdx,2),%ecx
cmp    %ecx,%eax
jg     114c <AX0RX1+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    1153 <AX0RX1+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AX0RX1>:
movslq %edx,%rax
movzwl 0x989680(%rax,%rax,1),%edx
movslq %ecx,%rcx
xor    %eax,%eax
cmp    (%r9,%rcx,2),%dx
setbe  %al
ret

LLVM IR (-O0):
define i32 @AX0RX1(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4, i16* %5) {
%7 = alloca i32
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i16*
%14 = trunc i32 %0 to i16
%15 = trunc i32 %1 to i16
store i16 %14, i16* %8
store i16 %15, i16* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i16* %4, i16** %12
store i16* %5, i16** %13
%16 = load i32, i32* %10
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i16, i16* inttoptr (i64 10000000 to i16*), i64 %17
%19 = load i16, i16* %18
%20 = zext i16 %19 to i32
%21 = load i16*, i16** %13
%22 = load i32, i32* %11
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i16, i16* %21, i64 %23
%25 = load i16, i16* %24
%26 = zext i16 %25 to i32
%27 = icmp sle i32 %20, %26
br i1 %27, label %28, label %29
28: ; preds = %6
store i32 1, i32* %7
br label %30
29: ; preds = %6
store i32 0, i32* %7
br label %30
30: ; preds = %29, %28
%31 = load i32, i32* %7
ret i32 %31
}

LLVM IR (-O2):
define i32 @AX0RX1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i16, i16* inttoptr (i64 10000000 to i16*), i64 %7
%9 = load i16, i16* %8
%10 = sext i32 %3 to i64
%11 = getelementptr inbounds i16, i16* %5, i64 %10
%12 = load i16, i16* %11
%13 = icmp ule i16 %9, %12
%14 = zext i1 %13 to i32
ret i32 %14
}
/* Variables and functions */
long fat(int);
int /*<<< orphan*/ printf(char *, long);
int main() {
  int i, p = 2;
  long soma = 0;
  for (i = 1; i <= 4; i++) {
    soma = soma + fat(p);
    p = p + 2;
  }
  printf("%ld", soma);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jg     1184 <main+0x64>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <fat@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1145 <main+0x25>
mov    -0x18(%rbp),%rsi
lea    0xe71(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x2,%edi
call   1040 <fat@plt>
mov    %rax,%rbx
mov    $0x4,%edi
call   1040 <fat@plt>
add    %rax,%rbx
mov    $0x6,%edi
call   1040 <fat@plt>
add    %rax,%rbx
mov    $0x8,%edi
call   1040 <fat@plt>
add    %rax,%rbx
lea    0xea4(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
define i32 @main() {
%1 = tail call i64 @fat(i32 2)
%2 = tail call i64 @fat(i32 4)
%3 = add nsw i64 %2, %1
%4 = tail call i64 @fat(i32 6)
%5 = add nsw i64 %4, %3
%6 = tail call i64 @fat(i32 8)
%7 = add nsw i64 %6, %5
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void release(char **dst) {
  if (*dst)
    free(*dst);
  *dst = NULL;
}


x86 assembly (clang, -O0):
<release>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1136 <release+0x26>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<release>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1121 <release+0x11>
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @release(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @free(i8* %2)
br label %6
6: ; preds = %4, %1
store i8* null, i8** %0
ret void
}
void XInsertModifiermapEntry() {}


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

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

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

LLVM IR (-O2):
define void @XInsertModifiermapEntry() {
ret void
}
/* Type definitions */
struct useradd_cmdline_parser_params {
  int dummy;
};
struct useradd_args_info {
  int dummy;
};

/* Variables and functions */
int useradd_cmdline_parser_internal(int, char **, struct useradd_args_info *,
                                    struct useradd_cmdline_parser_params *,
                                    int /*<<< orphan*/);
int useradd_cmdline_parser_ext(int argc, char **argv,
                               struct useradd_args_info *args_info,
                               struct useradd_cmdline_parser_params *params) {
  int result;
  result = useradd_cmdline_parser_internal(argc, argv, args_info, params, 0);
  return result;
}


x86 assembly (clang, -O0):
<useradd_cmdline_parser_ext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %r8d,%r8d
call   1030 <useradd_cmdline_parser_internal@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<useradd_cmdline_parser_ext>:
xor    %r8d,%r8d
jmp    1030 <useradd_cmdline_parser_internal@plt>

LLVM IR (-O0):
%struct.useradd_args_info = type { i32 }
%struct.useradd_cmdline_parser_params = type { i32 }
define i32 @useradd_cmdline_parser_ext(i32 %0, i8** %1, %struct.useradd_args_info* %2, %struct.useradd_cmdline_parser_params* %3) {
%5 = alloca i32
%6 = alloca i8**
%7 = alloca %struct.useradd_args_info*
%8 = alloca %struct.useradd_cmdline_parser_params*
%9 = alloca i32
store i32 %0, i32* %5
store i8** %1, i8*** %6
store %struct.useradd_args_info* %2, %struct.useradd_args_info** %7
store %struct.useradd_cmdline_parser_params* %3, %struct.useradd_cmdline_parser_params** %8
%10 = load i32, i32* %5
%11 = load i8**, i8*** %6
%12 = load %struct.useradd_args_info*, %struct.useradd_args_info** %7
%13 = load %struct.useradd_cmdline_parser_params*, %struct.useradd_cmdline_parser_params** %8
%14 = call i32 @useradd_cmdline_parser_internal(i32 %10, i8** %11, %struct.useradd_args_info* %12, %struct.useradd_cmdline_parser_params* %13, i32 0)
store i32 %14, i32* %9
%15 = load i32, i32* %9
ret i32 %15
}

LLVM IR (-O2):
%struct.useradd_args_info = type { i32 }
%struct.useradd_cmdline_parser_params = type { i32 }
define i32 @useradd_cmdline_parser_ext(i32 %0, i8** %1, %struct.useradd_args_info* %2, %struct.useradd_cmdline_parser_params* %3) {
%5 = tail call i32 @useradd_cmdline_parser_internal(i32 %0, i8** %1, %struct.useradd_args_info* %2, %struct.useradd_cmdline_parser_params* %3, i32 0)
ret i32 %5
}
void foo75() {}


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

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

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

LLVM IR (-O2):
define void @foo75() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outnop1str(char *);
void outmulmulreg() { outnop1str("MUL"); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"MUL\00"
define void @outmulmulreg() {
%1 = tail call i32 @outnop1str(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
void eapol_sm_deinit(struct eapol_sm *sm) {}


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

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

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

LLVM IR (-O2):
%struct.eapol_sm = type opaque
define void @eapol_sm_deinit(%struct.eapol_sm* nocapture %0) {
ret void
}
int isBinary(char c) {
  return (c == '+' || c == '-' || c == '*' || c == '/' || c == '%' || c == '^');
}


x86 assembly (clang, -O0):
<isBinary>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2b,%ecx
mov    %al,-0x2(%rbp)
je     1171 <isBinary+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2d,%ecx
mov    %al,-0x2(%rbp)
je     1171 <isBinary+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2a,%ecx
mov    %al,-0x2(%rbp)
je     1171 <isBinary+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2f,%ecx
mov    %al,-0x2(%rbp)
je     1171 <isBinary+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x25,%ecx
mov    %al,-0x2(%rbp)
je     1171 <isBinary+0x71>
movsbl -0x1(%rbp),%eax
cmp    $0x5e,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isBinary>:
lea    -0x25(%rdi),%eax
cmp    $0xb,%al
jae    1119 <isBinary+0x19>
movzbl %al,%ecx
mov    $0x1,%eax
mov    $0x561,%edx
bt     %ecx,%edx
jb     1122 <isBinary+0x22>
xor    %eax,%eax
cmp    $0x5e,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @isBinary(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 43
br i1 %5, label %26, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 45
br i1 %9, label %26, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 42
br i1 %13, label %26, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 47
br i1 %17, label %26, label %18
18: ; preds = %14
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 37
br i1 %21, label %26, label %22
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 94
br label %26
26: ; preds = %22, %18, %14, %10, %6, %1
%27 = phi i1 [ true, %18 ], [ true, %14 ], [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %25, %22 ]
%28 = zext i1 %27 to i32
ret i32 %28
}

LLVM IR (-O2):
define i32 @isBinary(i8 signext %0) {
%2 = add i8 %0, -37
%3 = icmp ult i8 %2, 11
br i1 %3, label %7, label %4
4: ; preds = %7, %1
%5 = icmp eq i8 %0, 94
%6 = zext i1 %5 to i32
br label %12
7: ; preds = %1
%8 = zext i8 %2 to i16
%9 = lshr i16 1377, %8
%10 = and i16 %9, 1
%11 = icmp eq i16 %10, 0
br i1 %11, label %4, label %12
12: ; preds = %7, %4
%13 = phi i32 [ %6, %4 ], [ 1, %7 ]
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
scalar_t__ pthread_create(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                          void *(*)(void *), void *);
int /*<<< orphan*/ stderr;
void create_thread(pthread_t *thread, void *(*start_routine)(void *),
                   void *arg) {
  if (pthread_create(thread, NULL, start_routine, arg)) {
    fprintf(stderr, "Create thread failed");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<create_thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <pthread_create@plt>
cmp    $0x0,%rax
je     1182 <create_thread+0x52>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
lea    0xe8d(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_thread>:
push   %rax
mov    %rdx,%rcx
mov    %rsi,%rdx
xor    %esi,%esi
call   1040 <pthread_create@plt>
test   %rax,%rax
jne    1145 <create_thread+0x15>
pop    %rax
ret
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
lea    0xeab(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [21 x i8] c"Create thread failed\00"
define void @create_thread(i32* %0, i8* (i8*)* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i8* (i8*)*
%6 = alloca i8*
store i32* %0, i32** %4
store i8* (i8*)* %1, i8* (i8*)** %5
store i8* %2, i8** %6
%7 = load i32*, i32** %4
%8 = load i8* (i8*)*, i8* (i8*)** %5
%9 = load i8*, i8** %6
%10 = call i64 @pthread_create(i32* %7, i32* null, i8* (i8*)* %8, i8* %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %3
%13 = load i32, i32* @stderr
%14 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %3
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"Create thread failed\00"
define void @create_thread(i32* %0, i8* (i8*)* %1, i8* %2) {
%4 = tail call i64 @pthread_create(i32* %0, i32* null, i8* (i8*)* %1, i8* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ SOCK_STREAM;
int _socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int main(void) { return _socket(AF_INET, SOCK_STREAM, 0); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <_socket@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
jmp    1030 <_socket@plt>

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

LLVM IR (-O2):
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
define i32 @main() {
%1 = load i32, i32* @AF_INET
%2 = load i32, i32* @SOCK_STREAM
%3 = tail call i32 @_socket(i32 %1, i32 %2, i32 0)
ret i32 %3
}
void test___atomic_nand_fetch_1(short *mem) { __atomic_nand_fetch(mem, 1, 4); }


x86 assembly (clang, -O0):
<test___atomic_nand_fetch_1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movw   $0x1,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    %cx,-0x10(%rbp)
mov    (%rax),%ax
mov    %ax,-0xe(%rbp)
mov    -0xe(%rbp),%ax
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%dx
mov    %dx,%si
mov    %ax,%dx
mov    %edx,-0x28(%rbp)
and    %esi,%edx
mov    %edx,-0x24(%rbp)
not    %edx
mov    %edx,-0x20(%rbp)
lock cmpxchg %dx,(%rcx)
sete   %cl
mov    %ax,-0x1a(%rbp)
test   $0x1,%cl
mov    %ax,-0xe(%rbp)
jne    1162 <test___atomic_nand_fetch_1+0x62>
jmp    1125 <test___atomic_nand_fetch_1+0x25>
mov    -0x10(%rbp),%cx
mov    -0x1a(%rbp),%ax
and    %cx,%ax
xor    $0xffff,%ax
mov    %ax,-0xc(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test___atomic_nand_fetch_1>:
movzwl (%rdi),%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%ecx
not    %ecx
or     $0xfffe,%ecx
lock cmpxchg %cx,(%rdi)
jne    1110 <test___atomic_nand_fetch_1+0x10>
ret

LLVM IR (-O0):
define void @test___atomic_nand_fetch_1(i16* %0) {
%2 = alloca i16*
%3 = alloca i16
%4 = alloca i16
store i16* %0, i16** %2
%5 = load i16*, i16** %2
store i16 1, i16* %3
%6 = load i16, i16* %3
%7 = atomicrmw nand i16* %5, i16 %6 acq_rel
%8 = and i16 %7, %6
%9 = xor i16 %8, -1
store i16 %9, i16* %4
%10 = load i16, i16* %4
ret void
}

LLVM IR (-O2):
define void @test___atomic_nand_fetch_1(i16* nocapture %0) {
%2 = atomicrmw nand i16* %0, i16 1 acq_rel
ret void
}
/* Variables and functions */
scalar_t__ _new(int, int);
int /*<<< orphan*/ f(int *);
int /*<<< orphan*/ free(int *);
main() {
  int *p = (int *)_new(sizeof(int), 4);
  f(p);
  free(p);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%esi
mov    %esi,%edi
call   1050 <_new@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <f@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x4,%edi
mov    $0x4,%esi
call   1050 <_new@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <f@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32*
%2 = call i64 @_new(i32 4, i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = call i32 @f(i32* %4)
%6 = load i32*, i32** %1
%7 = call i32 @free(i32* %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @_new(i32 4, i32 4)
%2 = inttoptr i64 %1 to i32*
%3 = tail call i32 @f(i32* %2)
%4 = tail call i32 @free(i32* %2)
ret i32 0
}
void __attribute__((weak)) _mcount(void) {}


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

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

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

LLVM IR (-O2):
define weak void @_mcount() {
ret void
}
void eapol_sm_request_reauth(struct eapol_sm *sm) {}


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

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

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

LLVM IR (-O2):
%struct.eapol_sm = type opaque
define void @eapol_sm_request_reauth(%struct.eapol_sm* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ checkTerminal();
int /*<<< orphan*/ disableRepeatAndCursor();
int /*<<< orphan*/ registerSigIntCatcher();
int /*<<< orphan*/ saveAttributes();
int /*<<< orphan*/ setMenuMode();
void setEnvironment() {
  checkTerminal();
  saveAttributes();
  setMenuMode();
  registerSigIntCatcher();
  disableRepeatAndCursor();
}


x86 assembly (clang, -O0):
<setEnvironment>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <checkTerminal@plt>
mov    $0x0,%al
call   1050 <saveAttributes@plt>
mov    $0x0,%al
call   1060 <setMenuMode@plt>
mov    $0x0,%al
call   1070 <registerSigIntCatcher@plt>
mov    $0x0,%al
call   1030 <disableRepeatAndCursor@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<setEnvironment>:
push   %rax
xor    %eax,%eax
call   1040 <checkTerminal@plt>
xor    %eax,%eax
call   1050 <saveAttributes@plt>
xor    %eax,%eax
call   1060 <setMenuMode@plt>
xor    %eax,%eax
call   1070 <registerSigIntCatcher@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <disableRepeatAndCursor@plt>

LLVM IR (-O0):
define void @setEnvironment() {
%1 = call i32 (...) @checkTerminal()
%2 = call i32 (...) @saveAttributes()
%3 = call i32 (...) @setMenuMode()
%4 = call i32 (...) @registerSigIntCatcher()
%5 = call i32 (...) @disableRepeatAndCursor()
ret void
}

LLVM IR (-O2):
define void @setEnvironment() {
%1 = tail call i32 (...) @checkTerminal()
%2 = tail call i32 (...) @saveAttributes()
%3 = tail call i32 (...) @setMenuMode()
%4 = tail call i32 (...) @registerSigIntCatcher()
%5 = tail call i32 (...) @disableRepeatAndCursor()
ret void
}
/* Type definitions */
struct crypt_data {
  int dummy;
};
typedef int /*<<< orphan*/ data;

/* Variables and functions */
char *crypt_r(char const *, char const *, struct crypt_data *);
int /*<<< orphan*/ memset(struct crypt_data *, int /*<<< orphan*/, int);
int main(void) {
  static const char passwd[] = "somerandomtext";
  static const char salt[] = "examplesalt";
  char *encrypted;
  static struct crypt_data data;
  (void)memset(&data, 0, sizeof(data));
  encrypted = crypt_r(passwd, salt, &data);
  (void)encrypted;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0x2efe(%rip),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
lea    0xeb7(%rip),%rdi
lea    0xebf(%rip),%rsi
lea    0x2edd(%rip),%rdx
call   1030 <crypt_r@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0x2f0c(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
lea    0xec2(%rip),%rdi
lea    0xeca(%rip),%rsi
mov    %rbx,%rdx
call   1030 <crypt_r@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.crypt_data = type { i32 }
@main.passwd = internal constant [15 x i8] c"somerandomtext\00"
@main.salt = internal constant [12 x i8] c"examplesalt\00"
@main.data = internal global %struct.crypt_data zeroinitializer
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i32 @memset(%struct.crypt_data* @main.data, i32 0, i32 4)
%4 = call i8* @crypt_r(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @main.passwd, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @main.salt, i64 0, i64 0), %struct.crypt_data* @main.data)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
ret i32 0
}

LLVM IR (-O2):
%struct.crypt_data = type { i32 }
@main.passwd = internal constant [15 x i8] c"somerandomtext\00"
@main.salt = internal constant [12 x i8] c"examplesalt\00"
@main.data = internal global %struct.crypt_data zeroinitializer
define i32 @main() {
%1 = tail call i32 @memset(%struct.crypt_data* @main.data, i32 0, i32 4)
%2 = tail call i8* @crypt_r(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @main.passwd, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @main.salt, i64 0, i64 0), %struct.crypt_data* @main.data)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ read_words(int /*<<< orphan*/ *);
main() {
  FILE *fp;
  fp = fopen("opowiesci.txt", "r");
  read_words(fp);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xedf(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,%rdi
call   1030 <read_words@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"opowiesci.txt\00"
@.str.1 = [2 x i8] c"r\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @read_words(i32* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"opowiesci.txt\00"
@.str.1 = [2 x i8] c"r\00"
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @read_words(i32* %1)
ret i32 0
}
int maiorValor(int idade1, int idade2) {
  if (idade1 > idade2) {
    return idade1;
  } else {
    return idade2;
  }
}


x86 assembly (clang, -O0):
<maiorValor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1121 <maiorValor+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <maiorValor+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<maiorValor>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @maiorValor(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int object_destroy(unsigned int object_handle) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @object_destroy(i32 %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int afp_meta_truncate(const char *path, off_t offset) {}


x86 assembly (clang, -O0):
<afp_meta_truncate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @afp_meta_truncate(i8* nocapture readnone %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
scalar_t__ foo1();
scalar_t__ foo2();
scalar_t__ foo3();
int /*<<< orphan*/ printf(char *);
int main() {
  if (foo1() == 0 && foo2() == 0 && foo3() == 0)
    printf("PASS\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <foo1@plt>
cmp    $0x0,%rax
jne    118e <main+0x4e>
mov    $0x0,%al
call   1040 <foo2@plt>
cmp    $0x0,%rax
jne    118e <main+0x4e>
mov    $0x0,%al
call   1050 <foo3@plt>
cmp    $0x0,%rax
jne    118e <main+0x4e>
lea    0xe77(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <foo1@plt>
test   %rax,%rax
jne    1171 <main+0x31>
xor    %eax,%eax
call   1040 <foo2@plt>
test   %rax,%rax
jne    1171 <main+0x31>
xor    %eax,%eax
call   1050 <foo3@plt>
test   %rax,%rax
jne    1171 <main+0x31>
lea    0xe94(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"PASS\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @foo1()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %12
4: ; preds = %0
%5 = call i64 (...) @foo2()
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = call i64 (...) @foo3()
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %7, %4, %0
ret i32 0
}

LLVM IR (-O2):
@str = [5 x i8] c"PASS\00"
define i32 @main() {
%1 = tail call i64 (...) @foo1()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %11
3: ; preds = %0
%4 = tail call i64 (...) @foo2()
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = tail call i64 (...) @foo3()
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
br label %11
11: ; preds = %9, %6, %3, %0
ret i32 0
}
/* Type definitions */
struct timespec {
  int tv_sec;
  int tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ nanosleep(struct timespec *, int /*<<< orphan*/ *);
void nms_sleep(int t) {
  struct timespec ts;
  ts.tv_sec = t / 1000;
  ts.tv_nsec = (t % 1000) * 1000000;
  nanosleep(&ts, NULL);
}


x86 assembly (clang, -O0):
<nms_sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
imul   $0xf4240,%edx,%eax
mov    %eax,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nms_sleep>:
push   %rax
movslq %edi,%rax
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
mov    %ecx,(%rsp)
imul   $0x3e8,%ecx,%ecx
sub    %ecx,%eax
imul   $0xf4240,%eax,%eax
mov    %eax,0x4(%rsp)
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
define void @nms_sleep(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.timespec
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sdiv i32 %4, 1000
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
store i32 %5, i32* %6
%7 = load i32, i32* %2
%8 = srem i32 %7, 1000
%9 = mul nsw i32 %8, 1000000
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
store i32 %9, i32* %10
%11 = call i32 @nanosleep(%struct.timespec* %3, i32* null)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
define void @nms_sleep(i32 %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = sdiv i32 %0, 1000
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i32 %4, i32* %5
%6 = srem i32 %0, 1000
%7 = mul nsw i32 %6, 1000000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
store i32 %7, i32* %8
%9 = call i32 @nanosleep(%struct.timespec* %2, i32* null)
ret void
}
int gcd(int a, int b) { return (b == 0) ? a : gcd(b, a % b); }


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1133 <gcd+0x23>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1147 <gcd+0x37>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,%esi
call   1030 <gcd@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %edi,%eax
test   %esi,%esi
je     111d <gcd+0x1d>
mov    %esi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <gcd+0x10>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %1, %2 ]
%6 = phi i32 [ %5, %4 ], [ %0, %2 ]
%7 = srem i32 %6, %5
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %5, %4 ]
ret i32 %10
}
void glDrawArraysInstanced(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glDrawArraysInstanced() {
ret void
}
void Timer0B_Disable(void) {
  (*((volatile unsigned long *)0x4003000C)) &= ~0x00000100;
}


x86 assembly (clang, -O0):
<Timer0B_Disable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4003000c,%eax
mov    (%rax),%rcx
and    $0xfffffffffffffeff,%rcx
mov    $0x4003000c,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Timer0B_Disable>:
andq   $0xfffffffffffffeff,0x4003000c
40 ff fe ff ff
ret

LLVM IR (-O0):
define void @Timer0B_Disable() {
%1 = load volatile i64, i64* inttoptr (i64 1073938444 to i64*)
%2 = and i64 %1, -257
store volatile i64 %2, i64* inttoptr (i64 1073938444 to i64*)
ret void
}

LLVM IR (-O2):
define void @Timer0B_Disable() {
%1 = load volatile i64, i64* inttoptr (i64 1073938444 to i64*)
%2 = and i64 %1, -257
store volatile i64 %2, i64* inttoptr (i64 1073938444 to i64*)
ret void
}
/* Type definitions */
struct slist_t {
  int dummy;
};
struct slist_item_t {
  int dummy;
};

/* Variables and functions */
struct slist_item_t *_bsearch_slist(char const *, struct slist_t const *,
                                    int /*<<< orphan*/);
struct slist_item_t *bsearch_slist(const char *str,
                                   const struct slist_t *list) {
  return _bsearch_slist(str, list, 0);
}


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

x86 assembly (clang, -O2):
<bsearch_slist>:
xor    %edx,%edx
jmp    1030 <_bsearch_slist@plt>

LLVM IR (-O0):
%struct.slist_item_t = type { i32 }
%struct.slist_t = type { i32 }
define %struct.slist_item_t* @bsearch_slist(i8* %0, %struct.slist_t* %1) {
%3 = alloca i8*
%4 = alloca %struct.slist_t*
store i8* %0, i8** %3
store %struct.slist_t* %1, %struct.slist_t** %4
%5 = load i8*, i8** %3
%6 = load %struct.slist_t*, %struct.slist_t** %4
%7 = call %struct.slist_item_t* @_bsearch_slist(i8* %5, %struct.slist_t* %6, i32 0)
ret %struct.slist_item_t* %7
}

LLVM IR (-O2):
%struct.slist_item_t = type { i32 }
%struct.slist_t = type { i32 }
define %struct.slist_item_t* @bsearch_slist(i8* %0, %struct.slist_t* %1) {
%3 = tail call %struct.slist_item_t* @_bsearch_slist(i8* %0, %struct.slist_t* %1, i32 0)
ret %struct.slist_item_t* %3
}
int ImportantAnswer() { return 1337; }


x86 assembly (clang, -O0):
<ImportantAnswer>:
push   %rbp
mov    %rsp,%rbp
mov    $0x539,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ImportantAnswer() {
ret i32 1337
}

LLVM IR (-O2):
define i32 @ImportantAnswer() {
ret i32 1337
}
unsigned long hash(const char *str) {
  unsigned long hash = 5381;
  int c;
  while ((c = *(str++)))
    hash = ((hash << 5) + hash) + c;
  return hash;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     114a <hash+0x4a>
mov    -0x10(%rbp),%rax
shl    $0x5,%rax
add    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <hash+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112d <hash+0x2d>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movsbq %cl,%rax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i64 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 5381, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = mul i64 %7, 33
%10 = sext i8 %5 to i64
%11 = add i64 %9, %10
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 5381, %1 ], [ %11, %4 ]
ret i64 %15
}