#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 */
typedef int /*<<< orphan*/ texto;

/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char texto[] = "1234567890abcdefghijklm";
  int posicao = 15;
  int final = sizeof(texto) - posicao;
  char parte[final];
  memcpy(parte, &texto[posicao], final);
  printf("%s", parte);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movaps 0xed1(%rip),%xmm0
movaps %xmm0,-0x20(%rbp)
movabs $0x6d6c6b6a696867,%rax
mov    %rax,-0x10(%rbp)
movl   $0xf,-0x24(%rbp)
mov    -0x24(%rbp),%ecx
mov    $0x18,%eax
sub    %ecx,%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x40(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x38(%rbp)
movslq -0x24(%rbp),%rax
lea    -0x20(%rbp),%rsi
add    %rax,%rsi
mov    -0x28(%rbp),%edx
call   1040 <memcpy@plt>
mov    -0x40(%rbp),%rsi
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x30(%rbp),%rax
mov    %rax,%rsp
xor    %eax,%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x38,%rsp
mov    %rsp,%rbx
movaps 0xecf(%rip),%xmm0
movaps %xmm0,(%rsp)
movabs $0x6d6c6b6a696867,%rax
mov    %rax,0x10(%rsp)
lea    0xf(%rsp),%rsi
lea    0x20(%rsp),%r14
mov    %r14,%rdi
mov    $0x9,%edx
call   1040 <memcpy@plt>
lea    0xeb6(%rip),%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
mov    %rbx,%rsp
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.texto = [24 x i8] c"1234567890abcdefghijklm\00"
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [24 x i8]
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
%6 = bitcast [24 x i8]* %1 to i8*
store i32 15, i32* %2
%7 = load i32, i32* %2
%8 = sext i32 %7 to i64
%9 = sub i64 24, %8
%10 = trunc i64 %9 to i32
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = zext i32 %11 to i64
%13 = call i8* @llvm.stacksave()
store i8* %13, i8** %4
%14 = alloca i8, i64 %12
store i64 %12, i64* %5
%15 = load i32, i32* %2
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 %16
%18 = load i32, i32* %3
%19 = call i32 @memcpy(i8* %14, i8* %17, i32 %18)
%20 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %14)
%21 = load i8*, i8** %4
ret i32 0
}

LLVM IR (-O2):
@__const.main.texto = [24 x i8] c"1234567890abcdefghijklm\00"
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [24 x i8]
%2 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%3 = tail call i8* @llvm.stacksave()
%4 = alloca [9 x i8]
%5 = getelementptr inbounds [9 x i8], [9 x i8]* %4, i64 0, i64 0
%6 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 15
%7 = call i32 @memcpy(i8* %5, i8* %6, i32 9)
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 0
}