xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void usage(char *arg0) {
  printf("Usage for encrypting a text: %s <text> <password>\n or\n", arg0);
  printf("Usage for decrypting a text: %s -d <text> <password>\n or\n", arg0);
  printf("Usage for generating an Hash: %s -g <text> <length>\n", arg0);
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xef0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xf1a(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xefd(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xf28(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [55 x i8] c"Usage for encrypting a text: %s <text> <password>\0A or\0A\00"
@.str.1 = [58 x i8] c"Usage for decrypting a text: %s -d <text> <password>\0A or\0A\00"
@.str.2 = [53 x i8] c"Usage for generating an Hash: %s -g <text> <length>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = load i8*, i8** %2
%8 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.2, i64 0, i64 0), i8* %7)
%9 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [55 x i8] c"Usage for encrypting a text: %s <text> <password>\0A or\0A\00"
@.str.1 = [58 x i8] c"Usage for decrypting a text: %s -d <text> <password>\0A or\0A\00"
@.str.2 = [53 x i8] c"Usage for generating an Hash: %s -g <text> <length>\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%5 = tail call i32 @exit(i32 0)
unreachable
}
int IsVerbose() { return 0; }


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

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

LLVM IR (-O0):
define i32 @IsVerbose() {
ret i32 0
}

LLVM IR (-O2):
define i32 @IsVerbose() {
ret i32 0
}
void foo_1_2_2_1_2_2_2_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_2_1_2_2_2_1_1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *strdup_together(char *, char const *);
char *strdup_together3(char const *, char const *, char const *);
char *strdup_together4(const char *s, const char *t, const char *u,
                       const char *v) {
  char *four, *three;
  three = strdup_together3(s, t, u);
  four = strdup_together(three, v);
  free(three);
  return four;
}


x86 assembly (clang, -O0):
<strdup_together4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <strdup_together3@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1050 <strdup_together@plt>
mov    %rax,-0x28(%rbp)
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup_together4>:
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
call   1040 <strdup_together3@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1050 <strdup_together@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strdup_together4(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%11 = load i8*, i8** %5
%12 = load i8*, i8** %6
%13 = load i8*, i8** %7
%14 = call i8* @strdup_together3(i8* %11, i8* %12, i8* %13)
store i8* %14, i8** %10
%15 = load i8*, i8** %10
%16 = load i8*, i8** %8
%17 = call i8* @strdup_together(i8* %15, i8* %16)
store i8* %17, i8** %9
%18 = load i8*, i8** %10
%19 = call i32 @free(i8* %18)
%20 = load i8*, i8** %9
ret i8* %20
}

LLVM IR (-O2):
define i8* @strdup_together4(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i8* @strdup_together3(i8* %0, i8* %1, i8* %2)
%6 = tail call i8* @strdup_together(i8* %5, i8* %3)
%7 = tail call i32 @free(i8* %5)
ret i8* %6
}
/* Variables and functions */
scalar_t__ isspace(int);
char *skip_over_blanks(char *cp) {
  while (*cp && isspace((int)*cp))
    cp++;
  return cp;
}


x86 assembly (clang, -O0):
<skip_over_blanks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1147 <skip_over_blanks+0x37>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1157 <skip_over_blanks+0x47>
jmp    1168 <skip_over_blanks+0x58>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <skip_over_blanks+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_over_blanks>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1139 <skip_over_blanks+0x29>
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <isspace@plt>
test   %rax,%rax
je     1139 <skip_over_blanks+0x29>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <skip_over_blanks+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @skip_over_blanks(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %10
%5 = phi i8 [ %12, %10 ], [ %2, %1 ]
%6 = phi i8* [ %11, %10 ], [ %0, %1 ]
%7 = sext i8 %5 to i32
%8 = tail call i64 @isspace(i32 %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %4
%11 = getelementptr inbounds i8, i8* %6, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %10, %1
%15 = phi i8* [ %0, %1 ], [ %11, %10 ], [ %6, %4 ]
ret i8* %15
}
void _infix_operator_mod_u16_u16(unsigned short lhs, unsigned short rhs,
                                 unsigned short *__rval_1) {
  *__rval_1 = lhs % rhs;
}


x86 assembly (clang, -O0):
<_infix_operator_mod_u16_u16>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    %rdx,-0x10(%rbp)
movzwl -0x2(%rbp),%eax
movzwl -0x4(%rbp),%ecx
cltd
idiv   %ecx
mov    %dx,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_infix_operator_mod_u16_u16>:
mov    %rdx,%rcx
mov    %edi,%eax
xor    %edx,%edx
div    %si
mov    %dx,(%rcx)
ret

LLVM IR (-O0):
define void @_infix_operator_mod_u16_u16(i16 zeroext %0, i16 zeroext %1, i16* %2) {
%4 = alloca i16
%5 = alloca i16
%6 = alloca i16*
store i16 %0, i16* %4
store i16 %1, i16* %5
store i16* %2, i16** %6
%7 = load i16, i16* %4
%8 = zext i16 %7 to i32
%9 = load i16, i16* %5
%10 = zext i16 %9 to i32
%11 = srem i32 %8, %10
%12 = trunc i32 %11 to i16
%13 = load i16*, i16** %6
store i16 %12, i16* %13
ret void
}

LLVM IR (-O2):
define void @_infix_operator_mod_u16_u16(i16 zeroext %0, i16 zeroext %1, i16* nocapture writeonly %2) {
%4 = urem i16 %0, %1
store i16 %4, i16* %2
ret void
}
print_space(space, depth, size) char **space;
int depth, size;
{
  register int i;
  for (i = 0; i < size; i++) {
    space[i][depth - 1] = '\0';
    puts(space[i]);
  }
}


x86 assembly (clang, -O0):
<print_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    116f <print_space+0x5f>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1129 <print_space+0x19>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_space>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edx,%edx
jle    114e <print_space+0x3e>
mov    %rdi,%r12
movslq %esi,%r14
mov    %edx,%r15d
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    (%r12,%rbx,8),%rax
movb   $0x0,-0x1(%rax,%r14,1)
mov    (%r12,%rbx,8),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <print_space+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @print_space(i8** %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8** %0, i8*** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 0, i32* %8
br label %9
9: ; preds = %29, %3
%10 = load i32, i32* %8
%11 = load i32, i32* %7
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %32
13: ; preds = %9
%14 = load i8**, i8*** %5
%15 = load i32, i32* %8
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8*, i8** %14, i64 %16
%18 = load i8*, i8** %17
%19 = load i32, i32* %6
%20 = sub nsw i32 %19, 1
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8, i8* %18, i64 %21
store i8 0, i8* %22
%23 = load i8**, i8*** %5
%24 = load i32, i32* %8
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8*, i8** %23, i64 %25
%27 = load i8*, i8** %26
%28 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* %27)
br label %29
29: ; preds = %13
%30 = load i32, i32* %8
%31 = add nsw i32 %30, 1
store i32 %31, i32* %8
br label %9
32: ; preds = %9
%33 = load i32, i32* %4
ret i32 %33
}

LLVM IR (-O2):
define i32 @print_space(i8** nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %18
5: ; preds = %3
%6 = add nsw i32 %1, -1
%7 = sext i32 %6 to i64
%8 = zext i32 %2 to i64
br label %9
9: ; preds = %5, %9
%10 = phi i64 [ 0, %5 ], [ %16, %9 ]
%11 = getelementptr inbounds i8*, i8** %0, i64 %10
%12 = load i8*, i8** %11
%13 = getelementptr inbounds i8, i8* %12, i64 %7
store i8 0, i8* %13
%14 = load i8*, i8** %11
%15 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* %14)
%16 = add nuw nsw i64 %10, 1
%17 = icmp eq i64 %16, %8
br i1 %17, label %18, label %9
18: ; preds = %9, %3
ret i32 undef
}
char *ltoa(val)
long val;
{
  char *p;
  int flg = 0;
  if (val < 0) {
    flg++;
    val = -val;
  }
  p = ultoa(val);
  if (flg)
    *--p = '-';
  return p;
}


