#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 */
scalar_t__ findValue(char);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int strlen(char *);
int main() {
  int counter = 0, counter2, test, lenght;
  char deck[13], cards[13] = "23456789TJQKA", temp;
  printf("Enter cards : ");
  scanf("%s", deck);
  lenght = strlen(deck);
  for (counter = 0; counter < strlen(deck) - 1; counter++) {
    test = 0;
    for (counter2 = 0; counter2 < strlen(cards) - 1; counter2++) {
      if (deck[counter] == cards[counter2])
        test = 1;
    }
    if (test == 0) {
      printf("invalid deck");
      return 0;
    }
  }
  for (counter = 0; counter < strlen(deck); counter++) {
    for (counter2 = 0; counter2 < strlen(deck) - 1; counter2++) {
      if (findValue(deck[counter2]) > findValue(deck[counter2 + 1])) {
        temp = deck[counter2 + 1];
        deck[counter2 + 1] = deck[counter2];
        deck[counter2] = temp;
      }
    }
  }
  for (counter = 0; counter < lenght; counter++) {
    if (deck[counter] >= '2' && deck[counter] <= '9' || deck[counter] == 'A' ||
        deck[counter] == 'K' || deck[counter] == 'Q' || deck[counter] == 'J' ||
        deck[counter] == 'T')
      printf("%c", deck[counter]);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    0xea3(%rip),%rax
mov    %rax,-0x2e(%rbp)
mov    0xea1(%rip),%eax
mov    %eax,-0x26(%rbp)
mov    0xe9c(%rip),%al
mov    %al,-0x22(%rbp)
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x21(%rbp),%rsi
lea    0xe90(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x21(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x34(%rbp)
lea    -0x21(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x34(%rbp),%eax
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    125b <main+0x11b>
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x38(%rbp)
lea    -0x2e(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%eax
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1224 <main+0xe4>
movslq -0x8(%rbp),%rax
movsbl -0x21(%rbp,%rax,1),%eax
movslq -0xc(%rbp),%rcx
movsbl -0x2e(%rbp,%rcx,1),%ecx
cmp    %ecx,%eax
jne    1211 <main+0xd1>
movl   $0x1,-0x10(%rbp)
jmp    1216 <main+0xd6>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11d1 <main+0x91>
cmpl   $0x0,-0x10(%rbp)
jne    1248 <main+0x108>
lea    0xdea(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    13e7 <main+0x2a7>
jmp    124d <main+0x10d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11a4 <main+0x64>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x3c(%rbp)
lea    -0x21(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x3c(%rbp),%eax
cmp    %ecx,%eax
jge    132c <main+0x1ec>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x40(%rbp)
lea    -0x21(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x40(%rbp),%eax
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1319 <main+0x1d9>
movslq -0xc(%rbp),%rax
movsbl -0x21(%rbp,%rax,1),%edi
call   1060 <findValue@plt>
mov    %rax,-0x48(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
cltq
movsbl -0x21(%rbp,%rax,1),%edi
call   1060 <findValue@plt>
mov    %rax,%rcx
mov    -0x48(%rbp),%rax
cmp    %rcx,%rax
jle    1306 <main+0x1c6>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
cltq
mov    -0x21(%rbp,%rax,1),%al
mov    %al,-0x2f(%rbp)
movslq -0xc(%rbp),%rax
mov    -0x21(%rbp,%rax,1),%cl
mov    -0xc(%rbp),%eax
add    $0x1,%eax
cltq
mov    %cl,-0x21(%rbp,%rax,1)
mov    -0x2f(%rbp),%cl
movslq -0xc(%rbp),%rax
mov    %cl,-0x21(%rbp,%rax,1)
jmp    130b <main+0x1cb>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1285 <main+0x145>
jmp    131e <main+0x1de>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1262 <main+0x122>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    13e7 <main+0x2a7>
movslq -0x8(%rbp),%rax
movsbl -0x21(%rbp,%rax,1),%eax
cmp    $0x32,%eax
jl     1363 <main+0x223>
movslq -0x8(%rbp),%rax
movsbl -0x21(%rbp,%rax,1),%eax
cmp    $0x39,%eax
jle    13bd <main+0x27d>
movslq -0x8(%rbp),%rax
movsbl -0x21(%rbp,%rax,1),%eax
cmp    $0x41,%eax
je     13bd <main+0x27d>
movslq -0x8(%rbp),%rax
movsbl -0x21(%rbp,%rax,1),%eax
cmp    $0x4b,%eax
je     13bd <main+0x27d>
movslq -0x8(%rbp),%rax
movsbl -0x21(%rbp,%rax,1),%eax
cmp    $0x51,%eax
je     13bd <main+0x27d>
movslq -0x8(%rbp),%rax
movsbl -0x21(%rbp,%rax,1),%eax
cmp    $0x4a,%eax
je     13bd <main+0x27d>
movslq -0x8(%rbp),%rax
movsbl -0x21(%rbp,%rax,1),%eax
cmp    $0x54,%eax
jne    13d4 <main+0x294>
movslq -0x8(%rbp),%rax
movsbl -0x21(%rbp,%rax,1),%esi
lea    0xc5f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13d9 <main+0x299>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1333 <main+0x1f3>
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
movabs $0x414b514a54393837,%rax
51 4b 41
mov    %rax,0x1d(%rsp)
movabs $0x3938373635343332,%rax
37 38 39
mov    %rax,0x18(%rsp)
lea    0xe8a(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe8b(%rip),%rdi
lea    0x7(%rsp),%rbx
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %eax,0x14(%rsp)
mov    %rbx,%rdi
call   1040 <strlen@plt>
cmp    $0x2,%eax
jl     1232 <main+0xe2>
xor    %ebp,%ebp
lea    0x18(%rsp),%r13
mov    $0x1,%r12d
lea    0x7(%rsp),%r15
nopl   0x0(%rax)
mov    %r13,%rdi
call   1040 <strlen@plt>
cmp    $0x2,%eax
jl     12fc <main+0x1ac>
xor    %ebx,%ebx
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
movzbl 0x7(%rsp,%rbp,1),%eax
cmp    0x18(%rsp,%rbx,1),%al
cmove  %r12d,%r14d
add    $0x1,%rbx
mov    %r13,%rdi
call   1040 <strlen@plt>
add    $0xffffffff,%eax
cltq
cmp    %rax,%rbx
jl     11f0 <main+0xa0>
test   %r14d,%r14d
je     12fc <main+0x1ac>
add    $0x1,%rbp
mov    %r15,%rdi
call   1040 <strlen@plt>
add    $0xffffffff,%eax
cltq
cmp    %rax,%rbp
jl     11d0 <main+0x80>
lea    0x7(%rsp),%rdi
call   1040 <strlen@plt>
test   %eax,%eax
jle    12bd <main+0x16d>
xor    %r15d,%r15d
lea    0x7(%rsp),%r14
jmp    1261 <main+0x111>
xchg   %ax,%ax
add    $0x1,%r15d
mov    %r14,%rdi
call   1040 <strlen@plt>
cmp    %eax,%r15d
jge    12bd <main+0x16d>
mov    %r14,%rdi
call   1040 <strlen@plt>
cmp    $0x2,%eax
jl     1250 <main+0x100>
xor    %ebx,%ebx
jmp    1295 <main+0x145>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
call   1040 <strlen@plt>
add    $0xffffffff,%eax
cltq
mov    %rbp,%rbx
cmp    %rax,%rbp
jge    1250 <main+0x100>
movsbl 0x7(%rsp,%rbx,1),%edi
call   1070 <findValue@plt>
mov    %rax,%r12
lea    0x1(%rbx),%rbp
movsbl 0x8(%rsp,%rbx,1),%edi
call   1070 <findValue@plt>
cmp    %rax,%r12
jle    1280 <main+0x130>
rolw   $0x8,0x7(%rsp,%rbx,1)
jmp    1280 <main+0x130>
mov    0x14(%rsp),%eax
test   %eax,%eax
jle    130a <main+0x1ba>
mov    %eax,%ebx
xor    %ebp,%ebp
mov    $0x90601,%r14d
nop
movzbl 0x7(%rsp,%rbp,1),%edi
lea    -0x32(%rdi),%eax
cmp    $0x8,%al
jb     12ec <main+0x19c>
lea    -0x41(%rdi),%eax
cmp    $0x13,%al
ja     12f1 <main+0x1a1>
movzbl %al,%eax
bt     %rax,%r14
jae    12f1 <main+0x1a1>
call   1030 <putchar@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    12d0 <main+0x180>
jmp    130a <main+0x1ba>
lea    0xd1c(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.cards = [13 x i8] c"23456789TJQKA"
@.str = [15 x i8] c"Enter cards : \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [13 x i8] c"invalid deck\00"
@.str.3 = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [13 x i8]
%7 = alloca [13 x i8]
%8 = alloca i8
store i32 0, i32* %1
store i32 0, i32* %2
%9 = bitcast [13 x i8]* %7 to i8*
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%11 = getelementptr inbounds [13 x i8], [13 x i8]* %6, i64 0, i64 0
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = getelementptr inbounds [13 x i8], [13 x i8]* %6, i64 0, i64 0
%14 = call i32 @strlen(i8* %13)
store i32 %14, i32* %5
store i32 0, i32* %2
br label %15
15: ; preds = %51, %0
%16 = load i32, i32* %2
%17 = getelementptr inbounds [13 x i8], [13 x i8]* %6, i64 0, i64 0
%18 = call i32 @strlen(i8* %17)
%19 = sub nsw i32 %18, 1
%20 = icmp slt i32 %16, %19
br i1 %20, label %21, label %54
21: ; preds = %15
store i32 0, i32* %4
store i32 0, i32* %3
br label %22
22: ; preds = %42, %21
%23 = load i32, i32* %3
%24 = getelementptr inbounds [13 x i8], [13 x i8]* %7, i64 0, i64 0
%25 = call i32 @strlen(i8* %24)
%26 = sub nsw i32 %25, 1
%27 = icmp slt i32 %23, %26
br i1 %27, label %28, label %45
28: ; preds = %22
%29 = load i32, i32* %2
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [13 x i8], [13 x i8]* %6, i64 0, i64 %30
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = load i32, i32* %3
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [13 x i8], [13 x i8]* %7, i64 0, i64 %35
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
%39 = icmp eq i32 %33, %38
br i1 %39, label %40, label %41
40: ; preds = %28
store i32 1, i32* %4
br label %41
41: ; preds = %40, %28
br label %42
42: ; preds = %41
%43 = load i32, i32* %3
%44 = add nsw i32 %43, 1
store i32 %44, i32* %3
br label %22
45: ; preds = %22
%46 = load i32, i32* %4
%47 = icmp eq i32 %46, 0
br i1 %47, label %48, label %50
48: ; preds = %45
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %1
br label %171
50: ; preds = %45
br label %51
51: ; preds = %50
%52 = load i32, i32* %2
%53 = add nsw i32 %52, 1
store i32 %53, i32* %2
br label %15
54: ; preds = %15
store i32 0, i32* %2
br label %55
55: ; preds = %103, %54
%56 = load i32, i32* %2
%57 = getelementptr inbounds [13 x i8], [13 x i8]* %6, i64 0, i64 0
%58 = call i32 @strlen(i8* %57)
%59 = icmp slt i32 %56, %58
br i1 %59, label %60, label %106
60: ; preds = %55
store i32 0, i32* %3
br label %61
61: ; preds = %99, %60
%62 = load i32, i32* %3
%63 = getelementptr inbounds [13 x i8], [13 x i8]* %6, i64 0, i64 0
%64 = call i32 @strlen(i8* %63)
%65 = sub nsw i32 %64, 1
%66 = icmp slt i32 %62, %65
br i1 %66, label %67, label %102
67: ; preds = %61
%68 = load i32, i32* %3
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [13 x i8], [13 x i8]* %6, i64 0, i64 %69
%71 = load i8, i8* %70
%72 = call i64 @findValue(i8 signext %71)
%73 = load i32, i32* %3
%74 = add nsw i32 %73, 1
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [13 x i8], [13 x i8]* %6, i64 0, i64 %75
%77 = load i8, i8* %76
%78 = call i64 @findValue(i8 signext %77)
%79 = icmp sgt i64 %72, %78
br i1 %79, label %80, label %98
80: ; preds = %67
%81 = load i32, i32* %3
%82 = add nsw i32 %81, 1
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds [13 x i8], [13 x i8]* %6, i64 0, i64 %83
%85 = load i8, i8* %84
store i8 %85, i8* %8
%86 = load i32, i32* %3
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [13 x i8], [13 x i8]* %6, i64 0, i64 %87
%89 = load i8, i8* %88
%90 = load i32, i32* %3
%91 = add nsw i32 %90, 1
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds [13 x i8], [13 x i8]* %6, i64 0, i64 %92
store i8 %89, i8* %93
%94 = load i8, i8* %8
%95 = load i32, i32* %3
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds [13 x i8], [13 x i8]* %6, i64 0, i64 %96
store i8 %94, i8* %97
br label %98
98: ; preds = %80, %67
br label %99
99: ; preds = %98
%100 = load i32, i32* %3
%101 = add nsw i32 %100, 1
store i32 %101, i32* %3
br label %61
102: ; preds = %61
br label %103
103: ; preds = %102
%104 = load i32, i32* %2
%105 = add nsw i32 %104, 1
store i32 %105, i32* %2
br label %55
106: ; preds = %55
store i32 0, i32* %2
br label %107
107: ; preds = %168, %106
%108 = load i32, i32* %2
%109 = load i32, i32* %5
%110 = icmp slt i32 %108, %109
br i1 %110, label %111, label %171
111: ; preds = %107
%112 = load i32, i32* %2
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds [13 x i8], [13 x i8]* %6, i64 0, i64 %113
%115 = load i8, i8* %114
%116 = sext i8 %115 to i32
%117 = icmp sge i32 %116, 50
br i1 %117, label %118, label %125
118: ; preds = %111
%119 = load i32, i32* %2
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds [13 x i8], [13 x i8]* %6, i64 0, i64 %120
%122 = load i8, i8* %121
%123 = sext i8 %122 to i32
%124 = icmp sle i32 %123, 57
br i1 %124, label %160, label %125
125: ; preds = %118, %111
%126 = load i32, i32* %2
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds [13 x i8], [13 x i8]* %6, i64 0, i64 %127
%129 = load i8, i8* %128
%130 = sext i8 %129 to i32
%131 = icmp eq i32 %130, 65
br i1 %131, label %160, label %132
132: ; preds = %125
%133 = load i32, i32* %2
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds [13 x i8], [13 x i8]* %6, i64 0, i64 %134
%136 = load i8, i8* %135
%137 = sext i8 %136 to i32
%138 = icmp eq i32 %137, 75
br i1 %138, label %160, label %139
139: ; preds = %132
%140 = load i32, i32* %2
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds [13 x i8], [13 x i8]* %6, i64 0, i64 %141
%143 = load i8, i8* %142
%144 = sext i8 %143 to i32
%145 = icmp eq i32 %144, 81
br i1 %145, label %160, label %146
146: ; preds = %139
%147 = load i32, i32* %2
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds [13 x i8], [13 x i8]* %6, i64 0, i64 %148
%150 = load i8, i8* %149
%151 = sext i8 %150 to i32
%152 = icmp eq i32 %151, 74
br i1 %152, label %160, label %153
153: ; preds = %146
%154 = load i32, i32* %2
%155 = sext i32 %154 to i64
%156 = getelementptr inbounds [13 x i8], [13 x i8]* %6, i64 0, i64 %155
%157 = load i8, i8* %156
%158 = sext i8 %157 to i32
%159 = icmp eq i32 %158, 84
br i1 %159, label %160, label %167
160: ; preds = %153, %146, %139, %132, %125, %118
%161 = load i32, i32* %2
%162 = sext i32 %161 to i64
%163 = getelementptr inbounds [13 x i8], [13 x i8]* %6, i64 0, i64 %162
%164 = load i8, i8* %163
%165 = sext i8 %164 to i32
%166 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %165)
br label %167
167: ; preds = %160, %153
br label %168
168: ; preds = %167
%169 = load i32, i32* %2
%170 = add nsw i32 %169, 1
store i32 %170, i32* %2
br label %107
171: ; preds = %48, %107
%172 = load i32, i32* %1
ret i32 %172
}

LLVM IR (-O2):
@__const.main.cards = [13 x i8] c"23456789TJQKA"
@.str = [15 x i8] c"Enter cards : \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [13 x i8] c"invalid deck\00"
define i32 @main() {
%1 = alloca [13 x i8]
%2 = alloca [13 x i8]
%3 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [13 x i8], [13 x i8]* %2, i64 0, i64 0
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%7 = call i32 @strlen(i8* %3)
%8 = call i32 @strlen(i8* %3)
%9 = icmp sgt i32 %8, 1
br i1 %9, label %15, label %21
10: ; preds = %37
%11 = call i32 @strlen(i8* %3)
%12 = add nsw i32 %11, -1
%13 = sext i32 %12 to i64
%14 = icmp slt i64 %39, %13
br i1 %14, label %15, label %21
15: ; preds = %0, %10
%16 = phi i64 [ %39, %10 ], [ 0, %0 ]
%17 = call i32 @strlen(i8* %4)
%18 = icmp sgt i32 %17, 1
br i1 %18, label %19, label %40
19: ; preds = %15
%20 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 %16
br label %24
21: ; preds = %10, %0
%22 = call i32 @strlen(i8* %3)
%23 = icmp sgt i32 %22, 0
br i1 %23, label %42, label %46
24: ; preds = %19, %24
%25 = phi i64 [ 0, %19 ], [ %32, %24 ]
%26 = phi i32 [ 0, %19 ], [ %31, %24 ]
%27 = load i8, i8* %20
%28 = getelementptr inbounds [13 x i8], [13 x i8]* %2, i64 0, i64 %25
%29 = load i8, i8* %28
%30 = icmp eq i8 %27, %29
%31 = select i1 %30, i32 1, i32 %26
%32 = add nuw nsw i64 %25, 1
%33 = call i32 @strlen(i8* %4)
%34 = add nsw i32 %33, -1
%35 = sext i32 %34 to i64
%36 = icmp slt i64 %32, %35
br i1 %36, label %24, label %37
37: ; preds = %24
%38 = icmp eq i32 %31, 0
%39 = add nuw nsw i64 %16, 1
br i1 %38, label %40, label %10
40: ; preds = %15, %37
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
br label %85
42: ; preds = %21, %68
%43 = phi i32 [ %69, %68 ], [ 0, %21 ]
%44 = call i32 @strlen(i8* %3)
%45 = icmp sgt i32 %44, 1
br i1 %45, label %50, label %68
46: ; preds = %68, %21
%47 = icmp sgt i32 %7, 0
br i1 %47, label %48, label %85
48: ; preds = %46
%49 = zext i32 %7 to i64
br label %72
50: ; preds = %42, %63
%51 = phi i64 [ %55, %63 ], [ 0, %42 ]
%52 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 %51
%53 = load i8, i8* %52
%54 = call i64 @findValue(i8 signext %53)
%55 = add nuw nsw i64 %51, 1
%56 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 %55
%57 = load i8, i8* %56
%58 = call i64 @findValue(i8 signext %57)
%59 = icmp sgt i64 %54, %58
br i1 %59, label %60, label %63
60: ; preds = %50
%61 = load i8, i8* %56
%62 = load i8, i8* %52
store i8 %62, i8* %56
store i8 %61, i8* %52
br label %63
63: ; preds = %50, %60
%64 = call i32 @strlen(i8* %3)
%65 = add nsw i32 %64, -1
%66 = sext i32 %65 to i64
%67 = icmp slt i64 %55, %66
br i1 %67, label %50, label %68
68: ; preds = %63, %42
%69 = add nuw nsw i32 %43, 1
%70 = call i32 @strlen(i8* %3)
%71 = icmp slt i32 %69, %70
br i1 %71, label %42, label %46
72: ; preds = %48, %82
%73 = phi i64 [ 0, %48 ], [ %83, %82 ]
%74 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 %73
%75 = load i8, i8* %74
%76 = add i8 %75, -50
%77 = icmp ult i8 %76, 8
br i1 %77, label %79, label %78
78: ; preds = %72
switch i8 %75, label %82 [
i8 65, label %79
i8 75, label %79
i8 81, label %79
i8 74, label %79
i8 84, label %79
]
79: ; preds = %78, %78, %78, %78, %78, %72
%80 = zext i8 %75 to i32
%81 = call i32 @putchar(i32 %80)
br label %82
82: ; preds = %78, %79
%83 = add nuw nsw i64 %73, 1
%84 = icmp eq i64 %83, %49
br i1 %84, label %85, label %72
85: ; preds = %82, %46, %40
ret i32 0
}