#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*/ strcat2(char *, char *);
int main(int argc, char **argv) {
  char s[100] = "This is the first sentence.";
  char t[] = "This is the second sentence.";
  strcat2(s, " ");
  strcat2(s, t);
  printf("%s\n", s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x80(%rbp),%rdi
lea    0xeac(%rip),%rsi
mov    $0x64,%edx
call   1050 <memcpy@plt>
mov    0xf0b(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    0xf05(%rip),%rax
mov    %rax,-0x98(%rbp)
mov    0xeff(%rip),%rax
mov    %rax,-0x90(%rbp)
mov    0xefa(%rip),%eax
mov    %eax,-0x88(%rbp)
mov    0xef2(%rip),%al
mov    %al,-0x84(%rbp)
lea    -0x80(%rbp),%rdi
lea    0xee2(%rip),%rsi
call   1030 <strcat2@plt>
lea    -0x80(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
call   1030 <strcat2@plt>
lea    -0x80(%rbp),%rsi
lea    0xec4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x90,%rsp
movaps 0xf21(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xf05(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xeb1(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xe95(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movl   $0x0,0x80(%rsp)
movups 0xefb(%rip),%xmm0
movups %xmm0,0xd(%rsp)
movaps 0xee2(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xef4(%rip),%rsi
lea    0x20(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcat2@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1030 <strcat2@plt>
lea    0xed7(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.s = [100 x i8] c"This is the first sentence.\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\00"
@__const.main.t = [29 x i8] c"This is the second sentence.\00"
@.str = [2 x i8] c" \00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [100 x i8]
%7 = alloca [29 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [100 x i8]* %6 to i8*
%9 = bitcast [29 x i8]* %7 to i8*
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%11 = call i32 @strcat2(i8* %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%13 = getelementptr inbounds [29 x i8], [29 x i8]* %7, i64 0, i64 0
%14 = call i32 @strcat2(i8* %12, i8* %13)
%15 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %15)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s = [100 x i8] c"This is the first sentence.\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\00"
@__const.main.t = [29 x i8] c"This is the second sentence.\00"
@.str = [2 x i8] c" \00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [100 x i8]
%4 = alloca [29 x i8]
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [29 x i8], [29 x i8]* %4, i64 0, i64 0
%7 = call i32 @strcat2(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @strcat2(i8* %5, i8* %6)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %5)
ret i32 0
}