char *UTS_sprintf_wrap(obuf, fmt, d, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9,
                       a10, a11, a12, a13, a14, a15)
char *obuf, *fmt;
double d;
{
  int fmtlen, Width = 0, Precision = 6, Alt = 0, Plus = 0, Minus = 0, Zero = 0;
  int FmtChar, BaseFmt = 0;
  char *f = fmt, *AfterWidth = 0, *AfterPrecision = 0;
  char *Dot;
  if (*f++ != '%') {
    return sprintf(obuf, fmt, d, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
                   a11, a12, a13, a14, a15);
  }
  fmtlen = strlen(fmt);
  FmtChar = fmt[fmtlen - 1];
  switch (FmtChar) {
  case 'f':
  case 'F':
    return sprintf(obuf, fmt, d, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
                   a11, a12, a13, a14, a15);
  case 'e':
  case 'E':
    BaseFmt = 'e';
    goto BaseFmt_IsSet;
  case 'g':
  case 'G':
    BaseFmt = 'g';
  BaseFmt_IsSet:
    if (*f == '#') {
      Alt = 1;
      ++f;
    }
    if (*f == '+') {
      Plus = 1;
      ++f;
    }
    if (*f == '-') {
      Minus = 1;
      ++f;
    }
    if (*f == '0') {
      Zero = 1;
      ++f;
    }
    if (Dot = strchr(f, '.')) {
      Precision = strtol(Dot + 1, &AfterPrecision, 0);
    }
    if (!Dot || (Dot && Dot > f)) {
      Width = strtol(f, &AfterWidth, 0);
    }
    if (Dot) {
      f = AfterPrecision;
    } else if (AfterWidth) {
      f = AfterWidth;
    }
    if (*f != FmtChar)
      goto regular_sprintf;
    if (BaseFmt == 'e') {
      return do_efmt(d, obuf, Width, Precision, Alt, Plus, Minus, Zero,
                     FmtChar == 'E');
    } else {
      return do_gfmt(d, obuf, Width, Precision, Alt, Plus, Minus, Zero,
                     FmtChar == 'G');
    }
  default:
  regular_sprintf:
    return sprintf(obuf, fmt, d, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
                   a11, a12, a13, a14, a15);
  }
}


