#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 *, ...);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main() {
  char joining[10] = "Joining ";
  char strings[10] = "strings.";
  char result[20];
  strcpy(result, joining);
  strcat(result, strings);
  printf("%s\n", result);
  printf("First line\nSecond line\n");
  int value = 3;
  printf("The value %d interpolated", value);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0xe(%rbp)
mov    0xeb7(%rip),%ax
mov    %ax,-0x6(%rbp)
mov    0xeae(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeab(%rip),%ax
mov    %ax,-0x10(%rbp)
lea    -0x30(%rbp),%rdi
lea    -0xe(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x30(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1050 <strcat@plt>
lea    -0x30(%rbp),%rsi
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x3,-0x34(%rbp)
mov    -0x34(%rbp),%esi
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
movabs $0x20676e696e696f4a,%rax
6e 67 20
mov    %rax,0x10(%rsp)
movw   $0x0,0x18(%rsp)
movabs $0x2e73676e69727473,%rax
67 73 2e
mov    %rax,(%rsp)
movw   $0x0,0x8(%rsp)
lea    0x20(%rsp),%rbx
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1060 <strcat@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xe92(%rip),%rdi
call   1040 <puts@plt>
lea    0xe6c(%rip),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.joining = [10 x i8] c"Joining \00\00"
@__const.main.strings = [10 x i8] c"strings.\00\00"
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [24 x i8] c"First line\0ASecond line\0A\00"
@.str.2 = [26 x i8] c"The value %d interpolated\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i8]
%3 = alloca [10 x i8]
%4 = alloca [20 x i8]
%5 = alloca i32
store i32 0, i32* %1
%6 = bitcast [10 x i8]* %2 to i8*
%7 = bitcast [10 x i8]* %3 to i8*
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 0
%9 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 0
%12 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%13 = call i32 @strcat(i8* %11, i8* %12)
%14 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 0
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
store i32 3, i32* %5
%17 = load i32, i32* %5
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 %17)
ret i32 0
}

LLVM IR (-O2):
@__const.main.joining = [10 x i8] c"Joining \00\00"
@__const.main.strings = [10 x i8] c"strings.\00\00"
@.str.2 = [26 x i8] c"The value %d interpolated\00"
@str = [23 x i8] c"First line\0ASecond line\00"
define i32 @main() {
%1 = alloca [10 x i8]
%2 = alloca [10 x i8]
%3 = alloca [20 x i8]
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%7 = call i32 @strcpy(i8* %6, i8* %4)
%8 = call i32 @strcat(i8* %6, i8* %5)
%9 = call i32 @puts(i8* %6)
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 3)
ret i32 0
}