x86 assembly (clang, -O0):
<ltoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1141 <ltoa+0x31>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <ultoa@plt>
cltq
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     116f <ltoa+0x5f>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0x2d,-0x1(%rax)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ltoa>:
push   %rbx
mov    %rdi,%rbx
neg    %rdi
cmovs  %rbx,%rdi
xor    %eax,%eax
call   1030 <ultoa@plt>
cltq
test   %rbx,%rbx
js     112b <ltoa+0x1b>
pop    %rbx
ret
movb   $0x2d,-0x1(%rax)
add    $0xffffffffffffffff,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @ltoa(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
%4 = alloca i32
store i64 %0, i64* %2
store i32 0, i32* %4
%5 = load i64, i64* %2
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i32, i32* %4
%9 = add nsw i32 %8, 1
store i32 %9, i32* %4
%10 = load i64, i64* %2
%11 = sub nsw i64 0, %10
store i64 %11, i64* %2
br label %12
12: ; preds = %7, %1
%13 = load i64, i64* %2
%14 = call i32 (i64, ...) bitcast (i32 (...)* @ultoa to i32 (i64, ...)*)(i64 %13)
%15 = sext i32 %14 to i64
%16 = inttoptr i64 %15 to i8*
store i8* %16, i8** %3
%17 = load i32, i32* %4
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %12
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i32 -1
store i8* %21, i8** %3
store i8 45, i8* %21
br label %22
22: ; preds = %19, %12
%23 = load i8*, i8** %3
ret i8* %23
}

