xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, double *);
int main(void) {
  double miles, kms;
  printf("Enter the distance in miles > ");
  scanf("%lf", &miles);
  kms = 1.609 * miles;
  printf("That equals %f kilometres.\n", kms);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movsd  0xeab(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xec0(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm0
mulsd  0xeb5(%rip),%xmm0
lea    0xed9(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Enter the distance in miles > \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [28 x i8] c"That equals %f kilometres.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%6 = load double, double* %2
%7 = fmul double 1.609000e+00, %6
store double %7, double* %3
%8 = load double, double* %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"Enter the distance in miles > \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [28 x i8] c"That equals %f kilometres.\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%5 = load double, double* %1
%6 = fmul double %5, 1.609000e+00
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), double %6)
ret i32 0
}
/* Variables and functions */
float *general_hamming(int, double);
float *hamming(int N) { return general_hamming(N, 0.54); }


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

x86 assembly (clang, -O2):
<hamming>:
movsd  0xee8(%rip),%xmm0
jmp    1030 <general_hamming@plt>

LLVM IR (-O0):
define float* @hamming(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call float* @general_hamming(i32 %3, double 5.400000e-01)
ret float* %4
}

LLVM IR (-O2):
define float* @hamming(i32 %0) {
%2 = tail call float* @general_hamming(i32 %0, double 5.400000e-01)
ret float* %2
}
int check_repeated_edge(int *edges, int num) {
  for (; *edges; edges++)
    if (*edges == num)
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<check_repeated_edge>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
je     1149 <check_repeated_edge+0x49>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
cmp    -0x14(%rbp),%eax
jne    1133 <check_repeated_edge+0x33>
movl   $0x1,-0x4(%rbp)
jmp    1150 <check_repeated_edge+0x50>
jmp    1138 <check_repeated_edge+0x38>
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
jmp    110b <check_repeated_edge+0xb>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_repeated_edge>:
mov    (%rdi),%ecx
xor    %eax,%eax
test   %ecx,%ecx
je     111e <check_repeated_edge+0x1e>
add    $0x4,%rdi
nopl   0x0(%rax)
cmp    %esi,%ecx
je     111f <check_repeated_edge+0x1f>
mov    (%rdi),%ecx
add    $0x4,%rdi
test   %ecx,%ecx
jne    1110 <check_repeated_edge+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @check_repeated_edge(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = icmp eq i32 %3, 0
br i1 %4, label %13, label %8
5: ; preds = %8
%6 = load i32, i32* %12
%7 = icmp eq i32 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %2, %5
%9 = phi i32 [ %6, %5 ], [ %3, %2 ]
%10 = phi i32* [ %12, %5 ], [ %0, %2 ]
%11 = icmp eq i32 %9, %1
%12 = getelementptr inbounds i32, i32* %10, i64 1
br i1 %11, label %13, label %5
13: ; preds = %8, %5, %2
%14 = phi i32 [ 0, %2 ], [ 0, %5 ], [ 1, %8 ]
ret i32 %14
}
/* Type definitions */
struct node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct node *);
void dlink_node_free(struct node *nptr) { free(nptr); }


x86 assembly (clang, -O0):
<dlink_node_free>:
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):
<dlink_node_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.node = type { i32 }
define void @dlink_node_free(%struct.node* nocapture %0) {
%2 = tail call i32 @free(%struct.node* %0)
ret void
}
/* Variables and functions */
scalar_t__ PAIR_NUMBER(unsigned int);
short wrap_PAIR_NUMBER(unsigned int n) { return (short)(PAIR_NUMBER(n)); }


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

x86 assembly (clang, -O2):
<wrap_PAIR_NUMBER>:
push   %rax
call   1030 <PAIR_NUMBER@plt>
pop    %rcx
ret

LLVM IR (-O0):
define signext i16 @wrap_PAIR_NUMBER(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @PAIR_NUMBER(i32 %3)
%5 = trunc i64 %4 to i16
ret i16 %5
}

