#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__ isalnum(char);
scalar_t__ isalpha(char);
scalar_t__ isdigit(char);
scalar_t__ islower(char);
scalar_t__ ispunct(char);
scalar_t__ isspace(char);
scalar_t__ isupper(char);
int /*<<< orphan*/ printf(char *, ...);
int strlen(char *);
int tolower(char);
int toupper(char);
int main() {
  int ii;
  char *str = "Hello, TK-421!";
  for (ii = 0; ii < strlen(str); ii++) {
    printf("str[%2d]='%c'  (ASCII 0x%x)  ", ii, str[ii], str[ii]);
    if (isalnum(str[ii])) {
      printf("ALNUM ");
    }
    if (isalpha(str[ii])) {
      printf("ALPHA ");
    }
    if (isdigit(str[ii])) {
      printf("DIGIT ");
    }
    if (islower(str[ii])) {
      printf("LOWER ");
    }
    if (isupper(str[ii])) {
      printf("UPPER ");
    }
    if (isspace(str[ii])) {
      printf("SPACE ");
    }
    if (ispunct(str[ii])) {
      printf("PUNCT ");
    }
    printf("\n");
  }
  printf("\nAll upper case: ");
  for (ii = 0; ii < strlen(str); ii++) {
    printf("%c", toupper(str[ii]));
  }
  printf("\nAll lower case: ");
  for (ii = 0; ii < strlen(str); ii++) {
    printf("%c", tolower(str[ii]));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe3a(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
cmp    %ecx,%eax
jge    1351 <main+0x1a1>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsbl (%rax,%rcx,1),%edx
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
lea    0xe00(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1080 <isalnum@plt>
cmp    $0x0,%rax
je     123f <main+0x8f>
lea    0xdf5(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   10c0 <isalpha@plt>
cmp    $0x0,%rax
je     1268 <main+0xb8>
lea    0xdd3(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1291 <main+0xe1>
lea    0xdb1(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <islower@plt>
cmp    $0x0,%rax
je     12ba <main+0x10a>
lea    0xd8f(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   10d0 <isupper@plt>
cmp    $0x0,%rax
je     12e3 <main+0x133>
lea    0xd6d(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   10a0 <isspace@plt>
cmp    $0x0,%rax
je     130c <main+0x15c>
lea    0xd4b(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1090 <ispunct@plt>
cmp    $0x0,%rax
je     1335 <main+0x185>
lea    0xd29(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xd22(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11d1 <main+0x21>
lea    0xd08(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
cmp    %ecx,%eax
jge    13b1 <main+0x201>
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1050 <toupper@plt>
mov    %eax,%esi
lea    0xcd6(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1366 <main+0x1b6>
lea    0xcbd(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
cmp    %ecx,%eax
jge    1411 <main+0x261>
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   10b0 <tolower@plt>
mov    %eax,%esi
lea    0xc76(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    13c6 <main+0x216>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xe2e(%rip),%rbx
mov    %rbx,%rdi
call   1070 <strlen@plt>
test   %eax,%eax
jle    12f7 <main+0x137>
lea    0xe26(%rip),%r14
lea    0xe44(%rip),%r12
lea    0xe36(%rip),%r13
xor    %ebp,%ebp
jmp    1221 <main+0x61>
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbp
mov    %rbx,%rdi
call   1070 <strlen@plt>
cltq
cmp    %rax,%rbp
jge    12f7 <main+0x137>
movsbl 0x0(%rbp,%rbx,1),%r15d
mov    %r14,%rdi
mov    %ebp,%esi
mov    %r15d,%edx
mov    %r15d,%ecx
xor    %eax,%eax
call   1080 <printf@plt>
mov    %r15d,%edi
call   1090 <isalnum@plt>
test   %rax,%rax
je     1250 <main+0x90>
mov    %r13,%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %r15d,%edi
call   10d0 <isalpha@plt>
test   %rax,%rax
je     1267 <main+0xa7>
mov    %r12,%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %r15d,%edi
call   1040 <isdigit@plt>
test   %rax,%rax
je     1282 <main+0xc2>
lea    0xdc0(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %r15d,%edi
call   1050 <islower@plt>
test   %rax,%rax
je     129d <main+0xdd>
lea    0xdac(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %r15d,%edi
call   10e0 <isupper@plt>
test   %rax,%rax
je     12b8 <main+0xf8>
lea    0xd98(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %r15d,%edi
call   10b0 <isspace@plt>
test   %rax,%rax
je     12d3 <main+0x113>
lea    0xd84(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %r15d,%edi
call   10a0 <ispunct@plt>
test   %rax,%rax
je     1200 <main+0x40>
lea    0xd6c(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
jmp    1200 <main+0x40>
lea    0xd60(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
lea    0xcf4(%rip),%rbx
mov    %rbx,%rdi
call   1070 <strlen@plt>
test   %eax,%eax
jle    1344 <main+0x184>
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
movsbl 0x0(%rbp,%rbx,1),%edi
call   1060 <toupper@plt>
mov    %eax,%edi
call   1030 <putchar@plt>
add    $0x1,%rbp
mov    %rbx,%rdi
call   1070 <strlen@plt>
cltq
cmp    %rax,%rbp
jl     1320 <main+0x160>
lea    0xd25(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
lea    0xca7(%rip),%rbx
mov    %rbx,%rdi
call   1070 <strlen@plt>
test   %eax,%eax
jle    1394 <main+0x1d4>
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
movsbl 0x0(%rbp,%rbx,1),%edi
call   10c0 <tolower@plt>
mov    %eax,%edi
call   1030 <putchar@plt>
add    $0x1,%rbp
mov    %rbx,%rdi
call   1070 <strlen@plt>
cltq
cmp    %rax,%rbp
jl     1370 <main+0x1b0>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [15 x i8] c"Hello, TK-421!\00"
@.str.1 = [30 x i8] c"str[%2d]='%c' (ASCII 0x%x) \00"
@.str.2 = [7 x i8] c"ALNUM \00"
@.str.3 = [7 x i8] c"ALPHA \00"
@.str.4 = [7 x i8] c"DIGIT \00"
@.str.5 = [7 x i8] c"LOWER \00"
@.str.6 = [7 x i8] c"UPPER \00"
@.str.7 = [7 x i8] c"SPACE \00"
@.str.8 = [7 x i8] c"PUNCT \00"
@.str.10 = [18 x i8] c"\0AAll upper case: \00"
@.str.12 = [18 x i8] c"\0AAll lower case: \00"
define i32 @main() {
%1 = tail call i32 @strlen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = icmp sgt i32 %1, 0
br i1 %2, label %3, label %50
3: ; preds = %0, %44
%4 = phi i64 [ %46, %44 ], [ 0, %0 ]
%5 = getelementptr inbounds [15 x i8], [15 x i8]* @.str, i64 0, i64 %4
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = trunc i64 %4 to i32
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %7, i32 %7)
%10 = tail call i64 @isalnum(i8 signext %6)
%11 = icmp eq i64 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %3
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
br label %14
14: ; preds = %12, %3
%15 = tail call i64 @isalpha(i8 signext %6)
%16 = icmp eq i64 %15, 0
br i1 %16, label %19, label %17
17: ; preds = %14
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %19
19: ; preds = %17, %14
%20 = tail call i64 @isdigit(i8 signext %6)
%21 = icmp eq i64 %20, 0
br i1 %21, label %24, label %22
22: ; preds = %19
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %24
24: ; preds = %22, %19
%25 = tail call i64 @islower(i8 signext %6)
%26 = icmp eq i64 %25, 0
br i1 %26, label %29, label %27
27: ; preds = %24
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %29
29: ; preds = %27, %24
%30 = tail call i64 @isupper(i8 signext %6)
%31 = icmp eq i64 %30, 0
br i1 %31, label %34, label %32
32: ; preds = %29
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
br label %34
34: ; preds = %32, %29
%35 = tail call i64 @isspace(i8 signext %6)
%36 = icmp eq i64 %35, 0
br i1 %36, label %39, label %37
37: ; preds = %34
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
br label %39
39: ; preds = %37, %34
%40 = tail call i64 @ispunct(i8 signext %6)
%41 = icmp eq i64 %40, 0
br i1 %41, label %44, label %42
42: ; preds = %39
%43 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
br label %44
44: ; preds = %42, %39
%45 = tail call i32 @putchar(i32 10)
%46 = add nuw nsw i64 %4, 1
%47 = tail call i32 @strlen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%48 = sext i32 %47 to i64
%49 = icmp slt i64 %46, %48
br i1 %49, label %3, label %50
50: ; preds = %44, %0
%51 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0))
%52 = tail call i32 @strlen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%53 = icmp sgt i32 %52, 0
br i1 %53, label %54, label %64
54: ; preds = %50, %54
%55 = phi i64 [ %60, %54 ], [ 0, %50 ]
%56 = getelementptr inbounds [15 x i8], [15 x i8]* @.str, i64 0, i64 %55
%57 = load i8, i8* %56
%58 = tail call i32 @toupper(i8 signext %57)
%59 = tail call i32 @putchar(i32 %58)
%60 = add nuw nsw i64 %55, 1
%61 = tail call i32 @strlen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%62 = sext i32 %61 to i64
%63 = icmp slt i64 %60, %62
br i1 %63, label %54, label %64
64: ; preds = %54, %50
%65 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.12, i64 0, i64 0))
%66 = tail call i32 @strlen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%67 = icmp sgt i32 %66, 0
br i1 %67, label %68, label %78
68: ; preds = %64, %68
%69 = phi i64 [ %74, %68 ], [ 0, %64 ]
%70 = getelementptr inbounds [15 x i8], [15 x i8]* @.str, i64 0, i64 %69
%71 = load i8, i8* %70
%72 = tail call i32 @tolower(i8 signext %71)
%73 = tail call i32 @putchar(i32 %72)
%74 = add nuw nsw i64 %69, 1
%75 = tail call i32 @strlen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%76 = sext i32 %75 to i64
%77 = icmp slt i64 %74, %76
br i1 %77, label %68, label %78
78: ; preds = %68, %64
ret i32 0
}