#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*/ printf(char *, char *);
void main() {
  char c1[30] = {'I', ' ', 'l', 'o', 'v', 'e'};
  char c2[10] = {'k', 'n', '\0', 'o', 'w'};
  int i, j = 0;
  for (i = 0; i < 30; i++) {
    if (c1[i] == '\0') {
      c1[i] = c2[j];
      if (c2[j] == '\0')
        break;
      j++;
    } else
      continue;
  }
  printf("%s", c1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xed9(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    0xed3(%rip),%ax
mov    %ax,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x2a(%rbp)
mov    0xec7(%rip),%ax
mov    %ax,-0x22(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x30(%rbp)
cmpl   $0x1e,-0x30(%rbp)
jge    11da <main+0xca>
movslq -0x30(%rbp),%rax
movsbl -0x20(%rbp,%rax,1),%eax
cmp    $0x0,%eax
jne    11c2 <main+0xb2>
movslq -0x34(%rbp),%rax
mov    -0x2a(%rbp,%rax,1),%cl
movslq -0x30(%rbp),%rax
mov    %cl,-0x20(%rbp,%rax,1)
movslq -0x34(%rbp),%rax
movsbl -0x2a(%rbp,%rax,1),%eax
cmp    $0x0,%eax
jne    11b4 <main+0xa4>
jmp    11da <main+0xca>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11c7 <main+0xb7>
jmp    11cc <main+0xbc>
jmp    11cc <main+0xbc>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1171 <main+0x61>
lea    -0x20(%rbp),%rsi
lea    0xe43(%rip),%rdi
call   1030 <printf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movups 0xef3(%rip),%xmm0
movups %xmm0,0xe(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,(%rsp)
xor    %edi,%edi
mov    $0x49,%dl
mov    $0x1,%ecx
lea    0xee3(%rip),%r8
mov    $0x3e4,%esi
test   %dl,%dl
jne    1164 <main+0x54>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movslq %edi,%rdx
mov    (%rdx,%r8,1),%al
mov    %al,-0x1(%rsp,%rcx,1)
bt     %rdx,%rsi
jb     1178 <main+0x68>
add    $0x1,%edi
cmp    $0x1e,%rcx
je     1178 <main+0x68>
movzbl (%rsp,%rcx,1),%edx
add    $0x1,%rcx
test   %dl,%dl
jne    1164 <main+0x54>
jmp    1150 <main+0x40>
lea    0xea9(%rip),%rdi
mov    %rsp,%rsi
call   1030 <printf@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.c1 = <{ i8, i8, i8, i8, i8, i8, [24 x i8] }> <{ i8 73, i8 32, i8 108, i8 111, i8 118, i8 101, [24 x i8] zeroinitializer }>
@__const.main.c2 = [10 x i8] c"kn\00ow\00\00\00\00\00"
@.str = [3 x i8] c"%s\00"
define void @main() {
%1 = alloca [30 x i8]
%2 = alloca [10 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = bitcast [30 x i8]* %1 to i8*
%6 = bitcast [10 x i8]* %2 to i8*
store i32 0, i32* %4
store i32 0, i32* %3
br label %7
7: ; preds = %37, %0
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 30
br i1 %9, label %10, label %40
10: ; preds = %7
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 %12
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %35
17: ; preds = %10
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 %19
%21 = load i8, i8* %20
%22 = load i32, i32* %3
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 %23
store i8 %21, i8* %24
%25 = load i32, i32* %4
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 %26
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %32
31: ; preds = %17
br label %40
32: ; preds = %17
%33 = load i32, i32* %4
%34 = add nsw i32 %33, 1
store i32 %34, i32* %4
br label %36
35: ; preds = %10
br label %37
36: ; preds = %32
br label %37
37: ; preds = %36, %35
%38 = load i32, i32* %3
%39 = add nsw i32 %38, 1
store i32 %39, i32* %3
br label %7
40: ; preds = %31, %7
%41 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
%42 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %41)
ret void
}

LLVM IR (-O2):
@__const.main.c1 = <{ i8, i8, i8, i8, i8, i8, [24 x i8] }> <{ i8 73, i8 32, i8 108, i8 111, i8 118, i8 101, [24 x i8] zeroinitializer }>
@__const.main.c2 = [10 x i8] c"kn\00ow\00\00\00\00\00"
@.str = [3 x i8] c"%s\00"
define void @main() {
%1 = alloca [30 x i8]
%2 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
br label %3
3: ; preds = %22, %0
%4 = phi i8 [ 73, %0 ], [ %24, %22 ]
%5 = phi i64 [ 0, %0 ], [ %20, %22 ]
%6 = phi i32 [ 0, %0 ], [ %19, %22 ]
%7 = icmp eq i8 %4, 0
br i1 %7, label %8, label %18
8: ; preds = %3
%9 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 %5
%10 = sext i32 %6 to i64
%11 = getelementptr inbounds [10 x i8], [10 x i8]* @__const.main.c2, i64 0, i64 %10
%12 = load i8, i8* %11
store i8 %12, i8* %9
%13 = lshr i64 996, %10
%14 = and i64 %13, 1
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %25
16: ; preds = %8
%17 = add nsw i32 %6, 1
br label %18
18: ; preds = %3, %16
%19 = phi i32 [ %17, %16 ], [ %6, %3 ]
%20 = add nuw nsw i64 %5, 1
%21 = icmp eq i64 %20, 30
br i1 %21, label %25, label %22
22: ; preds = %18
%23 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 %20
%24 = load i8, i8* %23
br label %3
25: ; preds = %8, %18
%26 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}