LLVM IR (-O2):
define i8* @ltoa(i64 %0) {
%2 = icmp slt i64 %0, 0
%3 = sub nsw i64 0, %0
%4 = select i1 %2, i64 %3, i64 %0
%5 = tail call i32 (i64, ...) bitcast (i32 (...)* @ultoa to i32 (i64, ...)*)(i64 %4)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
br i1 %2, label %8, label %10
8: ; preds = %1
%9 = getelementptr inbounds i8, i8* %7, i64 -1
store i8 45, i8* %9
br label %10
10: ; preds = %8, %1
%11 = phi i8* [ %9, %8 ], [ %7, %1 ]
ret i8* %11
}
void cpu_util(double pcpu[3]) {}


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

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

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

LLVM IR (-O2):
define void @cpu_util(double* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ printf(char *);
void senddata_close(int fd) {
  printf("closing connection... \n");
  if (fd >= 0)
    close(fd);
}


x86 assembly (clang, -O0):
<senddata_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0x4(%rbp)
jl     1149 <senddata_close+0x29>
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<senddata_close>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
test   %ebx,%ebx
js     113b <senddata_close+0x1b>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <close@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"closing connection... \0A\00"
define void @senddata_close(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = icmp sge i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @close(i32 %7)
br label %9
9: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@str = [23 x i8] c"closing connection... \00"
define void @senddata_close(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%3 = icmp sgt i32 %0, -1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @close(i32 %0)
br label %6
6: ; preds = %4, %1
ret void
}
/* Type definitions */
struct object {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ destruct_cons(struct object *, struct object **,
                                 struct object **);
struct object *pop();
int /*<<< orphan*/ push(struct object *);
void quote_function(struct object *data) {
  struct object *arg = pop();
  struct object *envs;
  struct object *body;
  destruct_cons(arg, &envs, &body);
  push(body);
}


x86 assembly (clang, -O0):
<quote_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <pop@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
call   1040 <destruct_cons@plt>
mov    -0x20(%rbp),%rdi
call   1050 <push@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quote_function>:
sub    $0x18,%rsp
xor    %eax,%eax
call   1030 <pop@plt>
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rax,%rdi
call   1040 <destruct_cons@plt>
mov    0x8(%rsp),%rdi
call   1050 <push@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.object = type { i32 }
define void @quote_function(%struct.object* %0) {
%2 = alloca %struct.object*
%3 = alloca %struct.object*
%4 = alloca %struct.object*
%5 = alloca %struct.object*
store %struct.object* %0, %struct.object** %2
%6 = call %struct.object* (...) @pop()
store %struct.object* %6, %struct.object** %3
%7 = load %struct.object*, %struct.object** %3
%8 = call i32 @destruct_cons(%struct.object* %7, %struct.object** %4, %struct.object** %5)
%9 = load %struct.object*, %struct.object** %5
%10 = call i32 @push(%struct.object* %9)
ret void
}

LLVM IR (-O2):
%struct.object = type { i32 }
define void @quote_function(%struct.object* nocapture readnone %0) {
%2 = alloca %struct.object*
%3 = alloca %struct.object*
%4 = tail call %struct.object* (...) @pop()
%5 = bitcast %struct.object** %2 to i8*
%6 = bitcast %struct.object** %3 to i8*
%7 = call i32 @destruct_cons(%struct.object* %4, %struct.object** %2, %struct.object** %3)
%8 = load %struct.object*, %struct.object** %3
%9 = call i32 @push(%struct.object* %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello world!)\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Hello world!)\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"Hello world!)\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
int cache_has_file_real(char const *, scalar_t__ *, int);
int cache_has_file(const char *filename, uint64_t *cached_bytes) {
  *cached_bytes = 0;
  return cache_has_file_real(filename, cached_bytes, true);
}


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

x86 assembly (clang, -O2):
<cache_has_file>:
movq   $0x0,(%rsi)
mov    $0x1,%edx
jmp    1030 <cache_has_file_real@plt>

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

LLVM IR (-O2):
define i32 @cache_has_file(i8* %0, i64* %1) {
store i64 0, i64* %1
%3 = tail call i32 @cache_has_file_real(i8* %0, i64* %1, i32 1)
ret i32 %3
}
/* Variables and functions */
scalar_t__ EOF;
int putchar(char);
int puts(const char *s) {
  while (*s)
    if (putchar(*s++) == EOF)
      return EOF;
  return putchar('\n');
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1169 <puts+0x59>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%edi
call   1030 <putchar@plt>
cltq
mov    0x2e9f(%rip),%rcx
cmp    (%rcx),%rax
jne    1164 <puts+0x54>
mov    0x2e8f(%rip),%rax
mov    (%rax),%rax
mov    %eax,-0x4(%rbp)
jmp    1176 <puts+0x66>
jmp    111c <puts+0xc>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eca(%rip),%r14
xchg   %ax,%ax
movzbl (%rbx),%eax
test   %al,%al
je     1143 <puts+0x33>
add    $0x1,%rbx
movsbl %al,%edi
call   1030 <putchar@plt>
movslq %eax,%rcx
cmp    %rcx,(%r14)
jne    1120 <puts+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@EOF = global i64 0
define i32 @puts(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %3, i64 1
%8 = tail call i32 @putchar(i8 signext %4)
%9 = sext i32 %8 to i64
%10 = load i64, i64* @EOF
%11 = icmp eq i64 %10, %9
br i1 %11, label %14, label %2
12: ; preds = %2
%13 = tail call i32 @putchar(i8 signext 10)
br label %14
14: ; preds = %6, %12
%15 = phi i32 [ %13, %12 ], [ %8, %6 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
void sair() {
  printf("Obrigado por acessar nosso banco!\n");
  system("pause");
}


x86 assembly (clang, -O0):
<sair>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
lea    0xeec(%rip),%rdi
call   1030 <system@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sair>:
push   %rax
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1040 <system@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"Obrigado por acessar nosso banco!\0A\00"
@.str.1 = [6 x i8] c"pause\00"
define void @sair() {
%1 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"pause\00"
@str = [34 x i8] c"Obrigado por acessar nosso banco!\00"
define void @sair() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ send_event;
};
struct TYPE_4__ {
  TYPE_1__ xfocus;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xfocus_send_event(void *_p) {
  return (int)((XEvent *)_p)->xfocus.send_event;
}


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

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

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

LLVM IR (-O2):
define i32 @get_XEvent_xfocus_send_event(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
main() {
  int (*p)();
  func1();
  p = &func1;
  p();
  (*p)();
  printf("%x %x %x \n", p, *p, func1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <func1@plt>
mov    0x2eb2(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   *-0x8(%rbp)
mov    $0x0,%al
call   *-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x8(%rbp),%rdx
lea    0xebd(%rip),%rdi
mov    0x2e8e(%rip),%rcx
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <func1@plt>
mov    0x2eb9(%rip),%rbx
xor    %eax,%eax
call   1040 <func1@plt>
xor    %eax,%eax
call   1040 <func1@plt>
lea    0xecc(%rip),%rdi
mov    %rbx,%rsi
mov    %rbx,%rdx
mov    %rbx,%rcx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

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


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @nrf_drv_radio802154_notification_init() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long green_mask;
};
typedef TYPE_1__ XVisualInfo;

/* Variables and functions */
void set_XVisualInfo_green_mask(void *_p, unsigned long _v) {
  ((XVisualInfo *)_p)->green_mask = (unsigned long)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XVisualInfo_green_mask(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *);
void main() {
  printf("Hello there");
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"Hello there\00"
define void @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @getchar()
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hello there\00"
define void @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @getchar()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
int iswprint(int /*<<< orphan*/);
__attribute__((__weak__, __always___)) int softboundmpx_iswprint(wint_t wc) {
  return iswprint(wc);
}


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

x86 assembly (clang, -O2):
<softboundmpx_iswprint>:
jmp    1030 <iswprint@plt>

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

LLVM IR (-O2):
define weak i32 @softboundmpx_iswprint(i32 %0) {
%2 = tail call i32 @iswprint(i32 %0)
ret i32 %2
}
/* Variables and functions */
void *_android_array_alloc(size_t, size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *_android_array_alloc0(size_t itemSize, size_t count) {
  void *block = _android_array_alloc(itemSize, count);
  memset(block, 0, itemSize * count);
  return block;
}


x86 assembly (clang, -O0):
<_android_array_alloc0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <_android_array_alloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
imul   -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_android_array_alloc0>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
call   1040 <_android_array_alloc@plt>
mov    %rax,%r15
imul   %r14,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @_android_array_alloc0(i64 %0, i64 %1) {
%3 = tail call i8* @_android_array_alloc(i64 %0, i64 %1)
%4 = mul i64 %1, %0
%5 = tail call i32 @memset(i8* %3, i32 0, i64 %4)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void Usage(void) {
  fprintf(stderr, "Usage: 'tsmask filename.ts -pid1 -pid2 ... -pidn "
                  "[buffer_size_in_packets]'\n");
  fprintf(stderr, "-pid removes 'pid' packets\n");
}


x86 assembly (clang, -O0):
<Usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xf13(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Usage>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf1d(%rip),%rsi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [76 x i8] c"Usage: 'tsmask filename.ts -pid1 -pid2 ... -pidn [buffer_size_in_packets]'\0A\00"
@.str.1 = [28 x i8] c"-pid removes 'pid' packets\0A\00"
define void @Usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [76 x i8] c"Usage: 'tsmask filename.ts -pid1 -pid2 ... -pidn [buffer_size_in_packets]'\0A\00"
@.str.1 = [28 x i8] c"-pid removes 'pid' packets\0A\00"
define void @Usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int variable1 = 10;
  printf("Value of %%5d: %5d\n", variable1);
}


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

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

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

LLVM IR (-O2):
@.str = [20 x i8] c"Value of %%5d: %5d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 10)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ pthread_t;
typedef scalar_t__ pid_t;

/* Variables and functions */
scalar_t__ getpid();
int /*<<< orphan*/ printf(char *, char const *, unsigned int, unsigned int,
                          unsigned int);
scalar_t__ pthread_self();
void printIds(const char *s) {
  pid_t pid;
  pthread_t tid;
  pid = getpid();
  tid = pthread_self();
  printf("%s pid %u tid %u (0x%x)\n", s, (unsigned int)pid, (unsigned int)tid,
         (unsigned int)tid);
}


x86 assembly (clang, -O0):
<printIds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rax
mov    %eax,%edx
mov    -0x18(%rbp),%rax
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %eax,%r8d
lea    0xe90(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printIds>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1050 <pthread_self@plt>
lea    0xeb1(%rip),%rdi
mov    %r14,%rsi
mov    %ebx,%edx
mov    %eax,%ecx
mov    %eax,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"%s pid %u tid %u (0x%x)\0A\00"
define void @printIds(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i64
store i8* %0, i8** %2
%5 = call i64 (...) @getpid()
store i64 %5, i64* %3
%6 = call i64 (...) @pthread_self()
store i64 %6, i64* %4
%7 = load i8*, i8** %2
%8 = load i64, i64* %3
%9 = trunc i64 %8 to i32
%10 = load i64, i64* %4
%11 = trunc i64 %10 to i32
%12 = load i64, i64* %4
%13 = trunc i64 %12 to i32
%14 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %9, i32 %11, i32 %13)
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"%s pid %u tid %u (0x%x)\0A\00"
define void @printIds(i8* %0) {
%2 = tail call i64 (...) @getpid()
%3 = tail call i64 (...) @pthread_self()
%4 = trunc i64 %2 to i32
%5 = trunc i64 %3 to i32
%6 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %4, i32 %5, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void user_func(int signum) { printf("receive signal %d \n", signum); }


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

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

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

LLVM IR (-O2):
@.str = [20 x i8] c"receive signal %d \0A\00"
define void @user_func(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void loadKeysPreset() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ pA(char *, char const *, char const *, char const *);
void __func_sub_uint(struct Var *avar, const char *areg, const char *lreg,
                     const char *rreg) {
  pA("%s = %s - %s;", areg, lreg, rreg);
}


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

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

LLVM IR (-O0):
%struct.Var = type { i32 }
@.str = [14 x i8] c"%s = %s - %s;\00"
define void @__func_sub_uint(%struct.Var* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca %struct.Var*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store %struct.Var* %0, %struct.Var** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %6
%10 = load i8*, i8** %7
%11 = load i8*, i8** %8
%12 = call i32 @pA(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10, i8* %11)
ret void
}

LLVM IR (-O2):
%struct.Var = type { i32 }
@.str = [14 x i8] c"%s = %s - %s;\00"
define void @__func_sub_uint(%struct.Var* nocapture readnone %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @pA(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i8* %3)
ret void
}
int consumer_c() { return 0; }


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

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

LLVM IR (-O0):
define i32 @consumer_c() {
ret i32 0
}

LLVM IR (-O2):
define i32 @consumer_c() {
ret i32 0
}
int main() {
  double a = 10;
  double *p = &a;
  printf("%Fp", p);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  0xee0(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movabs $0x4024000000000000,%rax
mov    %rax,(%rsp)
lea    0xeda(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%Fp\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
store double 1.000000e+01, double* %1
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ trace_log_int(int);
void trace_common(int type, int time, int task, int cpu) {
  trace_log_int(type);
  trace_log_int(time);
  trace_log_int(task);
  trace_log_int(cpu);
}


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

x86 assembly (clang, -O2):
<trace_common>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %edx,%ebp
mov    %esi,%ebx
call   1030 <trace_log_int@plt>
mov    %ebx,%edi
call   1030 <trace_log_int@plt>
mov    %ebp,%edi
call   1030 <trace_log_int@plt>
mov    %r14d,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <trace_log_int@plt>

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

LLVM IR (-O2):
define void @trace_common(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @trace_log_int(i32 %0)
%6 = tail call i32 @trace_log_int(i32 %1)
%7 = tail call i32 @trace_log_int(i32 %2)
%8 = tail call i32 @trace_log_int(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
long double __ieee754_atanhl(long double x) {
  fputs("__ieee754_atanhl not implemented\n", stderr);
  __set_errno(ENOSYS);
  return 0.0;
}


x86 assembly (clang, -O0):
<__ieee754_atanhl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%esi
lea    0xec2(%rip),%rdi
call   1040 <fputs@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
fldz
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ieee754_atanhl>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1040 <fputs@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
fldz
pop    %rax
ret

LLVM IR (-O0):
@.str = [34 x i8] c"__ieee754_atanhl not implemented\0A\00"
@stderr = global i32 0
@ENOSYS = global i32 0
define x86_fp80 @__ieee754_atanhl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fputs(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @ENOSYS
%6 = call i32 @__set_errno(i32 %5)
ret x86_fp80 0xK00000000000000000000
}

LLVM IR (-O2):
@.str = [34 x i8] c"__ieee754_atanhl not implemented\0A\00"
@stderr = global i32 0
@ENOSYS = global i32 0
define x86_fp80 @__ieee754_atanhl(x86_fp80 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fputs(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @ENOSYS
%5 = tail call i32 @__set_errno(i32 %4)
ret x86_fp80 0xK00000000000000000000
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int fstatat_nomap_nolog(int, char const *, struct stat *, int);
int real_fstatat(int dirfd, const char *path, struct stat *statbuf, int flags) {
  int r;
  r = fstatat_nomap_nolog(dirfd, path, statbuf, flags);
  return (r);
}


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

x86 assembly (clang, -O2):
<real_fstatat>:
jmp    1030 <fstatat_nomap_nolog@plt>

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @real_fstatat(i32 %0, i8* %1, %struct.stat* %2, i32 %3) {
%5 = tail call i32 @fstatat_nomap_nolog(i32 %0, i8* %1, %struct.stat* %2, i32 %3)
ret i32 %5
}