#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 /*<<< orphan*/);
char *malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ str_ltrim(char *, char *);
int /*<<< orphan*/ str_rtrim(char *, char *);
int /*<<< orphan*/ str_trim(char *, char *);
int strlen(char *);
int main() {
  int type = 0;
  char *src1 = "\t\n\f\v\r hello world\t\n\f\v\r ";
  char src2[] = "\t\n\f\v\r hello world\t\n\f\v\r ";
  char *src3 = "";
  char *dest1;
  char *dest2;
  char *dest3;
  dest1 = malloc(strlen(src1) * sizeof(char) + 1);
  dest2 = malloc(strlen(src2) * sizeof(char) + 1);
  dest3 = malloc(strlen(src3) * sizeof(char) + 1);
  assert(dest1 != NULL);
  assert(dest2 != NULL);
  assert(dest3 != NULL);
  printf("Before trim\n");
  printf("===========\n");
  printf("src1: %s\n", src1);
  printf("src2: %s\n", src2);
  printf("src3: %s\n", src3);
  printf("Select trim type and press \"Enter\" to confirm:\n");
  printf("=========\n");
  printf("0 - trim\n");
  printf("1 - ltrim\n");
  printf("2 - rtrim\n");
  printf("\n");
  scanf("%d", &type);
  switch (type) {
  case 1:
    str_ltrim(dest1, src1);
    str_ltrim(dest2, src2);
    str_ltrim(dest3, src3);
    break;
  case 2:
    str_rtrim(dest1, src1);
    str_rtrim(dest2, src2);
    str_rtrim(dest3, src3);
    break;
  default:
    str_trim(dest1, src1);
    str_trim(dest2, src2);
    str_trim(dest3, src3);
  }
  printf("\nAfter trim\n");
  printf("============\n");
  printf("dest1: %s\n", dest1);
  printf("dest2: %s\n", dest2);
  printf("dest3: %s\n", dest3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xe63(%rip),%rax
mov    %rax,-0x10(%rbp)
movabs $0x200d0b0c0a0964,%rax
mov    %rax,-0x20(%rbp)
movaps 0xf2a(%rip),%xmm0
movaps %xmm0,-0x30(%rbp)
lea    0xeb1(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%edi
add    $0x1,%edi
call   1080 <malloc@plt>
mov    %rax,-0x40(%rbp)
lea    -0x30(%rbp),%rdi
mov    %rdi,-0x60(%rbp)
call   1030 <strlen@plt>
mov    %eax,%edi
add    $0x1,%edi
call   1080 <malloc@plt>
mov    %rax,-0x48(%rbp)
mov    -0x38(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%edi
add    $0x1,%edi
call   1080 <malloc@plt>
mov    %rax,-0x50(%rbp)
mov    -0x40(%rbp),%rax
test   %rax,%rax
setne  %al
movzbl %al,%edi
call   1070 <assert@plt>
mov    -0x48(%rbp),%rax
test   %rax,%rax
setne  %al
movzbl %al,%edi
call   1070 <assert@plt>
mov    -0x50(%rbp),%rax
test   %rax,%rax
setne  %al
movzbl %al,%edi
call   1070 <assert@plt>
lea    0xdcd(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x55(%rbp)
call   1040 <printf@plt>
mov    -0x55(%rbp),%al
lea    0xe45(%rip),%rdi
call   1040 <printf@plt>
mov    -0x55(%rbp),%al
mov    -0x10(%rbp),%rsi
lea    0xdb3(%rip),%rdi
call   1040 <printf@plt>
mov    -0x60(%rbp),%rsi
mov    -0x55(%rbp),%al
lea    0xdaa(%rip),%rdi
call   1040 <printf@plt>
mov    -0x55(%rbp),%al
mov    -0x38(%rbp),%rsi
lea    0xda1(%rip),%rdi
call   1040 <printf@plt>
mov    -0x55(%rbp),%al
lea    0xd9c(%rip),%rdi
call   1040 <printf@plt>
mov    -0x55(%rbp),%al
lea    0xdf0(%rip),%rdi
call   1040 <printf@plt>
mov    -0x55(%rbp),%al
lea    0xdae(%rip),%rdi
call   1040 <printf@plt>
mov    -0x55(%rbp),%al
lea    0xda9(%rip),%rdi
call   1040 <printf@plt>
mov    -0x55(%rbp),%al
lea    0xda5(%rip),%rdi
call   1040 <printf@plt>
mov    -0x55(%rbp),%al
lea    0xd7f(%rip),%rdi
call   1040 <printf@plt>
lea    0xd95(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1090 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x54(%rbp)
sub    $0x1,%eax
je     132c <main+0x1ac>
jmp    131b <main+0x19b>
mov    -0x54(%rbp),%eax
sub    $0x2,%eax
je     1358 <main+0x1d8>
jmp    1384 <main+0x204>
mov    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1060 <str_ltrim@plt>
mov    -0x48(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1060 <str_ltrim@plt>
mov    -0x50(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1060 <str_ltrim@plt>
jmp    13ab <main+0x22b>
mov    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <str_rtrim@plt>
mov    -0x48(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1050 <str_rtrim@plt>
mov    -0x50(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1050 <str_rtrim@plt>
jmp    13ab <main+0x22b>
mov    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   10a0 <str_trim@plt>
mov    -0x48(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   10a0 <str_trim@plt>
mov    -0x50(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   10a0 <str_trim@plt>
lea    0xce4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xce3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x40(%rbp),%rsi
lea    0xcdf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x48(%rbp),%rsi
lea    0xcd8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x50(%rbp),%rsi
lea    0xcd1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
movl   $0x0,0xc(%rsp)
movaps 0xe43(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movabs $0x200d0b0c0a0964,%rax
mov    %rax,0x20(%rsp)
lea    0xe28(%rip),%r12
mov    %r12,%rdi
call   1050 <strlen@plt>
lea    0x1(%rax),%edi
call   10a0 <malloc@plt>
mov    %rax,%r14
lea    0x10(%rsp),%r13
mov    %r13,%rdi
call   1050 <strlen@plt>
lea    0x1(%rax),%edi
call   10a0 <malloc@plt>
mov    %rax,%r15
lea    0xe17(%rip),%rbp
mov    %rbp,%rdi
call   1050 <strlen@plt>
lea    0x1(%rax),%edi
call   10a0 <malloc@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %r14,%r14
setne  %dil
call   1090 <assert@plt>
xor    %edi,%edi
test   %r15,%r15
setne  %dil
call   1090 <assert@plt>
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1090 <assert@plt>
lea    0xe0c(%rip),%rdi
call   1040 <puts@plt>
lea    0xe65(%rip),%rdi
call   1040 <puts@plt>
lea    0xdb2(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xdab(%rip),%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xda4(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xdcd(%rip),%rdi
call   1040 <puts@plt>
lea    0xe1c(%rip),%rdi
call   1040 <puts@plt>
lea    0xde4(%rip),%rdi
call   1040 <puts@plt>
lea    0xde1(%rip),%rdi
call   1040 <puts@plt>
lea    0xddf(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xd57(%rip),%rdi
lea    0xc(%rsp),%rsi
call   10b0 <scanf@plt>
mov    0xc(%rsp),%eax
lea    0xd0c(%rip),%rsi
mov    %r14,%rdi
cmp    $0x2,%eax
je     1324 <main+0x184>
cmp    $0x1,%eax
jne    1347 <main+0x1a7>
call   1080 <str_ltrim@plt>
lea    0x10(%rsp),%rsi
mov    %r15,%rdi
call   1080 <str_ltrim@plt>
lea    0xd07(%rip),%rsi
mov    %rbx,%rdi
call   1080 <str_ltrim@plt>
jmp    1368 <main+0x1c8>
call   1070 <str_rtrim@plt>
lea    0x10(%rsp),%rsi
mov    %r15,%rdi
call   1070 <str_rtrim@plt>
lea    0xce4(%rip),%rsi
mov    %rbx,%rdi
call   1070 <str_rtrim@plt>
jmp    1368 <main+0x1c8>
call   10c0 <str_trim@plt>
lea    0x10(%rsp),%rsi
mov    %r15,%rdi
call   10c0 <str_trim@plt>
lea    0xcc1(%rip),%rsi
mov    %rbx,%rdi
call   10c0 <str_trim@plt>
lea    0xd43(%rip),%rdi
call   1040 <puts@plt>
lea    0xd43(%rip),%rdi
call   1040 <puts@plt>
lea    0xcb2(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xcac(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xca6(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [24 x i8] c"\09\0A\0C\0B\0D hello world\09\0A\0C\0B\0D \00"
@__const.main.src2 = [24 x i8] c"\09\0A\0C\0B\0D hello world\09\0A\0C\0B\0D \00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [13 x i8] c"Before trim\0A\00"
@.str.3 = [13 x i8] c"===========\0A\00"
@.str.4 = [10 x i8] c"src1: %s\0A\00"
@.str.5 = [10 x i8] c"src2: %s\0A\00"
@.str.6 = [10 x i8] c"src3: %s\0A\00"
@.str.7 = [48 x i8] c"Select trim type and press \22Enter\22 to confirm:\0A\00"
@.str.8 = [11 x i8] c"=========\0A\00"
@.str.9 = [10 x i8] c"0 - trim\0A\00"
@.str.10 = [11 x i8] c"1 - ltrim\0A\00"
@.str.11 = [11 x i8] c"2 - rtrim\0A\00"
@.str.12 = [2 x i8] c"\0A\00"
@.str.13 = [3 x i8] c"%d\00"
@.str.14 = [13 x i8] c"\0AAfter trim\0A\00"
@.str.15 = [14 x i8] c"============\0A\00"
@.str.16 = [11 x i8] c"dest1: %s\0A\00"
@.str.17 = [11 x i8] c"dest2: %s\0A\00"
@.str.18 = [11 x i8] c"dest3: %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [24 x i8]
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i32 0, i32* %1
store i32 0, i32* %2
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8** %3
%9 = bitcast [24 x i8]* %4 to i8*
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8** %5
%10 = load i8*, i8** %3
%11 = call i32 @strlen(i8* %10)
%12 = sext i32 %11 to i64
%13 = mul i64 %12, 1
%14 = add i64 %13, 1
%15 = trunc i64 %14 to i32
%16 = call i8* @malloc(i32 %15)
store i8* %16, i8** %6
%17 = getelementptr inbounds [24 x i8], [24 x i8]* %4, i64 0, i64 0
%18 = call i32 @strlen(i8* %17)
%19 = sext i32 %18 to i64
%20 = mul i64 %19, 1
%21 = add i64 %20, 1
%22 = trunc i64 %21 to i32
%23 = call i8* @malloc(i32 %22)
store i8* %23, i8** %7
%24 = load i8*, i8** %5
%25 = call i32 @strlen(i8* %24)
%26 = sext i32 %25 to i64
%27 = mul i64 %26, 1
%28 = add i64 %27, 1
%29 = trunc i64 %28 to i32
%30 = call i8* @malloc(i32 %29)
store i8* %30, i8** %8
%31 = load i8*, i8** %6
%32 = icmp ne i8* %31, null
%33 = zext i1 %32 to i32
%34 = call i32 @assert(i32 %33)
%35 = load i8*, i8** %7
%36 = icmp ne i8* %35, null
%37 = zext i1 %36 to i32
%38 = call i32 @assert(i32 %37)
%39 = load i8*, i8** %8
%40 = icmp ne i8* %39, null
%41 = zext i1 %40 to i32
%42 = call i32 @assert(i32 %41)
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%45 = load i8*, i8** %3
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8* %45)
%47 = getelementptr inbounds [24 x i8], [24 x i8]* %4, i64 0, i64 0
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i8* %47)
%49 = load i8*, i8** %5
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i8* %49)
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.7, i64 0, i64 0))
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0))
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0))
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
%57 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i32* %2)
%58 = load i32, i32* %2
switch i32 %58, label %79 [
i32 1, label %59
i32 2, label %69
]
59: ; preds = %0
%60 = load i8*, i8** %6
%61 = load i8*, i8** %3
%62 = call i32 @str_ltrim(i8* %60, i8* %61)
%63 = load i8*, i8** %7
%64 = getelementptr inbounds [24 x i8], [24 x i8]* %4, i64 0, i64 0
%65 = call i32 @str_ltrim(i8* %63, i8* %64)
%66 = load i8*, i8** %8
%67 = load i8*, i8** %5
%68 = call i32 @str_ltrim(i8* %66, i8* %67)
br label %89
69: ; preds = %0
%70 = load i8*, i8** %6
%71 = load i8*, i8** %3
%72 = call i32 @str_rtrim(i8* %70, i8* %71)
%73 = load i8*, i8** %7
%74 = getelementptr inbounds [24 x i8], [24 x i8]* %4, i64 0, i64 0
%75 = call i32 @str_rtrim(i8* %73, i8* %74)
%76 = load i8*, i8** %8
%77 = load i8*, i8** %5
%78 = call i32 @str_rtrim(i8* %76, i8* %77)
br label %89
79: ; preds = %0
%80 = load i8*, i8** %6
%81 = load i8*, i8** %3
%82 = call i32 @str_trim(i8* %80, i8* %81)
%83 = load i8*, i8** %7
%84 = getelementptr inbounds [24 x i8], [24 x i8]* %4, i64 0, i64 0
%85 = call i32 @str_trim(i8* %83, i8* %84)
%86 = load i8*, i8** %8
%87 = load i8*, i8** %5
%88 = call i32 @str_trim(i8* %86, i8* %87)
br label %89
89: ; preds = %79, %69, %59
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0))
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0))
%92 = load i8*, i8** %6
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.16, i64 0, i64 0), i8* %92)
%94 = load i8*, i8** %7
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.17, i64 0, i64 0), i8* %94)
%96 = load i8*, i8** %8
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.18, i64 0, i64 0), i8* %96)
ret i32 0
}