x86 assembly (clang, -O0):
<UTS_sprintf_wrap>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x118,%rsp
mov    0x68(%rbp),%eax
mov    0x60(%rbp),%eax
mov    0x58(%rbp),%eax
mov    0x50(%rbp),%eax
mov    0x48(%rbp),%eax
mov    0x40(%rbp),%eax
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x38(%rbp)
mov    %rsi,-0x40(%rbp)
movsd  %xmm0,-0x48(%rbp)
mov    %edx,-0x4c(%rbp)
mov    %ecx,-0x50(%rbp)
mov    %r8d,-0x54(%rbp)
mov    %r9d,-0x58(%rbp)
movl   $0x0,-0x60(%rbp)
movl   $0x6,-0x64(%rbp)
movl   $0x0,-0x68(%rbp)
movl   $0x0,-0x6c(%rbp)
movl   $0x0,-0x70(%rbp)
movl   $0x0,-0x74(%rbp)
movl   $0x0,-0x7c(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x88(%rbp)
movq   $0x0,-0x90(%rbp)
movq   $0x0,-0x98(%rbp)
mov    -0x88(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x88(%rbp)
movsbl (%rax),%eax
cmp    $0x25,%eax
je     12ee <UTS_sprintf_wrap+0x18e>
mov    -0x38(%rbp),%rdi
mov    -0x40(%rbp),%rsi
movsd  -0x48(%rbp),%xmm0
mov    -0x4c(%rbp),%edx
mov    -0x50(%rbp),%ecx
mov    -0x54(%rbp),%r8d
mov    -0x58(%rbp),%r9d
mov    0x10(%rbp),%eax
mov    %eax,-0xb4(%rbp)
mov    0x18(%rbp),%eax
mov    %eax,-0xb0(%rbp)
mov    0x20(%rbp),%eax
mov    %eax,-0xac(%rbp)
mov    0x28(%rbp),%eax
mov    %eax,-0xa8(%rbp)
mov    0x30(%rbp),%r13d
mov    0x38(%rbp),%r12d
mov    0x40(%rbp),%r15d
mov    0x48(%rbp),%r14d
mov    0x50(%rbp),%ebx
mov    0x58(%rbp),%r11d
mov    0x60(%rbp),%r10d
mov    0x68(%rbp),%eax
mov    %eax,-0xa4(%rbp)
mov    -0xb4(%rbp),%eax
mov    %eax,(%rsp)
mov    -0xb0(%rbp),%eax
mov    %eax,0x8(%rsp)
mov    -0xac(%rbp),%eax
mov    %eax,0x10(%rsp)
mov    -0xa8(%rbp),%eax
mov    %eax,0x18(%rsp)
mov    -0xa4(%rbp),%eax
mov    %r13d,0x20(%rsp)
mov    %r12d,0x28(%rsp)
mov    %r15d,0x30(%rsp)
mov    %r14d,0x38(%rsp)
mov    %ebx,0x40(%rsp)
mov    %r11d,0x48(%rsp)
mov    %r10d,0x50(%rsp)
mov    %eax,0x58(%rsp)
mov    $0x1,%al
call   1080 <sprintf@plt>
cltq
mov    %rax,-0x30(%rbp)
jmp    174e <UTS_sprintf_wrap+0x5ee>
mov    -0x40(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x5c(%rbp)
mov    -0x40(%rbp),%rax
mov    -0x5c(%rbp),%ecx
add    $0xffffffff,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
mov    %eax,-0x78(%rbp)
mov    -0x78(%rbp),%eax
mov    %eax,-0xb8(%rbp)
sub    $0x45,%eax
je     1451 <UTS_sprintf_wrap+0x2f1>
jmp    1325 <UTS_sprintf_wrap+0x1c5>
mov    -0xb8(%rbp),%eax
sub    $0x46,%eax
je     1389 <UTS_sprintf_wrap+0x229>
jmp    1339 <UTS_sprintf_wrap+0x1d9>
mov    -0xb8(%rbp),%eax
sub    $0x47,%eax
je     145d <UTS_sprintf_wrap+0x2fd>
jmp    134d <UTS_sprintf_wrap+0x1ed>
mov    -0xb8(%rbp),%eax
sub    $0x65,%eax
je     1451 <UTS_sprintf_wrap+0x2f1>
jmp    1361 <UTS_sprintf_wrap+0x201>
mov    -0xb8(%rbp),%eax
sub    $0x66,%eax
je     1389 <UTS_sprintf_wrap+0x229>
jmp    1375 <UTS_sprintf_wrap+0x215>
mov    -0xb8(%rbp),%eax
sub    $0x67,%eax
je     145d <UTS_sprintf_wrap+0x2fd>
jmp    1686 <UTS_sprintf_wrap+0x526>
mov    -0x38(%rbp),%rdi
mov    -0x40(%rbp),%rsi
movsd  -0x48(%rbp),%xmm0
mov    -0x4c(%rbp),%edx
mov    -0x50(%rbp),%ecx
mov    -0x54(%rbp),%r8d
mov    -0x58(%rbp),%r9d
mov    0x10(%rbp),%eax
mov    %eax,-0xcc(%rbp)
mov    0x18(%rbp),%eax
mov    %eax,-0xc8(%rbp)
mov    0x20(%rbp),%eax
mov    %eax,-0xc4(%rbp)
mov    0x28(%rbp),%eax
mov    %eax,-0xc0(%rbp)
mov    0x30(%rbp),%r13d
mov    0x38(%rbp),%r12d
mov    0x40(%rbp),%r15d
mov    0x48(%rbp),%r14d
mov    0x50(%rbp),%ebx
mov    0x58(%rbp),%r11d
mov    0x60(%rbp),%r10d
mov    0x68(%rbp),%eax
mov    %eax,-0xbc(%rbp)
mov    -0xcc(%rbp),%eax
mov    %eax,(%rsp)
mov    -0xc8(%rbp),%eax
mov    %eax,0x8(%rsp)
mov    -0xc4(%rbp),%eax
mov    %eax,0x10(%rsp)
mov    -0xc0(%rbp),%eax
mov    %eax,0x18(%rsp)
mov    -0xbc(%rbp),%eax
mov    %r13d,0x20(%rsp)
mov    %r12d,0x28(%rsp)
mov    %r15d,0x30(%rsp)
mov    %r14d,0x38(%rsp)
mov    %ebx,0x40(%rsp)
mov    %r11d,0x48(%rsp)
mov    %r10d,0x50(%rsp)
mov    %eax,0x58(%rsp)
mov    $0x1,%al
call   1080 <sprintf@plt>
cltq
mov    %rax,-0x30(%rbp)
jmp    174e <UTS_sprintf_wrap+0x5ee>
movl   $0x65,-0x7c(%rbp)
jmp    1464 <UTS_sprintf_wrap+0x304>
movl   $0x67,-0x7c(%rbp)
mov    -0x88(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    1490 <UTS_sprintf_wrap+0x330>
movl   $0x1,-0x68(%rbp)
mov    -0x88(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
jne    14bc <UTS_sprintf_wrap+0x35c>
movl   $0x1,-0x6c(%rbp)
mov    -0x88(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    14e8 <UTS_sprintf_wrap+0x388>
movl   $0x1,-0x70(%rbp)
mov    -0x88(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jne    1514 <UTS_sprintf_wrap+0x3b4>
movl   $0x1,-0x74(%rbp)
mov    -0x88(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rdi
mov    $0x2e,%esi
call   1050 <strchr@plt>
mov    %rax,-0xa0(%rbp)
cmp    $0x0,%rax
je     1552 <UTS_sprintf_wrap+0x3f2>
mov    -0xa0(%rbp),%rdi
add    $0x1,%rdi
lea    -0x98(%rbp),%rsi
xor    %edx,%edx
call   1070 <strtol@plt>
mov    %eax,-0x64(%rbp)
cmpq   $0x0,-0xa0(%rbp)
je     1582 <UTS_sprintf_wrap+0x422>
cmpq   $0x0,-0xa0(%rbp)
je     159a <UTS_sprintf_wrap+0x43a>
mov    -0xa0(%rbp),%rax
cmp    -0x88(%rbp),%rax
jbe    159a <UTS_sprintf_wrap+0x43a>
mov    -0x88(%rbp),%rdi
lea    -0x90(%rbp),%rsi
xor    %edx,%edx
call   1070 <strtol@plt>
mov    %eax,-0x60(%rbp)
cmpq   $0x0,-0xa0(%rbp)
je     15bb <UTS_sprintf_wrap+0x45b>
mov    -0x98(%rbp),%rax
mov    %rax,-0x88(%rbp)
jmp    15dc <UTS_sprintf_wrap+0x47c>
cmpq   $0x0,-0x90(%rbp)
je     15d7 <UTS_sprintf_wrap+0x477>
mov    -0x90(%rbp),%rax
mov    %rax,-0x88(%rbp)
jmp    15dc <UTS_sprintf_wrap+0x47c>
mov    -0x88(%rbp),%rax
movsbl (%rax),%eax
cmp    -0x78(%rbp),%eax
je     15f4 <UTS_sprintf_wrap+0x494>
jmp    168b <UTS_sprintf_wrap+0x52b>
cmpl   $0x65,-0x7c(%rbp)
jne    1642 <UTS_sprintf_wrap+0x4e2>
movsd  -0x48(%rbp),%xmm0
mov    -0x38(%rbp),%rdi
mov    -0x60(%rbp),%esi
mov    -0x64(%rbp),%edx
mov    -0x68(%rbp),%ecx
mov    -0x6c(%rbp),%r8d
mov    -0x70(%rbp),%r9d
mov    -0x74(%rbp),%r10d
cmpl   $0x45,-0x78(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x1,%al
call   1060 <do_efmt@plt>
cltq
mov    %rax,-0x30(%rbp)
jmp    174e <UTS_sprintf_wrap+0x5ee>
movsd  -0x48(%rbp),%xmm0
mov    -0x38(%rbp),%rdi
mov    -0x60(%rbp),%esi
mov    -0x64(%rbp),%edx
mov    -0x68(%rbp),%ecx
mov    -0x6c(%rbp),%r8d
mov    -0x70(%rbp),%r9d
mov    -0x74(%rbp),%r10d
cmpl   $0x47,-0x78(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x1,%al
call   1040 <do_gfmt@plt>
cltq
mov    %rax,-0x30(%rbp)
jmp    174e <UTS_sprintf_wrap+0x5ee>
jmp    168b <UTS_sprintf_wrap+0x52b>
mov    -0x38(%rbp),%rdi
mov    -0x40(%rbp),%rsi
movsd  -0x48(%rbp),%xmm0
mov    -0x4c(%rbp),%edx
mov    -0x50(%rbp),%ecx
mov    -0x54(%rbp),%r8d
mov    -0x58(%rbp),%r9d
mov    0x10(%rbp),%eax
mov    %eax,-0xe0(%rbp)
mov    0x18(%rbp),%eax
mov    %eax,-0xdc(%rbp)
mov    0x20(%rbp),%eax
mov    %eax,-0xd8(%rbp)
mov    0x28(%rbp),%eax
mov    %eax,-0xd4(%rbp)
mov    0x30(%rbp),%r13d
mov    0x38(%rbp),%r12d
mov    0x40(%rbp),%r15d
mov    0x48(%rbp),%r14d
mov    0x50(%rbp),%ebx
mov    0x58(%rbp),%r11d
mov    0x60(%rbp),%r10d
mov    0x68(%rbp),%eax
mov    %eax,-0xd0(%rbp)
mov    -0xe0(%rbp),%eax
mov    %eax,(%rsp)
mov    -0xdc(%rbp),%eax
mov    %eax,0x8(%rsp)
mov    -0xd8(%rbp),%eax
mov    %eax,0x10(%rsp)
mov    -0xd4(%rbp),%eax
mov    %eax,0x18(%rsp)
mov    -0xd0(%rbp),%eax
mov    %r13d,0x20(%rsp)
mov    %r12d,0x28(%rsp)
mov    %r15d,0x30(%rsp)
mov    %r14d,0x38(%rsp)
mov    %ebx,0x40(%rsp)
mov    %r11d,0x48(%rsp)
mov    %r10d,0x50(%rsp)
mov    %eax,0x58(%rsp)
mov    $0x1,%al
call   1080 <sprintf@plt>
cltq
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
add    $0x118,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<UTS_sprintf_wrap>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %rsi,%rbp
mov    0xf8(%rsp),%ebx
mov    0xd0(%rsp),%r15d
mov    0xc8(%rsp),%r14d
mov    0xc0(%rsp),%r11d
movq   $0x0,0x48(%rsp)
movq   $0x0,0x40(%rsp)
cmpb   $0x25,(%rsi)
mov    0xb8(%rsp),%r10d
mov    0xb0(%rsp),%r12d
mov    0xa8(%rsp),%r13d
jne    1273 <UTS_sprintf_wrap+0x113>
mov    %edx,0x10(%rsp)
mov    %ecx,0x14(%rsp)
mov    %r8d,0x18(%rsp)
mov    %rdi,0x28(%rsp)
mov    %r9d,0x1c(%rsp)
mov    %rbp,%rdi
movsd  %xmm0,0x30(%rsp)
call   1030 <strlen@plt>
movsd  0x30(%rsp),%xmm0
add    $0xffffffff,%eax
cltq
movsbl 0x0(%rbp,%rax,1),%edx
lea    -0x45(%rdx),%eax
cmp    $0x22,%eax
mov    0xd8(%rsp),%r10d
mov    0xe0(%rsp),%r14d
mov    0xe8(%rsp),%r11d
mov    0xf0(%rsp),%r13d
mov    0xa0(%rsp),%r12d
ja     140c <UTS_sprintf_wrap+0x2ac>
movabs $0x100000001,%rcx
bt     %rax,%rcx
jb     12b2 <UTS_sprintf_wrap+0x152>
movabs $0x200000002,%rcx
bt     %rax,%rcx
jb     140c <UTS_sprintf_wrap+0x2ac>
movabs $0x400000004,%rcx
bt     %rax,%rcx
jae    140c <UTS_sprintf_wrap+0x2ac>
mov    %rdx,0x20(%rsp)
movl   $0x0,0xc(%rsp)
jmp    12bd <UTS_sprintf_wrap+0x15d>
mov    %rbp,%rsi
mov    $0x1,%al
push   %rbx
mov    0xf8(%rsp),%ebx
push   %rbx
mov    0xf8(%rsp),%ebx
push   %rbx
mov    0xf8(%rsp),%ebx
push   %rbx
mov    0xf8(%rsp),%ebx
push   %rbx
push   %r15
push   %r14
push   %r11
push   %r10
push   %r12
push   %r13
mov    0xf8(%rsp),%ebp
push   %rbp
jmp    1463 <UTS_sprintf_wrap+0x303>
mov    %rdx,0x20(%rsp)
mov    $0x1,%al
mov    %eax,0xc(%rsp)
lea    0x1(%rbp),%rax
lea    0x2(%rbp),%rcx
xor    %ebx,%ebx
cmpb   $0x23,0x1(%rbp)
cmove  %rcx,%rax
sete   %bl
xor    %ecx,%ecx
cmpb   $0x2b,0x1(%rbx,%rbp,1)
sete   %cl
xor    %r15d,%r15d
cmpb   $0x2d,(%rax,%rcx,1)
mov    %rcx,0x58(%rsp)
lea    (%rax,%rcx,1),%rax
sete   %r15b
lea    (%rax,%r15,1),%rcx
xor    %edx,%edx
cmpb   $0x30,(%r15,%rax,1)
sete   %dl
mov    %rdx,0x50(%rsp)
lea    (%rdx,%rcx,1),%r12
mov    %r12,%rdi
mov    $0x2e,%esi
call   1050 <strchr@plt>
mov    %rax,%r13
test   %rax,%rax
mov    %rbx,0x60(%rsp)
je     135d <UTS_sprintf_wrap+0x1fd>
lea    0x1(%r13),%rdi
lea    0x40(%rsp),%rsi
xor    %edx,%edx
call   1070 <strtol@plt>
cmp    %r12,%r13
mov    %rax,0x38(%rsp)
ja     1367 <UTS_sprintf_wrap+0x207>
xor    %eax,%eax
mov    0xd8(%rsp),%r10d
mov    0xe8(%rsp),%r11d
movsd  0x30(%rsp),%xmm0
mov    0x20(%rsp),%rsi
xor    %r9d,%r9d
jmp    1399 <UTS_sprintf_wrap+0x239>
mov    $0x6,%eax
mov    %rax,0x38(%rsp)
lea    0x48(%rsp),%rsi
mov    %r12,%rdi
xor    %edx,%edx
call   1070 <strtol@plt>
mov    %rax,%r9
mov    0x48(%rsp),%rax
mov    0xd8(%rsp),%r10d
mov    0xe8(%rsp),%r11d
movsd  0x30(%rsp),%xmm0
mov    0x20(%rsp),%rsi
test   %rax,%rax
cmovne %rax,%r12
test   %r13,%r13
je     13aa <UTS_sprintf_wrap+0x24a>
mov    0x40(%rsp),%r12
cmp    %sil,(%r12)
mov    0xa0(%rsp),%eax
mov    %rax,%r12
mov    0xf0(%rsp),%r13d
mov    0xf8(%rsp),%ebx
jne    140c <UTS_sprintf_wrap+0x2ac>
cmpb   $0x0,0xc(%rsp)
mov    0x28(%rsp),%rdi
mov    0x60(%rsp),%rcx
mov    0x58(%rsp),%r8
mov    0x50(%rsp),%rbx
mov    0x38(%rsp),%rdx
je     147d <UTS_sprintf_wrap+0x31d>
xor    %ebp,%ebp
cmp    $0x45,%sil
sete   %bpl
mov    %r9d,%esi
mov    %r15d,%r9d
mov    $0x1,%al
push   %rbp
push   %rbx
call   1060 <do_efmt@plt>
add    $0x10,%rsp
jmp    146c <UTS_sprintf_wrap+0x30c>
mov    0x28(%rsp),%rdi
mov    %rbp,%rsi
mov    0x10(%rsp),%edx
mov    0x14(%rsp),%ecx
mov    0x18(%rsp),%r8d
mov    0x1c(%rsp),%r9d
mov    $0x1,%al
push   %rbx
push   %r13
push   %r11
push   %r14
push   %r10
mov    0xf8(%rsp),%ebp
push   %rbp
mov    0xf8(%rsp),%ebp
push   %rbp
mov    0xf8(%rsp),%ebp
push   %rbp
mov    0xf8(%rsp),%ebp
push   %rbp
mov    0xf8(%rsp),%ebp
push   %rbp
mov    0xf8(%rsp),%ebp
push   %rbp
push   %r12
call   1080 <sprintf@plt>
add    $0x60,%rsp
cltq
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %ebp,%ebp
cmp    $0x47,%sil
sete   %bpl
mov    %r9d,%esi
mov    %r15d,%r9d
mov    $0x1,%al
push   %rbp
push   %rbx
call   1040 <do_gfmt@plt>
add    $0x10,%rsp
jmp    146c <UTS_sprintf_wrap+0x30c>

LLVM IR (-O0):
define i8* @UTS_sprintf_wrap(i8* %0, i8* %1, double %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10, i32 %11, i32 %12, i32 %13, i32 %14, i32 %15, i32 %16, i32 %17, i32 %18) {
%20 = alloca i8*
%21 = alloca i8*
%22 = alloca i8*
%23 = alloca double
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
%34 = alloca i32
%35 = alloca i32
%36 = alloca i32
%37 = alloca i32
%38 = alloca i32
%39 = alloca i32
%40 = alloca i32
%41 = alloca i32
%42 = alloca i32
%43 = alloca i32
%44 = alloca i32
%45 = alloca i32
%46 = alloca i32
%47 = alloca i32
%48 = alloca i32
%49 = alloca i8*
%50 = alloca i8*
%51 = alloca i8*
%52 = alloca i8*
store i8* %0, i8** %21
store i8* %1, i8** %22
store double %2, double* %23
store i32 %3, i32* %24
store i32 %4, i32* %25
store i32 %5, i32* %26
store i32 %6, i32* %27
store i32 %7, i32* %28
store i32 %8, i32* %29
store i32 %9, i32* %30
store i32 %10, i32* %31
store i32 %11, i32* %32
store i32 %12, i32* %33
store i32 %13, i32* %34
store i32 %14, i32* %35
store i32 %15, i32* %36
store i32 %16, i32* %37
store i32 %17, i32* %38
store i32 %18, i32* %39
store i32 0, i32* %41
store i32 6, i32* %42
store i32 0, i32* %43
store i32 0, i32* %44
store i32 0, i32* %45
store i32 0, i32* %46
store i32 0, i32* %48
%53 = load i8*, i8** %22
store i8* %53, i8** %49
store i8* null, i8** %50
store i8* null, i8** %51
%54 = load i8*, i8** %49
%55 = getelementptr inbounds i8, i8* %54, i32 1
store i8* %55, i8** %49
%56 = load i8, i8* %54
%57 = sext i8 %56 to i32
%58 = icmp ne i32 %57, 37
br i1 %58, label %59, label %82
59: ; preds = %19
%60 = load i8*, i8** %21
%61 = load i8*, i8** %22
%62 = load double, double* %23
%63 = load i32, i32* %24
%64 = load i32, i32* %25
%65 = load i32, i32* %26
%66 = load i32, i32* %27
%67 = load i32, i32* %28
%68 = load i32, i32* %29
%69 = load i32, i32* %30
%70 = load i32, i32* %31
%71 = load i32, i32* %32
%72 = load i32, i32* %33
%73 = load i32, i32* %34
%74 = load i32, i32* %35
%75 = load i32, i32* %36
%76 = load i32, i32* %37
%77 = load i32, i32* %38
%78 = load i32, i32* %39
%79 = call i32 (i8*, i8*, ...) @sprintf(i8* %60, i8* %61, double %62, i32 %63, i32 %64, i32 %65, i32 %66, i32 %67, i32 %68, i32 %69, i32 %70, i32 %71, i32 %72, i32 %73, i32 %74, i32 %75, i32 %76, i32 %77, i32 %78)
%80 = sext i32 %79 to i64
%81 = inttoptr i64 %80 to i8*
store i8* %81, i8** %20
br label %249
82: ; preds = %19
%83 = load i8*, i8** %22
%84 = call i64 @strlen(i8* %83)
%85 = trunc i64 %84 to i32
store i32 %85, i32* %40
%86 = load i8*, i8** %22
%87 = load i32, i32* %40
%88 = sub nsw i32 %87, 1
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds i8, i8* %86, i64 %89
%91 = load i8, i8* %90
%92 = sext i8 %91 to i32
store i32 %92, i32* %47
%93 = load i32, i32* %47
switch i32 %93, label %225 [
i32 102, label %94
i32 70, label %94
i32 101, label %117
i32 69, label %117
i32 103, label %118
i32 71, label %118
]
94: ; preds = %82, %82
%95 = load i8*, i8** %21
%96 = load i8*, i8** %22
%97 = load double, double* %23
%98 = load i32, i32* %24
%99 = load i32, i32* %25
%100 = load i32, i32* %26
%101 = load i32, i32* %27
%102 = load i32, i32* %28
%103 = load i32, i32* %29
%104 = load i32, i32* %30
%105 = load i32, i32* %31
%106 = load i32, i32* %32
%107 = load i32, i32* %33
%108 = load i32, i32* %34
%109 = load i32, i32* %35
%110 = load i32, i32* %36
%111 = load i32, i32* %37
%112 = load i32, i32* %38
%113 = load i32, i32* %39
%114 = call i32 (i8*, i8*, ...) @sprintf(i8* %95, i8* %96, double %97, i32 %98, i32 %99, i32 %100, i32 %101, i32 %102, i32 %103, i32 %104, i32 %105, i32 %106, i32 %107, i32 %108, i32 %109, i32 %110, i32 %111, i32 %112, i32 %113)
%115 = sext i32 %114 to i64
%116 = inttoptr i64 %115 to i8*
store i8* %116, i8** %20
br label %249
117: ; preds = %82, %82
store i32 101, i32* %48
br label %119
118: ; preds = %82, %82
store i32 103, i32* %48
br label %119
119: ; preds = %118, %117
%120 = load i8*, i8** %49
%121 = load i8, i8* %120
%122 = sext i8 %121 to i32
%123 = icmp eq i32 %122, 35
br i1 %123, label %124, label %127
124: ; preds = %119
store i32 1, i32* %43
%125 = load i8*, i8** %49
%126 = getelementptr inbounds i8, i8* %125, i32 1
store i8* %126, i8** %49
br label %127
127: ; preds = %124, %119
%128 = load i8*, i8** %49
%129 = load i8, i8* %128
%130 = sext i8 %129 to i32
%131 = icmp eq i32 %130, 43
br i1 %131, label %132, label %135
132: ; preds = %127
store i32 1, i32* %44
%133 = load i8*, i8** %49
%134 = getelementptr inbounds i8, i8* %133, i32 1
store i8* %134, i8** %49
br label %135
135: ; preds = %132, %127
%136 = load i8*, i8** %49
%137 = load i8, i8* %136
%138 = sext i8 %137 to i32
%139 = icmp eq i32 %138, 45
br i1 %139, label %140, label %143
140: ; preds = %135
store i32 1, i32* %45
%141 = load i8*, i8** %49
%142 = getelementptr inbounds i8, i8* %141, i32 1
store i8* %142, i8** %49
br label %143
143: ; preds = %140, %135
%144 = load i8*, i8** %49
%145 = load i8, i8* %144
%146 = sext i8 %145 to i32
%147 = icmp eq i32 %146, 48
br i1 %147, label %148, label %151
148: ; preds = %143
store i32 1, i32* %46
%149 = load i8*, i8** %49
%150 = getelementptr inbounds i8, i8* %149, i32 1
store i8* %150, i8** %49
br label %151
151: ; preds = %148, %143
%152 = load i8*, i8** %49
%153 = call i8* @strchr(i8* %152, i32 46)
store i8* %153, i8** %52
%154 = icmp ne i8* %153, null
br i1 %154, label %155, label %160
155: ; preds = %151
%156 = load i8*, i8** %52
%157 = getelementptr inbounds i8, i8* %156, i64 1
%158 = call i64 @strtol(i8* %157, i8** %51, i32 0)
%159 = trunc i64 %158 to i32
store i32 %159, i32* %42
br label %160
160: ; preds = %155, %151
%161 = load i8*, i8** %52
%162 = icmp ne i8* %161, null
br i1 %162, label %163, label %170
163: ; preds = %160
%164 = load i8*, i8** %52
%165 = icmp ne i8* %164, null
br i1 %165, label %166, label %174
166: ; preds = %163
%167 = load i8*, i8** %52
%168 = load i8*, i8** %49
%169 = icmp ugt i8* %167, %168
br i1 %169, label %170, label %174
170: ; preds = %166, %160
%171 = load i8*, i8** %49
%172 = call i64 @strtol(i8* %171, i8** %50, i32 0)
%173 = trunc i64 %172 to i32
store i32 %173, i32* %41
br label %174
174: ; preds = %170, %166, %163
%175 = load i8*, i8** %52
%176 = icmp ne i8* %175, null
br i1 %176, label %177, label %179
177: ; preds = %174
%178 = load i8*, i8** %51
store i8* %178, i8** %49
br label %185
179: ; preds = %174
%180 = load i8*, i8** %50
%181 = icmp ne i8* %180, null
br i1 %181, label %182, label %184
182: ; preds = %179
%183 = load i8*, i8** %50
store i8* %183, i8** %49
br label %184
184: ; preds = %182, %179
br label %185
185: ; preds = %184, %177
%186 = load i8*, i8** %49
%187 = load i8, i8* %186
%188 = sext i8 %187 to i32
%189 = load i32, i32* %47
%190 = icmp ne i32 %188, %189
br i1 %190, label %191, label %192
191: ; preds = %185
br label %226
192: ; preds = %185
%193 = load i32, i32* %48
%194 = icmp eq i32 %193, 101
br i1 %194, label %195, label %210
195: ; preds = %192
%196 = load double, double* %23
%197 = load i8*, i8** %21
%198 = load i32, i32* %41
%199 = load i32, i32* %42
%200 = load i32, i32* %43
%201 = load i32, i32* %44
%202 = load i32, i32* %45
%203 = load i32, i32* %46
%204 = load i32, i32* %47
%205 = icmp eq i32 %204, 69
%206 = zext i1 %205 to i32
%207 = call i32 (double, i8*, i32, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @do_efmt to i32 (double, i8*, i32, i32, i32, i32, i32, i32, i32, ...)*)(double %196, i8* %197, i32 %198, i32 %199, i32 %200, i32 %201, i32 %202, i32 %203, i32 %206)
%208 = sext i32 %207 to i64
%209 = inttoptr i64 %208 to i8*
store i8* %209, i8** %20
br label %249
210: ; preds = %192
%211 = load double, double* %23
%212 = load i8*, i8** %21
%213 = load i32, i32* %41
%214 = load i32, i32* %42
%215 = load i32, i32* %43
%216 = load i32, i32* %44
%217 = load i32, i32* %45
%218 = load i32, i32* %46
%219 = load i32, i32* %47
%220 = icmp eq i32 %219, 71
%221 = zext i1 %220 to i32
%222 = call i32 (double, i8*, i32, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @do_gfmt to i32 (double, i8*, i32, i32, i32, i32, i32, i32, i32, ...)*)(double %211, i8* %212, i32 %213, i32 %214, i32 %215, i32 %216, i32 %217, i32 %218, i32 %221)
%223 = sext i32 %222 to i64
%224 = inttoptr i64 %223 to i8*
store i8* %224, i8** %20
br label %249
225: ; preds = %82
br label %226
226: ; preds = %225, %191
%227 = load i8*, i8** %21
%228 = load i8*, i8** %22
%229 = load double, double* %23
%230 = load i32, i32* %24
%231 = load i32, i32* %25
%232 = load i32, i32* %26
%233 = load i32, i32* %27
%234 = load i32, i32* %28
%235 = load i32, i32* %29
%236 = load i32, i32* %30
%237 = load i32, i32* %31
%238 = load i32, i32* %32
%239 = load i32, i32* %33
%240 = load i32, i32* %34
%241 = load i32, i32* %35
%242 = load i32, i32* %36
%243 = load i32, i32* %37
%244 = load i32, i32* %38
%245 = load i32, i32* %39
%246 = call i32 (i8*, i8*, ...) @sprintf(i8* %227, i8* %228, double %229, i32 %230, i32 %231, i32 %232, i32 %233, i32 %234, i32 %235, i32 %236, i32 %237, i32 %238, i32 %239, i32 %240, i32 %241, i32 %242, i32 %243, i32 %244, i32 %245)
%247 = sext i32 %246 to i64
%248 = inttoptr i64 %247 to i8*
store i8* %248, i8** %20
br label %249
249: ; preds = %226, %210, %195, %94, %59
%250 = load i8*, i8** %20
ret i8* %250
}

LLVM IR (-O2):
define i8* @UTS_sprintf_wrap(i8* %0, i8* %1, double %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10, i32 %11, i32 %12, i32 %13, i32 %14, i32 %15, i32 %16, i32 %17, i32 %18) {
%20 = alloca i8*
%21 = alloca i8*
%22 = bitcast i8** %20 to i8*
store i8* null, i8** %20
%23 = bitcast i8** %21 to i8*
store i8* null, i8** %21
%24 = getelementptr inbounds i8, i8* %1, i64 1
%25 = load i8, i8* %1
%26 = icmp eq i8 %25, 37
br i1 %26, label %29, label %27
27: ; preds = %19
%28 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %0, i8* %1, double %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10, i32 %11, i32 %12, i32 %13, i32 %14, i32 %15, i32 %16, i32 %17, i32 %18)
br label %95
29: ; preds = %19
%30 = tail call i64 @strlen(i8* %1)
%31 = shl i64 %30, 32
%32 = add i64 %31, -4294967296
%33 = ashr exact i64 %32, 32
%34 = getelementptr inbounds i8, i8* %1, i64 %33
%35 = load i8, i8* %34
%36 = sext i8 %35 to i32
switch i32 %36, label %93 [
i32 102, label %37
i32 70, label %37
i32 101, label %40
i32 69, label %40
i32 103, label %39
i32 71, label %39
]
37: ; preds = %29, %29
%38 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %0, i8* %1, double %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10, i32 %11, i32 %12, i32 %13, i32 %14, i32 %15, i32 %16, i32 %17, i32 %18)
br label %95
39: ; preds = %29, %29
br label %40
40: ; preds = %29, %29, %39
%41 = phi i1 [ false, %39 ], [ true, %29 ], [ true, %29 ]
%42 = load i8, i8* %24
%43 = icmp eq i8 %42, 35
%44 = getelementptr inbounds i8, i8* %1, i64 2
%45 = zext i1 %43 to i32
%46 = select i1 %43, i8* %44, i8* %24
%47 = load i8, i8* %46
%48 = icmp eq i8 %47, 43
%49 = zext i1 %48 to i32
%50 = zext i1 %48 to i64
%51 = getelementptr i8, i8* %46, i64 %50
%52 = load i8, i8* %51
%53 = icmp eq i8 %52, 45
%54 = zext i1 %53 to i32
%55 = zext i1 %53 to i64
%56 = getelementptr i8, i8* %51, i64 %55
%57 = load i8, i8* %56
%58 = icmp eq i8 %57, 48
%59 = zext i1 %58 to i32
%60 = zext i1 %58 to i64
%61 = getelementptr i8, i8* %56, i64 %60
%62 = tail call i8* @strchr(i8* %61, i32 46)
%63 = icmp eq i8* %62, null
br i1 %63, label %69, label %64
64: ; preds = %40
%65 = getelementptr inbounds i8, i8* %62, i64 1
%66 = call i64 @strtol(i8* %65, i8** %21, i32 0)
%67 = trunc i64 %66 to i32
%68 = icmp ugt i8* %62, %61
br i1 %68, label %69, label %74
69: ; preds = %40, %64
%70 = phi i32 [ %67, %64 ], [ 6, %40 ]
%71 = call i64 @strtol(i8* %61, i8** %20, i32 0)
%72 = trunc i64 %71 to i32
%73 = load i8*, i8** %20
br label %74
74: ; preds = %64, %69
%75 = phi i8* [ %73, %69 ], [ null, %64 ]
%76 = phi i32 [ %70, %69 ], [ %67, %64 ]
%77 = phi i32 [ %72, %69 ], [ 0, %64 ]
%78 = load i8*, i8** %21
%79 = icmp eq i8* %75, null
%80 = select i1 %79, i8* %61, i8* %75
%81 = select i1 %63, i8* %80, i8* %78
%82 = load i8, i8* %81
%83 = icmp eq i8 %82, %35
br i1 %83, label %84, label %93
84: ; preds = %74
br i1 %41, label %85, label %89
85: ; preds = %84
%86 = icmp eq i8 %35, 69
%87 = zext i1 %86 to i32
%88 = tail call i32 (double, i8*, i32, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @do_efmt to i32 (double, i8*, i32, i32, i32, i32, i32, i32, i32, ...)*)(double %2, i8* %0, i32 %77, i32 %76, i32 %45, i32 %49, i32 %54, i32 %59, i32 %87)
br label %95
89: ; preds = %84
%90 = icmp eq i8 %35, 71
%91 = zext i1 %90 to i32
%92 = tail call i32 (double, i8*, i32, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @do_gfmt to i32 (double, i8*, i32, i32, i32, i32, i32, i32, i32, ...)*)(double %2, i8* %0, i32 %77, i32 %76, i32 %45, i32 %49, i32 %54, i32 %59, i32 %91)
br label %95
93: ; preds = %29, %74
%94 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %0, i8* %1, double %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10, i32 %11, i32 %12, i32 %13, i32 %14, i32 %15, i32 %16, i32 %17, i32 %18)
br label %95
95: ; preds = %93, %89, %85, %37, %27
%96 = phi i32 [ %28, %27 ], [ %94, %93 ], [ %88, %85 ], [ %92, %89 ], [ %38, %37 ]
%97 = sext i32 %96 to i64
%98 = inttoptr i64 %97 to i8*
ret i8* %98
}