int fSplitString(char *StringToSplit, int iLeftSplit) {
  int iSLenA, iSLenB, iLoopLen;
  int iLooper = 0;
  char sStringB[200], sFullString[200], sParam[2000], n, sCharacter[200];
  strncpy(sStringB, StringToSplit, iLeftSplit);
  lr_save_string(lr_eval_string(sStringB), "sLeftString");
  iSLenA = strlen(lr_eval_string(StringToSplit));
  iSLenB = strlen(lr_eval_string("{sLeftString}"));
  iLoopLen = iSLenA - iSLenB;
  sprintf(sParam, "%s", lr_eval_string(StringToSplit));
  for (iLooper = iSLenB; iLooper < iSLenA; iLooper++) {
    sscanf(sParam + iLooper, "%c", &n);
    sprintf(sCharacter, "%c", n);
    strcat(sFullString, sCharacter);
  }
  lr_save_string(lr_eval_string(sFullString), "sRightString");
}


x86 assembly (clang, -O0):
<fSplitString>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa70,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x24(%rbp)
lea    -0xf0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movslq -0x14(%rbp),%rdx
call   1040 <strncpy@plt>
lea    -0xf0(%rbp),%rdi
mov    $0x0,%al
call   1030 <lr_eval_string@plt>
mov    %eax,%edi
lea    0xe4c(%rip),%rsi
mov    $0x0,%al
call   1060 <lr_save_string@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <lr_eval_string@plt>
movslq %eax,%rdi
call   1050 <strlen@plt>
mov    %eax,-0x18(%rbp)
lea    0xe34(%rip),%rdi
mov    $0x0,%al
call   1030 <lr_eval_string@plt>
movslq %eax,%rdi
call   1050 <strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
sub    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
lea    -0x990(%rbp),%rax
mov    %rax,-0xa68(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <lr_eval_string@plt>
mov    -0xa68(%rbp),%rdi
mov    %eax,%edx
lea    0xdfe(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1295 <fSplitString+0x125>
lea    -0x990(%rbp),%rdi
movslq -0x24(%rbp),%rax
add    %rax,%rdi
lea    0xdd3(%rip),%rsi
lea    -0x991(%rbp),%rdx
mov    $0x0,%al
call   1070 <sscanf@plt>
lea    -0xa60(%rbp),%rdi
movsbl -0x991(%rbp),%edx
lea    0xdb0(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
lea    -0x1c0(%rbp),%rdi
lea    -0xa60(%rbp),%rsi
call   1080 <strcat@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1229 <fSplitString+0xb9>
lea    -0x1c0(%rbp),%rdi
mov    $0x0,%al
call   1030 <lr_eval_string@plt>
mov    %eax,%edi
lea    0xd74(%rip),%rsi
mov    $0x0,%al
call   1060 <lr_save_string@plt>
mov    -0x4(%rbp),%eax
add    $0xa70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fSplitString>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa58,%rsp
mov    %rdi,%r14
movslq %esi,%rdx
lea    0x1b0(%rsp),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strncpy@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <lr_eval_string@plt>
lea    0xe55(%rip),%rsi
mov    %eax,%edi
xor    %eax,%eax
call   1060 <lr_save_string@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <lr_eval_string@plt>
movslq %eax,%rdi
call   1050 <strlen@plt>
mov    %rax,%r15
lea    0xe3c(%rip),%rdi
xor    %eax,%eax
call   1030 <lr_eval_string@plt>
movslq %eax,%rdi
call   1050 <strlen@plt>
mov    %rax,%rbp
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <lr_eval_string@plt>
lea    0xe27(%rip),%rsi
lea    0x280(%rsp),%rdi
mov    %eax,%edx
xor    %eax,%eax
call   1090 <sprintf@plt>
cmp    %r15d,%ebp
jge    1273 <fSplitString+0x103>
movslq %ebp,%rax
lea    (%rsp,%rax,1),%rbx
add    $0x280,%rbx
sub    %ebp,%r15d
lea    0xdfc(%rip),%r14
lea    0xf(%rsp),%r12
lea    0xe0(%rsp),%r13
lea    0x10(%rsp),%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1070 <sscanf@plt>
movzbl 0xf(%rsp),%eax
mov    %al,0x10(%rsp)
movb   $0x0,0x11(%rsp)
mov    %r13,%rdi
mov    %rbp,%rsi
call   1080 <strcat@plt>
add    $0x1,%rbx
add    $0xffffffff,%r15d
jne    1240 <fSplitString+0xd0>
lea    0xe0(%rsp),%rdi
xor    %eax,%eax
call   1030 <lr_eval_string@plt>
lea    0xd97(%rip),%rsi
mov    %eax,%edi
xor    %eax,%eax
call   1060 <lr_save_string@plt>
add    $0xa58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"sLeftString\00"
@.str.1 = [14 x i8] c"{sLeftString}\00"
@.str.2 = [3 x i8] c"%s\00"
@.str.3 = [3 x i8] c"%c\00"
@.str.4 = [13 x i8] c"sRightString\00"
define i32 @fSplitString(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca [200 x i8]
%11 = alloca [200 x i8]
%12 = alloca [2000 x i8]
%13 = alloca i8
%14 = alloca [200 x i8]
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 0, i32* %9
%15 = getelementptr inbounds [200 x i8], [200 x i8]* %10, i64 0, i64 0
%16 = load i8*, i8** %4
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = call i8* @strncpy(i8* %15, i8* %16, i64 %18)
%20 = getelementptr inbounds [200 x i8], [200 x i8]* %10, i64 0, i64 0
%21 = call i32 (i8*, ...) bitcast (i32 (...)* @lr_eval_string to i32 (i8*, ...)*)(i8* %20)
%22 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @lr_save_string to i32 (i32, i8*, ...)*)(i32 %21, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%23 = load i8*, i8** %4
%24 = call i32 (i8*, ...) bitcast (i32 (...)* @lr_eval_string to i32 (i8*, ...)*)(i8* %23)
%25 = sext i32 %24 to i64
%26 = inttoptr i64 %25 to i8*
%27 = call i64 @strlen(i8* %26)
%28 = trunc i64 %27 to i32
store i32 %28, i32* %6
%29 = call i32 (i8*, ...) bitcast (i32 (...)* @lr_eval_string to i32 (i8*, ...)*)(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%30 = sext i32 %29 to i64
%31 = inttoptr i64 %30 to i8*
%32 = call i64 @strlen(i8* %31)
%33 = trunc i64 %32 to i32
store i32 %33, i32* %7
%34 = load i32, i32* %6
%35 = load i32, i32* %7
%36 = sub nsw i32 %34, %35
store i32 %36, i32* %8
%37 = getelementptr inbounds [2000 x i8], [2000 x i8]* %12, i64 0, i64 0
%38 = load i8*, i8** %4
%39 = call i32 (i8*, ...) bitcast (i32 (...)* @lr_eval_string to i32 (i8*, ...)*)(i8* %38)
%40 = call i32 (i8*, i8*, ...) @sprintf(i8* %37, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %39)
%41 = load i32, i32* %7
store i32 %41, i32* %9
br label %42
42: ; preds = %59, %2
%43 = load i32, i32* %9
%44 = load i32, i32* %6
%45 = icmp slt i32 %43, %44
br i1 %45, label %46, label %62
46: ; preds = %42
%47 = getelementptr inbounds [2000 x i8], [2000 x i8]* %12, i64 0, i64 0
%48 = load i32, i32* %9
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds i8, i8* %47, i64 %49
%51 = call i32 (i8*, i8*, ...) @sscanf(i8* %50, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %13)
%52 = getelementptr inbounds [200 x i8], [200 x i8]* %14, i64 0, i64 0
%53 = load i8, i8* %13
%54 = sext i8 %53 to i32
%55 = call i32 (i8*, i8*, ...) @sprintf(i8* %52, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %54)
%56 = getelementptr inbounds [200 x i8], [200 x i8]* %11, i64 0, i64 0
%57 = getelementptr inbounds [200 x i8], [200 x i8]* %14, i64 0, i64 0
%58 = call i8* @strcat(i8* %56, i8* %57)
br label %59
59: ; preds = %46
%60 = load i32, i32* %9
%61 = add nsw i32 %60, 1
store i32 %61, i32* %9
br label %42
62: ; preds = %42
%63 = getelementptr inbounds [200 x i8], [200 x i8]* %11, i64 0, i64 0
%64 = call i32 (i8*, ...) bitcast (i32 (...)* @lr_eval_string to i32 (i8*, ...)*)(i8* %63)
%65 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @lr_save_string to i32 (i32, i8*, ...)*)(i32 %64, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%66 = load i32, i32* %3
ret i32 %66
}

LLVM IR (-O2):
@.str = [12 x i8] c"sLeftString\00"
@.str.1 = [14 x i8] c"{sLeftString}\00"
@.str.2 = [3 x i8] c"%s\00"
@.str.3 = [3 x i8] c"%c\00"
@.str.4 = [13 x i8] c"sRightString\00"
define i32 @fSplitString(i8* %0, i32 %1) {
%3 = alloca [200 x i8]
%4 = alloca [200 x i8]
%5 = alloca [2000 x i8]
%6 = alloca i8
%7 = alloca [200 x i8]
%8 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%10 = getelementptr inbounds [2000 x i8], [2000 x i8]* %5, i64 0, i64 0
%11 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 0
%12 = sext i32 %1 to i64
%13 = call i8* @strncpy(i8* %8, i8* %0, i64 %12)
%14 = call i32 (i8*, ...) bitcast (i32 (...)* @lr_eval_string to i32 (i8*, ...)*)(i8* %8)
%15 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @lr_save_string to i32 (i32, i8*, ...)*)(i32 %14, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%16 = call i32 (i8*, ...) bitcast (i32 (...)* @lr_eval_string to i32 (i8*, ...)*)(i8* %0)
%17 = sext i32 %16 to i64
%18 = inttoptr i64 %17 to i8*
%19 = call i64 @strlen(i8* dereferenceable(1) %18)
%20 = trunc i64 %19 to i32
%21 = call i32 (i8*, ...) bitcast (i32 (...)* @lr_eval_string to i32 (i8*, ...)*)(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%22 = sext i32 %21 to i64
%23 = inttoptr i64 %22 to i8*
%24 = call i64 @strlen(i8* dereferenceable(1) %23)
%25 = trunc i64 %24 to i32
%26 = call i32 (i8*, ...) bitcast (i32 (...)* @lr_eval_string to i32 (i8*, ...)*)(i8* %0)
%27 = call i32 (i8*, i8*, ...) @sprintf(i8* %10, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %26)
%28 = icmp slt i32 %25, %20
br i1 %28, label %29, label %42
29: ; preds = %2
%30 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 1
%31 = shl i64 %24, 32
%32 = ashr exact i64 %31, 32
br label %33
33: ; preds = %29, %33
%34 = phi i64 [ %32, %29 ], [ %39, %33 ]
%35 = getelementptr inbounds [2000 x i8], [2000 x i8]* %5, i64 0, i64 %34
%36 = call i32 (i8*, i8*, ...) @sscanf(i8* %35, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %6)
%37 = load i8, i8* %6
store i8 %37, i8* %11
store i8 0, i8* %30
%38 = call i8* @strcat(i8* %9, i8* %11)
%39 = add nsw i64 %34, 1
%40 = trunc i64 %39 to i32
%41 = icmp eq i32 %40, %20
br i1 %41, label %42, label %33
42: ; preds = %33, %2
%43 = call i32 (i8*, ...) bitcast (i32 (...)* @lr_eval_string to i32 (i8*, ...)*)(i8* %9)
%44 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @lr_save_string to i32 (i32, i8*, ...)*)(i32 %43, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
ret i32 undef
}