#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*/ buf;

/* Variables and functions */
int csc_strinsert(char *, int, char *, int, char *);
int /*<<< orphan*/ slog_csoup_format(char *, ...);
int /*<<< orphan*/ slog_csoup_puts(int /*<<< orphan*/, int, int /*<<< orphan*/);
int /*<<< orphan*/ strcpy(char *, char *);
int strings_strinsert(void) {
  char buf[24];
  int rc;
  slog_csoup_puts(
      0, (8 | 0),
      slog_csoup_format("\nFrom [Alpha AXP of DEC] to [Alpha RISC of DEC]: "));
  strcpy(buf, "Alpha AXP of DEC");
  csc_strinsert(buf, sizeof(buf), &buf[6], 3, "RISC");
  slog_csoup_puts(0, (8 | 0), slog_csoup_format("%s\n", buf));
  slog_csoup_puts(
      0, (8 | 0),
      slog_csoup_format("From [Alpha AXP of DEC] to [RISCAlpha AXP of DEC]: "));
  strcpy(buf, "Alpha AXP of DEC");
  csc_strinsert(buf, sizeof(buf), NULL, 0, "RISC");
  slog_csoup_puts(0, (8 | 0), slog_csoup_format("%s\n", buf));
  slog_csoup_puts(
      0, (8 | 0),
      slog_csoup_format("From [Alpha AXP of DEC] to [Alpha AXP of DECCISC]: "));
  strcpy(buf, "Alpha AXP of DEC");
  csc_strinsert(buf, sizeof(buf), buf + sizeof(buf), 0, "CISC");
  slog_csoup_puts(0, (8 | 0), slog_csoup_format("%s\n", buf));
  slog_csoup_puts(
      0, (8 | 0),
      slog_csoup_format(
          "From [Alpha AXP of DEC] to [Alpha RISCCISAXP of DEC]: "));
  strcpy(buf, "Alpha AXP of DEC");
  csc_strinsert(buf, sizeof(buf), &buf[6], 0, "RISCCIS");
  slog_csoup_puts(0, (8 | 0), slog_csoup_format("%s\n", buf));
  slog_csoup_puts(
      0, (8 | 0),
      slog_csoup_format("From [Alpha AXP of DEC] to buffer overflow: "));
  strcpy(buf, "Alpha AXP of DEC");
  rc = csc_strinsert(buf, sizeof(buf), &buf[6], 0, "RISCCISC");
  slog_csoup_puts(0, (8 | 0), slog_csoup_format("%s [%d]\n", buf, rc));
  slog_csoup_puts(0, (8 | 0),
                  slog_csoup_format(
                      "From [Alpha AXP of DEC] to [Alpha AXP _AXP of DEC]: "));
  strcpy(buf, "Alpha AXP of DEC");
  csc_strinsert(buf, sizeof(buf), buf + 10, -4, "_");
  slog_csoup_puts(0, (8 | 0), slog_csoup_format("%s\n", buf));
  slog_csoup_puts(
      0, (8 | 0),
      slog_csoup_format("From [Alpha AXP of DEC] to out of boundry: "));
  strcpy(buf, "Alpha AXP of DEC");
  rc = csc_strinsert(buf, sizeof(buf), &buf[3], -4, "_");
  slog_csoup_puts(0, (8 | 0), slog_csoup_format("%s [%d]\n", buf, rc));
  slog_csoup_puts(
      0, (8 | 0),
      slog_csoup_format("From [Alpha AXP of DEC] to [Alpha is gone]: "));
  strcpy(buf, "Alpha AXP of DEC");
  csc_strinsert(buf, sizeof(buf), buf + 6, 100, "is gone");
  slog_csoup_puts(0, (8 | 0), slog_csoup_format("%s\n", buf));
  slog_csoup_puts(
      0, (8 | 0),
      slog_csoup_format("From [Alpha AXP of DEC] to [Alpha of DEC]: "));
  strcpy(buf, "Alpha AXP of DEC");
  csc_strinsert(buf, sizeof(buf), buf + 6, 4, NULL);
  slog_csoup_puts(0, (8 | 0), slog_csoup_format("%s\n", buf));
  return 0;
}


