xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ getline(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ reverse(char *);
main() {
  char line[1000];
  while (getline(line, 1000) > 0) {
    reverse(line);
    printf("%s", line);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1050 <getline@plt>
cmp    $0x0,%rax
jle    1181 <main+0x51>
lea    -0x3f0(%rbp),%rdi
call   1030 <reverse@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xe89(%rip),%rdi
call   1040 <printf@plt>
jmp    1142 <main+0x12>
mov    -0x4(%rbp),%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1050 <getline@plt>
test   %rax,%rax
jle    1185 <main+0x55>
mov    %rsp,%rbx
lea    0xeaa(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <reverse@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1050 <getline@plt>
test   %rax,%rax
jg     1160 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i64 @getline(i8* %2, i32 1000)
%4 = icmp sgt i64 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %0, %5
%6 = call i32 @reverse(i8* %2)
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%8 = call i64 @getline(i8* %2, i32 1000)
%9 = icmp sgt i64 %8, 0
br i1 %9, label %5, label %10
10: ; preds = %5, %0
ret i32 0
}
const int (*y3(int x[3][3]))[3] { return x; }


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

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

LLVM IR (-O0):
define [3 x i32]* @y3([3 x i32]* %0) {
%2 = alloca [3 x i32]*
store [3 x i32]* %0, [3 x i32]** %2
%3 = load [3 x i32]*, [3 x i32]** %2
ret [3 x i32]* %3
}

LLVM IR (-O2):
define [3 x i32]* @y3([3 x i32]* readnone returned %0) {
ret [3 x i32]* %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, char const *);
void print_help_crit(const char *limit, const char *def) {
  printf(" -c, --critical=LIMIT\n      Return critical if %s exceeds limit. "
         "Defaults to %s\n",
         limit, def);
}


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

x86 assembly (clang, -O2):
<print_help_crit>:
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [81 x i8] c" -c, --critical=LIMIT\0A Return critical if %s exceeds limit. Defaults to %s\0A\00"
define void @print_help_crit(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [81 x i8] c" -c, --critical=LIMIT\0A Return critical if %s exceeds limit. Defaults to %s\0A\00"
define void @print_help_crit(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
signed long long f8(signed long long v_a, signed long long v_b) {
  signed long long v_anda = v_a & -72057594037927936;
  signed long long v_shrb = ((unsigned long long)v_b) >> 8;
  signed long long v_or = v_anda | v_shrb;
  return v_or;
}


x86 assembly (clang, -O0):
<f8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movabs $0xff00000000000000,%rax
and    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
or     -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f8>:
movabs $0xff00000000000000,%rax
and    %rdi,%rax
shr    $0x8,%rsi
or     %rsi,%rax
ret

LLVM IR (-O0):
define i64 @f8(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%8 = load i64, i64* %3
%9 = and i64 %8, -72057594037927936
store i64 %9, i64* %5
%10 = load i64, i64* %4
%11 = lshr i64 %10, 8
store i64 %11, i64* %6
%12 = load i64, i64* %5
%13 = load i64, i64* %6
%14 = or i64 %12, %13
store i64 %14, i64* %7
%15 = load i64, i64* %7
ret i64 %15
}

LLVM IR (-O2):
define i64 @f8(i64 %0, i64 %1) {
%3 = and i64 %0, -72057594037927936
%4 = lshr i64 %1, 8
%5 = or i64 %4, %3
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ lgen(char *, char *, int);
void cgstorsw(int n) { lgen("%s\t%%eax,%c%d", "movl", n); }


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

x86 assembly (clang, -O2):
<cgstorsw>:
mov    %edi,%edx
lea    0xee7(%rip),%rdi
lea    0xeee(%rip),%rsi
jmp    1030 <lgen@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"%s\09%%eax,%c%d\00"
@.str.1 = [5 x i8] c"movl\00"
define void @cgstorsw(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @lgen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"%s\09%%eax,%c%d\00"
@.str.1 = [5 x i8] c"movl\00"
define void @cgstorsw(i32 %0) {
%2 = tail call i32 @lgen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint64_t;

/* Variables and functions */
uint8_t getSixBitByte(uint64_t c, int n) { return (c >> (42 - 6 * n)) & 0x3F; }


x86 assembly (clang, -O0):
<getSixBitByte>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   $0x6,-0x8(%rbp),%edx
mov    $0x2a,%ecx
sub    %edx,%ecx
sar    %cl,%eax
and    $0x3f,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getSixBitByte>:
mov    %edi,%eax
add    %esi,%esi
lea    (%rsi,%rsi,2),%ecx
neg    %ecx
add    $0x2a,%cl
sar    %cl,%eax
and    $0x3f,%eax
ret

LLVM IR (-O0):
define i32 @getSixBitByte(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = mul nsw i32 6, %6
%8 = sub nsw i32 42, %7
%9 = ashr i32 %5, %8
%10 = and i32 %9, 63
ret i32 %10
}

LLVM IR (-O2):
define i32 @getSixBitByte(i32 %0, i32 %1) {
%3 = mul i32 %1, -6
%4 = add i32 %3, 42
%5 = ashr i32 %0, %4
%6 = and i32 %5, 63
ret i32 %6
}
/* Variables and functions */
scalar_t__ RAND_MAX;
double rand();
double frand() { return 2.0 * (rand() / (double)RAND_MAX) - 1.0; }


x86 assembly (clang, -O0):
<frand>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
mov    0x2ec6(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
addsd  %xmm0,%xmm0
movsd  0xec9(%rip),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<frand>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
mov    0x2ec9(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
addsd  %xmm0,%xmm0
addsd  0xecc(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define double @frand() {
%1 = call double (...) @rand()
%2 = load i64, i64* @RAND_MAX
%3 = sitofp i64 %2 to double
%4 = fdiv double %1, %3
%5 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %4, double -1.000000e+00)
ret double %5
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define double @frand() {
%1 = tail call double (...) @rand()
%2 = load i64, i64* @RAND_MAX
%3 = sitofp i64 %2 to double
%4 = fdiv double %1, %3
%5 = tail call double @llvm.fmuladd.f64(double %4, double 2.000000e+00, double -1.000000e+00)
ret double %5
}
unsigned char f72(unsigned char x, long int y) {
  return (x << y) + (x >> (8 - y));
}


x86 assembly (clang, -O0):
<f72>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
mov    -0x10(%rbp),%rcx
shl    %cl,%eax
movzbl -0x1(%rbp),%edx
mov    $0x8,%ecx
sub    -0x10(%rbp),%rcx
sar    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f72>:
mov    %rsi,%rcx
mov    %edi,%eax
shl    %cl,%eax
mov    $0x8,%dl
sub    %cl,%dl
mov    %edx,%ecx
shr    %cl,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @f72(i8 zeroext %0, i64 %1) {
%3 = alloca i8
%4 = alloca i64
store i8 %0, i8* %3
store i64 %1, i64* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i64, i64* %4
%8 = trunc i64 %7 to i32
%9 = shl i32 %6, %8
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = load i64, i64* %4
%13 = sub nsw i64 8, %12
%14 = trunc i64 %13 to i32
%15 = ashr i32 %11, %14
%16 = add nsw i32 %9, %15
%17 = trunc i32 %16 to i8
ret i8 %17
}

LLVM IR (-O2):
define zeroext i8 @f72(i8 zeroext %0, i64 %1) {
%3 = zext i8 %0 to i32
%4 = trunc i64 %1 to i32
%5 = shl i32 %3, %4
%6 = sub i32 8, %4
%7 = lshr i32 %3, %6
%8 = add nsw i32 %7, %5
%9 = trunc i32 %8 to i8
ret i8 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void usage(FILE *fp) {
  fprintf(fp, "Usage: privify elf64filein elf64fileout\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x28,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"Usage: privify elf64filein elf64fileout\0A\00"
define void @usage(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [41 x i8] c"Usage: privify elf64filein elf64fileout\0A\00"
define void @usage(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i64 40, i64 1, i32* %0)
ret void
}
void fa107(void) {
P0A:
  goto P0A;
  ({
    P01A:
      goto P01A;
      ({
        P012A:
          goto P012A;
          0;
      });
    P01B:
      goto P01B;
      ({
        P013A:
          goto P013A;
          0;
      });
    P01C:
      goto P01C;
      0;
  });
P0B:
  goto P0B;
  ({
    p02A:
      goto p02A;
      goto a;
    P02A:
      goto P02A;
      ({
        P024A:
          goto P024A;
          0;
      });
    a:
      ({
        P025A:
          goto P025A;
          0;
      });
    P02C:
      goto P02C;
      0;
  });
P0C:
  goto P0C;
  0;
P0D:
  goto P0D;
}


x86 assembly (clang, -O0):
<fa107>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <fa107+0x4>

x86 assembly (clang, -O2):
<fa107>:
jmp    1100 <fa107>

LLVM IR (-O0):
define void @fa107() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
br label %7
7: ; preds = %7, %0
br label %7
8: ; No predecessors!
br label %9
9: ; preds = %9, %8
br label %9
10: ; No predecessors!
br label %11
11: ; preds = %11, %10
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
br label %14
14: ; preds = %14, %13
br label %14
15: ; preds = %15
br label %15
16: ; preds = %16
br label %16
17: ; No predecessors!
br label %18
18: ; preds = %18, %17
br label %18
19: ; preds = %19
br label %19
20: ; No predecessors!
br label %21
21: ; preds = %21, %20
br label %21
22: ; No predecessors!
br label %23
23: ; preds = %23, %22
br label %23
24: ; preds = %24
br label %24
25: ; preds = %25
br label %25
26: ; preds = %26
br label %26
}

LLVM IR (-O2):
define void @fa107() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ dev_t;

/* Variables and functions */
int /*<<< orphan*/ MKDEV(int, int);
int /*<<< orphan*/ exit(int);
scalar_t__ mknod(char *, char, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
const void create_node(void) {
  dev_t dev = MKDEV(666, 1);
  if (mknod("/dev/driver", 'c', dev) != 0) {
    printf("Could not create device\n");
    exit(-1);
  }
  printf("Created node\n");
}


x86 assembly (clang, -O0):
<create_node>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x29a,%edi
mov    $0x1,%esi
call   1040 <MKDEV@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xe9c(%rip),%rdi
mov    $0x63,%esi
call   1050 <mknod@plt>
cmp    $0x0,%rax
je     118e <create_node+0x4e>
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_node>:
push   %rax
mov    $0x29a,%edi
mov    $0x1,%esi
call   1040 <MKDEV@plt>
lea    0xea9(%rip),%rdi
mov    $0x63,%esi
mov    %eax,%edx
call   1050 <mknod@plt>
test   %rax,%rax
jne    1175 <create_node+0x35>
lea    0xe9d(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>
lea    0xe9d(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"/dev/driver\00"
@.str.1 = [25 x i8] c"Could not create device\0A\00"
@.str.2 = [14 x i8] c"Created node\0A\00"
define void @create_node() {
%1 = alloca i32
%2 = call i32 @MKDEV(i32 666, i32 1)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i64 @mknod(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext 99, i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @exit(i32 -1)
unreachable
9: ; preds = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"/dev/driver\00"
@str = [13 x i8] c"Created node\00"
@str.3 = [24 x i8] c"Could not create device\00"
define void @create_node() {
%1 = tail call i32 @MKDEV(i32 666, i32 1)
%2 = tail call i64 @mknod(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext 99, i32 %1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %0
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.3, i64 0, i64 0))
%6 = tail call i32 @exit(i32 -1)
unreachable
7: ; preds = %0
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mob_spawn(int);
int mob_delayspawn(int tid, unsigned int tick, int id, void *data) {
  mob_spawn(id);
  return 0;
}


x86 assembly (clang, -O0):
<mob_delayspawn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <mob_spawn@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @mob_delayspawn(i32 %0, i32 %1, i32 %2, i8* nocapture readnone %3) {
%5 = tail call i32 @mob_spawn(i32 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ZIsInstanceOf(void *, void *);
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void *ZCast(void *type, void *obj) {
  assert(ZIsInstanceOf(obj, type));
  return obj;
}


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

x86 assembly (clang, -O2):
<ZCast>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    %rbx,%rdi
call   1040 <ZIsInstanceOf@plt>
mov    %eax,%edi
call   1030 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @ZCast(i8* %0, i8* returned %1) {
%3 = tail call i32 @ZIsInstanceOf(i8* %1, i8* %0)
%4 = tail call i32 @assert(i32 %3)
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_array(int *a, int len) {
  int i;
  for (i = 0; i < len; i++)
    printf("[%d]", a[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<print_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <print_array+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_array+0x16>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <print_array+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print_array+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"[%d]\00"
define void @print_array(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rvid_putchar(int);
int putch(int c) {
  rvid_putchar(c);
  return c;
}


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

x86 assembly (clang, -O2):
<putch>:
push   %rbx
mov    %edi,%ebx
call   1030 <rvid_putchar@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @putch(i32 returned %0) {
%2 = tail call i32 @rvid_putchar(i32 %0)
ret i32 %0
}
/* Type definitions */
struct timespec {
  int tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ nanosleep(struct timespec *, struct timespec *);
int /*<<< orphan*/ syscall(int);
int main() {
  struct timespec req, *rem;
  req.tv_sec = 0;
  req.tv_nsec = 100000000;
  while (1) {
    nanosleep(&req, rem);
    syscall(316);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0x5f5e100,-0x18(%rbp)
mov    -0x20(%rbp),%rsi
lea    -0x18(%rbp),%rdi
call   1030 <nanosleep@plt>
mov    $0x13c,%edi
call   1040 <syscall@plt>
jmp    113e <main+0x1e>

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movq   $0x0,0x8(%rsp)
movl   $0x5f5e100,(%rsp)
mov    %rsp,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <nanosleep@plt>
mov    $0x13c,%edi
call   1040 <syscall@plt>
jmp    1140 <main+0x20>

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.timespec
%3 = alloca %struct.timespec*
store i32 0, i32* %1
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i32 0, i32 1
store i64 0, i64* %4
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i32 0, i32 0
store i32 100000000, i32* %5
br label %6
6: ; preds = %0, %6
%7 = load %struct.timespec*, %struct.timespec** %3
%8 = call i32 @nanosleep(%struct.timespec* %2, %struct.timespec* %7)
%9 = call i32 @syscall(i32 316)
br label %6
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
define i32 @main() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
store i64 0, i64* %3
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
store i32 100000000, i32* %4
br label %5
5: ; preds = %5, %0
%6 = call i32 @nanosleep(%struct.timespec* %1, %struct.timespec* undef)
%7 = call i32 @syscall(i32 316)
br label %5
}
void XVisualIDFromVisual() {}


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

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

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

LLVM IR (-O2):
define void @XVisualIDFromVisual() {
ret void
}
/* Type definitions */
typedef unsigned int uint8_t;
typedef unsigned int const uint32_t;

/* Variables and functions */
uint32_t le24toh_ptr(const uint8_t *p) {
  return p[0] | (p[1] << 8U) | (p[2] << 16U);
}


x86 assembly (clang, -O0):
<le24toh_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%rcx
mov    0x4(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<le24toh_ptr>:
mov    0x4(%rdi),%ecx
mov    0x8(%rdi),%eax
shl    $0x8,%ecx
or     (%rdi),%ecx
shl    $0x10,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @le24toh_ptr(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = load i32, i32* %7
%9 = shl i32 %8, 8
%10 = or i32 %5, %9
%11 = load i32*, i32** %2
%12 = getelementptr inbounds i32, i32* %11, i64 2
%13 = load i32, i32* %12
%14 = shl i32 %13, 16
%15 = or i32 %10, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @le24toh_ptr(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = shl i32 %4, 8
%6 = or i32 %5, %2
%7 = getelementptr inbounds i32, i32* %0, i64 2
%8 = load i32, i32* %7
%9 = shl i32 %8, 16
%10 = or i32 %6, %9
ret i32 %10
}
int compatible_nloop_location(int nl1, int nl2) {
  if (nl1 == 3) {
    return nl2;
  } else if (nl2 == 3) {
    return nl1;
  } else if (nl1 == nl2) {
    return nl1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<compatible_nloop_location>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x3,-0x8(%rbp)
jne    111f <compatible_nloop_location+0x1f>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1152 <compatible_nloop_location+0x52>
cmpl   $0x3,-0xc(%rbp)
jne    1134 <compatible_nloop_location+0x34>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1152 <compatible_nloop_location+0x52>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    114b <compatible_nloop_location+0x4b>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1152 <compatible_nloop_location+0x52>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compatible_nloop_location>:
mov    %esi,%eax
cmp    $0x3,%edi
je     1118 <compatible_nloop_location+0x18>
cmp    $0x3,%eax
jne    110f <compatible_nloop_location+0xf>
mov    %edi,%eax
ret
xor    %ecx,%ecx
cmp    %eax,%edi
cmove  %edi,%ecx
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @compatible_nloop_location(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 = icmp eq i32 %6, 3
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %5
store i32 %9, i32* %3
br label %22
10: ; preds = %2
%11 = load i32, i32* %5
%12 = icmp eq i32 %11, 3
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = load i32, i32* %4
store i32 %14, i32* %3
br label %22
15: ; preds = %10
%16 = load i32, i32* %4
%17 = load i32, i32* %5
%18 = icmp eq i32 %16, %17
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = load i32, i32* %4
store i32 %20, i32* %3
br label %22
21: ; preds = %15
store i32 0, i32* %3
br label %22
22: ; preds = %21, %19, %13, %8
%23 = load i32, i32* %3
ret i32 %23
}

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


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

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

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

LLVM IR (-O2):
define void @system_byteorder() {
ret void
}
void HalCC2430SimpleUartP$uart0$putDone(void) { EchoP$uart0$putDone(); }


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

x86 assembly (clang, -O2):
<HalCC2430SimpleUartP$uart0$putDone>:
xor    %eax,%eax
jmp    1030 <EchoP$uart0$putDone@plt>

LLVM IR (-O0):
define void @"HalCC2430SimpleUartP$uart0$putDone"() {
%1 = call i32 (...) @"EchoP$uart0$putDone"()
ret void
}

LLVM IR (-O2):
define void @"HalCC2430SimpleUartP$uart0$putDone"() {
%1 = tail call i32 (...) @"EchoP$uart0$putDone"()
ret void
}
void *test_anti_range_66(int n) {
  extern void *alloc_anti_range_66(int) __attribute__((alloc_size(1)));
  if (0 <= n && n <= 0)
    n = 0 - 1;
  return alloc_anti_range_66(n);
}


x86 assembly (clang, -O0):
<test_anti_range_66>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmp    -0x4(%rbp),%eax
jg     1137 <test_anti_range_66+0x27>
cmpl   $0x0,-0x4(%rbp)
jg     1137 <test_anti_range_66+0x27>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <alloc_anti_range_66@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_66>:
cmp    $0x1,%edi
sbb    %eax,%eax
or     %eax,%edi
jmp    1030 <alloc_anti_range_66@plt>

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

LLVM IR (-O2):
define i8* @test_anti_range_66(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i32 -1, i32 %0
%4 = tail call i8* @alloc_anti_range_66(i32 %3)
ret i8* %4
}
int count_char(const char *str, const char c) {
  int count = 0;
  while (*str) {
    count += (*str++ == c);
  }
  return count;
}


x86 assembly (clang, -O0):
<count_char>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114d <count_char+0x4d>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1115 <count_char+0x15>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_char>:
mov    (%rdi),%cl
test   %cl,%cl
je     1126 <count_char+0x26>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
xor    %edx,%edx
cmp    %sil,%cl
sete   %dl
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <count_char+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @count_char(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i32 [ %12, %5 ], [ 0, %2 ]
%8 = phi i8* [ %9, %5 ], [ %0, %2 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = icmp eq i8 %6, %1
%11 = zext i1 %10 to i32
%12 = add nuw nsw i32 %7, %11
%13 = load i8, i8* %9
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i32 [ 0, %2 ], [ %12, %5 ]
ret i32 %16
}
/* Variables and functions */
scalar_t__ _U_Qfcmp(long double, long double, int);
int _U_Qfuneq(long double a, long double b) {
  return (_U_Qfcmp(a, b, 1 | 2 | 4) != 0);
}


x86 assembly (clang, -O0):
<_U_Qfuneq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
mov    $0x7,%edi
call   1030 <_U_Qfcmp@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_U_Qfuneq>:
sub    $0x28,%rsp
fldt   0x30(%rsp)
fldt   0x40(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
mov    $0x7,%edi
call   1030 <_U_Qfcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
add    $0x28,%rsp
ret

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

LLVM IR (-O2):
define i32 @_U_Qfuneq(x86_fp80 %0, x86_fp80 %1) {
%3 = tail call i64 @_U_Qfcmp(x86_fp80 %0, x86_fp80 %1, i32 7)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *);
char *folder_primary_where(char *folder_name) {
  static char where[256];
  sprintf(where, "folder = '%s'", folder_name);
  return where;
}


x86 assembly (clang, -O0):
<folder_primary_where>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0x2f19(%rip),%rdi
lea    0xed2(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2f06(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<folder_primary_where>:
push   %rbx
mov    %rdi,%rdx
lea    0x2f25(%rip),%rbx
lea    0xede(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@folder_primary_where.where = internal global [256 x i8] zeroinitializer
@.str = [14 x i8] c"folder = '%s'\00"
define i8* @folder_primary_where(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @sprintf(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @folder_primary_where.where, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @folder_primary_where.where, i64 0, i64 0)
}

LLVM IR (-O2):
@folder_primary_where.where = internal global [256 x i8] zeroinitializer
@.str = [14 x i8] c"folder = '%s'\00"
define i8* @folder_primary_where(i8* %0) {
%2 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([256 x i8], [256 x i8]* @folder_primary_where.where, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @folder_primary_where.where, i64 0, i64 0)
}
void g_DUMMY_popup_remove_item(int cont_id, int item_id, int pos) {
  cont_id = cont_id;
  item_id = item_id;
  pos = pos;
}


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

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

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

LLVM IR (-O2):
define void @g_DUMMY_popup_remove_item(i32 %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
int xstrtoll_range(char const *, int, int, int);
int xstrtoi_range(const char *str, int b, int l, int u) {
  return xstrtoll_range(str, b, l, u);
}


x86 assembly (clang, -O0):
<xstrtoi_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <xstrtoll_range@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrtoi_range>:
jmp    1030 <xstrtoll_range@plt>

LLVM IR (-O0):
define i32 @xstrtoi_range(i8* %0, i32 %1, i32 %2, i32 %3) {
%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 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @xstrtoll_range(i8* %9, i32 %10, i32 %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @xstrtoi_range(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @xstrtoll_range(i8* %0, i32 %1, i32 %2, i32 %3)
ret i32 %5
}
void runAutonomous() {
  int autoMode = 0;
  if (autoMode == 1) {
  } else if (autoMode == 2) {
  } else if (autoMode == 3) {
  }
}


x86 assembly (clang, -O0):
<runAutonomous>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    111a <runAutonomous+0x1a>
jmp    1142 <runAutonomous+0x42>
cmpl   $0x2,-0x4(%rbp)
jne    1129 <runAutonomous+0x29>
jmp    113d <runAutonomous+0x3d>
cmpl   $0x3,-0x4(%rbp)
jne    1138 <runAutonomous+0x38>
jmp    1138 <runAutonomous+0x38>
jmp    113d <runAutonomous+0x3d>
jmp    1142 <runAutonomous+0x42>
pop    %rbp
ret

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

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

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

/* Variables and functions */
scalar_t__ iwl_is_rfkill_hw(struct iwl_priv *);
scalar_t__ iwl_is_rfkill_sw(struct iwl_priv *);
int iwl_is_rfkill(struct iwl_priv *priv) {
  return iwl_is_rfkill_hw(priv) || iwl_is_rfkill_sw(priv);
}


x86 assembly (clang, -O0):
<iwl_is_rfkill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <iwl_is_rfkill_hw@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    115a <iwl_is_rfkill+0x3a>
mov    -0x8(%rbp),%rdi
call   1040 <iwl_is_rfkill_sw@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iwl_is_rfkill>:
push   %rbx
mov    %rdi,%rbx
call   1030 <iwl_is_rfkill_hw@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1138 <iwl_is_rfkill+0x18>
pop    %rbx
ret
mov    %rbx,%rdi
call   1040 <iwl_is_rfkill_sw@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
%struct.iwl_priv = type { i32 }
define i32 @iwl_is_rfkill(%struct.iwl_priv* %0) {
%2 = alloca %struct.iwl_priv*
store %struct.iwl_priv* %0, %struct.iwl_priv** %2
%3 = load %struct.iwl_priv*, %struct.iwl_priv** %2
%4 = call i64 @iwl_is_rfkill_hw(%struct.iwl_priv* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load %struct.iwl_priv*, %struct.iwl_priv** %2
%8 = call i64 @iwl_is_rfkill_sw(%struct.iwl_priv* %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
%struct.iwl_priv = type { i32 }
define i32 @iwl_is_rfkill(%struct.iwl_priv* %0) {
%2 = tail call i64 @iwl_is_rfkill_hw(%struct.iwl_priv* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @iwl_is_rfkill_sw(%struct.iwl_priv* %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ function(int, int);
int /*<<< orphan*/ printf(char *);
int main(void) {
  function(1, 2);
  printf("`function` return address points here\n");
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
call   1040 <function@plt>
lea    0xec9(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [39 x i8] c"`function` return address points here\0A\00"
define i32 @main() {
%1 = call i32 @function(i32 1, i32 2)
%2 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [38 x i8] c"`function` return address points here\00"
define i32 @main() {
%1 = tail call i32 @function(i32 1, i32 2)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void bar(void) { usleep(3000); }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    $0xbb8,%edi
call   1030 <usleep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
mov    $0xbb8,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @bar() {
%1 = call i32 @usleep(i32 3000)
ret void
}

LLVM IR (-O2):
define void @bar() {
%1 = tail call i32 @usleep(i32 3000)
ret void
}
void initLeds() {
  unsigned int *dir = ((unsigned int *)0x50028000);
  unsigned int *data = ((unsigned int *)0x50023FFC);
  *dir = 0xFFF;
  *data &= ~1;
}


x86 assembly (clang, -O0):
<initLeds>:
push   %rbp
mov    %rsp,%rbp
mov    $0x50028000,%eax
mov    %rax,-0x8(%rbp)
mov    $0x50023ffc,%eax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movl   $0xfff,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
and    $0xfffffffe,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<initLeds>:
movl   $0xfff,0x50028000
andb   $0xfe,0x50023ffc
fe
ret

LLVM IR (-O0):
define void @initLeds() {
%1 = alloca i32*
%2 = alloca i32*
store i32* inttoptr (i64 1342341120 to i32*), i32** %1
store i32* inttoptr (i64 1342324732 to i32*), i32** %2
%3 = load i32*, i32** %1
store i32 4095, i32* %3
%4 = load i32*, i32** %2
%5 = load i32, i32* %4
%6 = and i32 %5, -2
store i32 %6, i32* %4
ret void
}

LLVM IR (-O2):
define void @initLeds() {
store i32 4095, i32* inttoptr (i64 1342341120 to i32*)
%1 = load i32, i32* inttoptr (i64 1342324732 to i32*)
%2 = and i32 %1, -2
store i32 %2, i32* inttoptr (i64 1342324732 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ first_avail_fd();
int main() {
  first_avail_fd();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @first_avail_fd()
ret i32 0
}
/* Type definitions */
struct control_packet {
  int dummy;
};

/* Variables and functions */
scalar_t__ set_squelch_left(struct control_packet *, int);
scalar_t__ set_squelch_right(struct control_packet *, int);
int set_squelch(struct control_packet *packet, int left, int right) {
  int o = 0;
  o += set_squelch_left(packet, left);
  o += set_squelch_right(packet, right);
  return o;
}


x86 assembly (clang, -O0):
<set_squelch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <set_squelch_left@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1040 <set_squelch_right@plt>
mov    %rax,%rcx
movslq -0x14(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_squelch>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rdi,%rbx
call   1030 <set_squelch_left@plt>
mov    %rax,%rbp
mov    %rbx,%rdi
mov    %r14d,%esi
call   1040 <set_squelch_right@plt>
add    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.control_packet = type { i32 }
define i32 @set_squelch(%struct.control_packet* %0, i32 %1, i32 %2) {
%4 = alloca %struct.control_packet*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store %struct.control_packet* %0, %struct.control_packet** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
%8 = load %struct.control_packet*, %struct.control_packet** %4
%9 = load i32, i32* %5
%10 = call i64 @set_squelch_left(%struct.control_packet* %8, i32 %9)
%11 = load i32, i32* %7
%12 = sext i32 %11 to i64
%13 = add nsw i64 %12, %10
%14 = trunc i64 %13 to i32
store i32 %14, i32* %7
%15 = load %struct.control_packet*, %struct.control_packet** %4
%16 = load i32, i32* %6
%17 = call i64 @set_squelch_right(%struct.control_packet* %15, i32 %16)
%18 = load i32, i32* %7
%19 = sext i32 %18 to i64
%20 = add nsw i64 %19, %17
%21 = trunc i64 %20 to i32
store i32 %21, i32* %7
%22 = load i32, i32* %7
ret i32 %22
}

LLVM IR (-O2):
%struct.control_packet = type { i32 }
define i32 @set_squelch(%struct.control_packet* %0, i32 %1, i32 %2) {
%4 = tail call i64 @set_squelch_left(%struct.control_packet* %0, i32 %1)
%5 = tail call i64 @set_squelch_right(%struct.control_packet* %0, i32 %2)
%6 = add i64 %5, %4
%7 = trunc i64 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello, C\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 = [10 x i8] c"Hello, C\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [9 x i8] c"Hello, C\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int strcasecmp(char const *, char const *);
int ht_compare(const char *a, const char *b) { return strcasecmp(a, b); }


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

x86 assembly (clang, -O2):
<ht_compare>:
jmp    1030 <strcasecmp@plt>

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

LLVM IR (-O2):
define i32 @ht_compare(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcasecmp(i8* %0, i8* %1)
ret i32 %3
}
void pacer_to_heart_systolic_pulse() {}


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

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

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

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