#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 index(char *, char);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
int strlen(char *);
int main() {
  char s1[50], s2[50], c1;
  scanf("%s\n", s1);
  scanf("%c\n", &c1);
  scanf("%s", s2);
  char s3[100];
  int i, j;
  if ((index(s1, c1)) == 0) {
    for (i = 0; i < (strlen(s1) + strlen(s2)); i++) {
      if (i < strlen(s2))
        s3[i] = s2[i];
      else
        s3[i] = s1[(i - strlen(s2))];
    }
    printf("%s", s3);
  }
  if (index(s1, c1) > 0) {
    for (j = 0; j < index(s1, c1); j++) {
      s3[j] = s1[j];
    }
    int k = 0;
    for (j = index(s1, c1); j < (index(s1, c1) + strlen(s2)); j++) {
      s3[j] = s2[k];
      k++;
    }
    int l = index(s1, c1);
    for (j = (index(s1, c1) + strlen(s2)); j < (strlen(s1) + strlen(s2)); j++) {
      s3[j] = s1[l];
      l++;
    }
    printf("%s", s3);
  } else {
    printf("%s", s1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rsi
lea    0xea3(%rip),%rdi
call   1060 <scanf@plt>
lea    0xe9b(%rip),%rdi
lea    -0x81(%rbp),%rsi
call   1060 <scanf@plt>
lea    -0x80(%rbp),%rsi
lea    0xe88(%rip),%rdi
call   1060 <scanf@plt>
lea    -0x40(%rbp),%rdi
movsbl -0x81(%rbp),%esi
call   1050 <index@plt>
cmp    $0x0,%eax
jne    1286 <main+0x146>
movl   $0x0,-0xf4(%rbp)
mov    -0xf4(%rbp),%eax
mov    %eax,-0x104(%rbp)
lea    -0x40(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x108(%rbp)
lea    -0x80(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x108(%rbp),%ecx
mov    %eax,%edx
mov    -0x104(%rbp),%eax
add    %edx,%ecx
cmp    %ecx,%eax
jge    1273 <main+0x133>
mov    -0xf4(%rbp),%eax
mov    %eax,-0x10c(%rbp)
lea    -0x80(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x10c(%rbp),%eax
cmp    %ecx,%eax
jge    1227 <main+0xe7>
movslq -0xf4(%rbp),%rax
mov    -0x80(%rbp,%rax,1),%cl
movslq -0xf4(%rbp),%rax
mov    %cl,-0xf0(%rbp,%rax,1)
jmp    125a <main+0x11a>
mov    -0xf4(%rbp),%eax
mov    %eax,-0x110(%rbp)
lea    -0x80(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x110(%rbp),%eax
sub    %ecx,%eax
cltq
mov    -0x40(%rbp,%rax,1),%cl
movslq -0xf4(%rbp),%rax
mov    %cl,-0xf0(%rbp,%rax,1)
jmp    125f <main+0x11f>
mov    -0xf4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf4(%rbp)
jmp    11a8 <main+0x68>
lea    -0xf0(%rbp),%rsi
lea    0xd87(%rip),%rdi
call   1040 <printf@plt>
lea    -0x40(%rbp),%rdi
movsbl -0x81(%rbp),%esi
call   1050 <index@plt>
cmp    $0x0,%eax
jle    1476 <main+0x336>
movl   $0x0,-0xf8(%rbp)
mov    -0xf8(%rbp),%eax
mov    %eax,-0x114(%rbp)
lea    -0x40(%rbp),%rdi
movsbl -0x81(%rbp),%esi
call   1050 <index@plt>
mov    %eax,%ecx
mov    -0x114(%rbp),%eax
cmp    %ecx,%eax
jge    1302 <main+0x1c2>
movslq -0xf8(%rbp),%rax
mov    -0x40(%rbp,%rax,1),%cl
movslq -0xf8(%rbp),%rax
mov    %cl,-0xf0(%rbp,%rax,1)
mov    -0xf8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf8(%rbp)
jmp    12a9 <main+0x169>
movl   $0x0,-0xfc(%rbp)
lea    -0x40(%rbp),%rdi
movsbl -0x81(%rbp),%esi
call   1050 <index@plt>
mov    %eax,-0xf8(%rbp)
mov    -0xf8(%rbp),%eax
mov    %eax,-0x118(%rbp)
lea    -0x40(%rbp),%rdi
movsbl -0x81(%rbp),%esi
call   1050 <index@plt>
mov    %eax,-0x11c(%rbp)
lea    -0x80(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x11c(%rbp),%ecx
mov    %eax,%edx
mov    -0x118(%rbp),%eax
add    %edx,%ecx
cmp    %ecx,%eax
jge    13a1 <main+0x261>
movslq -0xfc(%rbp),%rax
mov    -0x80(%rbp,%rax,1),%cl
movslq -0xf8(%rbp),%rax
mov    %cl,-0xf0(%rbp,%rax,1)
mov    -0xfc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xfc(%rbp)
mov    -0xf8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf8(%rbp)
jmp    1322 <main+0x1e2>
lea    -0x40(%rbp),%rdi
movsbl -0x81(%rbp),%esi
call   1050 <index@plt>
mov    %eax,-0x100(%rbp)
lea    -0x40(%rbp),%rdi
movsbl -0x81(%rbp),%esi
call   1050 <index@plt>
mov    %eax,-0x120(%rbp)
lea    -0x80(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x120(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xf8(%rbp)
mov    -0xf8(%rbp),%eax
mov    %eax,-0x124(%rbp)
lea    -0x40(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x128(%rbp)
lea    -0x80(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x128(%rbp),%ecx
mov    %eax,%edx
mov    -0x124(%rbp),%eax
add    %edx,%ecx
cmp    %ecx,%eax
jge    145e <main+0x31e>
movslq -0x100(%rbp),%rax
mov    -0x40(%rbp,%rax,1),%cl
movslq -0xf8(%rbp),%rax
mov    %cl,-0xf0(%rbp,%rax,1)
mov    -0x100(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x100(%rbp)
mov    -0xf8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf8(%rbp)
jmp    13e6 <main+0x2a6>
lea    -0xf0(%rbp),%rsi
lea    0xb9c(%rip),%rdi
call   1040 <printf@plt>
jmp    1486 <main+0x346>
lea    -0x40(%rbp),%rsi
lea    0xb87(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xf8,%rsp
lea    0xea8(%rip),%rdi
lea    0x10(%rsp),%r14
mov    %r14,%rsi
call   1060 <scanf@plt>
lea    0xe98(%rip),%rdi
lea    0xf(%rsp),%rsi
call   1060 <scanf@plt>
lea    0xe8b(%rip),%rdi
lea    0x50(%rsp),%rsi
call   1060 <scanf@plt>
movsbl 0xf(%rsp),%esi
mov    %r14,%rdi
call   1050 <index@plt>
test   %eax,%eax
jne    123e <main+0xfe>
lea    0x10(%rsp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ebx
lea    0x50(%rsp),%rdi
call   1030 <strlen@plt>
add    %ebx,%eax
jle    122a <main+0xea>
xor    %ebx,%ebx
lea    0x50(%rsp),%r12
lea    0x10(%rsp),%r15
jmp    1211 <main+0xd1>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r12,%rdi
call   1030 <strlen@plt>
cltq
mov    %rbx,%rcx
sub    %rax,%rcx
lea    (%rsp,%rcx,1),%rax
add    $0x10,%rax
movzbl (%rax),%eax
mov    %al,0x90(%rsp,%rbx,1)
add    $0x1,%rbx
mov    %r15,%rdi
call   1030 <strlen@plt>
mov    %eax,%ebp
mov    %r12,%rdi
call   1030 <strlen@plt>
add    %ebp,%eax
cltq
cmp    %rax,%rbx
jge    122a <main+0xea>
mov    %r12,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%rbx
jge    11d0 <main+0x90>
lea    (%rsp,%rbx,1),%rax
add    $0x50,%rax
jmp    11e8 <main+0xa8>
lea    0xdd7(%rip),%rdi
lea    0x90(%rsp),%rsi
call   1040 <printf@plt>
movsbl 0xf(%rsp),%esi
mov    %r14,%rdi
call   1050 <index@plt>
test   %eax,%eax
jle    13c0 <main+0x280>
movsbl 0xf(%rsp),%esi
lea    0x10(%rsp),%rdi
call   1050 <index@plt>
test   %eax,%eax
jle    1294 <main+0x154>
xor    %ebp,%ebp
lea    0x10(%rsp),%rbx
nopl   (%rax)
movzbl 0x10(%rsp,%rbp,1),%eax
mov    %al,0x90(%rsp,%rbp,1)
add    $0x1,%rbp
movsbl 0xf(%rsp),%esi
mov    %rbx,%rdi
call   1050 <index@plt>
cltq
cmp    %rax,%rbp
jl     1270 <main+0x130>
movsbl 0xf(%rsp),%esi
lea    0x10(%rsp),%rbp
mov    %rbp,%rdi
call   1050 <index@plt>
mov    %eax,%ebx
movsbl 0xf(%rsp),%esi
mov    %rbp,%rdi
call   1050 <index@plt>
mov    %eax,%ebp
lea    0x50(%rsp),%r14
mov    %r14,%rdi
call   1030 <strlen@plt>
add    %ebp,%eax
cmp    %eax,%ebx
jge    1315 <main+0x1d5>
movslq %ebx,%rbx
lea    0x10(%rsp),%r15
mov    %r14,%rbp
cs nopw 0x0(%rax,%rax,1)
nop
movzbl 0x0(%rbp),%eax
mov    %al,0x90(%rsp,%rbx,1)
add    $0x1,%rbx
movsbl 0xf(%rsp),%esi
mov    %r15,%rdi
call   1050 <index@plt>
mov    %eax,%r12d
mov    %r14,%rdi
call   1030 <strlen@plt>
add    %r12d,%eax
cltq
add    $0x1,%rbp
cmp    %rax,%rbx
jl     12e0 <main+0x1a0>
lea    0x90(%rsp),%r14
movsbl 0xf(%rsp),%esi
lea    0x10(%rsp),%r12
mov    %r12,%rdi
call   1050 <index@plt>
mov    %eax,%r15d
movsbl 0xf(%rsp),%esi
mov    %r12,%rdi
call   1050 <index@plt>
mov    %eax,%ebx
lea    0x50(%rsp),%r13
mov    %r13,%rdi
call   1030 <strlen@plt>
mov    %eax,%ebp
add    %ebx,%ebp
mov    %r12,%rdi
call   1030 <strlen@plt>
mov    %eax,%ebx
mov    %r13,%rdi
call   1030 <strlen@plt>
add    %ebx,%eax
cmp    %eax,%ebp
jge    13c0 <main+0x280>
movslq %r15d,%rax
movslq %ebp,%rbx
lea    (%rsp,%rax,1),%rbp
add    $0x10,%rbp
lea    0x10(%rsp),%r15
lea    0x50(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl 0x0(%rbp),%eax
mov    %al,0x90(%rsp,%rbx,1)
add    $0x1,%rbx
mov    %r15,%rdi
call   1030 <strlen@plt>
mov    %eax,%r13d
mov    %r12,%rdi
call   1030 <strlen@plt>
add    %r13d,%eax
cltq
add    $0x1,%rbp
cmp    %rax,%rbx
jl     1390 <main+0x250>
lea    0xc41(%rip),%rdi
mov    %r14,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xf8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [4 x i8] c"%c\0A\00"
@.str.2 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [50 x i8]
%2 = alloca [50 x i8]
%3 = alloca i8
%4 = alloca [100 x i8]
%5 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %6)
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%11 = load i8, i8* %3
%12 = call i32 @index(i8* %5, i8 signext %11)
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %44
14: ; preds = %0
%15 = call i32 @strlen(i8* %5)
%16 = call i32 @strlen(i8* %6)
%17 = add nsw i32 %16, %15
%18 = icmp sgt i32 %17, 0
br i1 %18, label %19, label %42
19: ; preds = %14, %32
%20 = phi i64 [ %36, %32 ], [ 0, %14 ]
%21 = call i32 @strlen(i8* %6)
%22 = sext i32 %21 to i64
%23 = icmp slt i64 %20, %22
br i1 %23, label %24, label %26
24: ; preds = %19
%25 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 %20
br label %32
26: ; preds = %19
%27 = call i32 @strlen(i8* %6)
%28 = trunc i64 %20 to i32
%29 = sub nsw i32 %28, %27
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %30
br label %32
32: ; preds = %24, %26
%33 = phi i8* [ %25, %24 ], [ %31, %26 ]
%34 = load i8, i8* %33
%35 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %20
store i8 %34, i8* %35
%36 = add nuw nsw i64 %20, 1
%37 = call i32 @strlen(i8* %5)
%38 = call i32 @strlen(i8* %6)
%39 = add nsw i32 %38, %37
%40 = sext i32 %39 to i64
%41 = icmp slt i64 %36, %40
br i1 %41, label %19, label %42
42: ; preds = %32, %14
%43 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %10)
br label %44
44: ; preds = %42, %0
%45 = load i8, i8* %3
%46 = call i32 @index(i8* %5, i8 signext %45)
%47 = icmp sgt i32 %46, 0
br i1 %47, label %48, label %113
48: ; preds = %44
%49 = load i8, i8* %3
%50 = call i32 @index(i8* %5, i8 signext %49)
%51 = icmp sgt i32 %50, 0
br i1 %51, label %52, label %62
52: ; preds = %48, %52
%53 = phi i64 [ %57, %52 ], [ 0, %48 ]
%54 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %53
%55 = load i8, i8* %54
%56 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %53
store i8 %55, i8* %56
%57 = add nuw nsw i64 %53, 1
%58 = load i8, i8* %3
%59 = call i32 @index(i8* %5, i8 signext %58)
%60 = sext i32 %59 to i64
%61 = icmp slt i64 %57, %60
br i1 %61, label %52, label %62
62: ; preds = %52, %48
%63 = load i8, i8* %3
%64 = call i32 @index(i8* %5, i8 signext %63)
%65 = load i8, i8* %3
%66 = call i32 @index(i8* %5, i8 signext %65)
%67 = call i32 @strlen(i8* %6)
%68 = add nsw i32 %67, %66
%69 = icmp slt i32 %64, %68
br i1 %69, label %70, label %86
70: ; preds = %62
%71 = sext i32 %64 to i64
br label %72
72: ; preds = %70, %72
%73 = phi i64 [ %71, %70 ], [ %79, %72 ]
%74 = phi i64 [ 0, %70 ], [ %78, %72 ]
%75 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 %74
%76 = load i8, i8* %75
%77 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %73
store i8 %76, i8* %77
%78 = add nuw nsw i64 %74, 1
%79 = add nsw i64 %73, 1
%80 = load i8, i8* %3
%81 = call i32 @index(i8* %5, i8 signext %80)
%82 = call i32 @strlen(i8* %6)
%83 = add nsw i32 %82, %81
%84 = sext i32 %83 to i64
%85 = icmp slt i64 %79, %84
br i1 %85, label %72, label %86
86: ; preds = %72, %62
%87 = load i8, i8* %3
%88 = call i32 @index(i8* %5, i8 signext %87)
%89 = load i8, i8* %3
%90 = call i32 @index(i8* %5, i8 signext %89)
%91 = call i32 @strlen(i8* %6)
%92 = add i32 %91, %90
%93 = call i32 @strlen(i8* %5)
%94 = call i32 @strlen(i8* %6)
%95 = add nsw i32 %94, %93
%96 = icmp slt i32 %92, %95
br i1 %96, label %97, label %113
97: ; preds = %86
%98 = sext i32 %88 to i64
%99 = sext i32 %92 to i64
br label %100
100: ; preds = %97, %100
%101 = phi i64 [ %99, %97 ], [ %107, %100 ]
%102 = phi i64 [ %98, %97 ], [ %106, %100 ]
%103 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 %102
%104 = load i8, i8* %103
%105 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %101
store i8 %104, i8* %105
%106 = add nsw i64 %102, 1
%107 = add nsw i64 %101, 1
%108 = call i32 @strlen(i8* %5)
%109 = call i32 @strlen(i8* %6)
%110 = add nsw i32 %109, %108
%111 = sext i32 %110 to i64
%112 = icmp slt i64 %107, %111
br i1 %112, label %100, label %113
113: ; preds = %100, %44, %86
%114 = phi i8* [ %10, %86 ], [ %5, %44 ], [ %10, %100 ]
%115 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %114)
ret i32 0
}