#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*/ assert(int);
int count_column(char *);
void test_transpose() {
  {
    char *str = "0 1 2 3 4 5 6 A A G T";
    assert(count_column(str) == 9);
  }
  {
    char *str = "0\t1\t2\t3\t4\t5\t6\tA A\tG T";
    assert(count_column(str) == 9);
  }
  {
    char *str = "0  1  2  3  4 5 6  A A G T";
    assert(count_column(str) == 9);
  }
  {
    char *str = "0\t\t1\t\t2\t\t3\t\t4\t\t5\t\t6\t\tA A\tG T";
    assert(count_column(str) == 9);
  }
}


x86 assembly (clang, -O0):
<test_transpose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <count_column@plt>
cmp    $0x9,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
lea    0xec3(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <count_column@plt>
cmp    $0x9,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
lea    0xeb5(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <count_column@plt>
cmp    $0x9,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
lea    0xeac(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <count_column@plt>
cmp    $0x9,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_transpose>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <count_column@plt>
xor    %edi,%edi
cmp    $0x9,%eax
sete   %dil
call   1030 <assert@plt>
lea    0xed4(%rip),%rdi
call   1040 <count_column@plt>
xor    %edi,%edi
cmp    $0x9,%eax
sete   %dil
call   1030 <assert@plt>
lea    0xed0(%rip),%rdi
call   1040 <count_column@plt>
xor    %edi,%edi
cmp    $0x9,%eax
sete   %dil
call   1030 <assert@plt>
lea    0xed1(%rip),%rdi
call   1040 <count_column@plt>
xor    %edi,%edi
cmp    $0x9,%eax
sete   %dil
pop    %rax
jmp    1030 <assert@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"0 1 2 3 4 5 6 A A G T\00"
@.str.1 = [22 x i8] c"0\091\092\093\094\095\096\09A A\09G T\00"
@.str.2 = [27 x i8] c"0 1 2 3 4 5 6 A A G T\00"
@.str.3 = [29 x i8] c"0\09\091\09\092\09\093\09\094\09\095\09\096\09\09A A\09G T\00"
define void @test_transpose() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8** %1
%5 = load i8*, i8** %1
%6 = call i32 @count_column(i8* %5)
%7 = icmp eq i32 %6, 9
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8** %2
%10 = load i8*, i8** %2
%11 = call i32 @count_column(i8* %10)
%12 = icmp eq i32 %11, 9
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i8** %3
%15 = load i8*, i8** %3
%16 = call i32 @count_column(i8* %15)
%17 = icmp eq i32 %16, 9
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18)
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i8** %4
%20 = load i8*, i8** %4
%21 = call i32 @count_column(i8* %20)
%22 = icmp eq i32 %21, 9
%23 = zext i1 %22 to i32
%24 = call i32 @assert(i32 %23)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"0 1 2 3 4 5 6 A A G T\00"
@.str.1 = [22 x i8] c"0\091\092\093\094\095\096\09A A\09G T\00"
@.str.2 = [27 x i8] c"0 1 2 3 4 5 6 A A G T\00"
@.str.3 = [29 x i8] c"0\09\091\09\092\09\093\09\094\09\095\09\096\09\09A A\09G T\00"
define void @test_transpose() {
%1 = tail call i32 @count_column(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 9
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @count_column(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i32 %5, 9
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i32 @count_column(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%10 = icmp eq i32 %9, 9
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
%13 = tail call i32 @count_column(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
%14 = icmp eq i32 %13, 9
%15 = zext i1 %14 to i32
%16 = tail call i32 @assert(i32 %15)
ret void
}