#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*/ moveleftoffset(char *, int, int);
int /*<<< orphan*/ printf(char *, char *);
int strlen(char *);
int main() {
  char s[] = "abcdefghijklm";
  int strlength = strlen(s);
  int moveoffset = 3;
  if (moveoffset <= strlength) {
    moveleftoffset(s, strlength, moveoffset);
    printf("%s", s);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x12(%rbp)
mov    0xeb8(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xeb2(%rip),%ax
mov    %ax,-0x6(%rbp)
lea    -0x12(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x18(%rbp)
movl   $0x3,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     119c <main+0x6c>
lea    -0x12(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
call   1050 <moveleftoffset@plt>
lea    -0x12(%rbp),%rsi
lea    0xe77(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0x6d6c6b6a696867,%rax
mov    %rax,0x6(%rsp)
movabs $0x6867666564636261,%rax
66 67 68
mov    %rax,(%rsp)
mov    %rsp,%rdi
call   1030 <strlen@plt>
cmp    $0x3,%eax
jl     1180 <main+0x50>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0x3,%edx
call   1050 <moveleftoffset@plt>
lea    0xe96(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.s = [14 x i8] c"abcdefghijklm\00"
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [14 x i8]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [14 x i8]* %2 to i8*
%6 = getelementptr inbounds [14 x i8], [14 x i8]* %2, i64 0, i64 0
%7 = call i32 @strlen(i8* %6)
store i32 %7, i32* %3
store i32 3, i32* %4
%8 = load i32, i32* %4
%9 = load i32, i32* %3
%10 = icmp sle i32 %8, %9
br i1 %10, label %11, label %18
11: ; preds = %0
%12 = getelementptr inbounds [14 x i8], [14 x i8]* %2, i64 0, i64 0
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = call i32 @moveleftoffset(i8* %12, i32 %13, i32 %14)
%16 = getelementptr inbounds [14 x i8], [14 x i8]* %2, i64 0, i64 0
%17 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %16)
br label %18
18: ; preds = %11, %0
%19 = load i32, i32* %1
ret i32 %19
}

LLVM IR (-O2):
@__const.main.s = [14 x i8] c"abcdefghijklm\00"
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [14 x i8]
%2 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%3 = call i32 @strlen(i8* %2)
%4 = icmp sgt i32 %3, 2
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = call i32 @moveleftoffset(i8* %2, i32 %3, i32 3)
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %8
8: ; preds = %5, %0
ret i32 0
}