#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*/ gets(char *);
int /*<<< orphan*/ puts(char *);
int main() {
  char str[80] = "computer", str1[80];
  int i, j;
  gets(str1);
  for (i = 0; str[i] != '\0'; i++)
    ;
  for (j = 0; str1[j] != '\0'; j++, i++)
    str[i] = str1[j];
  str[i] = '\0';
  puts(str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xeb3(%rip),%rsi
mov    $0x50,%edx
call   1040 <memcpy@plt>
lea    -0xb0(%rbp),%rdi
call   1050 <gets@plt>
movl   $0x0,-0xb4(%rbp)
movslq -0xb4(%rbp),%rax
movsbl -0x60(%rbp,%rax,1),%eax
cmp    $0x0,%eax
je     119b <main+0x6b>
jmp    1187 <main+0x57>
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    116d <main+0x3d>
movl   $0x0,-0xb8(%rbp)
movslq -0xb8(%rbp),%rax
movsbl -0xb0(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
je     11f9 <main+0xc9>
movslq -0xb8(%rbp),%rax
mov    -0xb0(%rbp,%rax,1),%cl
movslq -0xb4(%rbp),%rax
mov    %cl,-0x60(%rbp,%rax,1)
mov    -0xb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb8(%rbp)
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    11a5 <main+0x75>
movslq -0xb4(%rbp),%rax
movb   $0x0,-0x60(%rbp,%rax,1)
lea    -0x60(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0xa8,%rsp
movaps 0xf12(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xef6(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xeda(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xebe(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea2(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x50(%rsp),%rdi
call   1040 <gets@plt>
xor    %eax,%eax
xchg   %ax,%ax
cmpb   $0x0,0x1(%rsp,%rax,1)
lea    0x1(%rax),%rax
jne    1170 <main+0x50>
mov    0x50(%rsp),%cl
test   %cl,%cl
je     11a2 <main+0x82>
mov    %eax,%eax
lea    0x51(%rsp),%rdx
nopw   0x0(%rax,%rax,1)
mov    %cl,(%rsp,%rax,1)
add    $0x1,%rax
movzbl (%rdx),%ecx
add    $0x1,%rdx
test   %cl,%cl
jne    1190 <main+0x70>
mov    %eax,%eax
movb   $0x0,(%rsp,%rax,1)
mov    %rsp,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0xa8,%rsp
ret

LLVM IR (-O0):
@__const.main.str = [80 x i8] c"computer\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [80 x i8]
%3 = alloca [80 x i8]
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = bitcast [80 x i8]* %2 to i8*
%7 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%8 = call i32 @gets(i8* %7)
store i32 0, i32* %4
br label %9
9: ; preds = %17, %0
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 %11
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %20
16: ; preds = %9
br label %17
17: ; preds = %16
%18 = load i32, i32* %4
%19 = add nsw i32 %18, 1
store i32 %19, i32* %4
br label %9
20: ; preds = %9
store i32 0, i32* %5
br label %21
21: ; preds = %36, %20
%22 = load i32, i32* %5
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 %23
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp ne i32 %26, 0
br i1 %27, label %28, label %41
28: ; preds = %21
%29 = load i32, i32* %5
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 %30
%32 = load i8, i8* %31
%33 = load i32, i32* %4
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 %34
store i8 %32, i8* %35
br label %36
36: ; preds = %28
%37 = load i32, i32* %5
%38 = add nsw i32 %37, 1
store i32 %38, i32* %5
%39 = load i32, i32* %4
%40 = add nsw i32 %39, 1
store i32 %40, i32* %4
br label %21
41: ; preds = %21
%42 = load i32, i32* %4
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 %43
store i8 0, i8* %44
%45 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%46 = call i32 @puts(i8* %45)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [80 x i8] c"computer\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define i32 @main() {
%1 = alloca [80 x i8]
%2 = alloca [80 x i8]
%3 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%5 = call i32 @gets(i8* %4)
br label %6
6: ; preds = %0, %6
%7 = phi i64 [ 1, %0 ], [ %11, %6 ]
%8 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
%11 = add nuw i64 %7, 1
br i1 %10, label %12, label %6
12: ; preds = %6
%13 = load i8, i8* %4
%14 = icmp eq i8 %13, 0
br i1 %14, label %27, label %15
15: ; preds = %12
%16 = and i64 %7, 4294967295
br label %17
17: ; preds = %15, %17
%18 = phi i64 [ %16, %15 ], [ %23, %17 ]
%19 = phi i64 [ 0, %15 ], [ %22, %17 ]
%20 = phi i8 [ %13, %15 ], [ %25, %17 ]
%21 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 %18
store i8 %20, i8* %21
%22 = add nuw nsw i64 %19, 1
%23 = add nuw i64 %18, 1
%24 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 %22
%25 = load i8, i8* %24
%26 = icmp eq i8 %25, 0
br i1 %26, label %27, label %17
27: ; preds = %17, %12
%28 = phi i64 [ %7, %12 ], [ %23, %17 ]
%29 = and i64 %28, 4294967295
%30 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 %29
store i8 0, i8* %30
%31 = call i32 @puts(i8* %3)
ret i32 0
}