xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ strcpy(char *, char *);
void logMsg(char *msg, int msg_len) {
  char log_str[119];
  strcpy(log_str, "Msg in: ");
  strcpy(&(log_str[8]), msg);
  putchar('6');
  putchar('\n');
  return;
}


x86 assembly (clang, -O0):
<logMsg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x90(%rbp),%rdi
lea    0xec0(%rip),%rsi
call   1040 <strcpy@plt>
lea    -0x90(%rbp),%rdi
add    $0x8,%rdi
mov    -0x8(%rbp),%rsi
call   1040 <strcpy@plt>
mov    $0x36,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logMsg>:
push   %rbx
sub    $0x80,%rsp
mov    %rdi,%rbx
lea    0xece(%rip),%rsi
mov    %rsp,%rdi
call   1040 <strcpy@plt>
lea    0x8(%rsp),%rdi
mov    %rbx,%rsi
call   1040 <strcpy@plt>
mov    $0x36,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"Msg in: \00"
define void @logMsg(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [119 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [119 x i8], [119 x i8]* %5, i64 0, i64 0
%7 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%8 = getelementptr inbounds [119 x i8], [119 x i8]* %5, i64 0, i64 8
%9 = load i8*, i8** %3
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = call i32 @putchar(i8 signext 54)
%12 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"Msg in: \00"
define void @logMsg(i8* %0, i32 %1) {
%3 = alloca [119 x i8]
%4 = getelementptr inbounds [119 x i8], [119 x i8]* %3, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [119 x i8], [119 x i8]* %3, i64 0, i64 8
%7 = call i32 @strcpy(i8* %6, i8* %0)
%8 = call i32 @putchar(i8 signext 54)
%9 = call i32 @putchar(i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HplMcs51GeneralIOC__P13__clr();
void ReverseGPIOP__1__In__clr(void) { HplMcs51GeneralIOC__P13__clr(); }


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

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

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

LLVM IR (-O2):
define void @ReverseGPIOP__1__In__clr() {
%1 = tail call i32 (...) @HplMcs51GeneralIOC__P13__clr()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main() {
  int naughty = 0;
loop:
  puts("Naughty, naughty");
  naughty++;
  if (naughty < 10)
    goto loop;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    114a <main+0x3a>
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [17 x i8] c"Naughty, naughty\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %9, %0
%4 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 1
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 10
br i1 %8, label %9, label %10
9: ; preds = %3
br label %3
10: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Naughty, naughty\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int *calloc(int, int);
int *newperm(int *perm, int ngenes) {
  int i;
  int *newperm = calloc(ngenes, sizeof(int));
  for (i = 0; i < ngenes; i++)
    newperm[i] = perm[i];
  return newperm;
}


x86 assembly (clang, -O0):
<newperm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x4,%esi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1167 <newperm+0x57>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x18(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1137 <newperm+0x27>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newperm>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r14
mov    %esi,%edi
mov    $0x4,%esi
call   1030 <calloc@plt>
mov    %rax,%rbx
test   %ebp,%ebp
jle    114d <newperm+0x2d>
mov    %ebp,%edx
shl    $0x2,%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define noalias i32* @newperm(i32* nocapture %0, i32 %1) {
%3 = tail call i32* @calloc(i32 %1, i32 4)
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = bitcast i32* %3 to i8*
%7 = bitcast i32* %0 to i8*
%8 = zext i32 %1 to i64
%9 = shl nuw nsw i64 %8, 2
br label %10
10: ; preds = %5, %2
ret i32* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void fd(char *optarg) { printf("m: %s\n", optarg); }


x86 assembly (clang, -O0):
<fd>:
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):
<fd>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"m: %s\0A\00"
define void @fd(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void sig_abort(int signum) {
  printf("\e[?47l");
  exit(0);
}


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"\1B[?47l\00"
define void @sig_abort(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [7 x i8] c"\1B[?47l\00"
define void @sig_abort(i32 %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
int pbgzf_min(int x, int y) { return (x < y) ? x : y; }


x86 assembly (clang, -O0):
<pbgzf_min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <pbgzf_min+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <pbgzf_min+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pbgzf_min>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @pbgzf_min(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int ft_indexof(char c, char const *str) {
  int i;
  i = -1;
  while (str[++i])
    if (str[i] == c)
      return (i);
  return (-1);
}


x86 assembly (clang, -O0):
<ft_indexof>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x14(%rbp)
movslq %ecx,%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1157 <ft_indexof+0x57>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
jne    1152 <ft_indexof+0x52>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115e <ft_indexof+0x5e>
jmp    1115 <ft_indexof+0x15>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_indexof>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi),%ecx
test   %cl,%cl
je     1124 <ft_indexof+0x24>
add    $0x1,%eax
add    $0x1,%rsi
cmp    %dil,%cl
jne    1110 <ft_indexof+0x10>
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_indexof(i8 signext %0, i8* nocapture %1) {
br label %3
3: ; preds = %9, %2
%4 = phi i64 [ %5, %9 ], [ -1, %2 ]
%5 = add nsw i64 %4, 1
%6 = getelementptr inbounds i8, i8* %1, i64 %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %3
%10 = icmp eq i8 %7, %0
br i1 %10, label %11, label %3
11: ; preds = %9
%12 = trunc i64 %5 to i32
br label %13
13: ; preds = %3, %11
%14 = phi i32 [ %12, %11 ], [ -1, %3 ]
ret i32 %14
}
/* Variables and functions */
double __ocml_fmin_f64(double, double);
double fmin(double x, double y) { return __ocml_fmin_f64(x, y); }


x86 assembly (clang, -O0):
<fmin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <__ocml_fmin_f64@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmin>:
jmp    1030 <__ocml_fmin_f64@plt>

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

LLVM IR (-O2):
define double @fmin(double %0, double %1) {
%3 = tail call double @__ocml_fmin_f64(double %0, double %1)
ret double %3
}
char *mu_fine_test() {
  do {
    if (!(1))
      return "MinUnit isn't working properly";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<mu_fine_test>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <mu_fine_test+0x9>
jmp    110e <mu_fine_test+0xe>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @mu_fine_test() {
br label %1
1: ; preds = %0
br label %2
2: ; preds = %1
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @mu_fine_test() {
ret i8* null
}
/* Type definitions */
struct comp {
  int dummy;
};
struct BrzNullAdapt_ {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SEND_ACKDOWN(int);
void BrzNullAdapt_reqdown(struct comp *comp, int port) {
  struct BrzNullAdapt_ *c = (struct BrzNullAdapt_ *)comp;
  SEND_ACKDOWN(1);
}


x86 assembly (clang, -O0):
<BrzNullAdapt_reqdown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x1,%edi
call   1030 <SEND_ACKDOWN@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.comp = type { i32 }
%struct.BrzNullAdapt_ = type { i32 }
define void @BrzNullAdapt_reqdown(%struct.comp* %0, i32 %1) {
%3 = alloca %struct.comp*
%4 = alloca i32
%5 = alloca %struct.BrzNullAdapt_*
store %struct.comp* %0, %struct.comp** %3
store i32 %1, i32* %4
%6 = load %struct.comp*, %struct.comp** %3
%7 = bitcast %struct.comp* %6 to %struct.BrzNullAdapt_*
store %struct.BrzNullAdapt_* %7, %struct.BrzNullAdapt_** %5
%8 = call i32 @SEND_ACKDOWN(i32 1)
ret void
}

LLVM IR (-O2):
%struct.comp = type { i32 }
define void @BrzNullAdapt_reqdown(%struct.comp* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @SEND_ACKDOWN(i32 1)
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int solve_by_multprec_homotopy_continuation(int decimals) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc(496, &decimals, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<solve_by_multprec_homotopy_continuation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1f0,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solve_by_multprec_homotopy_continuation>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1f0,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @solve_by_multprec_homotopy_continuation(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %3
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc(i32 496, i32* %2, i32* %6, double* %7)
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @solve_by_multprec_homotopy_continuation(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc(i32 496, i32* %2, i32* undef, double* undef)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_attr_t;

/* Variables and functions */
int pthread_attr_getstacksize(int /*<<< orphan*/ *, size_t *);
int my_pthread_attr_getstacksize(pthread_attr_t const *__attr,
                                 size_t *stack_size) {
  pthread_attr_t *realattr = (pthread_attr_t *)*(int *)__attr;
  return pthread_attr_getstacksize(realattr, stack_size);
}


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

x86 assembly (clang, -O2):
<my_pthread_attr_getstacksize>:
movslq (%rdi),%rdi
jmp    1030 <pthread_attr_getstacksize@plt>

LLVM IR (-O0):
define i32 @my_pthread_attr_getstacksize(i32* %0, i64* %1) {
%3 = alloca i32*
%4 = alloca i64*
%5 = alloca i32*
store i32* %0, i32** %3
store i64* %1, i64** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
store i32* %9, i32** %5
%10 = load i32*, i32** %5
%11 = load i64*, i64** %4
%12 = call i32 @pthread_attr_getstacksize(i32* %10, i64* %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @my_pthread_attr_getstacksize(i32* nocapture %0, i64* %1) {
%3 = load i32, i32* %0
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = tail call i32 @pthread_attr_getstacksize(i32* %5, i64* %1)
ret i32 %6
}
void usewise(int a, int b) { 0x90; }


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

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

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

LLVM IR (-O2):
define void @usewise(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ from_stdin();
int /*<<< orphan*/ to_stdout(char);
void main(void) {
  char c;
  do {
    c = (char)from_stdin();
    if (c != (char)0x04) {
      to_stdout(c);
    }
  } while (c != '%');
  to_stdout('\n');
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <from_stdin@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x4,%eax
je     1158 <main+0x28>
movsbl -0x1(%rbp),%edi
call   1030 <to_stdout@plt>
jmp    115d <main+0x2d>
movsbl -0x1(%rbp),%eax
cmp    $0x25,%eax
jne    1138 <main+0x8>
mov    $0xa,%edi
call   1030 <to_stdout@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <from_stdin@plt>
mov    %rax,%rbx
cmp    $0x4,%bl
je     1140 <main+0x10>
movsbl %bl,%edi
call   1030 <to_stdout@plt>
cmp    $0x25,%bl
jne    1140 <main+0x10>
mov    $0xa,%edi
call   1030 <to_stdout@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i8
br label %2
2: ; preds = %12, %0
%3 = call i64 (...) @from_stdin()
%4 = trunc i64 %3 to i8
store i8 %4, i8* %1
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 4
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i8, i8* %1
%10 = call i32 @to_stdout(i8 signext %9)
br label %11
11: ; preds = %8, %2
br label %12
12: ; preds = %11
%13 = load i8, i8* %1
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, 37
br i1 %15, label %2, label %16
16: ; preds = %12
%17 = call i32 @to_stdout(i8 signext 10)
%18 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @main() {
br label %1
1: ; preds = %8, %0
%2 = tail call i64 (...) @from_stdin()
%3 = trunc i64 %2 to i8
%4 = icmp eq i8 %3, 4
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = tail call i32 @to_stdout(i8 signext %3)
%7 = icmp eq i8 %3, 37
br i1 %7, label %9, label %8
8: ; preds = %5, %1
br label %1
9: ; preds = %5
%10 = tail call i32 @to_stdout(i8 signext 10)
%11 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void jsoo_set() { exit(1); }


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

x86 assembly (clang, -O2):
<jsoo_set>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @jsoo_set() {
%1 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @jsoo_set() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
void break_me(void) {}


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

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

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

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

/* Variables and functions */
struct lms_parser_info *lms_parser_info(char const *);
int /*<<< orphan*/ lms_parser_info_free(struct lms_parser_info *);
int /*<<< orphan*/ print_parser(char const *, struct lms_parser_info *);
int list_parser(void *data, const char *path) {
  struct lms_parser_info *info;
  info = lms_parser_info(path);
  print_parser(path, info);
  lms_parser_info_free(info);
  return 1;
}


x86 assembly (clang, -O0):
<list_parser>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <lms_parser_info@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <print_parser@plt>
mov    -0x18(%rbp),%rdi
call   1030 <lms_parser_info_free@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_parser>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rsi,%rdi
call   1050 <lms_parser_info@plt>
mov    %rax,%r14
mov    %rbx,%rdi
mov    %rax,%rsi
call   1040 <print_parser@plt>
mov    %r14,%rdi
call   1030 <lms_parser_info_free@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.lms_parser_info = type { i32 }
define i32 @list_parser(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca %struct.lms_parser_info*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call %struct.lms_parser_info* @lms_parser_info(i8* %6)
store %struct.lms_parser_info* %7, %struct.lms_parser_info** %5
%8 = load i8*, i8** %4
%9 = load %struct.lms_parser_info*, %struct.lms_parser_info** %5
%10 = call i32 @print_parser(i8* %8, %struct.lms_parser_info* %9)
%11 = load %struct.lms_parser_info*, %struct.lms_parser_info** %5
%12 = call i32 @lms_parser_info_free(%struct.lms_parser_info* %11)
ret i32 1
}

LLVM IR (-O2):
%struct.lms_parser_info = type { i32 }
define i32 @list_parser(i8* nocapture readnone %0, i8* %1) {
%3 = tail call %struct.lms_parser_info* @lms_parser_info(i8* %1)
%4 = tail call i32 @print_parser(i8* %1, %struct.lms_parser_info* %3)
%5 = tail call i32 @lms_parser_info_free(%struct.lms_parser_info* %3)
ret i32 1
}
/* Variables and functions */
int pow(double, double);
int sqrt(int);
double c_norm(double h) { return 1. / (sqrt(2.) * pow(h * h + 1., 0.25)); }


x86 assembly (clang, -O0):
<c_norm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x2,%edi
call   1040 <sqrt@plt>
mov    %eax,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeb0(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xeac(%rip),%xmm1
call   1030 <pow@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm1
movsd  0xe8b(%rip),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_norm>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mov    $0x2,%edi
call   1040 <sqrt@plt>
mov    %eax,%ebx
movsd  0x8(%rsp),%xmm0
mulsd  %xmm0,%xmm0
addsd  0xeb7(%rip),%xmm0
movsd  0xeb7(%rip),%xmm1
call   1030 <pow@plt>
imul   %ebx,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0xe98(%rip),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @c_norm(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 @sqrt(i32 2)
%4 = load double, double* %2
%5 = load double, double* %2
%6 = call double @llvm.fmuladd.f64(double %4, double %5, double 1.000000e+00)
%7 = call i32 @pow(double %6, double 2.500000e-01)
%8 = mul nsw i32 %3, %7
%9 = sitofp i32 %8 to double
%10 = fdiv double 1.000000e+00, %9
ret double %10
}

LLVM IR (-O2):
define double @c_norm(double %0) {
%2 = tail call i32 @sqrt(i32 2)
%3 = tail call double @llvm.fmuladd.f64(double %0, double %0, double 1.000000e+00)
%4 = tail call i32 @pow(double %3, double 2.500000e-01)
%5 = mul nsw i32 %4, %2
%6 = sitofp i32 %5 to double
%7 = fdiv double 1.000000e+00, %6
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ japi_kill();
void j_kill() { japi_kill(); }


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

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

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

LLVM IR (-O2):
define void @j_kill() {
%1 = tail call i32 (...) @japi_kill()
ret void
}
double Mbytes_to_bytes(double Mbytes) { return Mbytes * 1e6; }


x86 assembly (clang, -O0):
<Mbytes_to_bytes>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mbytes_to_bytes>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @Mbytes_to_bytes(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 1.000000e+06
ret double %4
}

LLVM IR (-O2):
define double @Mbytes_to_bytes(double %0) {
%2 = fmul double %0, 1.000000e+06
ret double %2
}
/* Type definitions */
struct undo_move_record {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct undo_move_record *);
struct undo_move_record *undo_pop(struct undo_move_record **);
void undo_free_entire_list(struct undo_move_record **list) {
  struct undo_move_record *to_be_freed;
  while ((to_be_freed = undo_pop(list))) {
    free(to_be_freed);
  }
  *list = (struct undo_move_record *)NULL;
}


x86 assembly (clang, -O0):
<undo_free_entire_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <undo_pop@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1151 <undo_free_entire_list+0x31>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
jmp    112c <undo_free_entire_list+0xc>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<undo_free_entire_list>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
call   1040 <undo_pop@plt>
test   %rax,%rax
je     1147 <undo_free_entire_list+0x27>
mov    %rax,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
jmp    1130 <undo_free_entire_list+0x10>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
%struct.undo_move_record = type { i32 }
define void @undo_free_entire_list(%struct.undo_move_record** %0) {
%2 = alloca %struct.undo_move_record**
%3 = alloca %struct.undo_move_record*
store %struct.undo_move_record** %0, %struct.undo_move_record*** %2
br label %4
4: ; preds = %8, %1
%5 = load %struct.undo_move_record**, %struct.undo_move_record*** %2
%6 = call %struct.undo_move_record* @undo_pop(%struct.undo_move_record** %5)
store %struct.undo_move_record* %6, %struct.undo_move_record** %3
%7 = icmp ne %struct.undo_move_record* %6, null
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = load %struct.undo_move_record*, %struct.undo_move_record** %3
%10 = call i32 @free(%struct.undo_move_record* %9)
br label %4
11: ; preds = %4
%12 = load %struct.undo_move_record**, %struct.undo_move_record*** %2
store %struct.undo_move_record* null, %struct.undo_move_record** %12
ret void
}

LLVM IR (-O2):
%struct.undo_move_record = type { i32 }
define void @undo_free_entire_list(%struct.undo_move_record** %0) {
%2 = tail call %struct.undo_move_record* @undo_pop(%struct.undo_move_record** %0)
%3 = icmp eq %struct.undo_move_record* %2, null
br i1 %3, label %9, label %4
4: ; preds = %1, %4
%5 = phi %struct.undo_move_record* [ %7, %4 ], [ %2, %1 ]
%6 = tail call i32 @free(%struct.undo_move_record* %5)
%7 = tail call %struct.undo_move_record* @undo_pop(%struct.undo_move_record** %0)
%8 = icmp eq %struct.undo_move_record* %7, null
br i1 %8, label %9, label %4
9: ; preds = %4, %1
store %struct.undo_move_record* null, %struct.undo_move_record** %0
ret void
}
void mt_dcm_topck_off(void) {}


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

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

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

LLVM IR (-O2):
define void @mt_dcm_topck_off() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  void copy(char[], char[]);
  char str1[80], str2[80];
  printf("input string:\n");
  scanf("%s", str1);
  copy(str1, str2);
  printf("the vowel leters are:%s", str2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x60(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x60(%rbp),%rdi
lea    -0xb0(%rbp),%rsi
call   1040 <copy@plt>
lea    -0xb0(%rbp),%rsi
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xa8,%rsp
lea    0xec7(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb8(%rip),%rdi
lea    0x50(%rsp),%rbx
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    %rsp,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <copy@plt>
lea    0xe81(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xa8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [15 x i8] c"input string:\0A\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [24 x i8] c"the vowel leters are:%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [80 x i8]
%3 = alloca [80 x i8]
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%8 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [24 x i8] c"the vowel leters are:%s\00"
@str = [14 x i8] c"input string:\00"
define i32 @main() {
%1 = alloca [80 x i8]
%2 = alloca [80 x i8]
%3 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* %4)
ret i32 0
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int spread_bits64(int);
int64_t xyf2nest64(int64_t nside, int ix, int iy, int face_num) {
  return (face_num * nside * nside) + spread_bits64(ix) +
         (spread_bits64(iy) << 1);
}


x86 assembly (clang, -O0):
<xyf2nest64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
imul   -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <spread_bits64@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <spread_bits64@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
shl    $0x1,%ecx
add    %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xyf2nest64>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %edi,%ebp
imul   %edi,%ebp
imul   %ecx,%ebp
mov    %esi,%edi
call   1030 <spread_bits64@plt>
mov    %eax,%ebx
add    %ebp,%ebx
mov    %r14d,%edi
call   1030 <spread_bits64@plt>
lea    (%rbx,%rax,2),%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @xyf2nest64(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* %8
%10 = load i32, i32* %5
%11 = mul nsw i32 %9, %10
%12 = load i32, i32* %5
%13 = mul nsw i32 %11, %12
%14 = load i32, i32* %6
%15 = call i32 @spread_bits64(i32 %14)
%16 = add nsw i32 %13, %15
%17 = load i32, i32* %7
%18 = call i32 @spread_bits64(i32 %17)
%19 = shl i32 %18, 1
%20 = add nsw i32 %16, %19
ret i32 %20
}

LLVM IR (-O2):
define i32 @xyf2nest64(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = mul i32 %0, %0
%6 = mul i32 %5, %3
%7 = tail call i32 @spread_bits64(i32 %1)
%8 = add nsw i32 %7, %6
%9 = tail call i32 @spread_bits64(i32 %2)
%10 = shl i32 %9, 1
%11 = add nsw i32 %8, %10
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ test_decompose_cartesian_vectors();
int /*<<< orphan*/ test_reciprocal_vectors();
int /*<<< orphan*/ test_volume_factors();
int main(void) {
  test_reciprocal_vectors();
  test_decompose_cartesian_vectors();
  test_volume_factors();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_reciprocal_vectors()
%2 = tail call i32 (...) @test_decompose_cartesian_vectors()
%3 = tail call i32 (...) @test_volume_factors()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("cl_ext.h standalone test PASSED.\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [34 x i8] c"cl_ext.h standalone test PASSED.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [33 x i8] c"cl_ext.h standalone test PASSED.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int f(void) {
  int ret;
  { return (ret); }
}


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

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

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

LLVM IR (-O2):
define i32 @f() {
ret i32 undef
}
mandel(double _Complex C) {
  int py;
  C = (__extension__ 1.0iF) * (double)py;
  return cabs(C);
}


x86 assembly (clang, -O0):
<mandel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x8(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm2
xorps  %xmm1,%xmm1
mulsd  %xmm2,%xmm1
movsd  0xeca(%rip),%xmm0
mulsd  %xmm2,%xmm0
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm0,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  %xmm1,-0x28(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1030 <cabs@plt>
cvttsd2si %xmm0,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mandel>:
push   %rax
xorpd  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   1030 <cabs@plt>
cvttsd2si %xmm0,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mandel(double %0, double %1) {
%3 = alloca { double, double }
%4 = alloca i32
%5 = alloca { double, double }
%6 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
store double %0, double* %6
%7 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
store double %1, double* %7
%8 = load i32, i32* %4
%9 = sitofp i32 %8 to double
%10 = fmul double 0.000000e+00, %9
%11 = fmul double 1.000000e+00, %9
%12 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
%13 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
store double %10, double* %12
store double %11, double* %13
%14 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
%15 = load double, double* %14
%16 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
%17 = load double, double* %16
%18 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 0
%19 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 1
store double %15, double* %18
store double %17, double* %19
%20 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 0
%21 = load double, double* %20
%22 = getelementptr inbounds { double, double }, { double, double }* %5, i32 0, i32 1
%23 = load double, double* %22
%24 = call double @cabs(double %21, double %23)
%25 = fptosi double %24 to i32
ret i32 %25
}

LLVM IR (-O2):
define i32 @mandel(double %0, double %1) {
%3 = tail call double @cabs(double 0.000000e+00, double 0.000000e+00)
%4 = fptosi double %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(
      stderr,
      "usage: test_limits [-t (r|n|h|b)] [-a address] [-p port] [-n num]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [67 x i8] c"usage: test_limits [-t (r|n|h|b)] [-a address] [-p port] [-n num]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [67 x i8] c"usage: test_limits [-t (r|n|h|b)] [-a address] [-p port] [-n num]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
scalar_t__ sqrt(float);
float length(float *v) {
  return (float)sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
}


x86 assembly (clang, -O0):
<length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulss  0x4(%rax),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1030 <sqrt@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<length>:
push   %rax
movss  (%rdi),%xmm1
movss  0x4(%rdi),%xmm0
mulss  %xmm0,%xmm0
mulss  %xmm1,%xmm1
addss  %xmm0,%xmm1
movss  0x8(%rdi),%xmm0
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
call   1030 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @length(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = getelementptr inbounds float, float* %3, i64 0
%5 = load float, float* %4
%6 = load float*, float** %2
%7 = getelementptr inbounds float, float* %6, i64 0
%8 = load float, float* %7
%9 = load float*, float** %2
%10 = getelementptr inbounds float, float* %9, i64 1
%11 = load float, float* %10
%12 = load float*, float** %2
%13 = getelementptr inbounds float, float* %12, i64 1
%14 = load float, float* %13
%15 = fmul float %11, %14
%16 = call float @llvm.fmuladd.f32(float %5, float %8, float %15)
%17 = load float*, float** %2
%18 = getelementptr inbounds float, float* %17, i64 2
%19 = load float, float* %18
%20 = load float*, float** %2
%21 = getelementptr inbounds float, float* %20, i64 2
%22 = load float, float* %21
%23 = call float @llvm.fmuladd.f32(float %19, float %22, float %16)
%24 = call i64 @sqrt(float %23)
%25 = sitofp i64 %24 to float
ret float %25
}

LLVM IR (-O2):
define float @length(float* nocapture %0) {
%2 = load float, float* %0
%3 = getelementptr inbounds float, float* %0, i64 1
%4 = load float, float* %3
%5 = fmul float %4, %4
%6 = tail call float @llvm.fmuladd.f32(float %2, float %2, float %5)
%7 = getelementptr inbounds float, float* %0, i64 2
%8 = load float, float* %7
%9 = tail call float @llvm.fmuladd.f32(float %8, float %8, float %6)
%10 = tail call i64 @sqrt(float %9)
%11 = sitofp i64 %10 to float
ret float %11
}
void f90(void) {
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  goto a;
a:
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  0;
}


x86 assembly (clang, -O0):
<f90>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f90() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ devspec_init(int *);
int /*<<< orphan*/ reset_replay_ndx(int);
int main(int argc, char **argv) {
  int fd;
  devspec_init(&fd);
  reset_replay_ndx(fd);
  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
call   1040 <devspec_init@plt>
mov    -0x14(%rbp),%edi
call   1030 <reset_replay_ndx@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%rdi
call   1040 <devspec_init@plt>
mov    0x4(%rsp),%edi
call   1030 <reset_replay_ndx@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @devspec_init(i32* %3)
%6 = load i32, i32* %3
%7 = call i32 @reset_replay_ndx(i32 %6)
ret i32 0
}
int fib(int x) {
  if (x == 1) {
    return 1;
  } else {
    return fib(x - 1) + fib(x - 2);
  }
}


x86 assembly (clang, -O0):
<fib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1131 <fib+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1154 <fib+0x44>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fib@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fib@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fib>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebx
cmp    $0x1,%edi
je     1141 <fib+0x31>
mov    %edi,%ebp
add    $0xffffffff,%ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %ebp,%edi
call   1030 <fib@plt>
add    %eax,%ebx
add    $0xfffffffe,%ebp
jne    1130 <fib+0x20>
add    $0x1,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fib(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i32 @fib(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add nsw i32 %7, %5
%10 = icmp eq i32 %8, 1
br i1 %10, label %11, label %3
11: ; preds = %3
%12 = add i32 %9, 1
br label %13
13: ; preds = %11, %1
%14 = phi i32 [ 1, %1 ], [ %12, %11 ]
ret i32 %14
}