void FormatError2(char *a_, unsigned int _a_high, unsigned char *w1_,
                  unsigned int _w1_high, unsigned char *w2_,
                  unsigned int _w2_high) {
  typedef struct _T4_a _T4;
  struct _T4_a {
    char array[(1024 * 8) + 1];
  };
  _T4 s;
  char a[_a_high + 1];
  unsigned char w1[_w1_high + 1];
  unsigned char w2[_w2_high + 1];
  memcpy(a, a_, _a_high + 1);
  memcpy(w1, w1_, _w1_high + 1);
  memcpy(w2, w2_, _w2_high + 1);
  StringFormat1((char *)&s.array[0], (1024 * 8), (char *)a, _a_high,
                (unsigned char *)w1, _w1_high);
  FormatError1((char *)&s.array[0], (1024 * 8), (unsigned char *)w2, _w2_high);
}


x86 assembly (clang, -O0):
<FormatError2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2070,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %rsp,%rcx
mov    %rcx,-0x2038(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x2068(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x2040(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x2060(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x2048(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x2058(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x2050(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,%eax
mov    %eax,%edx
call   1040 <memcpy@plt>
mov    -0x2060(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,%eax
mov    %eax,%edx
call   1040 <memcpy@plt>
mov    -0x2058(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,%eax
mov    %eax,%edx
call   1040 <memcpy@plt>
mov    -0x2068(%rbp),%rdx
mov    -0x2060(%rbp),%r8
lea    -0x2030(%rbp),%rdi
mov    -0xc(%rbp),%ecx
mov    -0x1c(%rbp),%r9d
mov    $0x2000,%esi
mov    $0x0,%al
call   1050 <StringFormat1@plt>
mov    -0x2058(%rbp),%rdx
lea    -0x2030(%rbp),%rdi
mov    -0x2c(%rbp),%ecx
mov    $0x2000,%esi
mov    $0x0,%al
call   1030 <FormatError1@plt>
mov    -0x2038(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FormatError2>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2038,%rsp
mov    %r9,-0x30(%rbp)
mov    %r8,-0x48(%rbp)
mov    %rcx,-0x40(%rbp)
mov    %rdx,-0x38(%rbp)
mov    %rsi,-0x50(%rbp)
mov    %rdi,%r8
mov    %rsp,-0x58(%rbp)
lea    0x1(%rsi),%edx
mov    %rsp,%rbx
lea    0xf(%rdx),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
lea    0x1(%rcx),%r15d
mov    %rsp,%r12
lea    0xf(%r15),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r12
mov    %r12,%rsp
lea    0x1(%r9),%r13d
mov    %rsp,%r14
lea    0xf(%r13),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r14
mov    %r14,%rsp
mov    %rbx,%rdi
mov    %r8,%rsi
call   1040 <memcpy@plt>
mov    %r12,%rdi
mov    -0x38(%rbp),%rsi
mov    %r15,%rdx
call   1040 <memcpy@plt>
mov    %r14,%rdi
mov    -0x48(%rbp),%rsi
mov    %r13,%rdx
call   1040 <memcpy@plt>
lea    -0x2060(%rbp),%r15
mov    %r15,%rdi
mov    $0x2000,%esi
mov    %rbx,%rdx
mov    -0x50(%rbp),%rcx
mov    %r12,%r8
mov    -0x40(%rbp),%r9
xor    %eax,%eax
call   1050 <StringFormat1@plt>
mov    %r15,%rdi
mov    $0x2000,%esi
mov    %r14,%rdx
mov    -0x30(%rbp),%rcx
xor    %eax,%eax
call   1030 <FormatError1@plt>
mov    -0x58(%rbp),%rsp
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct._T4_a = type { [8193 x i8] }
define void @FormatError2(i8* %0, i32 %1, i8* %2, i32 %3, i8* %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i32
%13 = alloca %struct._T4_a
%14 = alloca i8*
%15 = alloca i64
%16 = alloca i64
%17 = alloca i64
store i8* %0, i8** %7
store i32 %1, i32* %8
store i8* %2, i8** %9
store i32 %3, i32* %10
store i8* %4, i8** %11
store i32 %5, i32* %12
%18 = load i32, i32* %8
%19 = add i32 %18, 1
%20 = zext i32 %19 to i64
%21 = call i8* @llvm.stacksave()
store i8* %21, i8** %14
%22 = alloca i8, i64 %20
store i64 %20, i64* %15
%23 = load i32, i32* %10
%24 = add i32 %23, 1
%25 = zext i32 %24 to i64
%26 = alloca i8, i64 %25
store i64 %25, i64* %16
%27 = load i32, i32* %12
%28 = add i32 %27, 1
%29 = zext i32 %28 to i64
%30 = alloca i8, i64 %29
store i64 %29, i64* %17
%31 = load i8*, i8** %7
%32 = load i32, i32* %8
%33 = add i32 %32, 1
%34 = zext i32 %33 to i64
%35 = load i8*, i8** %9
%36 = load i32, i32* %10
%37 = add i32 %36, 1
%38 = zext i32 %37 to i64
%39 = load i8*, i8** %11
%40 = load i32, i32* %12
%41 = add i32 %40, 1
%42 = zext i32 %41 to i64
%43 = getelementptr inbounds %struct._T4_a, %struct._T4_a* %13, i32 0, i32 0
%44 = getelementptr inbounds [8193 x i8], [8193 x i8]* %43, i64 0, i64 0
%45 = load i32, i32* %8
%46 = load i32, i32* %10
%47 = call i32 (i8*, i32, i8*, i32, i8*, i32, ...) bitcast (i32 (...)* @StringFormat1 to i32 (i8*, i32, i8*, i32, i8*, i32, ...)*)(i8* %44, i32 8192, i8* %22, i32 %45, i8* %26, i32 %46)
%48 = getelementptr inbounds %struct._T4_a, %struct._T4_a* %13, i32 0, i32 0
%49 = getelementptr inbounds [8193 x i8], [8193 x i8]* %48, i64 0, i64 0
%50 = load i32, i32* %12
%51 = call i32 (i8*, i32, i8*, i32, ...) bitcast (i32 (...)* @FormatError1 to i32 (i8*, i32, i8*, i32, ...)*)(i8* %49, i32 8192, i8* %30, i32 %50)
%52 = load i8*, i8** %14
ret void
}

LLVM IR (-O2):
%struct._T4_a = type { [8193 x i8] }
define void @FormatError2(i8* nocapture %0, i32 %1, i8* nocapture %2, i32 %3, i8* nocapture %4, i32 %5) {
%7 = alloca %struct._T4_a
%8 = getelementptr inbounds %struct._T4_a, %struct._T4_a* %7, i64 0, i32 0, i64 0
%9 = add i32 %1, 1
%10 = zext i32 %9 to i64
%11 = tail call i8* @llvm.stacksave()
%12 = alloca i8, i64 %10
%13 = add i32 %3, 1
%14 = zext i32 %13 to i64
%15 = alloca i8, i64 %14
%16 = add i32 %5, 1
%17 = zext i32 %16 to i64
%18 = alloca i8, i64 %17
%19 = call i32 (i8*, i32, i8*, i32, i8*, i32, ...) bitcast (i32 (...)* @StringFormat1 to i32 (i8*, i32, i8*, i32, i8*, i32, ...)*)(i8* %8, i32 8192, i8* %12, i32 %1, i8* %15, i32 %3)
%20 = call i32 (i8*, i32, i8*, i32, ...) bitcast (i32 (...)* @FormatError1 to i32 (i8*, i32, i8*, i32, ...)*)(i8* %8, i32 8192, i8* %18, i32 %5)
ret void
}