#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 */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ close(int);
scalar_t__ fork();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ isalpha(char);
scalar_t__ isupper(char);
int pipe(int *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ read(int, char *, int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char tolower(char);
char toupper(char);
int /*<<< orphan*/ wait(int /*<<< orphan*/ *);
int /*<<< orphan*/ write(int, char *, int);
int main(int argc, char *argv[]) {
  pid_t pid;
  int fd[2];
  if (argc != 2) {
    printf("ERROR: Incorrect number of parameters.\n");
    return 0;
  }
  if (strlen(argv[1]) > 63) {
    printf("ERROR: Incorrect number of parameters.\n");
    return 0;
  }
  if (pipe(fd) == -1) {
    fprintf(stderr, "Pipe failed");
    return 1;
  }
  pid = fork();
  if (pid < 0) {
    fprintf(stderr, "Fork failed");
    return 1;
  }
  if (pid > 0) {
    char parent_write_msg[64] = "";
    char parent_read_msg[64] = "";
    strcpy(parent_write_msg, argv[1]);
    write(fd[1], parent_write_msg, strlen(parent_write_msg) + 1);
    close(fd[1]);
    wait(NULL);
    read(fd[0], parent_read_msg, 64);
    printf("%s\n", parent_read_msg);
    close(fd[0]);
  } else {
    char child_write_msg[64] = "";
    char child_read_msg[64] = "";
    int str_len, i;
    read(fd[0], child_read_msg, 64);
    close(fd[0]);
    str_len = strlen(child_read_msg);
    for (i = 0; i < str_len; i++) {
      char c = child_read_msg[i];
      if (!isalpha(c))
        child_write_msg[i] = c;
      else {
        if (isupper(c))
          child_write_msg[i] = tolower(c);
        else
          child_write_msg[i] = toupper(c);
      }
    }
    child_write_msg[i] = '\0';
    write(fd[1], child_write_msg, strlen(child_write_msg) + 1);
    close(fd[1]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x150,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     122d <main+0x3d>
lea    0xde6(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    14fc <main+0x30c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1060 <strlen@plt>
cmp    $0x3f,%eax
jle    125d <main+0x6d>
lea    0xdb6(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    14fc <main+0x30c>
lea    -0x20(%rbp),%rdi
call   10a0 <pipe@plt>
cmp    $0xffffffff,%eax
jne    1290 <main+0xa0>
mov    0x2d6a(%rip),%rax
mov    (%rax),%edi
lea    0xda9(%rip),%rsi
call   10c0 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    14fc <main+0x30c>
mov    $0x0,%al
call   1110 <fork@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jge    12c7 <main+0xd7>
mov    0x2d33(%rip),%rax
mov    (%rax),%edi
lea    0xd7e(%rip),%rsi
call   10c0 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    14fc <main+0x30c>
cmpq   $0x0,-0x18(%rbp)
jle    1381 <main+0x191>
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1080 <memset@plt>
lea    -0xa0(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1080 <memset@plt>
lea    -0x60(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1030 <strcpy@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x13c(%rbp)
lea    -0x60(%rbp),%rax
mov    %rax,-0x138(%rbp)
lea    -0x60(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x13c(%rbp),%edi
mov    -0x138(%rbp),%rsi
mov    %eax,%edx
add    $0x1,%edx
call   1050 <write@plt>
mov    -0x1c(%rbp),%edi
call   1090 <close@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1100 <wait@plt>
mov    -0x20(%rbp),%edi
lea    -0xa0(%rbp),%rsi
mov    $0x40,%edx
call   10b0 <read@plt>
lea    -0xa0(%rbp),%rsi
lea    0xcd3(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x20(%rbp),%edi
call   1090 <close@plt>
jmp    14f5 <main+0x305>
lea    -0xe0(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1080 <memset@plt>
lea    -0x120(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1080 <memset@plt>
mov    -0x20(%rbp),%edi
lea    -0x120(%rbp),%rsi
mov    $0x40,%edx
call   10b0 <read@plt>
mov    -0x20(%rbp),%edi
call   1090 <close@plt>
lea    -0x120(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,-0x124(%rbp)
movl   $0x0,-0x128(%rbp)
mov    -0x128(%rbp),%eax
cmp    -0x124(%rbp),%eax
jge    14a4 <main+0x2b4>
movslq -0x128(%rbp),%rax
mov    -0x120(%rbp,%rax,1),%al
mov    %al,-0x129(%rbp)
movsbl -0x129(%rbp),%edi
call   10e0 <isalpha@plt>
cmp    $0x0,%eax
jne    1433 <main+0x243>
mov    -0x129(%rbp),%cl
movslq -0x128(%rbp),%rax
mov    %cl,-0xe0(%rbp,%rax,1)
jmp    148b <main+0x29b>
movsbl -0x129(%rbp),%edi
call   10f0 <isupper@plt>
cmp    $0x0,%rax
je     146a <main+0x27a>
movsbl -0x129(%rbp),%edi
call   10d0 <tolower@plt>
mov    %al,%cl
movslq -0x128(%rbp),%rax
mov    %cl,-0xe0(%rbp,%rax,1)
jmp    1486 <main+0x296>
movsbl -0x129(%rbp),%edi
call   1040 <toupper@plt>
mov    %al,%cl
movslq -0x128(%rbp),%rax
mov    %cl,-0xe0(%rbp,%rax,1)
jmp    148b <main+0x29b>
jmp    1490 <main+0x2a0>
mov    -0x128(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x128(%rbp)
jmp    13df <main+0x1ef>
movslq -0x128(%rbp),%rax
movb   $0x0,-0xe0(%rbp,%rax,1)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x14c(%rbp)
lea    -0xe0(%rbp),%rax
mov    %rax,-0x148(%rbp)
lea    -0xe0(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x14c(%rbp),%edi
mov    -0x148(%rbp),%rsi
mov    %eax,%edx
add    $0x1,%edx
call   1050 <write@plt>
mov    -0x1c(%rbp),%edi
call   1090 <close@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x150,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x90,%rsp
cmp    $0x2,%edi
jne    1205 <main+0x25>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1070 <strlen@plt>
cmp    $0x40,%eax
jl     1227 <main+0x47>
lea    0xe0c(%rip),%rdi
call   1050 <puts@plt>
xor    %r14d,%r14d
mov    %r14d,%eax
add    $0x90,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x8(%rsp),%rdi
call   1090 <pipe@plt>
cmp    $0xffffffff,%eax
je     12e2 <main+0x102>
xor    %eax,%eax
call   1100 <fork@plt>
test   %rax,%rax
js     12f4 <main+0x114>
xorps  %xmm0,%xmm0
je     1314 <main+0x134>
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
mov    0x8(%rbx),%rsi
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    0xc(%rsp),%ebp
mov    %rbx,%rdi
call   1070 <strlen@plt>
lea    0x1(%rax),%edx
mov    %ebp,%edi
mov    %rbx,%rsi
call   1060 <write@plt>
mov    0xc(%rsp),%edi
call   1080 <close@plt>
xor    %r14d,%r14d
xor    %edi,%edi
call   10f0 <wait@plt>
mov    0x8(%rsp),%edi
lea    0x50(%rsp),%rbx
mov    %rbx,%rsi
mov    $0x40,%edx
call   10a0 <read@plt>
mov    %rbx,%rdi
call   1050 <puts@plt>
mov    0x8(%rsp),%edi
jmp    13df <main+0x1ff>
mov    0x2cf7(%rip),%rax
mov    (%rax),%edi
lea    0xd0e(%rip),%rsi
jmp    1304 <main+0x124>
mov    0x2ce5(%rip),%rax
mov    (%rax),%edi
lea    0xd08(%rip),%rsi
call   10b0 <fprintf@plt>
mov    $0x1,%r14d
jmp    1214 <main+0x34>
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
mov    0x8(%rsp),%edi
lea    0x50(%rsp),%rbx
mov    %rbx,%rsi
mov    $0x40,%edx
call   10a0 <read@plt>
mov    0x8(%rsp),%edi
call   1080 <close@plt>
mov    %rbx,%rdi
call   1070 <strlen@plt>
xor    %r14d,%r14d
test   %eax,%eax
jle    13b4 <main+0x1d4>
mov    %eax,%r15d
xor    %ebp,%ebp
jmp    1388 <main+0x1a8>
call   1040 <toupper@plt>
mov    %eax,%ebx
mov    %bl,0x10(%rsp,%rbp,1)
add    $0x1,%rbp
cmp    %rbp,%r15
je     13b7 <main+0x1d7>
movzbl 0x50(%rsp,%rbp,1),%ebx
movsbl %bl,%r12d
mov    %r12d,%edi
call   10d0 <isalpha@plt>
test   %eax,%eax
je     137b <main+0x19b>
mov    %r12d,%edi
call   10e0 <isupper@plt>
mov    %r12d,%edi
test   %rax,%rax
je     1374 <main+0x194>
call   10c0 <tolower@plt>
jmp    1379 <main+0x199>
xor    %r15d,%r15d
movb   $0x0,0x10(%rsp,%r15,1)
mov    0xc(%rsp),%ebx
lea    0x10(%rsp),%rbp
mov    %rbp,%rdi
call   1070 <strlen@plt>
lea    0x1(%rax),%edx
mov    %ebx,%edi
mov    %rbp,%rsi
call   1060 <write@plt>
mov    0xc(%rsp),%edi
call   1080 <close@plt>
jmp    1214 <main+0x34>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str.1 = [12 x i8] c"Pipe failed\00"
@.str.2 = [12 x i8] c"Fork failed\00"
@str.4 = [39 x i8] c"ERROR: Incorrect number of parameters.\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [2 x i32]
%4 = alloca [64 x i8]
%5 = alloca [64 x i8]
%6 = alloca [64 x i8]
%7 = alloca [64 x i8]
%8 = bitcast [2 x i32]* %3 to i8*
%9 = icmp eq i32 %0, 2
br i1 %9, label %12, label %10
10: ; preds = %2
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.4, i64 0, i64 0))
br label %93
12: ; preds = %2
%13 = getelementptr inbounds i8*, i8** %1, i64 1
%14 = load i8*, i8** %13
%15 = tail call i32 @strlen(i8* %14)
%16 = icmp sgt i32 %15, 63
br i1 %16, label %17, label %19
17: ; preds = %12
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.4, i64 0, i64 0))
br label %93
19: ; preds = %12
%20 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%21 = call i32 @pipe(i32* %20)
%22 = icmp eq i32 %21, -1
br i1 %22, label %23, label %26
23: ; preds = %19
%24 = load i32, i32* @stderr
%25 = call i32 @fprintf(i32 %24, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
br label %93
26: ; preds = %19
%27 = call i64 (...) @fork()
%28 = icmp slt i64 %27, 0
br i1 %28, label %29, label %32
29: ; preds = %26
%30 = load i32, i32* @stderr
%31 = call i32 @fprintf(i32 %30, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
br label %93
32: ; preds = %26
%33 = icmp eq i64 %27, 0
br i1 %33, label %52, label %34
34: ; preds = %32
%35 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%36 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 0
%37 = load i8*, i8** %13
%38 = call i32 @strcpy(i8* %35, i8* %37)
%39 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%40 = load i32, i32* %39
%41 = call i32 @strlen(i8* %35)
%42 = add nsw i32 %41, 1
%43 = call i32 @write(i32 %40, i8* %35, i32 %42)
%44 = load i32, i32* %39
%45 = call i32 @close(i32 %44)
%46 = call i32 @wait(i32* null)
%47 = load i32, i32* %20
%48 = call i32 @read(i32 %47, i8* %36, i32 64)
%49 = call i32 @puts(i8* %36)
%50 = load i32, i32* %20
%51 = call i32 @close(i32 %50)
br label %93
52: ; preds = %32
%53 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 0
%54 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 0
%55 = load i32, i32* %20
%56 = call i32 @read(i32 %55, i8* %54, i32 64)
%57 = load i32, i32* %20
%58 = call i32 @close(i32 %57)
%59 = call i32 @strlen(i8* %54)
%60 = icmp sgt i32 %59, 0
br i1 %60, label %61, label %83
61: ; preds = %52
%62 = zext i32 %59 to i64
br label %63
63: ; preds = %61, %76
%64 = phi i64 [ 0, %61 ], [ %79, %76 ]
%65 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 %64
%66 = load i8, i8* %65
%67 = call i32 @isalpha(i8 signext %66)
%68 = icmp eq i32 %67, 0
br i1 %68, label %76, label %69
69: ; preds = %63
%70 = call i64 @isupper(i8 signext %66)
%71 = icmp eq i64 %70, 0
br i1 %71, label %74, label %72
72: ; preds = %69
%73 = call signext i8 @tolower(i8 signext %66)
br label %76
74: ; preds = %69
%75 = call signext i8 @toupper(i8 signext %66)
br label %76
76: ; preds = %63, %72, %74
%77 = phi i8 [ %73, %72 ], [ %75, %74 ], [ %66, %63 ]
%78 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 %64
store i8 %77, i8* %78
%79 = add nuw nsw i64 %64, 1
%80 = icmp eq i64 %79, %62
br i1 %80, label %81, label %63
81: ; preds = %76
%82 = zext i32 %59 to i64
br label %83
83: ; preds = %52, %81
%84 = phi i64 [ %82, %81 ], [ 0, %52 ]
%85 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 %84
store i8 0, i8* %85
%86 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%87 = load i32, i32* %86
%88 = call i32 @strlen(i8* %53)
%89 = add nsw i32 %88, 1
%90 = call i32 @write(i32 %87, i8* %53, i32 %89)
%91 = load i32, i32* %86
%92 = call i32 @close(i32 %91)
br label %93
93: ; preds = %34, %83, %29, %23, %17, %10
%94 = phi i32 [ 0, %10 ], [ 0, %17 ], [ 1, %23 ], [ 1, %29 ], [ 0, %83 ], [ 0, %34 ]
ret i32 %94
}