#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*/ getline_my(char **);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ strcat_my(char **, char **);
void main() {
  char line1[100 * 2];
  char line2[100];
  printf("Input please first string:\n");
  getline_my(&line1);
  printf("Getted string = %s;\n", line1);
  printf("Input please second string:\n");
  getline_my(&line2);
  printf("Getted string = %s;\n\n", line2);
  printf("And now we have two strings, line1 = \"%s\" and line2 = \"%s\";\n",
         line1, line2);
  strcat_my(&line1, &line2);
  printf("After concatenation of strings line 1 = \"%s\";\n", line1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0xd0(%rbp),%rdi
call   1050 <getline_my@plt>
lea    -0xd0(%rbp),%rsi
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x140(%rbp),%rdi
call   1050 <getline_my@plt>
lea    -0x140(%rbp),%rsi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0xd0(%rbp),%rsi
lea    -0x140(%rbp),%rdx
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0xd0(%rbp),%rdi
lea    -0x140(%rbp),%rsi
call   1030 <strcat_my@plt>
lea    -0xd0(%rbp),%rsi
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x138,%rsp
lea    0xf46(%rip),%rdi
call   1030 <puts@plt>
lea    0x70(%rsp),%r14
mov    %r14,%rdi
call   1060 <getline_my@plt>
lea    0xe96(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf37(%rip),%rdi
call   1030 <puts@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1060 <getline_my@plt>
lea    0xe83(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe88(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <strcat_my@plt>
lea    0xea6(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x138,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Input please first string:\0A\00"
@.str.1 = [21 x i8] c"Getted string = %s;\0A\00"
@.str.2 = [29 x i8] c"Input please second string:\0A\00"
@.str.3 = [22 x i8] c"Getted string = %s;\0A\0A\00"
@.str.4 = [61 x i8] c"And now we have two strings, line1 = \22%s\22 and line2 = \22%s\22;\0A\00"
@.str.5 = [47 x i8] c"After concatenation of strings line 1 = \22%s\22;\0A\00"
define void @main() {
%1 = alloca [200 x i8]
%2 = alloca [100 x i8]
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%4 = bitcast [200 x i8]* %1 to i8**
%5 = call i32 @getline_my(i8** %4)
%6 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%9 = bitcast [100 x i8]* %2 to i8**
%10 = call i32 @getline_my(i8** %9)
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i8* %11)
%13 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%14 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.4, i64 0, i64 0), i8* %13, i8* %14)
%16 = bitcast [200 x i8]* %1 to i8**
%17 = bitcast [100 x i8]* %2 to i8**
%18 = call i32 @strcat_my(i8** %16, i8** %17)
%19 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.5, i64 0, i64 0), i8* %19)
ret void
}

LLVM IR (-O2):
@.str.1 = [21 x i8] c"Getted string = %s;\0A\00"
@.str.3 = [22 x i8] c"Getted string = %s;\0A\0A\00"
@.str.4 = [61 x i8] c"And now we have two strings, line1 = \22%s\22 and line2 = \22%s\22;\0A\00"
@.str.5 = [47 x i8] c"After concatenation of strings line 1 = \22%s\22;\0A\00"
@str = [27 x i8] c"Input please first string:\00"
@str.6 = [28 x i8] c"Input please second string:\00"
define void @main() {
%1 = alloca [200 x i8]
%2 = alloca [100 x i8]
%3 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%6 = bitcast [200 x i8]* %1 to i8**
%7 = call i32 @getline_my(i8** %6)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.6, i64 0, i64 0))
%10 = bitcast [100 x i8]* %2 to i8**
%11 = call i32 @getline_my(i8** %10)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i8* %4)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @.str.4, i64 0, i64 0), i8* %3, i8* %4)
%14 = call i32 @strcat_my(i8** %6, i8** %10)
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.5, i64 0, i64 0), i8* %3)
ret void
}