#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ putchar(char);
void eigg_print_hyperplanes(double **hyperplanes, long num_hyperplanes,
                            long kmer_len) {
  for (int i = 0; i < num_hyperplanes; ++i) {
    printf("H%d: ", i);
    for (int j = 0; j < kmer_len; ++j) {
      printf("%f ", hyperplanes[i][j]);
    }
    putchar('\n');
  }
  putchar('\n');
}


x86 assembly (clang, -O0):
<eigg_print_hyperplanes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movslq -0x1c(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    11b6 <eigg_print_hyperplanes+0x96>
cvtsi2sdl -0x1c(%rbp),%xmm0
lea    0xeab(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x20(%rbp)
movslq -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    119e <eigg_print_hyperplanes+0x7e>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xe7b(%rip),%rdi
call   1040 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1161 <eigg_print_hyperplanes+0x41>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    113b <eigg_print_hyperplanes+0x1b>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eigg_print_hyperplanes>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %rsi,%rsi
jle    119d <eigg_print_hyperplanes+0x7d>
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebp,%ebp
lea    0xec4(%rip),%r13
jmp    1163 <eigg_print_hyperplanes+0x43>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbp
cmp    %r14,%rbp
je     119d <eigg_print_hyperplanes+0x7d>
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
lea    0xe8f(%rip),%rdi
call   1040 <printf@plt>
test   %rbx,%rbx
jle    1150 <eigg_print_hyperplanes+0x30>
xor    %r12d,%r12d
xchg   %ax,%ax
mov    (%r15,%rbp,8),%rax
movsd  (%rax,%r12,8),%xmm0
mov    %r13,%rdi
call   1040 <printf@plt>
add    $0x1,%r12
cmp    %r12,%rbx
jne    1180 <eigg_print_hyperplanes+0x60>
jmp    1150 <eigg_print_hyperplanes+0x30>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"H%d: \00"
@.str.1 = [4 x i8] c"%f \00"
define void @eigg_print_hyperplanes(double** %0, i64 %1, i64 %2) {
%4 = alloca double**
%5 = alloca i64
%6 = alloca i64
%7 = alloca i32
%8 = alloca i32
store double** %0, double*** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
store i32 0, i32* %7
br label %9
9: ; preds = %39, %3
%10 = load i32, i32* %7
%11 = sext i32 %10 to i64
%12 = load i64, i64* %5
%13 = icmp slt i64 %11, %12
br i1 %13, label %14, label %42
14: ; preds = %9
%15 = load i32, i32* %7
%16 = sitofp i32 %15 to double
%17 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %16)
store i32 0, i32* %8
br label %18
18: ; preds = %34, %14
%19 = load i32, i32* %8
%20 = sext i32 %19 to i64
%21 = load i64, i64* %6
%22 = icmp slt i64 %20, %21
br i1 %22, label %23, label %37
23: ; preds = %18
%24 = load double**, double*** %4
%25 = load i32, i32* %7
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds double*, double** %24, i64 %26
%28 = load double*, double** %27
%29 = load i32, i32* %8
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds double, double* %28, i64 %30
%32 = load double, double* %31
%33 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %32)
br label %34
34: ; preds = %23
%35 = load i32, i32* %8
%36 = add nsw i32 %35, 1
store i32 %36, i32* %8
br label %18
37: ; preds = %18
%38 = call i32 @putchar(i8 signext 10)
br label %39
39: ; preds = %37
%40 = load i32, i32* %7
%41 = add nsw i32 %40, 1
store i32 %41, i32* %7
br label %9
42: ; preds = %9
%43 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"H%d: \00"
@.str.1 = [4 x i8] c"%f \00"
define void @eigg_print_hyperplanes(double** nocapture %0, i64 %1, i64 %2) {
%4 = icmp sgt i64 %1, 0
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = icmp sgt i64 %2, 0
br label %9
7: ; preds = %16, %3
%8 = tail call i32 @putchar(i8 signext 10)
ret void
9: ; preds = %5, %16
%10 = phi i64 [ 0, %5 ], [ %18, %16 ]
%11 = trunc i64 %10 to i32
%12 = sitofp i32 %11 to double
%13 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %12)
br i1 %6, label %14, label %16
14: ; preds = %9
%15 = getelementptr inbounds double*, double** %0, i64 %10
br label %20
16: ; preds = %20, %9
%17 = tail call i32 @putchar(i8 signext 10)
%18 = add nuw nsw i64 %10, 1
%19 = icmp eq i64 %18, %1
br i1 %19, label %7, label %9
20: ; preds = %14, %20
%21 = phi i64 [ 0, %14 ], [ %26, %20 ]
%22 = load double*, double** %15
%23 = getelementptr inbounds double, double* %22, i64 %21
%24 = load double, double* %23
%25 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %24)
%26 = add nuw nsw i64 %21, 1
%27 = icmp eq i64 %26, %2
br i1 %27, label %16, label %20
}