x86 assembly (clang, -O0):
<strings_strinsert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1050 <slog_csoup_format@plt>
mov    %eax,%edx
xor    %edi,%edi
mov    $0x8,%esi
call   1040 <slog_csoup_puts@plt>
lea    -0x20(%rbp),%rdi
lea    0xec3(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x20(%rbp),%rdi
lea    -0x20(%rbp),%rdx
add    $0x6,%rdx
mov    $0x18,%esi
mov    $0x3,%ecx
lea    0xeb2(%rip),%r8
call   1060 <csc_strinsert@plt>
lea    -0x20(%rbp),%rsi
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1050 <slog_csoup_format@plt>
mov    %eax,%edx
xor    %edi,%edi
mov    $0x8,%esi
call   1040 <slog_csoup_puts@plt>
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1050 <slog_csoup_format@plt>
mov    %eax,%edx
xor    %edi,%edi
mov    $0x8,%esi
call   1040 <slog_csoup_puts@plt>
lea    -0x20(%rbp),%rdi
lea    0xe55(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x20(%rbp),%rdi
mov    $0x18,%esi
xor    %eax,%eax
mov    %eax,%edx
xor    %ecx,%ecx
lea    0xe4b(%rip),%r8
call   1060 <csc_strinsert@plt>
lea    -0x20(%rbp),%rsi
lea    0xe40(%rip),%rdi
mov    $0x0,%al
call   1050 <slog_csoup_format@plt>
mov    %eax,%edx
xor    %edi,%edi
mov    $0x8,%esi
call   1040 <slog_csoup_puts@plt>
lea    0xe5c(%rip),%rdi
mov    $0x0,%al
call   1050 <slog_csoup_format@plt>
mov    %eax,%edx
xor    %edi,%edi
mov    $0x8,%esi
call   1040 <slog_csoup_puts@plt>
lea    -0x20(%rbp),%rdi
lea    0xdee(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x20(%rbp),%rdi
lea    -0x20(%rbp),%rdx
add    $0x18,%rdx
mov    $0x18,%esi
xor    %ecx,%ecx
lea    0xec1(%rip),%r8
call   1060 <csc_strinsert@plt>
lea    -0x20(%rbp),%rsi
lea    0xdd5(%rip),%rdi
mov    $0x0,%al
call   1050 <slog_csoup_format@plt>
mov    %eax,%edx
xor    %edi,%edi
mov    $0x8,%esi
call   1040 <slog_csoup_puts@plt>
lea    0xe25(%rip),%rdi
mov    $0x0,%al
call   1050 <slog_csoup_format@plt>
mov    %eax,%edx
xor    %edi,%edi
mov    $0x8,%esi
call   1040 <slog_csoup_puts@plt>
lea    -0x20(%rbp),%rdi
lea    0xd83(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x20(%rbp),%rdi
lea    -0x20(%rbp),%rdx
add    $0x6,%rdx
mov    $0x18,%esi
xor    %ecx,%ecx
lea    0xe1d(%rip),%r8
call   1060 <csc_strinsert@plt>
lea    -0x20(%rbp),%rsi
lea    0xd6a(%rip),%rdi
mov    $0x0,%al
call   1050 <slog_csoup_format@plt>
mov    %eax,%edx
xor    %edi,%edi
mov    $0x8,%esi
call   1040 <slog_csoup_puts@plt>
lea    0xdf9(%rip),%rdi
mov    $0x0,%al
call   1050 <slog_csoup_format@plt>
mov    %eax,%edx
xor    %edi,%edi
mov    $0x8,%esi
call   1040 <slog_csoup_puts@plt>
lea    -0x20(%rbp),%rdi
lea    0xd18(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x20(%rbp),%rdi
lea    -0x20(%rbp),%rdx
add    $0x6,%rdx
mov    $0x18,%esi
xor    %ecx,%ecx
lea    0xde7(%rip),%r8
call   1060 <csc_strinsert@plt>
mov    %eax,-0x24(%rbp)
lea    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
lea    0xdda(%rip),%rdi
mov    $0x0,%al
call   1050 <slog_csoup_format@plt>
mov    %eax,%edx
xor    %edi,%edi
mov    $0x8,%esi
call   1040 <slog_csoup_puts@plt>
lea    0xdc7(%rip),%rdi
mov    $0x0,%al
call   1050 <slog_csoup_format@plt>
mov    %eax,%edx
xor    %edi,%edi
mov    $0x8,%esi
call   1040 <slog_csoup_puts@plt>
lea    -0x20(%rbp),%rdi
lea    0xca7(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x20(%rbp),%rdi
lea    -0x20(%rbp),%rdx
add    $0xa,%rdx
mov    $0x18,%esi
mov    $0xfffffffc,%ecx
lea    0xdba(%rip),%r8
call   1060 <csc_strinsert@plt>
lea    -0x20(%rbp),%rsi
lea    0xc8b(%rip),%rdi
mov    $0x0,%al
call   1050 <slog_csoup_format@plt>
mov    %eax,%edx
xor    %edi,%edi
mov    $0x8,%esi
call   1040 <slog_csoup_puts@plt>
lea    0xd90(%rip),%rdi
mov    $0x0,%al
call   1050 <slog_csoup_format@plt>
mov    %eax,%edx
xor    %edi,%edi
mov    $0x8,%esi
call   1040 <slog_csoup_puts@plt>
lea    -0x20(%rbp),%rdi
lea    0xc39(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x20(%rbp),%rdi
lea    -0x20(%rbp),%rdx
add    $0x3,%rdx
mov    $0x18,%esi
mov    $0xfffffffc,%ecx
lea    0xd4c(%rip),%r8
call   1060 <csc_strinsert@plt>
mov    %eax,-0x24(%rbp)
lea    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
lea    0xcf8(%rip),%rdi
mov    $0x0,%al
call   1050 <slog_csoup_format@plt>
mov    %eax,%edx
xor    %edi,%edi
mov    $0x8,%esi
call   1040 <slog_csoup_puts@plt>
lea    0xd48(%rip),%rdi
mov    $0x0,%al
call   1050 <slog_csoup_format@plt>
mov    %eax,%edx
xor    %edi,%edi
mov    $0x8,%esi
call   1040 <slog_csoup_puts@plt>
lea    -0x20(%rbp),%rdi
lea    0xbc5(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x20(%rbp),%rdi
lea    -0x20(%rbp),%rdx
add    $0x6,%rdx
mov    $0x18,%esi
mov    $0x64,%ecx
lea    0xd33(%rip),%r8
call   1060 <csc_strinsert@plt>
lea    -0x20(%rbp),%rsi
lea    0xba9(%rip),%rdi
mov    $0x0,%al
call   1050 <slog_csoup_format@plt>
mov    %eax,%edx
xor    %edi,%edi
mov    $0x8,%esi
call   1040 <slog_csoup_puts@plt>
lea    0xd0f(%rip),%rdi
mov    $0x0,%al
call   1050 <slog_csoup_format@plt>
mov    %eax,%edx
xor    %edi,%edi
mov    $0x8,%esi
call   1040 <slog_csoup_puts@plt>
lea    -0x20(%rbp),%rdi
lea    0xb57(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x20(%rbp),%rdi
lea    -0x20(%rbp),%rdx
add    $0x6,%rdx
mov    $0x18,%esi
mov    $0x4,%ecx
xor    %eax,%eax
mov    %eax,%r8d
call   1060 <csc_strinsert@plt>
lea    -0x20(%rbp),%rsi
lea    0xb3d(%rip),%rdi
mov    $0x0,%al
call   1050 <slog_csoup_format@plt>
mov    %eax,%edx
xor    %edi,%edi
mov    $0x8,%esi
call   1040 <slog_csoup_puts@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strings_strinsert>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xeab(%rip),%rdi
xor    %eax,%eax
call   1050 <slog_csoup_format@plt>
xor    %edi,%edi
mov    $0x8,%esi
mov    %eax,%edx
call   1040 <slog_csoup_puts@plt>
lea    0xec1(%rip),%r15
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
lea    0x6(%rsp),%r14
lea    0xeb8(%rip),%r13
mov    %rbx,%rdi
mov    $0x18,%esi
mov    %r14,%rdx
mov    $0x3,%ecx
mov    %r13,%r8
call   1060 <csc_strinsert@plt>
lea    0xe9e(%rip),%r12
mov    %r12,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <slog_csoup_format@plt>
xor    %edi,%edi
mov    $0x8,%esi
mov    %eax,%edx
call   1040 <slog_csoup_puts@plt>
lea    0xe80(%rip),%rdi
xor    %eax,%eax
call   1050 <slog_csoup_format@plt>
xor    %edi,%edi
mov    $0x8,%esi
mov    %eax,%edx
call   1040 <slog_csoup_puts@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    $0x18,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    %r13,%r8
call   1060 <csc_strinsert@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <slog_csoup_format@plt>
xor    %edi,%edi
mov    $0x8,%esi
mov    %eax,%edx
call   1040 <slog_csoup_puts@plt>
lea    0xe5e(%rip),%rdi
xor    %eax,%eax
call   1050 <slog_csoup_format@plt>
xor    %edi,%edi
mov    $0x8,%esi
mov    %eax,%edx
call   1040 <slog_csoup_puts@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
lea    0x18(%rsp),%rdx
lea    0xed6(%rip),%r8
mov    %rbx,%rdi
mov    $0x18,%esi
xor    %ecx,%ecx
call   1060 <csc_strinsert@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <slog_csoup_format@plt>
xor    %edi,%edi
mov    $0x8,%esi
mov    %eax,%edx
call   1040 <slog_csoup_puts@plt>
lea    0xe35(%rip),%rdi
xor    %eax,%eax
call   1050 <slog_csoup_format@plt>
xor    %edi,%edi
mov    $0x8,%esi
mov    %eax,%edx
call   1040 <slog_csoup_puts@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
lea    0xe45(%rip),%r8
mov    %rbx,%rdi
mov    $0x18,%esi
mov    %r14,%rdx
xor    %ecx,%ecx
call   1060 <csc_strinsert@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <slog_csoup_format@plt>
xor    %edi,%edi
mov    $0x8,%esi
mov    %eax,%edx
call   1040 <slog_csoup_puts@plt>
lea    0xe19(%rip),%rdi
xor    %eax,%eax
call   1050 <slog_csoup_format@plt>
xor    %edi,%edi
mov    $0x8,%esi
mov    %eax,%edx
call   1040 <slog_csoup_puts@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
lea    0xe1f(%rip),%r8
mov    %rbx,%rdi
mov    $0x18,%esi
mov    %r14,%rdx
xor    %ecx,%ecx
call   1060 <csc_strinsert@plt>
lea    0xe0f(%rip),%r13
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <slog_csoup_format@plt>
xor    %edi,%edi
mov    $0x8,%esi
mov    %eax,%edx
call   1040 <slog_csoup_puts@plt>
lea    0xdf4(%rip),%rdi
xor    %eax,%eax
call   1050 <slog_csoup_format@plt>
xor    %edi,%edi
mov    $0x8,%esi
mov    %eax,%edx
call   1040 <slog_csoup_puts@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
lea    0xa(%rsp),%rdx
lea    0xdfd(%rip),%rbp
mov    %rbx,%rdi
mov    $0x18,%esi
mov    $0xfffffffc,%ecx
mov    %rbp,%r8
call   1060 <csc_strinsert@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <slog_csoup_format@plt>
xor    %edi,%edi
mov    $0x8,%esi
mov    %eax,%edx
call   1040 <slog_csoup_puts@plt>
lea    0xdc8(%rip),%rdi
xor    %eax,%eax
call   1050 <slog_csoup_format@plt>
xor    %edi,%edi
mov    $0x8,%esi
mov    %eax,%edx
call   1040 <slog_csoup_puts@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
lea    0x3(%rsp),%rdx
mov    %rbx,%rdi
mov    $0x18,%esi
mov    $0xfffffffc,%ecx
mov    %rbp,%r8
call   1060 <csc_strinsert@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1050 <slog_csoup_format@plt>
xor    %edi,%edi
mov    $0x8,%esi
mov    %eax,%edx
call   1040 <slog_csoup_puts@plt>
lea    0xd96(%rip),%rdi
xor    %eax,%eax
call   1050 <slog_csoup_format@plt>
xor    %edi,%edi
mov    $0x8,%esi
mov    %eax,%edx
call   1040 <slog_csoup_puts@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
lea    0xd9c(%rip),%r8
mov    %rbx,%rdi
mov    $0x18,%esi
mov    %r14,%rdx
mov    $0x64,%ecx
call   1060 <csc_strinsert@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <slog_csoup_format@plt>
xor    %edi,%edi
mov    $0x8,%esi
mov    %eax,%edx
call   1040 <slog_csoup_puts@plt>
lea    0xd6d(%rip),%rdi
xor    %eax,%eax
call   1050 <slog_csoup_format@plt>
xor    %edi,%edi
mov    $0x8,%esi
mov    %eax,%edx
call   1040 <slog_csoup_puts@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    $0x18,%esi
mov    %r14,%rdx
mov    $0x4,%ecx
xor    %r8d,%r8d
call   1060 <csc_strinsert@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <slog_csoup_format@plt>
xor    %edi,%edi
mov    $0x8,%esi
mov    %eax,%edx
call   1040 <slog_csoup_puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [50 x i8] c"\0AFrom [Alpha AXP of DEC] to [Alpha RISC of DEC]: \00"
@.str.1 = [17 x i8] c"Alpha AXP of DEC\00"
@.str.2 = [5 x i8] c"RISC\00"
@.str.3 = [4 x i8] c"%s\0A\00"
@.str.4 = [52 x i8] c"From [Alpha AXP of DEC] to [RISCAlpha AXP of DEC]: \00"
@.str.5 = [52 x i8] c"From [Alpha AXP of DEC] to [Alpha AXP of DECCISC]: \00"
@.str.6 = [5 x i8] c"CISC\00"
@.str.7 = [55 x i8] c"From [Alpha AXP of DEC] to [Alpha RISCCISAXP of DEC]: \00"
@.str.8 = [8 x i8] c"RISCCIS\00"
@.str.9 = [45 x i8] c"From [Alpha AXP of DEC] to buffer overflow: \00"
@.str.10 = [9 x i8] c"RISCCISC\00"
@.str.11 = [9 x i8] c"%s [%d]\0A\00"
@.str.12 = [53 x i8] c"From [Alpha AXP of DEC] to [Alpha AXP _AXP of DEC]: \00"
@.str.13 = [2 x i8] c"_\00"
@.str.14 = [44 x i8] c"From [Alpha AXP of DEC] to out of boundry: \00"
@.str.15 = [45 x i8] c"From [Alpha AXP of DEC] to [Alpha is gone]: \00"
@.str.16 = [8 x i8] c"is gone\00"
@.str.17 = [44 x i8] c"From [Alpha AXP of DEC] to [Alpha of DEC]: \00"
define i32 @strings_strinsert() {
%1 = alloca [24 x i8]
%2 = alloca i32
%3 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %3)
%5 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%6 = call i32 @strcpy(i8* %5, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%7 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%8 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 6
%9 = call i32 @csc_strinsert(i8* %7, i32 24, i8* %8, i32 3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%10 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%11 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %10)
%12 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %11)
%13 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.4, i64 0, i64 0))
%14 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %13)
%15 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%16 = call i32 @strcpy(i8* %15, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%17 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%18 = call i32 @csc_strinsert(i8* %17, i32 24, i8* null, i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%19 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%20 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %19)
%21 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %20)
%22 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.5, i64 0, i64 0))
%23 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %22)
%24 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%25 = call i32 @strcpy(i8* %24, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%26 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%27 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%28 = getelementptr inbounds i8, i8* %27, i64 24
%29 = call i32 @csc_strinsert(i8* %26, i32 24, i8* %28, i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%30 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%31 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %30)
%32 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %31)
%33 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.7, i64 0, i64 0))
%34 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %33)
%35 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%36 = call i32 @strcpy(i8* %35, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%37 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%38 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 6
%39 = call i32 @csc_strinsert(i8* %37, i32 24, i8* %38, i32 0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%40 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%41 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %40)
%42 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %41)
%43 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.9, i64 0, i64 0))
%44 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %43)
%45 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%46 = call i32 @strcpy(i8* %45, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%47 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%48 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 6
%49 = call i32 @csc_strinsert(i8* %47, i32 24, i8* %48, i32 0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0))
store i32 %49, i32* %2
%50 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%51 = load i32, i32* %2
%52 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i8* %50, i32 %51)
%53 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %52)
%54 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.12, i64 0, i64 0))
%55 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %54)
%56 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%57 = call i32 @strcpy(i8* %56, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%58 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%59 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%60 = getelementptr inbounds i8, i8* %59, i64 10
%61 = call i32 @csc_strinsert(i8* %58, i32 24, i8* %60, i32 -4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%62 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%63 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %62)
%64 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %63)
%65 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.14, i64 0, i64 0))
%66 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %65)
%67 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%68 = call i32 @strcpy(i8* %67, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%69 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%70 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 3
%71 = call i32 @csc_strinsert(i8* %69, i32 24, i8* %70, i32 -4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
store i32 %71, i32* %2
%72 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%73 = load i32, i32* %2
%74 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i8* %72, i32 %73)
%75 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %74)
%76 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.15, i64 0, i64 0))
%77 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %76)
%78 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%79 = call i32 @strcpy(i8* %78, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%80 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%81 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%82 = getelementptr inbounds i8, i8* %81, i64 6
%83 = call i32 @csc_strinsert(i8* %80, i32 24, i8* %82, i32 100, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0))
%84 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%85 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %84)
%86 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %85)
%87 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.17, i64 0, i64 0))
%88 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %87)
%89 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%90 = call i32 @strcpy(i8* %89, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%91 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%92 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%93 = getelementptr inbounds i8, i8* %92, i64 6
%94 = call i32 @csc_strinsert(i8* %91, i32 24, i8* %93, i32 4, i8* null)
%95 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%96 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %95)
%97 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %96)
ret i32 0
}

