#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 *, ...);
int strlen(char *);
void line_print_cons(char *consensus, char *aln_ref, char *ref_id, int *cov) {
  int len, i;
  len = strlen(consensus);
  printf("Consensus, %s, coverage:\n", ref_id);
  printf("%s\n%s\n", consensus, aln_ref);
  for (i = 0; i < len; i++) {
    printf("%d ", cov[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<line_print_cons>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    11a6 <line_print_cons+0x86>
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1173 <line_print_cons+0x53>
lea    0xe6b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<line_print_cons>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r13
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbp
call   1040 <strlen@plt>
mov    %eax,%r12d
lea    0xeaa(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeb3(%rip),%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
test   %r12d,%r12d
jle    11a8 <line_print_cons+0x78>
mov    %r12d,%ebp
lea    0xe9e(%rip),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x0(%r13,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1190 <line_print_cons+0x60>
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 = [26 x i8] c"Consensus, %s, coverage:\0A\00"
@.str.1 = [7 x i8] c"%s\0A%s\0A\00"
@.str.2 = [4 x i8] c"%d \00"
@.str.3 = [2 x i8] c"\0A\00"
define void @line_print_cons(i8* %0, i8* %1, i8* %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32* %3, i32** %8
%11 = load i8*, i8** %5
%12 = call i32 @strlen(i8* %11)
store i32 %12, i32* %9
%13 = load i8*, i8** %7
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %13)
%15 = load i8*, i8** %5
%16 = load i8*, i8** %6
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %15, i8* %16)
store i32 0, i32* %10
br label %18
18: ; preds = %29, %4
%19 = load i32, i32* %10
%20 = load i32, i32* %9
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %32
22: ; preds = %18
%23 = load i32*, i32** %8
%24 = load i32, i32* %10
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
%27 = load i32, i32* %26
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %27)
br label %29
29: ; preds = %22
%30 = load i32, i32* %10
%31 = add nsw i32 %30, 1
store i32 %31, i32* %10
br label %18
32: ; preds = %18
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"Consensus, %s, coverage:\0A\00"
@.str.1 = [7 x i8] c"%s\0A%s\0A\00"
@.str.2 = [4 x i8] c"%d \00"
define void @line_print_cons(i8* %0, i8* %1, i8* %2, i32* nocapture %3) {
%5 = tail call i32 @strlen(i8* %0)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %2)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %1)
%8 = icmp sgt i32 %5, 0
br i1 %8, label %9, label %18
9: ; preds = %4
%10 = zext i32 %5 to i64
br label %11
11: ; preds = %9, %11
%12 = phi i64 [ 0, %9 ], [ %16, %11 ]
%13 = getelementptr inbounds i32, i32* %3, i64 %12
%14 = load i32, i32* %13
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %14)
%16 = add nuw nsw i64 %12, 1
%17 = icmp eq i64 %16, %10
br i1 %17, label %18, label %11
18: ; preds = %11, %4
%19 = tail call i32 @putchar(i32 10)
ret void
}