LLVM IR (-O2):
@__const.main.src2 = [24 x i8] c"\09\0A\0C\0B\0D hello world\09\0A\0C\0B\0D \00"
@.str.1 = [1 x i8] zeroinitializer
@.str.4 = [10 x i8] c"src1: %s\0A\00"
@.str.5 = [10 x i8] c"src2: %s\0A\00"
@.str.6 = [10 x i8] c"src3: %s\0A\00"
@.str.13 = [3 x i8] c"%d\00"
@.str.16 = [11 x i8] c"dest1: %s\0A\00"
@.str.17 = [11 x i8] c"dest2: %s\0A\00"
@.str.18 = [11 x i8] c"dest3: %s\0A\00"
@str = [12 x i8] c"Before trim\00"
@str.19 = [12 x i8] c"===========\00"
@str.20 = [47 x i8] c"Select trim type and press \22Enter\22 to confirm:\00"
@str.21 = [10 x i8] c"=========\00"
@str.22 = [9 x i8] c"0 - trim\00"
@str.23 = [10 x i8] c"1 - ltrim\00"
@str.24 = [10 x i8] c"2 - rtrim\00"
@str.25 = [12 x i8] c"\0AAfter trim\00"
@str.26 = [13 x i8] c"============\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [24 x i8]
%3 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%4 = getelementptr inbounds [24 x i8], [24 x i8]* %2, i64 0, i64 0
%5 = tail call i32 @strlen(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @__const.main.src2, i64 0, i64 0))
%6 = add i32 %5, 1
%7 = tail call i8* @malloc(i32 %6)
%8 = call i32 @strlen(i8* %4)
%9 = add i32 %8, 1
%10 = call i8* @malloc(i32 %9)
%11 = call i32 @strlen(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%12 = add i32 %11, 1
%13 = call i8* @malloc(i32 %12)
%14 = icmp ne i8* %7, null
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = icmp ne i8* %10, null
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18)
%20 = icmp ne i8* %13, null
%21 = zext i1 %20 to i32
%22 = call i32 @assert(i32 %21)
%23 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%24 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.19, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @__const.main.src2, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i8* %4)
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%28 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.20, i64 0, i64 0))
%29 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.21, i64 0, i64 0))
%30 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.22, i64 0, i64 0))
%31 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.23, i64 0, i64 0))
%32 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.24, i64 0, i64 0))
%33 = call i32 @putchar(i32 10)
%34 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), i32* %1)
%35 = load i32, i32* %1
switch i32 %35, label %44 [
i32 1, label %36
i32 2, label %40
]
36: ; preds = %0
%37 = call i32 @str_ltrim(i8* %7, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @__const.main.src2, i64 0, i64 0))
%38 = call i32 @str_ltrim(i8* %10, i8* %4)
%39 = call i32 @str_ltrim(i8* %13, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %48
40: ; preds = %0
%41 = call i32 @str_rtrim(i8* %7, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @__const.main.src2, i64 0, i64 0))
%42 = call i32 @str_rtrim(i8* %10, i8* %4)
%43 = call i32 @str_rtrim(i8* %13, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %48
44: ; preds = %0
%45 = call i32 @str_trim(i8* %7, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @__const.main.src2, i64 0, i64 0))
%46 = call i32 @str_trim(i8* %10, i8* %4)
%47 = call i32 @str_trim(i8* %13, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %48
48: ; preds = %44, %40, %36
%49 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.25, i64 0, i64 0))
%50 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.26, i64 0, i64 0))
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.16, i64 0, i64 0), i8* %7)
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.17, i64 0, i64 0), i8* %10)
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.18, i64 0, i64 0), i8* %13)
ret i32 0
}