#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*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdin;
char *strchr(char *, char);
int strlen(char *);
int main() {
  printf("###############################\n");
  printf("##### Transpose Technique #####\n");
  printf("###############################\n");
  char string[100];
  char alphabets[27];
  char ch, *tmp;
  int i, j, index_ch, probes;
  for (i = 0; i < 26; i++)
    alphabets[i] = (char)(i + 97);
  alphabets[26] = ' ';
  printf("\nAlphabets: ");
  for (i = 0; i < 27; i++)
    printf("%c", alphabets[i]);
  printf("\n\n");
  printf("Enter String [max 100 chars]: ");
  fgets(string, 100, stdin);
  tmp = strchr(string, '\n');
  if (tmp != NULL)
    *tmp = '\0';
  probes = 0;
  for (i = 0; i < strlen(string); i++) {
    ch = string[i];
    index_ch = -1;
    for (j = 0; j < 27; j++) {
      if (alphabets[j] == ch) {
        index_ch = j;
        break;
      }
    }
    if (index_ch == -1)
      continue;
    if (index_ch != 0) {
      char T;
      T = alphabets[index_ch];
      alphabets[index_ch] = alphabets[index_ch - 1];
      alphabets[index_ch - 1] = T;
      ;
    }
    probes += index_ch + 1;
  }
  printf("\nAlphabets: ");
  for (i = 0; i < 27; i++)
    printf("%c", alphabets[i]);
  printf("\nProbes   : %d", probes);
  printf("\n\n");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xa4(%rbp)
cmpl   $0x1a,-0xa4(%rbp)
jge    11c0 <main+0x80>
mov    -0xa4(%rbp),%eax
add    $0x61,%eax
mov    %al,%cl
movslq -0xa4(%rbp),%rax
mov    %cl,-0x90(%rbp,%rax,1)
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    1186 <main+0x46>
movb   $0x20,-0x76(%rbp)
lea    0xe77(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xa4(%rbp)
cmpl   $0x1b,-0xa4(%rbp)
jge    121a <main+0xda>
movslq -0xa4(%rbp),%rax
movsbl -0x90(%rbp,%rax,1),%esi
ff
lea    0xe50(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    11dc <main+0x9c>
lea    0xe31(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe26(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x70(%rbp),%rdi
mov    0x2da7(%rip),%rax
mov    (%rax),%edx
mov    $0x64,%esi
call   1060 <fgets@plt>
lea    -0x70(%rbp),%rdi
mov    $0xa,%esi
call   1040 <strchr@plt>
mov    %rax,-0xa0(%rbp)
cmpq   $0x0,-0xa0(%rbp)
je     127a <main+0x13a>
mov    -0xa0(%rbp),%rax
movb   $0x0,(%rax)
movl   $0x0,-0xb0(%rbp)
movl   $0x0,-0xa4(%rbp)
mov    -0xa4(%rbp),%eax
mov    %eax,-0xb8(%rbp)
lea    -0x70(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0xb8(%rbp),%eax
cmp    %ecx,%eax
jge    13c1 <main+0x281>
movslq -0xa4(%rbp),%rax
mov    -0x70(%rbp,%rax,1),%al
mov    %al,-0x91(%rbp)
movl   $0xffffffff,-0xac(%rbp)
ff ff ff
movl   $0x0,-0xa8(%rbp)
cmpl   $0x1b,-0xa8(%rbp)
jge    132d <main+0x1ed>
movslq -0xa8(%rbp),%rax
movsbl -0x90(%rbp,%rax,1),%eax
ff
movsbl -0x91(%rbp),%ecx
cmp    %ecx,%eax
jne    1314 <main+0x1d4>
mov    -0xa8(%rbp),%eax
mov    %eax,-0xac(%rbp)
jmp    132d <main+0x1ed>
jmp    1319 <main+0x1d9>
mov    -0xa8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa8(%rbp)
jmp    12d8 <main+0x198>
cmpl   $0xffffffff,-0xac(%rbp)
jne    133f <main+0x1ff>
jmp    13ad <main+0x26d>
cmpl   $0x0,-0xac(%rbp)
je     1398 <main+0x258>
movslq -0xac(%rbp),%rax
mov    -0x90(%rbp,%rax,1),%al
mov    %al,-0xb1(%rbp)
mov    -0xac(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x90(%rbp,%rax,1),%cl
movslq -0xac(%rbp),%rax
mov    %cl,-0x90(%rbp,%rax,1)
mov    -0xb1(%rbp),%cl
mov    -0xac(%rbp),%eax
sub    $0x1,%eax
cltq
mov    %cl,-0x90(%rbp,%rax,1)
mov    -0xac(%rbp),%eax
add    $0x1,%eax
add    -0xb0(%rbp),%eax
mov    %eax,-0xb0(%rbp)
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    128e <main+0x14e>
lea    0xc7a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xa4(%rbp)
cmpl   $0x1b,-0xa4(%rbp)
jge    1417 <main+0x2d7>
movslq -0xa4(%rbp),%rax
movsbl -0x90(%rbp,%rax,1),%esi
ff
lea    0xc53(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    13d9 <main+0x299>
mov    -0xb0(%rbp),%esi
lea    0xc50(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xc20(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x90,%rsp
lea    0xef8(%rip),%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xec9(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
movaps 0xe6a(%rip),%xmm0
movaps %xmm0,(%rsp)
movabs $0x7877767574737271,%rax
76 77 78
mov    %rax,0x10(%rsp)
movw   $0x7a79,0x18(%rsp)
movb   $0x20,0x1a(%rsp)
lea    0xe54(%rip),%rdi
xor    %r15d,%r15d
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x61,%edi
call   1030 <putchar@plt>
mov    $0x62,%edi
call   1030 <putchar@plt>
mov    $0x63,%edi
call   1030 <putchar@plt>
mov    $0x64,%edi
call   1030 <putchar@plt>
mov    $0x65,%edi
call   1030 <putchar@plt>
mov    $0x66,%edi
call   1030 <putchar@plt>
mov    $0x67,%edi
call   1030 <putchar@plt>
mov    $0x68,%edi
call   1030 <putchar@plt>
mov    $0x69,%edi
call   1030 <putchar@plt>
mov    $0x6a,%edi
call   1030 <putchar@plt>
mov    $0x6b,%edi
call   1030 <putchar@plt>
mov    $0x6c,%edi
call   1030 <putchar@plt>
mov    $0x6d,%edi
call   1030 <putchar@plt>
mov    $0x6e,%edi
call   1030 <putchar@plt>
mov    $0x6f,%edi
call   1030 <putchar@plt>
mov    $0x70,%edi
call   1030 <putchar@plt>
mov    $0x71,%edi
call   1030 <putchar@plt>
mov    $0x72,%edi
call   1030 <putchar@plt>
mov    $0x73,%edi
call   1030 <putchar@plt>
mov    $0x74,%edi
call   1030 <putchar@plt>
mov    $0x75,%edi
call   1030 <putchar@plt>
mov    $0x76,%edi
call   1030 <putchar@plt>
mov    $0x77,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
call   1030 <putchar@plt>
mov    $0x79,%edi
call   1030 <putchar@plt>
mov    $0x7a,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
lea    0xdb0(%rip),%rdi
call   1040 <puts@plt>
lea    0xd36(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x2cf3(%rip),%rax
mov    (%rax),%edx
lea    0x20(%rsp),%r14
mov    %r14,%rdi
mov    $0x64,%esi
call   1080 <fgets@plt>
mov    %r14,%rdi
mov    $0xa,%esi
call   1060 <strchr@plt>
test   %rax,%rax
je     131e <main+0x1be>
movb   $0x0,(%rax)
lea    0x20(%rsp),%rdi
call   1050 <strlen@plt>
test   %eax,%eax
jle    14fe <main+0x39e>
xor    %ebx,%ebx
lea    0x20(%rsp),%r14
xor    %r15d,%r15d
nopw   0x0(%rax,%rax,1)
movzbl 0x20(%rsp,%rbx,1),%edi
mov    $0x0,%ecx
cmp    %dil,(%rsp)
je     14e0 <main+0x380>
mov    $0x1,%ecx
cmp    %dil,0x1(%rsp)
je     14d0 <main+0x370>
mov    $0x2,%ecx
cmp    %dil,0x2(%rsp)
je     14d0 <main+0x370>
mov    $0x3,%ecx
cmp    %dil,0x3(%rsp)
je     14d0 <main+0x370>
mov    $0x4,%ecx
cmp    %dil,0x4(%rsp)
je     14d0 <main+0x370>
mov    $0x5,%ecx
cmp    %dil,0x5(%rsp)
je     14d0 <main+0x370>
mov    $0x6,%ecx
cmp    %dil,0x6(%rsp)
je     14d0 <main+0x370>
mov    $0x7,%ecx
cmp    %dil,0x7(%rsp)
je     14d0 <main+0x370>
mov    $0x8,%ecx
cmp    %dil,0x8(%rsp)
je     14d0 <main+0x370>
mov    $0x9,%ecx
cmp    %dil,0x9(%rsp)
je     14d0 <main+0x370>
mov    $0xa,%ecx
cmp    %dil,0xa(%rsp)
je     14d0 <main+0x370>
mov    $0xb,%ecx
cmp    %dil,0xb(%rsp)
je     14d0 <main+0x370>
mov    $0xc,%ecx
cmp    %dil,0xc(%rsp)
je     14d0 <main+0x370>
mov    $0xd,%ecx
cmp    %dil,0xd(%rsp)
je     14d0 <main+0x370>
mov    $0xe,%ecx
cmp    %dil,0xe(%rsp)
je     14d0 <main+0x370>
mov    $0xf,%ecx
cmp    %dil,0xf(%rsp)
je     14d0 <main+0x370>
mov    $0x10,%ecx
cmp    %dil,0x10(%rsp)
je     14d0 <main+0x370>
mov    $0x11,%ecx
cmp    %dil,0x11(%rsp)
je     14d0 <main+0x370>
mov    $0x12,%ecx
cmp    %dil,0x12(%rsp)
je     14d0 <main+0x370>
mov    $0x13,%ecx
cmp    %dil,0x13(%rsp)
je     14d0 <main+0x370>
mov    $0x14,%ecx
cmp    %dil,0x14(%rsp)
je     14d0 <main+0x370>
mov    $0x15,%ecx
cmp    %dil,0x15(%rsp)
je     14d0 <main+0x370>
mov    $0x16,%ecx
cmp    %dil,0x16(%rsp)
je     14d0 <main+0x370>
mov    $0x17,%ecx
cmp    %dil,0x17(%rsp)
je     14d0 <main+0x370>
mov    $0x18,%ecx
cmp    %dil,0x18(%rsp)
je     14d0 <main+0x370>
mov    $0x19,%ecx
cmp    %dil,0x19(%rsp)
je     14d0 <main+0x370>
mov    $0x1a,%ecx
cmp    %dil,0x1a(%rsp)
jne    14e7 <main+0x387>
nopl   0x0(%rax)
mov    %ecx,%edx
lea    -0x1(%rcx),%esi
movzbl (%rsp,%rsi,1),%eax
mov    %al,(%rsp,%rdx,1)
mov    %dil,(%rsp,%rsi,1)
add    %ecx,%r15d
add    $0x1,%r15d
add    $0x1,%rbx
mov    %r14,%rdi
call   1050 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1340 <main+0x1e0>
lea    0xb0b(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
movsbl (%rsp),%edi
call   1030 <putchar@plt>
movsbl 0x1(%rsp),%edi
call   1030 <putchar@plt>
movsbl 0x2(%rsp),%edi
call   1030 <putchar@plt>
movsbl 0x3(%rsp),%edi
call   1030 <putchar@plt>
movsbl 0x4(%rsp),%edi
call   1030 <putchar@plt>
movsbl 0x5(%rsp),%edi
call   1030 <putchar@plt>
movsbl 0x6(%rsp),%edi
call   1030 <putchar@plt>
movsbl 0x7(%rsp),%edi
call   1030 <putchar@plt>
movsbl 0x8(%rsp),%edi
call   1030 <putchar@plt>
movsbl 0x9(%rsp),%edi
call   1030 <putchar@plt>
movsbl 0xa(%rsp),%edi
call   1030 <putchar@plt>
movsbl 0xb(%rsp),%edi
call   1030 <putchar@plt>
movsbl 0xc(%rsp),%edi
call   1030 <putchar@plt>
movsbl 0xd(%rsp),%edi
call   1030 <putchar@plt>
movsbl 0xe(%rsp),%edi
call   1030 <putchar@plt>
movsbl 0xf(%rsp),%edi
call   1030 <putchar@plt>
movsbl 0x10(%rsp),%edi
call   1030 <putchar@plt>
movsbl 0x11(%rsp),%edi
call   1030 <putchar@plt>
movsbl 0x12(%rsp),%edi
call   1030 <putchar@plt>
movsbl 0x13(%rsp),%edi
call   1030 <putchar@plt>
movsbl 0x14(%rsp),%edi
call   1030 <putchar@plt>
movsbl 0x15(%rsp),%edi
call   1030 <putchar@plt>
movsbl 0x16(%rsp),%edi
call   1030 <putchar@plt>
movsbl 0x17(%rsp),%edi
call   1030 <putchar@plt>
movsbl 0x18(%rsp),%edi
call   1030 <putchar@plt>
movsbl 0x19(%rsp),%edi
call   1030 <putchar@plt>
movsbl 0x1a(%rsp),%edi
call   1030 <putchar@plt>
lea    0xa1c(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xa5a(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [33 x i8] c"###############################\0A\00"
@.str.1 = [33 x i8] c"##### Transpose Technique #####\0A\00"
@.str.2 = [13 x i8] c"\0AAlphabets: \00"
@.str.3 = [3 x i8] c"%c\00"
@.str.4 = [3 x i8] c"\0A\0A\00"
@.str.5 = [31 x i8] c"Enter String [max 100 chars]: \00"
@stdin = global i32 0
@.str.6 = [15 x i8] c"\0AProbes : %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca [27 x i8]
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8
store i32 0, i32* %1
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %6
br label %14
14: ; preds = %24, %0
%15 = load i32, i32* %6
%16 = icmp slt i32 %15, 26
br i1 %16, label %17, label %27
17: ; preds = %14
%18 = load i32, i32* %6
%19 = add nsw i32 %18, 97
%20 = trunc i32 %19 to i8
%21 = load i32, i32* %6
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [27 x i8], [27 x i8]* %3, i64 0, i64 %22
store i8 %20, i8* %23
br label %24
24: ; preds = %17
%25 = load i32, i32* %6
%26 = add nsw i32 %25, 1
store i32 %26, i32* %6
br label %14
27: ; preds = %14
%28 = getelementptr inbounds [27 x i8], [27 x i8]* %3, i64 0, i64 26
store i8 32, i8* %28
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %6
br label %30
30: ; preds = %40, %27
%31 = load i32, i32* %6
%32 = icmp slt i32 %31, 27
br i1 %32, label %33, label %43
33: ; preds = %30
%34 = load i32, i32* %6
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [27 x i8], [27 x i8]* %3, i64 0, i64 %35
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %38)
br label %40
40: ; preds = %33
%41 = load i32, i32* %6
%42 = add nsw i32 %41, 1
store i32 %42, i32* %6
br label %30
43: ; preds = %30
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0))
%46 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%47 = load i32, i32* @stdin
%48 = call i32 @fgets(i8* %46, i32 100, i32 %47)
%49 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%50 = call i8* @strchr(i8* %49, i8 signext 10)
store i8* %50, i8** %5
%51 = load i8*, i8** %5
%52 = icmp ne i8* %51, null
br i1 %52, label %53, label %55
53: ; preds = %43
%54 = load i8*, i8** %5
store i8 0, i8* %54
br label %55
55: ; preds = %53, %43
store i32 0, i32* %9
store i32 0, i32* %6
br label %56
56: ; preds = %114, %55
%57 = load i32, i32* %6
%58 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%59 = call i32 @strlen(i8* %58)
%60 = icmp slt i32 %57, %59
br i1 %60, label %61, label %117
61: ; preds = %56
%62 = load i32, i32* %6
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %63
%65 = load i8, i8* %64
store i8 %65, i8* %4
store i32 -1, i32* %8
store i32 0, i32* %7
br label %66
66: ; preds = %81, %61
%67 = load i32, i32* %7
%68 = icmp slt i32 %67, 27
br i1 %68, label %69, label %84
69: ; preds = %66
%70 = load i32, i32* %7
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [27 x i8], [27 x i8]* %3, i64 0, i64 %71
%73 = load i8, i8* %72
%74 = sext i8 %73 to i32
%75 = load i8, i8* %4
%76 = sext i8 %75 to i32
%77 = icmp eq i32 %74, %76
br i1 %77, label %78, label %80
78: ; preds = %69
%79 = load i32, i32* %7
store i32 %79, i32* %8
br label %84
80: ; preds = %69
br label %81
81: ; preds = %80
%82 = load i32, i32* %7
%83 = add nsw i32 %82, 1
store i32 %83, i32* %7
br label %66
84: ; preds = %78, %66
%85 = load i32, i32* %8
%86 = icmp eq i32 %85, -1
br i1 %86, label %87, label %88
87: ; preds = %84
br label %114
88: ; preds = %84
%89 = load i32, i32* %8
%90 = icmp ne i32 %89, 0
br i1 %90, label %91, label %109
91: ; preds = %88
%92 = load i32, i32* %8
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds [27 x i8], [27 x i8]* %3, i64 0, i64 %93
%95 = load i8, i8* %94
store i8 %95, i8* %10
%96 = load i32, i32* %8
%97 = sub nsw i32 %96, 1
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds [27 x i8], [27 x i8]* %3, i64 0, i64 %98
%100 = load i8, i8* %99
%101 = load i32, i32* %8
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds [27 x i8], [27 x i8]* %3, i64 0, i64 %102
store i8 %100, i8* %103
%104 = load i8, i8* %10
%105 = load i32, i32* %8
%106 = sub nsw i32 %105, 1
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds [27 x i8], [27 x i8]* %3, i64 0, i64 %107
store i8 %104, i8* %108
br label %109
109: ; preds = %91, %88
%110 = load i32, i32* %8
%111 = add nsw i32 %110, 1
%112 = load i32, i32* %9
%113 = add nsw i32 %112, %111
store i32 %113, i32* %9
br label %114
114: ; preds = %109, %87
%115 = load i32, i32* %6
%116 = add nsw i32 %115, 1
store i32 %116, i32* %6
br label %56
117: ; preds = %56
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %6
br label %119
119: ; preds = %129, %117
%120 = load i32, i32* %6
%121 = icmp slt i32 %120, 27
br i1 %121, label %122, label %132
122: ; preds = %119
%123 = load i32, i32* %6
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds [27 x i8], [27 x i8]* %3, i64 0, i64 %124
%126 = load i8, i8* %125
%127 = sext i8 %126 to i32
%128 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %127)
br label %129
129: ; preds = %122
%130 = load i32, i32* %6
%131 = add nsw i32 %130, 1
store i32 %131, i32* %6
br label %119
132: ; preds = %119
%133 = load i32, i32* %9
%134 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %133)
%135 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [13 x i8] c"\0AAlphabets: \00"
@.str.5 = [31 x i8] c"Enter String [max 100 chars]: \00"
@stdin = global i32 0
@.str.6 = [15 x i8] c"\0AProbes : %d\00"
@str.7 = [32 x i8] c"##### Transpose Technique #####\00"
@str.8 = [32 x i8] c"###############################\00"
@str.10 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca [27 x i8]
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.8, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.7, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.8, i64 0, i64 0))
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%7 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 0
%8 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 1
%9 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 2
%10 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 3
%11 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 4
%12 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 5
%13 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 6
%14 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 7
%15 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 8
%16 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 9
%17 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 10
%18 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 11
%19 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 12
%20 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 13
%21 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 14
%22 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 15
%23 = bitcast [27 x i8]* %2 to <16 x i8>*
store <16 x i8> <i8 97, i8 98, i8 99, i8 100, i8 101, i8 102, i8 103, i8 104, i8 105, i8 106, i8 107, i8 108, i8 109, i8 110, i8 111, i8 112>, <16 x i8>* %23
%24 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 16
store i8 113, i8* %24
%25 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 17
store i8 114, i8* %25
%26 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 18
store i8 115, i8* %26
%27 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 19
store i8 116, i8* %27
%28 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 20
store i8 117, i8* %28
%29 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 21
store i8 118, i8* %29
%30 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 22
store i8 119, i8* %30
%31 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 23
store i8 120, i8* %31
%32 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 24
store i8 121, i8* %32
%33 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 25
store i8 122, i8* %33
%34 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 26
store i8 32, i8* %34
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%36 = tail call i32 @putchar(i32 97)
%37 = tail call i32 @putchar(i32 98)
%38 = tail call i32 @putchar(i32 99)
%39 = tail call i32 @putchar(i32 100)
%40 = tail call i32 @putchar(i32 101)
%41 = tail call i32 @putchar(i32 102)
%42 = tail call i32 @putchar(i32 103)
%43 = tail call i32 @putchar(i32 104)
%44 = tail call i32 @putchar(i32 105)
%45 = tail call i32 @putchar(i32 106)
%46 = tail call i32 @putchar(i32 107)
%47 = tail call i32 @putchar(i32 108)
%48 = tail call i32 @putchar(i32 109)
%49 = tail call i32 @putchar(i32 110)
%50 = tail call i32 @putchar(i32 111)
%51 = tail call i32 @putchar(i32 112)
%52 = tail call i32 @putchar(i32 113)
%53 = tail call i32 @putchar(i32 114)
%54 = tail call i32 @putchar(i32 115)
%55 = tail call i32 @putchar(i32 116)
%56 = tail call i32 @putchar(i32 117)
%57 = tail call i32 @putchar(i32 118)
%58 = tail call i32 @putchar(i32 119)
%59 = tail call i32 @putchar(i32 120)
%60 = tail call i32 @putchar(i32 121)
%61 = tail call i32 @putchar(i32 122)
%62 = tail call i32 @putchar(i32 32)
%63 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.10, i64 0, i64 0))
%64 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0))
%65 = load i32, i32* @stdin
%66 = call i32 @fgets(i8* %6, i32 100, i32 %65)
%67 = call i8* @strchr(i8* %6, i8 signext 10)
%68 = icmp eq i8* %67, null
br i1 %68, label %70, label %69
69: ; preds = %0
store i8 0, i8* %67
br label %70
70: ; preds = %69, %0
%71 = call i32 @strlen(i8* %6)
%72 = icmp sgt i32 %71, 0
br i1 %72, label %73, label %176
73: ; preds = %70, %170
%74 = phi i64 [ %172, %170 ], [ 0, %70 ]
%75 = phi i32 [ %171, %170 ], [ 0, %70 ]
%76 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %74
%77 = load i8, i8* %76
%78 = load i8, i8* %7
%79 = icmp eq i8 %78, %77
br i1 %79, label %166, label %80
80: ; preds = %73
%81 = load i8, i8* %8
%82 = icmp eq i8 %81, %77
br i1 %82, label %158, label %83
83: ; preds = %80
%84 = load i8, i8* %9
%85 = icmp eq i8 %84, %77
br i1 %85, label %158, label %86
86: ; preds = %83
%87 = load i8, i8* %10
%88 = icmp eq i8 %87, %77
br i1 %88, label %158, label %89
89: ; preds = %86
%90 = load i8, i8* %11
%91 = icmp eq i8 %90, %77
br i1 %91, label %158, label %92
92: ; preds = %89
%93 = load i8, i8* %12
%94 = icmp eq i8 %93, %77
br i1 %94, label %158, label %95
95: ; preds = %92
%96 = load i8, i8* %13
%97 = icmp eq i8 %96, %77
br i1 %97, label %158, label %98
98: ; preds = %95
%99 = load i8, i8* %14
%100 = icmp eq i8 %99, %77
br i1 %100, label %158, label %101
101: ; preds = %98
%102 = load i8, i8* %15
%103 = icmp eq i8 %102, %77
br i1 %103, label %158, label %104
104: ; preds = %101
%105 = load i8, i8* %16
%106 = icmp eq i8 %105, %77
br i1 %106, label %158, label %107
107: ; preds = %104
%108 = load i8, i8* %17
%109 = icmp eq i8 %108, %77
br i1 %109, label %158, label %110
110: ; preds = %107
%111 = load i8, i8* %18
%112 = icmp eq i8 %111, %77
br i1 %112, label %158, label %113
113: ; preds = %110
%114 = load i8, i8* %19
%115 = icmp eq i8 %114, %77
br i1 %115, label %158, label %116
116: ; preds = %113
%117 = load i8, i8* %20
%118 = icmp eq i8 %117, %77
br i1 %118, label %158, label %119
119: ; preds = %116
%120 = load i8, i8* %21
%121 = icmp eq i8 %120, %77
br i1 %121, label %158, label %122
122: ; preds = %119
%123 = load i8, i8* %22
%124 = icmp eq i8 %123, %77
br i1 %124, label %158, label %125
125: ; preds = %122
%126 = load i8, i8* %24
%127 = icmp eq i8 %126, %77
br i1 %127, label %158, label %128
128: ; preds = %125
%129 = load i8, i8* %25
%130 = icmp eq i8 %129, %77
br i1 %130, label %158, label %131
131: ; preds = %128
%132 = load i8, i8* %26
%133 = icmp eq i8 %132, %77
br i1 %133, label %158, label %134
134: ; preds = %131
%135 = load i8, i8* %27
%136 = icmp eq i8 %135, %77
br i1 %136, label %158, label %137
137: ; preds = %134
%138 = load i8, i8* %28
%139 = icmp eq i8 %138, %77
br i1 %139, label %158, label %140
140: ; preds = %137
%141 = load i8, i8* %29
%142 = icmp eq i8 %141, %77
br i1 %142, label %158, label %143
143: ; preds = %140
%144 = load i8, i8* %30
%145 = icmp eq i8 %144, %77
br i1 %145, label %158, label %146
146: ; preds = %143
%147 = load i8, i8* %31
%148 = icmp eq i8 %147, %77
br i1 %148, label %158, label %149
149: ; preds = %146
%150 = load i8, i8* %32
%151 = icmp eq i8 %150, %77
br i1 %151, label %158, label %152
152: ; preds = %149
%153 = load i8, i8* %33
%154 = icmp eq i8 %153, %77
br i1 %154, label %158, label %155
155: ; preds = %152
%156 = load i8, i8* %34
%157 = icmp eq i8 %156, %77
br i1 %157, label %158, label %170
158: ; preds = %155, %152, %149, %146, %143, %140, %137, %134, %131, %128, %125, %122, %119, %116, %113, %110, %107, %104, %101, %98, %95, %92, %89, %86, %83, %80
%159 = phi i32 [ 1, %80 ], [ 2, %83 ], [ 3, %86 ], [ 4, %89 ], [ 5, %92 ], [ 6, %95 ], [ 7, %98 ], [ 8, %101 ], [ 9, %104 ], [ 10, %107 ], [ 11, %110 ], [ 12, %113 ], [ 13, %116 ], [ 14, %119 ], [ 15, %122 ], [ 16, %125 ], [ 17, %128 ], [ 18, %131 ], [ 19, %134 ], [ 20, %137 ], [ 21, %140 ], [ 22, %143 ], [ 23, %146 ], [ 24, %149 ], [ 25, %152 ], [ 26, %155 ]
%160 = zext i32 %159 to i64
%161 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 %160
%162 = add nsw i32 %159, -1
%163 = zext i32 %162 to i64
%164 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 %163
%165 = load i8, i8* %164
store i8 %165, i8* %161
store i8 %77, i8* %164
br label %166
166: ; preds = %73, %158
%167 = phi i32 [ %159, %158 ], [ 0, %73 ]
%168 = add nuw nsw i32 %167, 1
%169 = add nsw i32 %168, %75
br label %170
170: ; preds = %155, %166
%171 = phi i32 [ %169, %166 ], [ %75, %155 ]
%172 = add nuw nsw i64 %74, 1
%173 = call i32 @strlen(i8* %6)
%174 = sext i32 %173 to i64
%175 = icmp slt i64 %172, %174
br i1 %175, label %73, label %176
176: ; preds = %170, %70
%177 = phi i32 [ 0, %70 ], [ %171, %170 ]
%178 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%179 = load i8, i8* %7
%180 = sext i8 %179 to i32
%181 = call i32 @putchar(i32 %180)
%182 = load i8, i8* %8
%183 = sext i8 %182 to i32
%184 = call i32 @putchar(i32 %183)
%185 = load i8, i8* %9
%186 = sext i8 %185 to i32
%187 = call i32 @putchar(i32 %186)
%188 = load i8, i8* %10
%189 = sext i8 %188 to i32
%190 = call i32 @putchar(i32 %189)
%191 = load i8, i8* %11
%192 = sext i8 %191 to i32
%193 = call i32 @putchar(i32 %192)
%194 = load i8, i8* %12
%195 = sext i8 %194 to i32
%196 = call i32 @putchar(i32 %195)
%197 = load i8, i8* %13
%198 = sext i8 %197 to i32
%199 = call i32 @putchar(i32 %198)
%200 = load i8, i8* %14
%201 = sext i8 %200 to i32
%202 = call i32 @putchar(i32 %201)
%203 = load i8, i8* %15
%204 = sext i8 %203 to i32
%205 = call i32 @putchar(i32 %204)
%206 = load i8, i8* %16
%207 = sext i8 %206 to i32
%208 = call i32 @putchar(i32 %207)
%209 = load i8, i8* %17
%210 = sext i8 %209 to i32
%211 = call i32 @putchar(i32 %210)
%212 = load i8, i8* %18
%213 = sext i8 %212 to i32
%214 = call i32 @putchar(i32 %213)
%215 = load i8, i8* %19
%216 = sext i8 %215 to i32
%217 = call i32 @putchar(i32 %216)
%218 = load i8, i8* %20
%219 = sext i8 %218 to i32
%220 = call i32 @putchar(i32 %219)
%221 = load i8, i8* %21
%222 = sext i8 %221 to i32
%223 = call i32 @putchar(i32 %222)
%224 = load i8, i8* %22
%225 = sext i8 %224 to i32
%226 = call i32 @putchar(i32 %225)
%227 = load i8, i8* %24
%228 = sext i8 %227 to i32
%229 = call i32 @putchar(i32 %228)
%230 = load i8, i8* %25
%231 = sext i8 %230 to i32
%232 = call i32 @putchar(i32 %231)
%233 = load i8, i8* %26
%234 = sext i8 %233 to i32
%235 = call i32 @putchar(i32 %234)
%236 = load i8, i8* %27
%237 = sext i8 %236 to i32
%238 = call i32 @putchar(i32 %237)
%239 = load i8, i8* %28
%240 = sext i8 %239 to i32
%241 = call i32 @putchar(i32 %240)
%242 = load i8, i8* %29
%243 = sext i8 %242 to i32
%244 = call i32 @putchar(i32 %243)
%245 = load i8, i8* %30
%246 = sext i8 %245 to i32
%247 = call i32 @putchar(i32 %246)
%248 = load i8, i8* %31
%249 = sext i8 %248 to i32
%250 = call i32 @putchar(i32 %249)
%251 = load i8, i8* %32
%252 = sext i8 %251 to i32
%253 = call i32 @putchar(i32 %252)
%254 = load i8, i8* %33
%255 = sext i8 %254 to i32
%256 = call i32 @putchar(i32 %255)
%257 = load i8, i8* %34
%258 = sext i8 %257 to i32
%259 = call i32 @putchar(i32 %258)
%260 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %177)
%261 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.10, i64 0, i64 0))
ret i32 0
}