LLVM IR (-O2):
define signext i16 @wrap_PAIR_NUMBER(i32 %0) {
%2 = tail call i64 @PAIR_NUMBER(i32 %0)
%3 = trunc i64 %2 to i16
ret i16 %3
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ cleanup();
void sigint_handler(int signum) {
  cleanup();
  _exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<sigint_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <cleanup@plt>
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<sigint_handler>:
push   %rax
xor    %eax,%eax
call   1040 <cleanup@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define void @sigint_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @cleanup()
%4 = load i32, i32* @EXIT_SUCCESS
%5 = call i32 @_exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define void @sigint_handler(i32 %0) {
%2 = tail call i32 (...) @cleanup()
%3 = load i32, i32* @EXIT_SUCCESS
%4 = tail call i32 @_exit(i32 %3)
unreachable
}
char *str_pop(char **str) {
  char *res = *str;
  char *cp = res;
  while (*cp) {
    if (((*cp == ' ') || (*cp == '\t'))) {
      *str = cp;
      return res;
    }
    cp++;
  }
  *str = cp;
  return res;
}


x86 assembly (clang, -O0):
<str_pop>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpb   $0x0,(%rax)
je     1171 <str_pop+0x71>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     1148 <str_pop+0x48>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
jne    1160 <str_pop+0x60>
mov    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1184 <str_pop+0x84>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    111b <str_pop+0x1b>
mov    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_pop>:
mov    (%rdi),%rax
movabs $0x100000201,%rdx
mov    %rax,%rcx
jmp    1124 <str_pop+0x24>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%rcx
movzbl (%rcx),%esi
cmp    $0x20,%rsi
ja     1120 <str_pop+0x20>
bt     %rsi,%rdx
jae    1120 <str_pop+0x20>
mov    %rcx,(%rdi)
ret

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

LLVM IR (-O2):
define i8* @str_pop(i8** nocapture %0) {
%2 = load i8*, i8** %0
br label %3
3: ; preds = %6, %1
%4 = phi i8* [ %2, %1 ], [ %7, %6 ]
%5 = load i8, i8* %4
switch i8 %5, label %6 [
i8 0, label %8
i8 32, label %8
i8 9, label %8
]
6: ; preds = %3
%7 = getelementptr inbounds i8, i8* %4, i64 1
br label %3
8: ; preds = %3, %3, %3
store i8* %4, i8** %0
ret i8* %2
}
unsigned int plus2(unsigned int a, unsigned int b) {
  while (b > 0) {
    a += 1;
    b -= 1;
  }
  return a;
}


x86 assembly (clang, -O0):
<plus2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jbe    112b <plus2+0x2b>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110a <plus2+0xa>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<plus2>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @plus2(i32 %0, i32 %1) {
%3 = add i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *cmd) {
  printf("usage: %s <filename> {sha1|md5}\n", cmd);
}


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"usage: %s <filename> {sha1|md5}\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"usage: %s <filename> {sha1|md5}\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int pioneer_send_string(unsigned char *, int);
int pioneer_send_command0(char cmd) {
  char buf[256];
  buf[0] = cmd;
  return pioneer_send_string((unsigned char *)buf, 1);
}


x86 assembly (clang, -O0):
<pioneer_send_command0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x110(%rbp)
lea    -0x110(%rbp),%rdi
mov    $0x1,%esi
call   1030 <pioneer_send_string@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pioneer_send_command0>:
sub    $0x108,%rsp
mov    %dil,(%rsp)
mov    %rsp,%rdi
mov    $0x1,%esi
call   1030 <pioneer_send_string@plt>
add    $0x108,%rsp
ret

LLVM IR (-O0):
define i32 @pioneer_send_command0(i8 signext %0) {
%2 = alloca i8
%3 = alloca [256 x i8]
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
store i8 %4, i8* %5
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%7 = call i32 @pioneer_send_string(i8* %6, i32 1)
ret i32 %7
}

LLVM IR (-O2):
define i32 @pioneer_send_command0(i8 signext %0) {
%2 = alloca [256 x i8]
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
store i8 %0, i8* %3
%4 = call i32 @pioneer_send_string(i8* %3, i32 1)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ XEvent;
typedef int /*<<< orphan*/ Widget;
typedef int /*<<< orphan*/ String;
typedef int /*<<< orphan*/ Cardinal;

/* Variables and functions */
int /*<<< orphan*/ EraseToEndOfLine(int /*<<< orphan*/, int /*<<< orphan*/ *,
                                    int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ MoveToBegining(int /*<<< orphan*/, int /*<<< orphan*/ *,
                                  int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void EraseLine(Widget ctxw, XEvent *event, String *params,
               Cardinal *num_params) {
  MoveToBegining(ctxw, event, params, num_params);
  EraseToEndOfLine(ctxw, event, params, num_params);
}


x86 assembly (clang, -O0):
<EraseLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <MoveToBegining@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1040 <EraseToEndOfLine@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EraseLine>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
mov    %edi,%ebp
call   1030 <MoveToBegining@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <EraseToEndOfLine@plt>

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

LLVM IR (-O2):
define void @EraseLine(i32 %0, i32* %1, i32* %2, i32* %3) {
%5 = tail call i32 @MoveToBegining(i32 %0, i32* %1, i32* %2, i32* %3)
%6 = tail call i32 @EraseToEndOfLine(i32 %0, i32* %1, i32* %2, i32* %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ read_le32(int /*<<< orphan*/ const *);
uint32_t read_at_le32(const void *src, size_t offset) {
  const uint8_t *s = src;
  s += offset;
  return read_le32(s);
}


x86 assembly (clang, -O0):
<read_at_le32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x2,%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <read_le32@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_at_le32>:
lea    (%rdi,%rsi,4),%rdi
jmp    1030 <read_le32@plt>

LLVM IR (-O0):
define i32 @read_at_le32(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i64, i64* %4
%9 = load i32*, i32** %5
%10 = getelementptr inbounds i32, i32* %9, i64 %8
store i32* %10, i32** %5
%11 = load i32*, i32** %5
%12 = call i32 @read_le32(i32* %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @read_at_le32(i8* %0, i64 %1) {
%3 = bitcast i8* %0 to i32*
%4 = getelementptr inbounds i32, i32* %3, i64 %1
%5 = tail call i32 @read_le32(i32* %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_context_is_pending() {
  printf("NOT IMPLEMENTED:"
         "pa_context_is_pending"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [39 x i8] c"NOT IMPLEMENTED:pa_context_is_pending\0A\00"
define i32 @pa_context_is_pending() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [38 x i8] c"NOT IMPLEMENTED:pa_context_is_pending\00"
define i32 @pa_context_is_pending() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ glColor3ui(unsigned int, unsigned int, unsigned int);
void Color3ui(unsigned int r, unsigned int g, unsigned int b) {
  glColor3ui(r, g, b);
}


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

x86 assembly (clang, -O2):
<Color3ui>:
jmp    1030 <glColor3ui@plt>

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

LLVM IR (-O2):
define void @Color3ui(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @glColor3ui(i32 %0, i32 %1, i32 %2)
ret void
}
gcd(int a, int b) {
  while ((a %= b) && (b %= a))
    ;
  return a + b;
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
xor    %eax,%eax
cmp    $0x0,%edx
mov    %al,-0x9(%rbp)
je     1139 <gcd+0x39>
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%eax
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
cmp    $0x0,%edx
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1149 <gcd+0x49>
jmp    114e <gcd+0x4e>
jmp    110a <gcd+0xa>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%edi
test   %edx,%edx
je     1118 <gcd+0x18>
mov    %esi,%eax
cltd
idiv   %edi
mov    %edx,%esi
test   %edx,%edx
jne    1100 <gcd>
xor    %esi,%esi
add    %edi,%esi
mov    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
br label %3
3: ; preds = %8, %2
%4 = phi i32 [ %0, %2 ], [ %6, %8 ]
%5 = phi i32 [ %1, %2 ], [ %9, %8 ]
%6 = srem i32 %4, %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %3
%9 = srem i32 %5, %6
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %3
11: ; preds = %3, %8
%12 = phi i32 [ %5, %3 ], [ 0, %8 ]
%13 = add nsw i32 %12, %6
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void displayErrorAndExit(char *message) {
  printf("Error: %s\n", message);
  exit(0);
}


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"Error: %s\0A\00"
define void @displayErrorAndExit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [11 x i8] c"Error: %s\0A\00"
define void @displayErrorAndExit(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int GPTLstart(char const *);
int GPTLstop(char const *);
int GPTLbarrier(int comm, const char *name) {
  int ret;
  static const char *thisfunc = "GPTLbarrier";
  ret = GPTLstart(name);
  ret = GPTLstop(name);
  return 0;
}


x86 assembly (clang, -O0):
<GPTLbarrier>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <GPTLstart@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <GPTLstop@plt>
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPTLbarrier>:
push   %rbx
mov    %rsi,%rbx
mov    %rsi,%rdi
call   1040 <GPTLstart@plt>
mov    %rbx,%rdi
call   1030 <GPTLstop@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@GPTLbarrier.thisfunc = internal global i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i32 0, i32 0)
@.str = [12 x i8] c"GPTLbarrier\00"
define i32 @GPTLbarrier(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i32 @GPTLstart(i8* %6)
store i32 %7, i32* %5
%8 = load i8*, i8** %4
%9 = call i32 @GPTLstop(i8* %8)
store i32 %9, i32* %5
ret i32 0
}

LLVM IR (-O2):
define i32 @GPTLbarrier(i32 %0, i8* %1) {
%3 = tail call i32 @GPTLstart(i8* %1)
%4 = tail call i32 @GPTLstop(i8* %1)
ret i32 0
}
void rop3_180_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = ~*D;
  stk2 = S & stk3;
  stk1 = T ^ stk2;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_180_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
xor    $0xffffffff,%eax
mov    %al,-0xd(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_180_0_1>:
mov    (%rdi),%r8b
mov    %r8d,%ecx
not    %cl
and    %sil,%cl
mov    %edx,%eax
not    %al
and    %cl,%al
xor    %dl,%cl
and    %sil,%cl
not    %sil
and    %dl,%sil
and    %r8b,%sil
or     %al,%sil
or     %cl,%sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_180_0_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8*, i8** %4
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = xor i32 %12, -1
%14 = trunc i32 %13 to i8
store i8 %14, i8* %9
%15 = load i8, i8* %5
%16 = zext i8 %15 to i32
%17 = load i8, i8* %9
%18 = zext i8 %17 to i32
%19 = and i32 %16, %18
%20 = trunc i32 %19 to i8
store i8 %20, i8* %8
%21 = load i8, i8* %6
%22 = zext i8 %21 to i32
%23 = load i8, i8* %8
%24 = zext i8 %23 to i32
%25 = xor i32 %22, %24
%26 = trunc i32 %25 to i8
store i8 %26, i8* %7
%27 = load i8, i8* %7
%28 = zext i8 %27 to i32
%29 = load i8, i8* %5
%30 = zext i8 %29 to i32
%31 = and i32 %28, %30
%32 = load i8, i8* %7
%33 = zext i8 %32 to i32
%34 = load i8, i8* %6
%35 = zext i8 %34 to i32
%36 = xor i32 %35, -1
%37 = and i32 %33, %36
%38 = or i32 %31, %37
%39 = load i8, i8* %6
%40 = zext i8 %39 to i32
%41 = load i8, i8* %5
%42 = zext i8 %41 to i32
%43 = xor i32 %42, -1
%44 = and i32 %40, %43
%45 = load i8*, i8** %4
%46 = load i8, i8* %45
%47 = zext i8 %46 to i32
%48 = and i32 %44, %47
%49 = or i32 %38, %48
%50 = trunc i32 %49 to i8
%51 = load i8*, i8** %4
store i8 %50, i8* %51
ret void
}

LLVM IR (-O2):
define void @rop3_180_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, -1
%6 = and i8 %5, %1
%7 = xor i8 %6, %2
%8 = and i8 %7, %1
%9 = xor i8 %2, -1
%10 = and i8 %6, %9
%11 = xor i8 %1, -1
%12 = and i8 %11, %2
%13 = and i8 %12, %4
%14 = or i8 %10, %13
%15 = or i8 %14, %8
store i8 %15, i8* %0
ret void
}
char hexcode(char x) {
  if (x >= '0' && x <= '9')
    return (x - 0x30);
  else if (x >= 'a' && x <= 'f')
    return (x - 0x57);
  else
    return x;
}


x86 assembly (clang, -O0):
<hexcode>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x30,%eax
jl     1133 <hexcode+0x33>
movsbl -0x2(%rbp),%eax
cmp    $0x39,%eax
jg     1133 <hexcode+0x33>
movsbl -0x2(%rbp),%eax
sub    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    1162 <hexcode+0x62>
movsbl -0x2(%rbp),%eax
cmp    $0x61,%eax
jl     115c <hexcode+0x5c>
movsbl -0x2(%rbp),%eax
cmp    $0x66,%eax
jg     115c <hexcode+0x5c>
movsbl -0x2(%rbp),%eax
sub    $0x57,%eax
mov    %al,-0x1(%rbp)
jmp    1162 <hexcode+0x62>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexcode>:
lea    -0x30(%rdi),%eax
lea    -0x61(%rdi),%ecx
lea    -0x57(%rdi),%edx
cmp    $0x6,%cl
movzbl %dl,%ecx
cmovae %edi,%ecx
cmp    $0xa,%al
movzbl %al,%eax
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @hexcode(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %16
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 48
%15 = trunc i32 %14 to i8
store i8 %15, i8* %2
br label %31
16: ; preds = %7, %1
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = icmp sge i32 %18, 97
br i1 %19, label %20, label %29
20: ; preds = %16
%21 = load i8, i8* %3
%22 = sext i8 %21 to i32
%23 = icmp sle i32 %22, 102
br i1 %23, label %24, label %29
24: ; preds = %20
%25 = load i8, i8* %3
%26 = sext i8 %25 to i32
%27 = sub nsw i32 %26, 87
%28 = trunc i32 %27 to i8
store i8 %28, i8* %2
br label %31
29: ; preds = %20, %16
%30 = load i8, i8* %3
store i8 %30, i8* %2
br label %31
31: ; preds = %29, %24, %11
%32 = load i8, i8* %2
ret i8 %32
}

LLVM IR (-O2):
define signext i8 @hexcode(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = add i8 %0, -97
%5 = icmp ult i8 %4, 6
%6 = add i8 %0, -87
%7 = select i1 %5, i8 %6, i8 %0
%8 = select i1 %3, i8 %2, i8 %7
ret i8 %8
}
void __attribute__((stdcall)) AIL_mem_free_lock(void *ptr) {}


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

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

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

LLVM IR (-O2):
define void @AIL_mem_free_lock(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ syscall_cp(int, int, void *, size_t, long, int);
ssize_t msgrcv(int q, void *m, size_t len, long type, int flag) {
  return syscall_cp(302, q, m, len, type, flag);
}


x86 assembly (clang, -O0):
<msgrcv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x24(%rbp),%r9d
mov    $0x12e,%edi
call   1030 <syscall_cp@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msgrcv>:
mov    %r8d,%r9d
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x12e,%edi
jmp    1030 <syscall_cp@plt>

LLVM IR (-O0):
define i32 @msgrcv(i32 %0, i8* %1, i64 %2, i64 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i32
store i32 %0, i32* %6
store i8* %1, i8** %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load i8*, i8** %7
%13 = load i64, i64* %8
%14 = load i64, i64* %9
%15 = load i32, i32* %10
%16 = call i32 @syscall_cp(i32 302, i32 %11, i8* %12, i64 %13, i64 %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @msgrcv(i32 %0, i8* %1, i64 %2, i64 %3, i32 %4) {
%6 = tail call i32 @syscall_cp(i32 302, i32 %0, i8* %1, i64 %2, i64 %3, i32 %4)
ret i32 %6
}
void answer_easy(void) {}


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

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

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

LLVM IR (-O2):
define void @answer_easy() {
ret void
}
void fd14(int n) {
p0A:
  goto p0A;
  goto a;
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  P02A:
    goto P02A;
    {
      typedef int(*g)[n];
    P024A:
      goto P024A;
      0;
    };
  P02B:
    goto P02B;
    {
      typedef int(*h)[n];
    P025A:
      goto P025A;
      0;
    };
  P02C:
    goto P02C;
    ;
    typedef int(*i)[n];
  P026A:
    goto P026A;
    0;
  };
a:;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd14>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd14+0x7>

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

LLVM IR (-O0):
define void @fd14(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; preds = %4
br label %4
5: ; No predecessors!
%6 = load i32, i32* %2
%7 = zext i32 %6 to i64
br label %8
8: ; preds = %8, %5
br label %8
9: ; No predecessors!
%10 = load i32, i32* %2
%11 = zext i32 %10 to i64
br label %12
12: ; preds = %12, %9
br label %12
13: ; preds = %13
br label %13
14: ; No predecessors!
%15 = load i32, i32* %2
%16 = zext i32 %15 to i64
br label %17
17: ; preds = %17, %14
br label %17
18: ; preds = %18
br label %18
19: ; No predecessors!
%20 = load i32, i32* %2
%21 = zext i32 %20 to i64
br label %22
22: ; preds = %22, %19
br label %22
23: ; preds = %23
br label %23
24: ; No predecessors!
%25 = load i32, i32* %2
%26 = zext i32 %25 to i64
br label %27
27: ; preds = %27, %24
br label %27
28: ; No predecessors!
%29 = load i32, i32* %2
%30 = zext i32 %29 to i64
br label %31
31: ; preds = %31, %28
br label %31
32: ; preds = %32
br label %32
33: ; No predecessors!
%34 = load i32, i32* %2
%35 = zext i32 %34 to i64
br label %36
36: ; preds = %36, %33
br label %36
37: ; preds = %37
br label %37
38: ; No predecessors!
%39 = load i32, i32* %2
%40 = zext i32 %39 to i64
br label %41
41: ; preds = %41, %38
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd14(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
unsigned calc_tnum(unsigned num) { return (num * (num + 1) / 2); }


x86 assembly (clang, -O0):
<calc_tnum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
shr    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_tnum>:
lea    0x1(%rdi),%eax
imul   %edi,%eax
shr    %eax
ret

LLVM IR (-O0):
define i32 @calc_tnum(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = add i32 %4, 1
%6 = mul i32 %3, %5
%7 = udiv i32 %6, 2
ret i32 %7
}

LLVM IR (-O2):
define i32 @calc_tnum(i32 %0) {
%2 = add i32 %0, 1
%3 = mul i32 %2, %0
%4 = lshr i32 %3, 1
ret i32 %4
}
/* Type definitions */
struct inode {
  int dummy;
};
struct buffer_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ brelse(struct buffer_head *);
struct buffer_head *ext2_update_inode(struct inode *);
void ext2_write_inode(struct inode *inode) {
  struct buffer_head *bh;
  bh = ext2_update_inode(inode);
  brelse(bh);
}


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

x86 assembly (clang, -O2):
<ext2_write_inode>:
push   %rax
call   1030 <ext2_update_inode@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <brelse@plt>

LLVM IR (-O0):
%struct.inode = type { i32 }
%struct.buffer_head = type { i32 }
define void @ext2_write_inode(%struct.inode* %0) {
%2 = alloca %struct.inode*
%3 = alloca %struct.buffer_head*
store %struct.inode* %0, %struct.inode** %2
%4 = load %struct.inode*, %struct.inode** %2
%5 = call %struct.buffer_head* @ext2_update_inode(%struct.inode* %4)
store %struct.buffer_head* %5, %struct.buffer_head** %3
%6 = load %struct.buffer_head*, %struct.buffer_head** %3
%7 = call i32 @brelse(%struct.buffer_head* %6)
ret void
}

LLVM IR (-O2):
%struct.inode = type { i32 }
%struct.buffer_head = type { i32 }
define void @ext2_write_inode(%struct.inode* %0) {
%2 = tail call %struct.buffer_head* @ext2_update_inode(%struct.inode* %0)
%3 = tail call i32 @brelse(%struct.buffer_head* %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ ULLONG_MAX;
unsigned long long wcstox(int /*<<< orphan*/ const *, int /*<<< orphan*/ **,
                          int, int /*<<< orphan*/);
unsigned long long wcstoull(const wchar_t *restrict s, wchar_t **restrict p,
                            int base) {
  return wcstox(s, p, base, ULLONG_MAX);
}


x86 assembly (clang, -O0):
<wcstoull>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    0x2eb3(%rip),%rax
mov    (%rax),%ecx
call   1030 <wcstox@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcstoull>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%ecx
jmp    1030 <wcstox@plt>

LLVM IR (-O0):
@ULLONG_MAX = global i32 0
define i64 @wcstoull(i32* noalias %0, i32** noalias %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32**
%6 = alloca i32
store i32* %0, i32** %4
store i32** %1, i32*** %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i32**, i32*** %5
%9 = load i32, i32* %6
%10 = load i32, i32* @ULLONG_MAX
%11 = call i64 @wcstox(i32* %7, i32** %8, i32 %9, i32 %10)
ret i64 %11
}

LLVM IR (-O2):
@ULLONG_MAX = global i32 0
define i64 @wcstoull(i32* noalias %0, i32** noalias %1, i32 %2) {
%4 = load i32, i32* @ULLONG_MAX
%5 = tail call i64 @wcstox(i32* %0, i32** %1, i32 %2, i32 %4)
ret i64 %5
}
void rec2(int *p, int x) {
  int i = 0;
  if (x == 0) {
    rec2(p, 1);
    *p = i;
  } else {
    *p = 9;
    i = 0;
  }
}


x86 assembly (clang, -O0):
<rec2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    114c <rec2+0x3c>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <rec2@plt>
mov    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
jmp    115d <rec2+0x4d>
mov    -0x8(%rbp),%rax
movl   $0x9,(%rax)
movl   $0x0,-0x10(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rec2>:
xor    %eax,%eax
test   %esi,%esi
setne  %al
lea    (%rax,%rax,8),%eax
mov    %eax,(%rdi)
ret

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

LLVM IR (-O2):
define void @rec2(i32* nocapture writeonly %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = select i1 %3, i32 0, i32 9
store i32 %4, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ write(int /*<<< orphan*/, char *, int);
void pipe_sign_handler(int a) {
  write(0, "\n Problema con pipeline.\n ",
        sizeof("\n Problema con pipeline.\n"));
  exit(-1);
}


x86 assembly (clang, -O0):
<pipe_sign_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
lea    0xecc(%rip),%rsi
mov    $0x1a,%edx
call   1030 <write@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<pipe_sign_handler>:
push   %rax
lea    0xed8(%rip),%rsi
xor    %edi,%edi
mov    $0x1a,%edx
call   1030 <write@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"\0A Problema con pipeline.\0A \00"
define void @pipe_sign_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @write(i32 0, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 26)
%4 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [27 x i8] c"\0A Problema con pipeline.\0A \00"
define void @pipe_sign_handler(i32 %0) {
%2 = tail call i32 @write(i32 0, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 26)
%3 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void erreur_taille_monde(int n) {
  printf("n (=%d) ne valide pas n > 1 !\n", n);
}


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"n (=%d) ne valide pas n > 1 !\0A\00"
define void @erreur_taille_monde(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"n (=%d) ne valide pas n > 1 !\0A\00"
define void @erreur_taille_monde(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SEEK_CUR;
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int lseek(int, int, int /*<<< orphan*/);
int fd_len(int fd) {
  int current_pos = lseek(fd, 0, SEEK_CUR);
  int length = lseek(fd, 0, SEEK_END);
  lseek(fd, current_pos, SEEK_SET);
  return length;
}


x86 assembly (clang, -O0):
<fd_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1030 <lseek@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ead(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1030 <lseek@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    0x2e7c(%rip),%rax
mov    (%rax),%edx
call   1030 <lseek@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fd_len>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
mov    0x2ec3(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1030 <lseek@plt>
mov    %eax,%r14d
mov    0x2eb8(%rip),%rax
mov    (%rax),%edx
mov    %ebx,%edi
xor    %esi,%esi
call   1030 <lseek@plt>
mov    %eax,%ebp
mov    0x2e8c(%rip),%rax
mov    (%rax),%edx
mov    %ebx,%edi
mov    %r14d,%esi
call   1030 <lseek@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@SEEK_CUR = global i32 0
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i32 @fd_len(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = load i32, i32* @SEEK_CUR
%7 = call i32 @lseek(i32 %5, i32 0, i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = load i32, i32* @SEEK_END
%10 = call i32 @lseek(i32 %8, i32 0, i32 %9)
store i32 %10, i32* %4
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = load i32, i32* @SEEK_SET
%14 = call i32 @lseek(i32 %11, i32 %12, i32 %13)
%15 = load i32, i32* %4
ret i32 %15
}

LLVM IR (-O2):
@SEEK_CUR = global i32 0
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i32 @fd_len(i32 %0) {
%2 = load i32, i32* @SEEK_CUR
%3 = tail call i32 @lseek(i32 %0, i32 0, i32 %2)
%4 = load i32, i32* @SEEK_END
%5 = tail call i32 @lseek(i32 %0, i32 0, i32 %4)
%6 = load i32, i32* @SEEK_SET
%7 = tail call i32 @lseek(i32 %0, i32 %3, i32 %6)
ret i32 %5
}
/* Variables and functions */
void *bs_write_backupfile(void *arg) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @bs_write_backupfile(i8* nocapture readnone %0) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ CMP2_DriverIRQHandler();
__attribute__((weak)) void CMP2_IRQHandler(void) { CMP2_DriverIRQHandler(); }


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

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

LLVM IR (-O0):
define weak void @CMP2_IRQHandler() {
%1 = call i32 (...) @CMP2_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @CMP2_IRQHandler() {
%1 = tail call i32 (...) @CMP2_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_ppl_memory_size_(int *);
int /*<<< orphan*/ reallo_ppl_memory(int *);
void reallo_envelope_(int *plot_mem_used) {
  int pmemsize;
  get_ppl_memory_size_(&pmemsize);
  if (*plot_mem_used > pmemsize)
    reallo_ppl_memory(plot_mem_used);
}


x86 assembly (clang, -O0):
<reallo_envelope_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
call   1040 <get_ppl_memory_size_@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
cmp    -0xc(%rbp),%eax
jle    114d <reallo_envelope_+0x2d>
mov    -0x8(%rbp),%rdi
call   1030 <reallo_ppl_memory@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reallo_envelope_>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xc(%rsp),%rdi
call   1040 <get_ppl_memory_size_@plt>
mov    (%rbx),%eax
cmp    0xc(%rsp),%eax
jle    1142 <reallo_envelope_+0x22>
mov    %rbx,%rdi
call   1030 <reallo_ppl_memory@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define void @reallo_envelope_(i32* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @get_ppl_memory_size_(i32* %2)
%5 = load i32, i32* %0
%6 = load i32, i32* %2
%7 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @reallo_ppl_memory(i32* %0)
br label %10
10: ; preds = %8, %1
ret void
}
void ff_hevc_put_hevc_bi_w_epel_h32_12_sse4() {}


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

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

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

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