LLVM IR (-O2):
@.str = [50 x i8] c"\0AFrom [Alpha AXP of DEC] to [Alpha RISC of DEC]: \00"
@.str.1 = [17 x i8] c"Alpha AXP of DEC\00"
@.str.2 = [5 x i8] c"RISC\00"
@.str.3 = [4 x i8] c"%s\0A\00"
@.str.4 = [52 x i8] c"From [Alpha AXP of DEC] to [RISCAlpha AXP of DEC]: \00"
@.str.5 = [52 x i8] c"From [Alpha AXP of DEC] to [Alpha AXP of DECCISC]: \00"
@.str.6 = [5 x i8] c"CISC\00"
@.str.7 = [55 x i8] c"From [Alpha AXP of DEC] to [Alpha RISCCISAXP of DEC]: \00"
@.str.8 = [8 x i8] c"RISCCIS\00"
@.str.9 = [45 x i8] c"From [Alpha AXP of DEC] to buffer overflow: \00"
@.str.10 = [9 x i8] c"RISCCISC\00"
@.str.11 = [9 x i8] c"%s [%d]\0A\00"
@.str.12 = [53 x i8] c"From [Alpha AXP of DEC] to [Alpha AXP _AXP of DEC]: \00"
@.str.13 = [2 x i8] c"_\00"
@.str.14 = [44 x i8] c"From [Alpha AXP of DEC] to out of boundry: \00"
@.str.15 = [45 x i8] c"From [Alpha AXP of DEC] to [Alpha is gone]: \00"
@.str.16 = [8 x i8] c"is gone\00"
@.str.17 = [44 x i8] c"From [Alpha AXP of DEC] to [Alpha of DEC]: \00"
define i32 @strings_strinsert() {
%1 = alloca [24 x i8]
%2 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @slog_csoup_puts(i32 0, i32 8, i32 %3)
%5 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%6 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 6
%7 = call i32 @csc_strinsert(i8* %2, i32 24, i8* %6, i32 3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %2)
%9 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %8)
%10 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.4, i64 0, i64 0))
%11 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %10)
%12 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 @csc_strinsert(i8* %2, i32 24, i8* null, i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%14 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %2)
%15 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %14)
%16 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.5, i64 0, i64 0))
%17 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %16)
%18 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%19 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 24
%20 = call i32 @csc_strinsert(i8* %2, i32 24, i8* %19, i32 0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%21 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %2)
%22 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %21)
%23 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.7, i64 0, i64 0))
%24 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %23)
%25 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%26 = call i32 @csc_strinsert(i8* %2, i32 24, i8* %6, i32 0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%27 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %2)
%28 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %27)
%29 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.9, i64 0, i64 0))
%30 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %29)
%31 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%32 = call i32 @csc_strinsert(i8* %2, i32 24, i8* %6, i32 0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0))
%33 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i8* %2, i32 %32)
%34 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %33)
%35 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.12, i64 0, i64 0))
%36 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %35)
%37 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%38 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 10
%39 = call i32 @csc_strinsert(i8* %2, i32 24, i8* %38, i32 -4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%40 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %2)
%41 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %40)
%42 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.14, i64 0, i64 0))
%43 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %42)
%44 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%45 = getelementptr inbounds [24 x i8], [24 x i8]* %1, i64 0, i64 3
%46 = call i32 @csc_strinsert(i8* %2, i32 24, i8* %45, i32 -4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%47 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i8* %2, i32 %46)
%48 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %47)
%49 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.15, i64 0, i64 0))
%50 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %49)
%51 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%52 = call i32 @csc_strinsert(i8* %2, i32 24, i8* %6, i32 100, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0))
%53 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %2)
%54 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %53)
%55 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.17, i64 0, i64 0))
%56 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %55)
%57 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%58 = call i32 @csc_strinsert(i8* %2, i32 24, i8* %6, i32 4, i8* null)
%59 = call i32 (i8*, ...) @slog_csoup_format(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %2)
%60 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %59)
ret i32 0
}