#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
void print_block_details(FILE *block_file_pointer, int start_coordinate,
                         int end_coordinate, int number_of_snps,
                         char *current_node_id, char *parent_node_id,
                         char *taxon_names, int number_of_child_nodes,
                         double neg_log_likelihood) {
  fprintf(block_file_pointer, "FT   misc_feature    %d..%d\n", start_coordinate,
          end_coordinate);
  fprintf(block_file_pointer, "FT                   /node=\"%s->%s\"\n",
          parent_node_id, current_node_id);
  fprintf(block_file_pointer,
          "FT                   /neg_log_likelihood=\"%f\"\n",
          neg_log_likelihood);
  if (number_of_child_nodes > 0) {
    fprintf(block_file_pointer, "FT                   /colour=\"2\"\n");
  } else {
    fprintf(block_file_pointer, "FT                   /colour=\"4\"\n");
  }
  fprintf(block_file_pointer, "FT                   /taxa=\"%s\"\n",
          taxon_names);
  fprintf(block_file_pointer, "FT                   /SNP_count=\"%d\"\n",
          number_of_snps);
  fflush(block_file_pointer);
}


x86 assembly (clang, -O0):
<print_block_details>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xea6(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xea9(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
movsd  -0x30(%rbp),%xmm0
lea    0xeb7(%rip),%rsi
mov    $0x1,%al
call   1030 <fprintf@plt>
cmpl   $0x0,0x18(%rbp)
jle    11b3 <print_block_details+0x93>
mov    -0x8(%rbp),%rdi
lea    0xeca(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    11c5 <print_block_details+0xa5>
mov    -0x8(%rbp),%rdi
lea    0xed5(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    0x10(%rbp),%rdx
lea    0xee1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xeed(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <fflush@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_block_details>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mov    %r9,%rbp
mov    %r8,%r12
mov    %ecx,%r14d
mov    %edx,%ecx
mov    %esi,%edx
mov    %rdi,%rbx
mov    0x40(%rsp),%r15
lea    0xea2(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    0xeb1(%rip),%rsi
mov    %rbx,%rdi
mov    %rbp,%rdx
mov    %r12,%rcx
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    0xebf(%rip),%rsi
mov    %rbx,%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1030 <fprintf@plt>
cmpl   $0x0,0x48(%rsp)
lea    0xed2(%rip),%rax
lea    0xeed(%rip),%rdi
cmovg  %rax,%rdi
mov    $0x21,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xef2(%rip),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    0xeff(%rip),%rsi
mov    %rbx,%rdi
mov    %r14d,%edx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    %rbx,%rdi
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"FT misc_feature %d..%d\0A\00"
@.str.1 = [37 x i8] c"FT /node=\22%s->%s\22\0A\00"
@.str.2 = [47 x i8] c"FT /neg_log_likelihood=\22%f\22\0A\00"
@.str.3 = [34 x i8] c"FT /colour=\222\22\0A\00"
@.str.4 = [34 x i8] c"FT /colour=\224\22\0A\00"
@.str.5 = [33 x i8] c"FT /taxa=\22%s\22\0A\00"
@.str.6 = [38 x i8] c"FT /SNP_count=\22%d\22\0A\00"
define void @print_block_details(i32* %0, i32 %1, i32 %2, i32 %3, i8* %4, i8* %5, i8* %6, i32 %7, double %8) {
%10 = alloca i32*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i32
%18 = alloca double
store i32* %0, i32** %10
store i32 %1, i32* %11
store i32 %2, i32* %12
store i32 %3, i32* %13
store i8* %4, i8** %14
store i8* %5, i8** %15
store i8* %6, i8** %16
store i32 %7, i32* %17
store double %8, double* %18
%19 = load i32*, i32** %10
%20 = load i32, i32* %11
%21 = load i32, i32* %12
%22 = call i32 (i32*, i8*, ...) @fprintf(i32* %19, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %20, i32 %21)
%23 = load i32*, i32** %10
%24 = load i8*, i8** %15
%25 = load i8*, i8** %14
%26 = call i32 (i32*, i8*, ...) @fprintf(i32* %23, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i8* %24, i8* %25)
%27 = load i32*, i32** %10
%28 = load double, double* %18
%29 = call i32 (i32*, i8*, ...) @fprintf(i32* %27, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), double %28)
%30 = load i32, i32* %17
%31 = icmp sgt i32 %30, 0
br i1 %31, label %32, label %35
32: ; preds = %9
%33 = load i32*, i32** %10
%34 = call i32 (i32*, i8*, ...) @fprintf(i32* %33, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0))
br label %38
35: ; preds = %9
%36 = load i32*, i32** %10
%37 = call i32 (i32*, i8*, ...) @fprintf(i32* %36, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
br label %38
38: ; preds = %35, %32
%39 = load i32*, i32** %10
%40 = load i8*, i8** %16
%41 = call i32 (i32*, i8*, ...) @fprintf(i32* %39, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i8* %40)
%42 = load i32*, i32** %10
%43 = load i32, i32* %13
%44 = call i32 (i32*, i8*, ...) @fprintf(i32* %42, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i32 %43)
%45 = load i32*, i32** %10
%46 = call i32 @fflush(i32* %45)
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"FT misc_feature %d..%d\0A\00"
@.str.1 = [37 x i8] c"FT /node=\22%s->%s\22\0A\00"
@.str.2 = [47 x i8] c"FT /neg_log_likelihood=\22%f\22\0A\00"
@.str.3 = [34 x i8] c"FT /colour=\222\22\0A\00"
@.str.4 = [34 x i8] c"FT /colour=\224\22\0A\00"
@.str.5 = [33 x i8] c"FT /taxa=\22%s\22\0A\00"
@.str.6 = [38 x i8] c"FT /SNP_count=\22%d\22\0A\00"
define void @print_block_details(i32* nocapture %0, i32 %1, i32 %2, i32 %3, i8* %4, i8* %5, i8* %6, i32 %7, double %8) {
%10 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
%11 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i8* %5, i8* %4)
%12 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), double %8)
%13 = icmp sgt i32 %7, 0
%14 = select i1 %13, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0)
%15 = tail call i64 @fwrite(i8* %14, i64 33, i64 1, i32* %0)
%16 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i8* %6)
%17 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i32 %3)
%18 = tail call i32 @fflush(i32* %0)
ret void
}