#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 *);
int /*<<< orphan*/ strcpy(char *, char *);
int main(void) {
  char string_1[20] = "Das Rhinozeros";
  char string_2[11];
  int index = 0;
  while (string_1[index] != ' ') {
    index += 1;
  }
  strcpy(string_2, string_1 + index + 1);
  printf("I understood: %s", string_2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec5(%rip),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x30(%rbp)
movslq -0x30(%rbp),%rax
movsbl -0x20(%rbp,%rax,1),%eax
cmp    $0x20,%eax
je     1175 <main+0x55>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1155 <main+0x35>
lea    -0x2b(%rbp),%rdi
lea    -0x20(%rbp),%rsi
movslq -0x30(%rbp),%rax
add    %rax,%rsi
add    $0x1,%rsi
call   1030 <strcpy@plt>
lea    -0x2b(%rbp),%rsi
lea    0xe7c(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movaps 0xed4(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x0,0x10(%rsp)
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x20,0x1(%rsp,%rax,1)
lea    0x1(%rax),%rax
jne    1140 <main+0x20>
mov    %eax,%eax
lea    (%rsp,%rax,1),%rsi
add    $0x1,%rsi
lea    0x15(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xeab(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.string_1 = [20 x i8] c"Das Rhinozeros\00\00\00\00\00\00"
@.str = [17 x i8] c"I understood: %s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
%3 = alloca [11 x i8]
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [20 x i8]* %2 to i8*
store i32 0, i32* %4
br label %6
6: ; preds = %13, %0
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 32
br i1 %12, label %13, label %16
13: ; preds = %6
%14 = load i32, i32* %4
%15 = add nsw i32 %14, 1
store i32 %15, i32* %4
br label %6
16: ; preds = %6
%17 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%18 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%19 = load i32, i32* %4
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
%22 = getelementptr inbounds i8, i8* %21, i64 1
%23 = call i32 @strcpy(i8* %17, i8* %22)
%24 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%25 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %24)
ret i32 0
}

LLVM IR (-O2):
@__const.main.string_1 = [20 x i8] c"Das Rhinozeros\00\00\00\00\00\00"
@.str = [17 x i8] c"I understood: %s\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = alloca [11 x i8]
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 0
br label %5
5: ; preds = %0, %5
%6 = phi i64 [ 1, %0 ], [ %10, %5 ]
%7 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 %6
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 32
%10 = add nuw i64 %6, 1
br i1 %9, label %11, label %5
11: ; preds = %5
%12 = and i64 %6, 4294967295
%13 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 %12
%14 = getelementptr inbounds i8, i8* %13, i64 1
%15 = call i32 @strcpy(i8* %4, i8* %14)
%16 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}