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

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *, int,
                           char *);
void ftest(const char *s, int value, int pass, FILE *f) {
  fprintf(f, "%s...%d\t%s\n", s, value, pass ? "PASS" : "FAIL");
}


x86 assembly (clang, -O0):
<ftest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%esi
lea    0xed6(%rip),%r8
lea    0xeca(%rip),%rax
cmp    $0x0,%esi
cmovne %rax,%r8
lea    0xeb0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftest>:
mov    %esi,%r9d
mov    %rdi,%rax
test   %edx,%edx
lea    0xef2(%rip),%rdx
lea    0xee6(%rip),%r8
cmove  %rdx,%r8
lea    0xecf(%rip),%rsi
mov    %rcx,%rdi
mov    %rax,%rdx
mov    %r9d,%ecx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"%s...%d\09%s\0A\00"
@.str.1 = [5 x i8] c"PASS\00"
@.str.2 = [5 x i8] c"FAIL\00"
define void @ftest(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 i32*, i32** %8
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = icmp ne i32 %12, 0
%14 = zext i1 %13 to i64
%15 = select i1 %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0)
%16 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %10, i32 %11, i8* %15)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%s...%d\09%s\0A\00"
@.str.1 = [5 x i8] c"PASS\00"
@.str.2 = [5 x i8] c"FAIL\00"
define void @ftest(i8* %0, i32 %1, i32 %2, i32* nocapture %3) {
%5 = icmp eq i32 %2, 0
%6 = select i1 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0)
%7 = tail call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i8* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bruteForce();
int main(int argc, char *argv[]) {
  bruteForce();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @bruteForce()
ret i32 0
}
int main(void) {
  int a = 1;
  int b = 1;
  if (1 == a) {
    goto gotolabel;
  }
  switch (a) {
  case 1:
    b = 3;
    break;
  default:
    b = 3;
    break;
  case 2:
  gotolabel:
    b = 5;
    break;
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    $0x1,%eax
cmp    -0x8(%rbp),%eax
jne    112c <main+0x2c>
jmp    116e <main+0x6e>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x1,%eax
je     1151 <main+0x51>
jmp    1140 <main+0x40>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     1169 <main+0x69>
jmp    115d <main+0x5d>
movl   $0x3,-0xc(%rbp)
jmp    1175 <main+0x75>
movl   $0x3,-0xc(%rbp)
jmp    1175 <main+0x75>
jmp    116e <main+0x6e>
movl   $0x5,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
double sqrt(double const);
double squareRoot(const double a) {
  double b = sqrt(a);
  if (b != b) {
    return -1.0;
  } else {
    return sqrt(a);
  }
}


x86 assembly (clang, -O0):
<squareRoot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jne    1147 <squareRoot+0x37>
jp     1147 <squareRoot+0x37>
jmp    1159 <squareRoot+0x49>
movsd  0xeb1(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1168 <squareRoot+0x58>
movsd  -0x10(%rbp),%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<squareRoot>:
push   %rax
movapd %xmm0,%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jb     1128 <squareRoot+0x18>
xorps  %xmm0,%xmm0
sqrtsd %xmm1,%xmm0
jmp    113b <squareRoot+0x2b>
movapd %xmm1,%xmm0
movsd  %xmm1,(%rsp)
call   1030 <sqrt@plt>
movsd  (%rsp),%xmm1
ucomisd %xmm0,%xmm0
jp     115e <squareRoot+0x4e>
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jb     1154 <squareRoot+0x44>
xorps  %xmm0,%xmm0
sqrtsd %xmm1,%xmm0
pop    %rax
ret
movapd %xmm1,%xmm0
pop    %rax
jmp    1030 <sqrt@plt>
movsd  0xe9a(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @squareRoot(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %3
%5 = load double, double* %3
%6 = call double @sqrt(double %5)
store double %6, double* %4
%7 = load double, double* %4
%8 = load double, double* %4
%9 = fcmp une double %7, %8
br i1 %9, label %10, label %11
10: ; preds = %1
store double -1.000000e+00, double* %2
br label %14
11: ; preds = %1
%12 = load double, double* %3
%13 = call double @sqrt(double %12)
store double %13, double* %2
br label %14
14: ; preds = %11, %10
%15 = load double, double* %2
ret double %15
}

LLVM IR (-O2):
define double @squareRoot(double %0) {
%2 = tail call double @sqrt(double %0)
%3 = fcmp uno double %2, 0.000000e+00
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call double @sqrt(double %0)
br label %6
6: ; preds = %1, %4
%7 = phi double [ %5, %4 ], [ -1.000000e+00, %1 ]
ret double %7
}
int atoi(char s[]) {
  int i, n;
  n = 0;
  for (i = 0; s[i] >= '0' && s[i] <= '9'; ++i)
    n = n * 10 + (s[i] - '0');
  return n;
}


x86 assembly (clang, -O0):
<atoi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x11(%rbp)
jl     1145 <atoi+0x45>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1155 <atoi+0x55>
jmp    117b <atoi+0x7b>
imul   $0xa,-0x10(%rbp),%eax
mov    -0x8(%rbp),%rcx
movslq -0xc(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <atoi+0x16>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<atoi>:
mov    (%rdi),%cl
lea    -0x30(%rcx),%edx
xor    %eax,%eax
cmp    $0x9,%dl
ja     113b <atoi+0x3b>
add    $0x1,%rdi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl %cl,%ecx
lea    (%rax,%rax,4),%eax
lea    (%rcx,%rax,2),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
lea    -0x30(%rcx),%edx
add    $0x1,%rdi
cmp    $0xa,%dl
jb     1120 <atoi+0x20>
ret

LLVM IR (-O0):
define i32 @atoi(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %4
store i32 0, i32* %3
br label %5
5: ; preds = %34, %1
%6 = load i8*, i8** %2
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp sge i32 %11, 48
br i1 %12, label %13, label %21
13: ; preds = %5
%14 = load i8*, i8** %2
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp sle i32 %19, 57
br label %21
21: ; preds = %13, %5
%22 = phi i1 [ false, %5 ], [ %20, %13 ]
br i1 %22, label %23, label %37
23: ; preds = %21
%24 = load i32, i32* %4
%25 = mul nsw i32 %24, 10
%26 = load i8*, i8** %2
%27 = load i32, i32* %3
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i8, i8* %26, i64 %28
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = sub nsw i32 %31, 48
%33 = add nsw i32 %25, %32
store i32 %33, i32* %4
br label %34
34: ; preds = %23
%35 = load i32, i32* %3
%36 = add nsw i32 %35, 1
store i32 %36, i32* %3
br label %5
37: ; preds = %21
%38 = load i32, i32* %4
ret i32 %38
}

LLVM IR (-O2):
define i32 @atoi(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -48
%4 = icmp ult i8 %3, 10
br i1 %4, label %5, label %18
5: ; preds = %1, %5
%6 = phi i64 [ %13, %5 ], [ 0, %1 ]
%7 = phi i8 [ %15, %5 ], [ %2, %1 ]
%8 = phi i32 [ %12, %5 ], [ 0, %1 ]
%9 = zext i8 %7 to i32
%10 = mul nsw i32 %8, 10
%11 = add i32 %10, -48
%12 = add i32 %11, %9
%13 = add nuw nsw i64 %6, 1
%14 = getelementptr inbounds i8, i8* %0, i64 %13
%15 = load i8, i8* %14
%16 = add i8 %15, -48
%17 = icmp ult i8 %16, 10
br i1 %17, label %5, label %18
18: ; preds = %5, %1
%19 = phi i32 [ 0, %1 ], [ %12, %5 ]
ret i32 %19
}
void instruc_35() {}


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

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

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

LLVM IR (-O2):
define void @instruc_35() {
ret void
}
int get_array_size(char array[]) { return sizeof(array) / sizeof(char); }


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

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

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

LLVM IR (-O2):
define i32 @get_array_size(i8* nocapture readnone %0) {
ret i32 8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
__attribute__((hotpatch(0))) void hp5(void) { printf("hello, world!\n"); }


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"hello, world!\00"
define void @hp5() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int ERANGE;
int /*<<< orphan*/ strcpy(char *, char *);
char *strerror(int);
size_t strlen(char *);
int strerror_r(int err, char *buf, size_t buflen) {
  char *msg = strerror(err);
  if (strlen(msg) >= buflen)
    return ERANGE;
  strcpy(buf, msg);
  return 0;
}


x86 assembly (clang, -O0):
<strerror_r>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <strerror@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <strlen@plt>
cmp    -0x18(%rbp),%rax
jb     1173 <strerror_r+0x43>
mov    0x2e7f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1187 <strerror_r+0x57>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <strcpy@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strerror_r>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r15
mov    %rsi,%r14
call   1050 <strerror@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <strlen@plt>
cmp    %r15,%rax
jae    115f <strerror_r+0x2f>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
xor    %eax,%eax
jmp    1168 <strerror_r+0x38>
mov    0x2e82(%rip),%rax
mov    (%rax),%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@ERANGE = global i32 0
define i32 @strerror_r(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i8*
store i32 %0, i32* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
%9 = load i32, i32* %5
%10 = call i8* @strerror(i32 %9)
store i8* %10, i8** %8
%11 = load i8*, i8** %8
%12 = call i64 @strlen(i8* %11)
%13 = load i64, i64* %7
%14 = icmp uge i64 %12, %13
br i1 %14, label %15, label %17
15: ; preds = %3
%16 = load i32, i32* @ERANGE
store i32 %16, i32* %4
br label %21
17: ; preds = %3
%18 = load i8*, i8** %6
%19 = load i8*, i8** %8
%20 = call i32 @strcpy(i8* %18, i8* %19)
store i32 0, i32* %4
br label %21
21: ; preds = %17, %15
%22 = load i32, i32* %4
ret i32 %22
}

LLVM IR (-O2):
@ERANGE = global i32 0
define i32 @strerror_r(i32 %0, i8* %1, i64 %2) {
%4 = tail call i8* @strerror(i32 %0)
%5 = tail call i64 @strlen(i8* dereferenceable(1) %4)
%6 = icmp ult i64 %5, %2
br i1 %6, label %9, label %7
7: ; preds = %3
%8 = load i32, i32* @ERANGE
br label %11
9: ; preds = %3
%10 = tail call i32 @strcpy(i8* %1, i8* %4)
br label %11
11: ; preds = %9, %7
%12 = phi i32 [ %8, %7 ], [ 0, %9 ]
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ by(int /*<<< orphan*/);
int /*<<< orphan*/ shr();
void shr_by(uint32_t x) {
  by(x);
  shr();
}


x86 assembly (clang, -O0):
<shr_by>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <by@plt>
mov    $0x0,%al
call   1030 <shr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shr_by>:
push   %rax
call   1040 <by@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <shr@plt>

LLVM IR (-O0):
define void @shr_by(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @by(i32 %3)
%5 = call i32 (...) @shr()
ret void
}

LLVM IR (-O2):
define void @shr_by(i32 %0) {
%2 = tail call i32 @by(i32 %0)
%3 = tail call i32 (...) @shr()
ret void
}
/* Variables and functions */
__attribute__((visibility("default"))) const char *
sd_bus_message_get_interface(void *m) {
  return NULL;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @sd_bus_message_get_interface(i8* nocapture readnone %0) {
ret i8* null
}
/* Variables and functions */
int dwarf_get_ATE_name(unsigned int, char const **);
char const *ellipname(int, unsigned int, char const *, char *, int);
const char *get_ATE_name(unsigned int val_in, int printonerr) {
  const char *v = 0;
  int res = dwarf_get_ATE_name(val_in, &v);
  return ellipname(res, val_in, v, "ATE", printonerr);
}


x86 assembly (clang, -O0):
<get_ATE_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
call   1040 <dwarf_get_ATE_name@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%r8d
lea    0xea6(%rip),%rcx
call   1030 <ellipname@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ATE_name>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
movq   $0x0,(%rsp)
mov    %rsp,%rsi
call   1040 <dwarf_get_ATE_name@plt>
mov    (%rsp),%rdx
lea    0xebe(%rip),%rcx
mov    %eax,%edi
mov    %ebp,%esi
mov    %ebx,%r8d
call   1030 <ellipname@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"ATE\00"
define i8* @get_ATE_name(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i8* null, i8** %5
%7 = load i32, i32* %3
%8 = call i32 @dwarf_get_ATE_name(i32 %7, i8** %5)
store i32 %8, i32* %6
%9 = load i32, i32* %6
%10 = load i32, i32* %3
%11 = load i8*, i8** %5
%12 = load i32, i32* %4
%13 = call i8* @ellipname(i32 %9, i32 %10, i8* %11, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i8* %13
}

LLVM IR (-O2):
@.str = [4 x i8] c"ATE\00"
define i8* @get_ATE_name(i32 %0, i32 %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%5 = call i32 @dwarf_get_ATE_name(i32 %0, i8** %3)
%6 = load i8*, i8** %3
%7 = call i8* @ellipname(i32 %5, i32 %0, i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i8* %7
}
int si_has_missing_return_2() {}


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

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

LLVM IR (-O0):
define i32 @si_has_missing_return_2() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @si_has_missing_return_2() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
char *gettext(char *);
int /*<<< orphan*/ stderr;
long strtol(char *, char **, int /*<<< orphan*/);
int convert(char *arg) {
  long result;
  char *end;
  result = strtol(arg, &end, 0);
  if (!*end)
    return (int)result;
  fprintf(stderr, gettext("Invalid number: %s\n"), arg);
  exit(1);
}


x86 assembly (clang, -O0):
<convert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
xor    %edx,%edx
call   1050 <strtol@plt>
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1176 <convert+0x36>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret
mov    0x2e63(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
lea    0xe77(%rip),%rdi
call   1030 <gettext@plt>
mov    -0x1c(%rbp),%edi
mov    %rax,%rsi
mov    -0x8(%rbp),%rdx
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<convert>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    %rsp,%rsi
xor    %edx,%edx
call   1050 <strtol@plt>
mov    (%rsp),%rcx
cmpb   $0x0,(%rcx)
jne    1160 <convert+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    0x2e79(%rip),%rax
mov    (%rax),%ebp
lea    0xe90(%rip),%rdi
call   1030 <gettext@plt>
mov    %ebp,%edi
mov    %rax,%rsi
mov    %rbx,%rdx
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"Invalid number: %s\0A\00"
define i32 @convert(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strtol(i8* %5, i8** %4, i32 0)
store i64 %6, i64* %3
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %1
%11 = load i64, i64* %3
%12 = trunc i64 %11 to i32
ret i32 %12
13: ; preds = %1
%14 = load i32, i32* @stderr
%15 = call i8* @gettext(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%16 = load i8*, i8** %2
%17 = call i32 @fprintf(i32 %14, i8* %15, i8* %16)
%18 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"Invalid number: %s\0A\00"
define i32 @convert(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i64 @strtol(i8* %0, i8** %2, i32 0)
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = trunc i64 %4 to i32
ret i32 %9
10: ; preds = %1
%11 = load i32, i32* @stderr
%12 = tail call i8* @gettext(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%13 = tail call i32 @fprintf(i32 %11, i8* %12, i8* %0)
%14 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
scalar_t__ test(int);
void foo() {
  int i;
  for (i = 0; i < 10; ++i) {
#pragma omp sections
    { continue; }
  }
#pragma omp sections
  {
#pragma omp section
    {
    bad1:;
    }
#pragma omp section
    goto bad1;
  }
#pragma omp sections
  { goto bad2; }
bad2:;
  goto bad3;
#pragma omp sections
  {
  bad3:;
  }
#pragma omp sections
  {
    {
      goto ok1;
    ok1:;
    }
#pragma omp section
    for (i = 0; i < 10; ++i)
      if (test(i))
        break;
      else
        continue;
#pragma omp section
    switch (i) {
    case 0:
      break;
    default:
      test(i);
    }
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    1128 <foo+0x28>
jmp    111a <foo+0x1a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <foo+0xb>
jmp    112d <foo+0x2d>
jmp    112d <foo+0x2d>

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

LLVM IR (-O0):
define void @foo() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %6, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 10
br i1 %4, label %5, label %9
5: ; preds = %2
br label %6
6: ; preds = %5
%7 = load i32, i32* %1
%8 = add nsw i32 %7, 1
store i32 %8, i32* %1
br label %2
9: ; preds = %2
br label %10
10: ; preds = %10, %9
br label %10
11: ; No predecessors!
br label %12
12: ; preds = %11
br label %13
13: ; preds = %12
store i32 0, i32* %1
br label %14
14: ; preds = %23, %13
%15 = load i32, i32* %1
%16 = icmp slt i32 %15, 10
br i1 %16, label %17, label %26
17: ; preds = %14
%18 = load i32, i32* %1
%19 = call i64 @test(i32 %18)
%20 = icmp ne i64 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %17
br label %26
22: ; preds = %17
br label %23
23: ; preds = %22
%24 = load i32, i32* %1
%25 = add nsw i32 %24, 1
store i32 %25, i32* %1
br label %14
26: ; preds = %21, %14
%27 = load i32, i32* %1
switch i32 %27, label %29 [
i32 0, label %28
]
28: ; preds = %26
br label %32
29: ; preds = %26
%30 = load i32, i32* %1
%31 = call i64 @test(i32 %30)
br label %32
32: ; preds = %29, %28
ret void
}

LLVM IR (-O2):
define void @foo() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
long double exp(long double const);
long double sin(long double const);
void fktn_h(const long double *x, long double *y) { *y = (sin(*x) * exp(*x)); }


x86 assembly (clang, -O0):
<fktn_h>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
fldt   (%rax)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <sin@plt>
fstpt  -0x1c(%rbp)
mov    -0x8(%rbp),%rax
fldt   (%rax)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <exp@plt>
fldt   -0x1c(%rbp)
fmulp  %st,%st(1)
mov    -0x10(%rbp),%rax
fstpt  (%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fktn_h>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
fldt   (%rdi)
fstpt  (%rsp)
call   1030 <sin@plt>
fstpt  0x1c(%rsp)
fldt   (%rbx)
fstpt  (%rsp)
call   1040 <exp@plt>
fldt   0x1c(%rsp)
fmulp  %st,%st(1)
fstpt  (%r14)
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @fktn_h(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* %5
%7 = call x86_fp80 @sin(x86_fp80 %6)
%8 = load x86_fp80*, x86_fp80** %3
%9 = load x86_fp80, x86_fp80* %8
%10 = call x86_fp80 @exp(x86_fp80 %9)
%11 = fmul x86_fp80 %7, %10
%12 = load x86_fp80*, x86_fp80** %4
store x86_fp80 %11, x86_fp80* %12
ret void
}

LLVM IR (-O2):
define void @fktn_h(x86_fp80* nocapture %0, x86_fp80* nocapture writeonly %1) {
%3 = load x86_fp80, x86_fp80* %0
%4 = tail call x86_fp80 @sin(x86_fp80 %3)
%5 = load x86_fp80, x86_fp80* %0
%6 = tail call x86_fp80 @exp(x86_fp80 %5)
%7 = fmul x86_fp80 %4, %6
store x86_fp80 %7, x86_fp80* %1
ret void
}
int main(int argc, const char *argv[]) {
  typedef float ff;
  typedef struct myPoint {
    float x;
    float y;
  } Point;
  typedef struct {
    float x;
    float y;
  } * pp;
  struct Point {
    float x;
    float y;
  };
  Point point = {10.0f, 10.0f};
  pp p = &point;
  p->x;
  p->y;
  typedef enum { spring, summer } Season;
  Season s = spring;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xee7(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.myPoint = type { float, float }
%struct.anon = type { float, float }
@__const.main.point = %struct.myPoint { float 1.000000e+01, float 1.000000e+01 }
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.myPoint
%7 = alloca %struct.anon*
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = bitcast %struct.myPoint* %6 to i8*
%10 = bitcast %struct.myPoint* %6 to %struct.anon*
store %struct.anon* %10, %struct.anon** %7
%11 = load %struct.anon*, %struct.anon** %7
%12 = getelementptr inbounds %struct.anon, %struct.anon* %11, i32 0, i32 0
%13 = load float, float* %12
%14 = load %struct.anon*, %struct.anon** %7
%15 = getelementptr inbounds %struct.anon, %struct.anon* %14, i32 0, i32 1
%16 = load float, float* %15
store i32 0, i32* %8
ret i32 0
}

LLVM IR (-O2):
%struct.anon = type { float, float }
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ uart_process_isr(int);
void uart_isr_C_1_function(void) { uart_process_isr(1); }


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

x86 assembly (clang, -O2):
<uart_isr_C_1_function>:
mov    $0x1,%edi
jmp    1030 <uart_process_isr@plt>

LLVM IR (-O0):
define void @uart_isr_C_1_function() {
%1 = call i32 @uart_process_isr(i32 1)
ret void
}

LLVM IR (-O2):
define void @uart_isr_C_1_function() {
%1 = tail call i32 @uart_process_isr(i32 1)
ret void
}
void generate_menu(int argc, char *argv[]) {}


x86 assembly (clang, -O0):
<generate_menu>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @generate_menu(i32 %0, i8** nocapture %1) {
ret void
}
/* Variables and functions */
unsigned int f04(unsigned int);
unsigned int f05(unsigned int a) { return f04(f04(a)); }


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

x86 assembly (clang, -O2):
<f05>:
push   %rax
call   1030 <f04@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <f04@plt>

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

LLVM IR (-O2):
define i32 @f05(i32 %0) {
%2 = tail call i32 @f04(i32 %0)
%3 = tail call i32 @f04(i32 %2)
ret i32 %3
}
/* Variables and functions */
void *OME_memory_allocate(size_t size) { return NULL; }


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

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

LLVM IR (-O0):
define i8* @OME_memory_allocate(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @OME_memory_allocate(i64 %0) {
ret i8* null
}
/* Variables and functions */
double __ieee754_jn(int, double);
double _jn(int n, double num) { return __ieee754_jn(n, num); }


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

x86 assembly (clang, -O2):
<_jn>:
jmp    1030 <__ieee754_jn@plt>

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

LLVM IR (-O2):
define double @_jn(i32 %0, double %1) {
%3 = tail call double @__ieee754_jn(i32 %0, double %1)
ret double %3
}
/* Type definitions */
typedef int uint64_t;
typedef scalar_t__ rax;

/* Variables and functions */
int /*<<< orphan*/ cpuid(int, int *, int *, int *, int *);
bool cpuid_clock_mod_extended() {
  uint64_t rax, rbx, rcx, rdx;
  int leaf = 6;
  cpuid(leaf, &rax, &rbx, &rcx, &rdx);
  if ((((uint64_t)(rax) &
        ((((uint64_t)1 << (((5)) - ((5)) + 1)) - 1) << ((5)))) >>
       (5)) == 1) {
    return true;
  } else {
    return false;
  }
}


x86 assembly (clang, -O0):
<cpuid_clock_mod_extended>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x6,-0x18(%rbp)
mov    -0x18(%rbp),%edi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1030 <cpuid@plt>
mov    -0x8(%rbp),%eax
and    $0x20,%eax
sar    $0x5,%eax
cmp    $0x1,%eax
jne    1155 <cpuid_clock_mod_extended+0x45>
movl   $0x1,-0x4(%rbp)
jmp    115c <cpuid_clock_mod_extended+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuid_clock_mod_extended>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rsi
lea    0x14(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0xc(%rsp),%r8
mov    $0x6,%edi
call   1030 <cpuid@plt>
mov    0x8(%rsp),%eax
shr    $0x5,%eax
and    $0x1,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @cpuid_clock_mod_extended() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @cpuid(i32 6, i32* %1, i32* %2, i32* %3, i32* %4)
%10 = load i32, i32* %1
%11 = lshr i32 %10, 5
%12 = and i32 %11, 1
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ SIGCHLD;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ error(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int fork();
int /*<<< orphan*/ setsid();
int /*<<< orphan*/ signal(int /*<<< orphan*/, int /*<<< orphan*/);
void background(void) {
  int childpid;
  if ((childpid = fork()) < 0) {
    error("Can't fork");
  } else {
    if (childpid > 0)
      exit(0);
  }
  setsid();
  signal(SIGCHLD, SIG_IGN);
}


x86 assembly (clang, -O0):
<background>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1070 <fork@plt>
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
jge    117c <background+0x2c>
lea    0xe8e(%rip),%rdi
call   1050 <error@plt>
jmp    1192 <background+0x42>
cmpl   $0x0,-0x4(%rbp)
jle    118d <background+0x3d>
xor    %edi,%edi
call   1060 <exit@plt>
jmp    1192 <background+0x42>
mov    $0x0,%al
call   1030 <setsid@plt>
mov    0x2e48(%rip),%rax
mov    (%rax),%edi
mov    0x2e37(%rip),%rax
mov    (%rax),%esi
call   1040 <signal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<background>:
push   %rax
xor    %eax,%eax
call   1070 <fork@plt>
test   %eax,%eax
js     1165 <background+0x15>
je     1171 <background+0x21>
xor    %edi,%edi
call   1060 <exit@plt>
lea    0xe94(%rip),%rdi
call   1050 <error@plt>
xor    %eax,%eax
call   1030 <setsid@plt>
mov    0x2e69(%rip),%rax
mov    (%rax),%edi
mov    0x2e58(%rip),%rax
mov    (%rax),%esi
pop    %rax
jmp    1040 <signal@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"Can't fork\00"
@SIGCHLD = global i32 0
@SIG_IGN = global i32 0
define void @background() {
%1 = alloca i32
%2 = call i32 (...) @fork()
store i32 %2, i32* %1
%3 = icmp slt i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @error(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %12
6: ; preds = %0
%7 = load i32, i32* %1
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 @exit(i32 0)
unreachable
11: ; preds = %6
br label %12
12: ; preds = %11, %4
%13 = call i32 (...) @setsid()
%14 = load i32, i32* @SIGCHLD
%15 = load i32, i32* @SIG_IGN
%16 = call i32 @signal(i32 %14, i32 %15)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"Can't fork\00"
@SIGCHLD = global i32 0
@SIG_IGN = global i32 0
define void @background() {
%1 = tail call i32 (...) @fork()
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @error(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %9
5: ; preds = %0
%6 = icmp eq i32 %1, 0
br i1 %6, label %9, label %7
7: ; preds = %5
%8 = tail call i32 @exit(i32 0)
unreachable
9: ; preds = %5, %3
%10 = tail call i32 (...) @setsid()
%11 = load i32, i32* @SIGCHLD
%12 = load i32, i32* @SIG_IGN
%13 = tail call i32 @signal(i32 %11, i32 %12)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void _clean_msg(void *input) {
  if (input)
    free(input);
}


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

x86 assembly (clang, -O2):
<_clean_msg>:
test   %rdi,%rdi
je     111a <_clean_msg+0xa>
jmp    1030 <free@plt>
ret

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

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


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

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

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

LLVM IR (-O2):
define void @X509V3_get_string() {
ret void
}
int biz22f_dialer(num, acu)
char *num, *acu;
{ return (biz_dialer(num, "V")); }


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

x86 assembly (clang, -O2):
<biz22f_dialer>:
lea    0xee9(%rip),%rsi
xor    %eax,%eax
jmp    1030 <biz_dialer@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"V\00"
define i32 @biz22f_dialer(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @biz_dialer to i32 (i8*, i8*, ...)*)(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 %6
}

LLVM IR (-O2):
@.str = [2 x i8] c"V\00"
define i32 @biz22f_dialer(i8* %0, i8* nocapture readnone %1) {
%3 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @biz_dialer to i32 (i8*, i8*, ...)*)(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void art(void) {
  printf("         /\\_/\\\n");
  printf("    ____/ o o \\\n");
  printf("  /~____  =ø= /\n");
  printf(" (______)__m_m)\n");
}


x86 assembly (clang, -O0):
<art>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
call   1030 <printf@plt>
lea    0xef4(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<art>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeeb(%rip),%rdi
call   1030 <puts@plt>
lea    0xeef(%rip),%rdi
call   1030 <puts@plt>
lea    0xef4(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [16 x i8] c" /\\_/\\\0A\00"
@.str.1 = [17 x i8] c" ____/ o o \\\0A\00"
@.str.2 = [18 x i8] c" /~____ =\C3\B8= /\0A\00"
@.str.3 = [17 x i8] c" (______)__m_m)\0A\00"
define void @art() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [15 x i8] c" /\\_/\\\00"
@str.4 = [16 x i8] c" ____/ o o \\\00"
@str.5 = [17 x i8] c" /~____ =\C3\B8= /\00"
@str.6 = [16 x i8] c" (______)__m_m)\00"
define void @art() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.6, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ pop();
int /*<<< orphan*/ push(scalar_t__);
void add(void) { push(pop() + pop()); }


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

x86 assembly (clang, -O2):
<add>:
push   %rbx
xor    %eax,%eax
call   1030 <pop@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <pop@plt>
add    %rax,%rbx
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <push@plt>

LLVM IR (-O0):
define void @add() {
%1 = call i64 (...) @pop()
%2 = call i64 (...) @pop()
%3 = add nsw i64 %1, %2
%4 = call i32 @push(i64 %3)
ret void
}

LLVM IR (-O2):
define void @add() {
%1 = tail call i64 (...) @pop()
%2 = tail call i64 (...) @pop()
%3 = add nsw i64 %2, %1
%4 = tail call i32 @push(i64 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ function_which_gives_up(int *);
scalar_t__ malloc(int);
void coverage3(int *x) {
  x++;
  function_which_gives_up(x);
  char *m = (char *)malloc(12);
}


x86 assembly (clang, -O0):
<coverage3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <function_which_gives_up@plt>
mov    $0xc,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coverage3>:
push   %rax
add    $0x4,%rdi
call   1030 <function_which_gives_up@plt>
mov    $0xc,%edi
pop    %rax
jmp    1040 <malloc@plt>

LLVM IR (-O0):
define void @coverage3(i32* %0) {
%2 = alloca i32*
%3 = alloca i8*
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i32 1
store i32* %5, i32** %2
%6 = load i32*, i32** %2
%7 = call i32 @function_which_gives_up(i32* %6)
%8 = call i64 @malloc(i32 12)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %3
ret void
}

LLVM IR (-O2):
define void @coverage3(i32* %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = tail call i32 @function_which_gives_up(i32* %2)
%4 = tail call i64 @malloc(i32 12)
ret void
}
double Vector_Dot_Product(double v1[3], double v2[3]) {
  double result = 0;
  for (int c = 0; c < 3; c++) {
    result += v1[c] * v2[c];
  }
  return result;
}


x86 assembly (clang, -O0):
<Vector_Dot_Product>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x3,-0x1c(%rbp)
jge    115f <Vector_Dot_Product+0x5f>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    111b <Vector_Dot_Product+0x1b>
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Vector_Dot_Product>:
movsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
mulsd  (%rsi),%xmm0
xorpd  %xmm2,%xmm2
addsd  %xmm0,%xmm2
mulsd  0x8(%rsi),%xmm1
addsd  %xmm2,%xmm1
movsd  0x10(%rdi),%xmm0
mulsd  0x10(%rsi),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @Vector_Dot_Product(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
%6 = alloca i32
store double* %0, double** %3
store double* %1, double** %4
store double 0.000000e+00, double* %5
store i32 0, i32* %6
br label %7
7: ; preds = %23, %2
%8 = load i32, i32* %6
%9 = icmp slt i32 %8, 3
br i1 %9, label %10, label %26
10: ; preds = %7
%11 = load double*, double** %3
%12 = load i32, i32* %6
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds double, double* %11, i64 %13
%15 = load double, double* %14
%16 = load double*, double** %4
%17 = load i32, i32* %6
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds double, double* %16, i64 %18
%20 = load double, double* %19
%21 = load double, double* %5
%22 = call double @llvm.fmuladd.f64(double %15, double %20, double %21)
store double %22, double* %5
br label %23
23: ; preds = %10
%24 = load i32, i32* %6
%25 = add nsw i32 %24, 1
store i32 %25, i32* %6
br label %7
26: ; preds = %7
%27 = load double, double* %5
ret double %27
}

LLVM IR (-O2):
define double @Vector_Dot_Product(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = tail call double @llvm.fmuladd.f64(double %3, double %4, double 0.000000e+00)
%6 = getelementptr inbounds double, double* %0, i64 1
%7 = load double, double* %6
%8 = getelementptr inbounds double, double* %1, i64 1
%9 = load double, double* %8
%10 = tail call double @llvm.fmuladd.f64(double %7, double %9, double %5)
%11 = getelementptr inbounds double, double* %0, i64 2
%12 = load double, double* %11
%13 = getelementptr inbounds double, double* %1, i64 2
%14 = load double, double* %13
%15 = tail call double @llvm.fmuladd.f64(double %12, double %14, double %10)
ret double %15
}
regx0imm1(r0, r1, x0, x1, p0, p1) unsigned int r0, r1;
unsigned int *p0, *p1;
{
  if ((p0[x0]) <= 33)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<regx0imm1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x10(%rbp),%rcx
cmpl   $0x21,(%rax,%rcx,4)
ja     1136 <regx0imm1+0x36>
movl   $0x1,-0x4(%rbp)
jmp    113d <regx0imm1+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<regx0imm1>:
movslq %edx,%rcx
xor    %eax,%eax
cmpl   $0x22,(%r8,%rcx,4)
setb   %al
ret

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

LLVM IR (-O2):
define i32 @regx0imm1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture %4, i32* nocapture readnone %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %4, i64 %7
%9 = load i32, i32* %8
%10 = icmp ult i32 %9, 34
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ core3_print(char *, char *, char const *);
void U_EMRSETICMMODE_print(const char *contents) {
  core3_print("U_EMRSETICMMODE", "iMode:", contents);
}


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

x86 assembly (clang, -O2):
<U_EMRSETICMMODE_print>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeef(%rip),%rsi
jmp    1030 <core3_print@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"U_EMRSETICMMODE\00"
@.str.1 = [7 x i8] c"iMode:\00"
define void @U_EMRSETICMMODE_print(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @core3_print(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"U_EMRSETICMMODE\00"
@.str.1 = [7 x i8] c"iMode:\00"
define void @U_EMRSETICMMODE_print(i8* %0) {
%2 = tail call i32 @core3_print(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}