xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ stderr;
void oops(char *s1, char *s2) {
  fprintf(stderr, "Error: %s ", s1);
  perror(s2);
  exit(1);
}


x86 assembly (clang, -O0):
<oops>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xeac(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<oops>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rdx
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
lea    0xeb9(%rip),%rsi
call   1030 <fprintf@plt>
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s \00"
define void @oops(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %4
%9 = call i32 @perror(i8* %8)
%10 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s \00"
define void @oops(i8* %0, i8* nocapture %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = tail call i32 @perror(i8* %1)
%6 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ die(int, char *);
char *strdup(char *);
char *estrdup(char *s) {
  if (!(s = strdup(s)))
    die(1, "strdup:");
  return s;
}


x86 assembly (clang, -O0):
<estrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
cmp    $0x0,%rax
jne    1154 <estrdup+0x34>
mov    $0x1,%edi
lea    0xeb1(%rip),%rsi
call   1030 <die@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<estrdup>:
push   %rbx
call   1040 <strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113f <estrdup+0x1f>
lea    0xecb(%rip),%rsi
mov    $0x1,%edi
call   1030 <die@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"strdup:\00"
define i8* @estrdup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @strdup(i8* %3)
store i8* %4, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = call i32 @die(i32 1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [8 x i8] c"strdup:\00"
define noalias i8* @estrdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @die(i32 1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int file_exists(const char *filename) {
  FILE *f = fopen(filename, "rb");
  if (f == NULL)
    return 0;
  fclose(f);
  return 1;
}


x86 assembly (clang, -O0):
<file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1157 <file_exists+0x37>
movl   $0x0,-0x4(%rbp)
jmp    1167 <file_exists+0x47>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_exists>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1141 <file_exists+0x21>
mov    %rax,%rdi
call   1030 <fclose@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"rb\00"
define i32 @file_exists(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %6, i32** %4
%7 = load i32*, i32** %4
%8 = icmp eq i32* %7, null
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 0, i32* %2
br label %13
10: ; preds = %1
%11 = load i32*, i32** %4
%12 = call i32 @fclose(i32* %11)
store i32 1, i32* %2
br label %13
13: ; preds = %10, %9
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
define i32 @file_exists(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
void tddfunc2(void) {
  static int staticint1;
  unsigned short int port = 0x5aU;
  unsigned short int result_8;
  result_8 = (~port) >> 4;
}


x86 assembly (clang, -O0):
<tddfunc2>:
push   %rbp
mov    %rsp,%rbp
movw   $0x5a,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
xor    $0xffffffff,%eax
sar    $0x4,%eax
mov    %ax,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
@tddfunc2.staticint1 = internal global i32 0
define void @tddfunc2() {
%1 = alloca i16
%2 = alloca i16
store i16 90, i16* %1
%3 = load i16, i16* %1
%4 = zext i16 %3 to i32
%5 = xor i32 %4, -1
%6 = ashr i32 %5, 4
%7 = trunc i32 %6 to i16
store i16 %7, i16* %2
ret void
}

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

/* Variables and functions */
scalar_t__ ASN1_item_d2i(int /*<<< orphan*/ **, unsigned char const **, long,
                         int /*<<< orphan*/ *);
int /*<<< orphan*/ PBEPARAM_it;
PBEPARAM *d2i_PBEPARAM(PBEPARAM **a, const unsigned char **in, long len) {
  return (PBEPARAM *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &PBEPARAM_it);
}


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

x86 assembly (clang, -O2):
<d2i_PBEPARAM>:
mov    0x2ed1(%rip),%rcx
jmp    1030 <ASN1_item_d2i@plt>

LLVM IR (-O0):
@PBEPARAM_it = global i32 0
define i32* @d2i_PBEPARAM(i32** %0, i8** %1, i64 %2) {
%4 = alloca i32**
%5 = alloca i8**
%6 = alloca i64
store i32** %0, i32*** %4
store i8** %1, i8*** %5
store i64 %2, i64* %6
%7 = load i32**, i32*** %4
%8 = load i8**, i8*** %5
%9 = load i64, i64* %6
%10 = call i64 @ASN1_item_d2i(i32** %7, i8** %8, i64 %9, i32* @PBEPARAM_it)
%11 = inttoptr i64 %10 to i32*
ret i32* %11
}

LLVM IR (-O2):
@PBEPARAM_it = global i32 0
define i32* @d2i_PBEPARAM(i32** %0, i8** %1, i64 %2) {
%4 = tail call i64 @ASN1_item_d2i(i32** %0, i8** %1, i64 %2, i32* @PBEPARAM_it)
%5 = inttoptr i64 %4 to i32*
ret i32* %5
}
/* Variables and functions */
double cosh(double);
double sinh(double);
double dAUX1bp2a(double x) {
  return (sinh(x) - x * cosh(x)) / (sinh(x) * sinh(x));
}


x86 assembly (clang, -O0):
<dAUX1bp2a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sinh@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <cosh@plt>
movsd  -0x28(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sinh@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sinh@plt>
movsd  -0x18(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dAUX1bp2a>:
sub    $0x18,%rsp
movsd  %xmm0,(%rsp)
call   1030 <sinh@plt>
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
call   1040 <cosh@plt>
movsd  (%rsp),%xmm2
mulsd  %xmm2,%xmm0
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movapd %xmm2,%xmm0
call   1030 <sinh@plt>
movsd  %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
call   1030 <sinh@plt>
mulsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @dAUX1bp2a(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @sinh(double %3)
%5 = load double, double* %2
%6 = load double, double* %2
%7 = call double @cosh(double %6)
%8 = fneg double %5
%9 = call double @llvm.fmuladd.f64(double %8, double %7, double %4)
%10 = load double, double* %2
%11 = call double @sinh(double %10)
%12 = load double, double* %2
%13 = call double @sinh(double %12)
%14 = fmul double %11, %13
%15 = fdiv double %9, %14
ret double %15
}

LLVM IR (-O2):
define double @dAUX1bp2a(double %0) {
%2 = tail call double @sinh(double %0)
%3 = tail call double @cosh(double %0)
%4 = fneg double %0
%5 = tail call double @llvm.fmuladd.f64(double %4, double %3, double %2)
%6 = tail call double @sinh(double %0)
%7 = tail call double @sinh(double %0)
%8 = fmul double %6, %7
%9 = fdiv double %5, %8
ret double %9
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
double stdlib_strided_dnanasumors(int /*<<< orphan*/ const, double const *,
                                  int /*<<< orphan*/ const);
double stdlib_strided_dnanasum(const int64_t N, const double *X,
                               const int64_t stride) {
  return stdlib_strided_dnanasumors(N, X, stride);
}


x86 assembly (clang, -O0):
<stdlib_strided_dnanasum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <stdlib_strided_dnanasumors@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdlib_strided_dnanasum>:
jmp    1030 <stdlib_strided_dnanasumors@plt>

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

LLVM IR (-O2):
define double @stdlib_strided_dnanasum(i32 %0, double* %1, i32 %2) {
%4 = tail call double @stdlib_strided_dnanasumors(i32 %0, double* %1, i32 %2)
ret double %4
}
/* Type definitions */
struct book_node {
  int dummy;
};
struct book {
  int dummy;
};

/* Variables and functions */
struct book *find_by_id(struct book_node *, long);
struct book_node *remove_book(struct book_node *, struct book *);
struct book_node *remove_first_with_id(struct book_node *head, long id) {
  struct book *to_remove = find_by_id(head, id);
  if (to_remove != NULL) {
    return remove_book(head, to_remove);
  }
  return NULL;
}


x86 assembly (clang, -O0):
<remove_first_with_id>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <find_by_id@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1162 <remove_first_with_id+0x42>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <remove_book@plt>
mov    %rax,-0x8(%rbp)
jmp    116a <remove_first_with_id+0x4a>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_first_with_id>:
push   %rbx
mov    %rdi,%rbx
call   1030 <find_by_id@plt>
test   %rax,%rax
je     113a <remove_first_with_id+0x1a>
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1040 <remove_book@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.book_node = type { i32 }
%struct.book = type { i32 }
define %struct.book_node* @remove_first_with_id(%struct.book_node* %0, i64 %1) {
%3 = alloca %struct.book_node*
%4 = alloca %struct.book_node*
%5 = alloca i64
%6 = alloca %struct.book*
store %struct.book_node* %0, %struct.book_node** %4
store i64 %1, i64* %5
%7 = load %struct.book_node*, %struct.book_node** %4
%8 = load i64, i64* %5
%9 = call %struct.book* @find_by_id(%struct.book_node* %7, i64 %8)
store %struct.book* %9, %struct.book** %6
%10 = load %struct.book*, %struct.book** %6
%11 = icmp ne %struct.book* %10, null
br i1 %11, label %12, label %16
12: ; preds = %2
%13 = load %struct.book_node*, %struct.book_node** %4
%14 = load %struct.book*, %struct.book** %6
%15 = call %struct.book_node* @remove_book(%struct.book_node* %13, %struct.book* %14)
store %struct.book_node* %15, %struct.book_node** %3
br label %17
16: ; preds = %2
store %struct.book_node* null, %struct.book_node** %3
br label %17
17: ; preds = %16, %12
%18 = load %struct.book_node*, %struct.book_node** %3
ret %struct.book_node* %18
}

LLVM IR (-O2):
%struct.book_node = type { i32 }
%struct.book = type { i32 }
define %struct.book_node* @remove_first_with_id(%struct.book_node* %0, i64 %1) {
%3 = tail call %struct.book* @find_by_id(%struct.book_node* %0, i64 %1)
%4 = icmp eq %struct.book* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call %struct.book_node* @remove_book(%struct.book_node* %0, %struct.book* %3)
br label %7
7: ; preds = %2, %5
%8 = phi %struct.book_node* [ %6, %5 ], [ null, %2 ]
ret %struct.book_node* %8
}
/* Variables and functions */
int /*<<< orphan*/ CiShared_Release(void *);
void CiShared_Assign(void **ptr, void *value) {
  CiShared_Release(*ptr);
  *ptr = value;
}


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

x86 assembly (clang, -O2):
<CiShared_Assign>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <CiShared_Release@plt>
mov    %r14,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @CiShared_Assign(i8** nocapture %0, i8* %1) {
%3 = load i8*, i8** %0
%4 = tail call i32 @CiShared_Release(i8* %3)
store i8* %1, i8** %0
ret void
}
int Strinsert(char *s1, char c, int pos) {
  char oldc;
  char *s;
  for (s = s1 + pos; c; s++) {
    oldc = *s;
    *s = c;
    c = oldc;
  }
  *s = '\0';
  return 1;
}


x86 assembly (clang, -O0):
<Strinsert>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
cmpb   $0x0,-0x9(%rbp)
je     1153 <Strinsert+0x53>
mov    -0x20(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x9(%rbp),%cl
mov    -0x20(%rbp),%rax
mov    %cl,(%rax)
mov    -0x11(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1120 <Strinsert+0x20>
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Strinsert>:
movslq %edx,%rax
add    %rdi,%rax
test   %sil,%sil
je     1120 <Strinsert+0x20>
nopl   0x0(%rax,%rax,1)
movzbl (%rax),%ecx
mov    %sil,(%rax)
add    $0x1,%rax
mov    %ecx,%esi
test   %cl,%cl
jne    1110 <Strinsert+0x10>
movb   $0x0,(%rax)
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @Strinsert(i8* nocapture %0, i8 signext %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = icmp eq i8 %1, 0
br i1 %6, label %13, label %7
7: ; preds = %3, %7
%8 = phi i8* [ %11, %7 ], [ %5, %3 ]
%9 = phi i8 [ %10, %7 ], [ %1, %3 ]
%10 = load i8, i8* %8
store i8 %9, i8* %8
%11 = getelementptr inbounds i8, i8* %8, i64 1
%12 = icmp eq i8 %10, 0
br i1 %12, label %13, label %7
13: ; preds = %7, %3
%14 = phi i8* [ %5, %3 ], [ %11, %7 ]
store i8 0, i8* %14
ret i32 1
}
/* Variables and functions */
int getpid();
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ sleep(int);
int f(void *i) {
  printf("my pid : %d, got : %d\n", getpid(), *(int *)i);
  sleep(3);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
lea    0xeae(%rip),%rdi
call   1040 <printf@plt>
mov    $0x3,%edi
call   1050 <sleep@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <getpid@plt>
mov    (%rbx),%edx
lea    0xebc(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x3,%edi
pop    %rbx
jmp    1050 <sleep@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"my pid : %d, got : %d\0A\00"
define i32 @f(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 (...) @getpid()
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %7)
%9 = call i32 @sleep(i32 3)
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@.str = [23 x i8] c"my pid : %d, got : %d\0A\00"
define i32 @f(i8* nocapture %0) {
%2 = tail call i32 (...) @getpid()
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4)
%6 = tail call i32 @sleep(i32 3)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ sleep(int);
int main(void) {
  while (1) {
    puts("Hi World! (shared)");
    sleep(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    112f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1130 <main+0x10>

LLVM IR (-O0):
@.str = [19 x i8] c"Hi World! (shared)\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i32 @puts(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @sleep(i32 1)
br label %2
}

LLVM IR (-O2):
@.str = [19 x i8] c"Hi World! (shared)\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @sleep(i32 1)
br label %1
}
int color_offset_f2(int x, int y) {
  return ((y << 10) - (((x << 10) * 467) / 447) - (25 << 10)) >> 10;
}


x86 assembly (clang, -O0):
<color_offset_f2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0xa,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xa,%eax
imul   $0x1d3,%eax,%eax
mov    $0x1bf,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
sub    %ecx,%eax
sub    $0x6400,%eax
sar    $0xa,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<color_offset_f2>:
shl    $0xa,%esi
imul   $0x74c00,%edi,%eax
cltq
imul   $0x6d63140b,%rax,%rcx
shr    $0x20,%rcx
sub    %eax,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
sar    $0x8,%ecx
add    %eax,%ecx
lea    (%rsi,%rcx,1),%eax
add    $0xffff9c00,%eax
sar    $0xa,%eax
ret

LLVM IR (-O0):
define i32 @color_offset_f2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = shl i32 %5, 10
%7 = load i32, i32* %3
%8 = shl i32 %7, 10
%9 = mul nsw i32 %8, 467
%10 = sdiv i32 %9, 447
%11 = sub nsw i32 %6, %10
%12 = sub nsw i32 %11, 25600
%13 = ashr i32 %12, 10
ret i32 %13
}

LLVM IR (-O2):
define i32 @color_offset_f2(i32 %0, i32 %1) {
%3 = shl i32 %1, 10
%4 = mul i32 %0, 478208
%5 = sdiv i32 %4, -447
%6 = add i32 %3, -25600
%7 = add i32 %6, %5
%8 = ashr i32 %7, 10
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ hash(int /*<<< orphan*/ *, int);
uint32_t hash_uint32(uint32_t key) { return hash((uint8_t *)(&key), 4); }


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

x86 assembly (clang, -O2):
<hash_uint32>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
call   1030 <hash@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @hash_uint32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @hash(i32* %2, i32 4)
ret i32 %3
}
double form_volume(double length_a, double length_b, double length_c,
                   double thick_rim_a, double thick_rim_b, double thick_rim_c) {
  return length_a * length_b * length_c +
         2.0 * thick_rim_a * length_b * length_c +
         2.0 * length_a * thick_rim_b * length_c +
         2.0 * length_a * length_b * thick_rim_c;
}


x86 assembly (clang, -O0):
<form_volume>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  0xec7(%rip),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xea8(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xe89(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<form_volume>:
movapd %xmm0,%xmm6
mulsd  %xmm1,%xmm6
addsd  %xmm3,%xmm3
mulsd  %xmm1,%xmm3
mulsd  %xmm2,%xmm3
mulsd  %xmm2,%xmm6
addsd  %xmm3,%xmm6
addsd  %xmm0,%xmm0
mulsd  %xmm0,%xmm4
mulsd  %xmm2,%xmm4
addsd  %xmm4,%xmm6
mulsd  %xmm1,%xmm0
mulsd  %xmm5,%xmm0
addsd  %xmm6,%xmm0
ret

LLVM IR (-O0):
define double @form_volume(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
%13 = load double, double* %7
%14 = load double, double* %8
%15 = fmul double %13, %14
%16 = load double, double* %9
%17 = load double, double* %10
%18 = fmul double 2.000000e+00, %17
%19 = load double, double* %8
%20 = fmul double %18, %19
%21 = load double, double* %9
%22 = fmul double %20, %21
%23 = call double @llvm.fmuladd.f64(double %15, double %16, double %22)
%24 = load double, double* %7
%25 = fmul double 2.000000e+00, %24
%26 = load double, double* %11
%27 = fmul double %25, %26
%28 = load double, double* %9
%29 = call double @llvm.fmuladd.f64(double %27, double %28, double %23)
%30 = load double, double* %7
%31 = fmul double 2.000000e+00, %30
%32 = load double, double* %8
%33 = fmul double %31, %32
%34 = load double, double* %12
%35 = call double @llvm.fmuladd.f64(double %33, double %34, double %29)
ret double %35
}

LLVM IR (-O2):
define double @form_volume(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = fmul double %0, %1
%8 = fmul double %3, 2.000000e+00
%9 = fmul double %8, %1
%10 = fmul double %9, %2
%11 = tail call double @llvm.fmuladd.f64(double %7, double %2, double %10)
%12 = fmul double %0, 2.000000e+00
%13 = fmul double %12, %4
%14 = tail call double @llvm.fmuladd.f64(double %13, double %2, double %11)
%15 = fmul double %12, %1
%16 = tail call double @llvm.fmuladd.f64(double %15, double %5, double %14)
ret double %16
}
int _revfindfirstbit(unsigned value) {
  int result;
  result = 0;
  while ((value & 1) == 0) {
    value >>= 1;
    ++result;
  }
  return result;
}


x86 assembly (clang, -O0):
<_revfindfirstbit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    1134 <_revfindfirstbit+0x34>
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <_revfindfirstbit+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_revfindfirstbit>:
xor    %eax,%eax
test   $0x1,%dil
jne    111d <_revfindfirstbit+0x1d>
xor    %eax,%eax
mov    %edi,%ecx
nopl   0x0(%rax)
shr    %ecx
add    $0x1,%eax
test   $0x2,%dil
mov    %ecx,%edi
je     1110 <_revfindfirstbit+0x10>
ret

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

LLVM IR (-O2):
define i32 @_revfindfirstbit(i32 %0) {
%2 = and i32 %0, 1
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %11
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i32 [ %7, %4 ], [ %0, %1 ]
%7 = lshr i32 %6, 1
%8 = add nuw nsw i32 %5, 1
%9 = and i32 %6, 2
%10 = icmp eq i32 %9, 0
br i1 %10, label %4, label %11
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
int fun1286() { return 1286; }


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

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

LLVM IR (-O0):
define i32 @fun1286() {
ret i32 1286
}

LLVM IR (-O2):
define i32 @fun1286() {
ret i32 1286
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void my_1st_print_func() { printf("\n\n\tthis is my func!\t\n\n"); }


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"\0A\0A\09this is my func!\09\0A\0A\00"
define void @my_1st_print_func() {
%1 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [22 x i8] c"\0A\0A\09this is my func!\09\0A\00"
define void @my_1st_print_func() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int LOG_PID;
int logger_get_facility(char const *);
int /*<<< orphan*/ openlog(char const *, int, int);
void logger_syslog_open(const char *ident, int option, const char *facility) {
  int fac;
  const char *l_ident;
  l_ident = ident;
  fac = logger_get_facility(facility);
  openlog(l_ident, option | LOG_PID, fac);
}


x86 assembly (clang, -O0):
<logger_syslog_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <logger_get_facility@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    0x2e8b(%rip),%rax
or     (%rax),%esi
mov    -0x1c(%rbp),%edx
call   1040 <openlog@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logger_syslog_open>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    %rdx,%rdi
call   1030 <logger_get_facility@plt>
mov    0x2ea8(%rip),%rcx
or     (%rcx),%ebx
mov    %r14,%rdi
mov    %ebx,%esi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <openlog@plt>

LLVM IR (-O0):
@LOG_PID = global i32 0
define void @logger_syslog_open(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%9 = load i8*, i8** %4
store i8* %9, i8** %8
%10 = load i8*, i8** %6
%11 = call i32 @logger_get_facility(i8* %10)
store i32 %11, i32* %7
%12 = load i8*, i8** %8
%13 = load i32, i32* %5
%14 = load i32, i32* @LOG_PID
%15 = or i32 %13, %14
%16 = load i32, i32* %7
%17 = call i32 @openlog(i8* %12, i32 %15, i32 %16)
ret void
}

LLVM IR (-O2):
@LOG_PID = global i32 0
define void @logger_syslog_open(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @logger_get_facility(i8* %2)
%5 = load i32, i32* @LOG_PID
%6 = or i32 %5, %1
%7 = tail call i32 @openlog(i8* %0, i32 %6, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main(int argc, char **argv) {
  char buf[4];
  strcpy(buf, "1234");
  printf("%s\n", buf);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x14(%rbp),%rdi
lea    0xebf(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x14(%rbp),%rsi
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rsi
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"1234\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [4 x i8]
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 0
}
int test_imm_9Fint64_lowword_reg(long long val) {
  return ((val) & (0x9F << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_9Fint64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0x9f,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_9Fint64_lowword_reg>:
test   $0x9f,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_9Fint64_lowword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 159
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -20, i32 -40
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_imm_9Fint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 159
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void fc270(int n) {
  {
    typedef int(*b)[n];
    {
      typedef int(*c)[n];
      0;
    }
    {
      typedef int(*d)[n];
      0;
    };
    typedef int(*e)[n];
    0;
  };
  {
    typedef int(*f)[n];
    {
      typedef int(*g)[n];
      0;
    };
    {
      typedef int(*h)[n];
      0;
    };
    ;
    typedef int(*i)[n];
    0;
  };
  ;
  typedef int(*j)[n];
  goto a;
a:
  0;
}


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

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

LLVM IR (-O0):
define void @fc270(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = load i32, i32* %2
%8 = zext i32 %7 to i64
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
%11 = load i32, i32* %2
%12 = zext i32 %11 to i64
%13 = load i32, i32* %2
%14 = zext i32 %13 to i64
%15 = load i32, i32* %2
%16 = zext i32 %15 to i64
%17 = load i32, i32* %2
%18 = zext i32 %17 to i64
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
br label %21
21: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @fc270(i32 %0) {
ret void
}
int auth_test(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @auth_test() {
ret i32 0
}
/* Variables and functions */
unsigned int my_rand(unsigned int);
void prepare_rand(int r[]) {
  int i;
  unsigned int randstate = 0xDEADBEEF;
  for (i = 0; i < 2048; i++) {
    r[i] = (randstate >> 16) - (1 << 15);
    randstate = my_rand(randstate);
  }
}


x86 assembly (clang, -O0):
<prepare_rand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0xdeadbeef,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x800,-0xc(%rbp)
jge    1167 <prepare_rand+0x57>
mov    -0x10(%rbp),%edx
shr    $0x10,%edx
sub    $0x8000,%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%edi
call   1030 <my_rand@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112a <prepare_rand+0x1a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prepare_rand>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0xdeadbeef,%eax
xor    %ebx,%ebx
xchg   %ax,%ax
mov    %eax,%ecx
shr    $0x10,%ecx
add    $0xffff8000,%ecx
mov    %ecx,(%r14,%rbx,4)
mov    %eax,%edi
call   1030 <my_rand@plt>
add    $0x1,%rbx
cmp    $0x800,%rbx
jne    1120 <prepare_rand+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @prepare_rand(i32* nocapture writeonly %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 0, %1 ], [ %9, %2 ]
%4 = phi i32 [ -559038737, %1 ], [ %8, %2 ]
%5 = lshr i32 %4, 16
%6 = add nsw i32 %5, -32768
%7 = getelementptr inbounds i32, i32* %0, i64 %3
store i32 %6, i32* %7
%8 = tail call i32 @my_rand(i32 %4)
%9 = add nuw nsw i64 %3, 1
%10 = icmp eq i64 %9, 2048
br i1 %10, label %11, label %2
11: ; preds = %2
ret void
}
int security_sem_semctl(struct sem_array *sma, int cmd) { return 0; }


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

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

LLVM IR (-O0):
%struct.sem_array = type opaque
define i32 @security_sem_semctl(%struct.sem_array* %0, i32 %1) {
%3 = alloca %struct.sem_array*
%4 = alloca i32
store %struct.sem_array* %0, %struct.sem_array** %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
%struct.sem_array = type opaque
define i32 @security_sem_semctl(%struct.sem_array* nocapture readnone %0, i32 %1) {
ret i32 0
}
int sn280x_get_bat_status(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @sn280x_get_bat_status() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ev_default_loop(int /*<<< orphan*/);
int /*<<< orphan*/ ev_loop_destroy(int /*<<< orphan*/);
void __attribute__((unused)) ev_default_destroy(void) {
  ev_loop_destroy(ev_default_loop(0));
}


x86 assembly (clang, -O0):
<ev_default_destroy>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <ev_default_loop@plt>
mov    %eax,%edi
call   1030 <ev_loop_destroy@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ev_default_destroy>:
push   %rax
xor    %edi,%edi
call   1040 <ev_default_loop@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <ev_loop_destroy@plt>

LLVM IR (-O0):
define void @ev_default_destroy() {
%1 = call i32 @ev_default_loop(i32 0)
%2 = call i32 @ev_loop_destroy(i32 %1)
ret void
}

LLVM IR (-O2):
define void @ev_default_destroy() {
%1 = tail call i32 @ev_default_loop(i32 0)
%2 = tail call i32 @ev_loop_destroy(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ variable_definition();
void definition(void) {
  ;
  variable_definition();
  ;
}


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

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

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

LLVM IR (-O2):
define void @definition() {
%1 = tail call i32 (...) @variable_definition()
ret void
}
void foo370(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo370(i32 %0) {
ret void
}
/* Type definitions */
struct cltorgb_module {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct cltorgb_module *);
void ClToRGB__v__stop(struct cltorgb_module *module) { free(module); }


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

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

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

LLVM IR (-O2):
%struct.cltorgb_module = type { i32 }
define void @ClToRGB__v__stop(%struct.cltorgb_module* nocapture %0) {
%2 = tail call i32 @free(%struct.cltorgb_module* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ preencher(char *, char);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char str[3], letra;
  scanf("%c", &letra);
  preencher(str, letra);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movsbl 0x4(%rsp),%esi
lea    0x5(%rsp),%rdi
call   1030 <preencher@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca [3 x i8]
%2 = alloca i8
%3 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = load i8, i8* %2
%6 = call i32 @preencher(i8* %3, i8 signext %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cpfw(char *, char *, size_t);
int /*<<< orphan*/ cptb(char *, char *, size_t);
void *c_vector_memmove(void *s1, const void *s2, size_t n) {
  char *ptr1;
  char *ptr2;
  ptr1 = (char *)s1;
  ptr2 = (char *)s2;
  if (ptr1 > ptr2)
    cptb(ptr1, ptr2, n);
  else
    cpfw(ptr1, ptr2, n);
  return (s1);
}


x86 assembly (clang, -O0):
<c_vector_memmove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jbe    1168 <c_vector_memmove+0x48>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <cptb@plt>
jmp    1179 <c_vector_memmove+0x59>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <cpfw@plt>
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_vector_memmove>:
push   %rbx
mov    %rdi,%rbx
cmp    %rsi,%rdi
jbe    1133 <c_vector_memmove+0x13>
mov    %rbx,%rdi
call   1030 <cptb@plt>
jmp    113b <c_vector_memmove+0x1b>
mov    %rbx,%rdi
call   1040 <cpfw@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @c_vector_memmove(i8* returned %0, i8* %1, i64 %2) {
%4 = icmp ugt i8* %0, %1
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @cptb(i8* %0, i8* %1, i64 %2)
br label %9
7: ; preds = %3
%8 = tail call i32 @cpfw(i8* %0, i8* %1, i64 %2)
br label %9
9: ; preds = %7, %5
ret i8* %0
}
/* Variables and functions */
int exact_square(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int chislo;
  printf("Vuvedi chislo:");
  scanf("%d", &chislo);
  printf("%d", exact_square(chislo));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebb(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <exact_square@plt>
mov    %eax,%esi
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec5(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
call   1040 <exact_square@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [15 x i8] c"Vuvedi chislo:\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @exact_square(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SIGUSR1;
int kill(int, int /*<<< orphan*/);
extern int halt_main(int argc, char **argv) { return (kill(1, SIGUSR1)); }


x86 assembly (clang, -O0):
<halt_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edi
call   1030 <kill@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<halt_main>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edi
jmp    1030 <kill@plt>

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

LLVM IR (-O2):
@SIGUSR1 = global i32 0
define i32 @halt_main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @SIGUSR1
%4 = tail call i32 @kill(i32 1, i32 %3)
ret i32 %4
}