// File: /workspace/github_c_makefile_star2_O2/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/lobject.c
// Function: luaO_pushvfstring
const char *luaO_pushvfstring (lua_State *L, const char *fmt, va_list argp) {
  int n = 0;
  for (;;) {
    const char *e = strchr(fmt, '%');
    if (e == NULL) break;
    luaD_checkstack(L, 2);  /* fmt + item */
    pushstr(L, fmt, e - fmt);
    switch (*(e+1)) {
      case 's': {
        const char *s = va_arg(argp, char *);
        if (s == NULL) s = "(null)";
        pushstr(L, s, strlen(s));
        break;
      }
      case 'c': {
        char buff;
        buff = cast(char, va_arg(argp, int));
        pushstr(L, &buff, 1);
        break;
      }
      case 'd': {
        setnvalue(L->top++, cast_num(va_arg(argp, int)));
        break;
      }
      case 'f': {
        setnvalue(L->top++, cast_num(va_arg(argp, l_uacNumber)));
        break;
      }
      case 'p': {
        char buff[4*sizeof(void *) + 8]; /* should be enough space for a `%p' */
        int l = sprintf(buff, "%p", va_arg(argp, void *));
        pushstr(L, buff, l);
        break;
      }
      case '%': {
        pushstr(L, "%", 1);
        break;
      }
      default: {
        luaG_runerror(L,
            "invalid option " LUA_QL("%%%c") " to " LUA_QL("lua_pushfstring"),
            *(e + 1));
      }
    }
    n += 2;
    fmt = e+2;
  }
  luaD_checkstack(L, 1);
  pushstr(L, fmt, strlen(fmt));
  if (n > 0) luaV_concat(L, n + 1);
  return svalue(L->top - 1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
pushq $0x1
popq %rbp
pushq $0x25
popq %r15
movq %r12, %rdi
movl %r15d, %esi
callq 0x6190
movq %rax, %r13
movq 0x30(%rbx), %rax
subq 0x10(%rbx), %rax
testq %r13, %r13
je 0xfef3
cmpq $0x20, %rax
jg 0xfd34
movq %rbx, %rdi
pushq $0x2
popq %rsi
callq 0xaef2
movq %r13, %rdx
subq %r12, %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0xff58
movzbl 0x1(%r13), %eax
cmpl $0x25, %eax
je 0xfe2c
cmpl $0x63, %eax
je 0xfdb2
cmpl $0x64, %eax
je 0xfdd1
cmpl $0x66, %eax
je 0xfdfc
cmpl $0x70, %eax
je 0xfd93
cmpl $0x73, %eax
jne 0xff44
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0xfe82
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0xfe8e
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0xfe38
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0xfe44
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0xfe66
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0xfe72
movq 0x10(%rbx), %rax
leaq 0x10(%rax), %rcx
movq %rcx, 0x10(%rbx)
movl (%r14), %edx
cmpq $0x28, %rdx
ja 0xfeb7
movq %rdx, %rcx
addq 0x10(%r14), %rcx
addl $0x8, %edx
movl %edx, (%r14)
jmp 0xfec3
movq 0x10(%rbx), %rax
leaq 0x10(%rax), %rcx
movq %rcx, 0x10(%rbx)
movl 0x4(%r14), %edx
cmpq $0xa0, %rdx
ja 0xfec9
movq %rdx, %rcx
addq 0x10(%r14), %rcx
addl $0x10, %edx
movl %edx, 0x4(%r14)
jmp 0xfed5
movq %rbx, %rdi
leaq 0xf478(%rip), %rsi      # 0x1f2ae
jmp 0xfe7d
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movq (%rax), %rdx
movq %rsp, %r12
movq %r12, %rdi
leaq 0xe6d0(%rip), %rsi      # 0x1e524
xorl %eax, %eax
callq 0x6520
movslq %eax, %rdx
movq %rbx, %rdi
movq %r12, %rsi
jmp 0xfeb0
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movb (%rax), %al
movb %al, (%rsp)
movq %rbx, %rdi
movq %rsp, %rsi
pushq $0x1
popq %rdx
jmp 0xfeb0
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movq (%rax), %r12
testq %r12, %r12
leaq 0xf223(%rip), %rax      # 0x1f0be
cmoveq %rax, %r12
movq %r12, %rdi
callq 0x6170
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0xff58
jmp 0xfee4
movq 0x8(%r14), %rcx
leaq 0x8(%rcx), %rdx
movq %rdx, 0x8(%r14)
cvtsi2sdl (%rcx), %xmm0
jmp 0xfed9
movq 0x8(%r14), %rcx
leaq 0x8(%rcx), %rdx
movq %rdx, 0x8(%r14)
movsd (%rcx), %xmm0
movsd %xmm0, (%rax)
movl $0x3, 0x8(%rax)
addq $0x2, %r13
addl $0x2, %ebp
movq %r13, %r12
jmp 0xfd04
cmpq $0x10, %rax
jg 0xff04
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xaef2
movq %r12, %rdi
callq 0x6170
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0xff58
cmpl $0x1, %ebp
je 0xff29
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1763b
movq 0x10(%rbx), %rax
movq -0x10(%rax), %rax
addq $0x18, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movsbl %al, %edx
leaq 0xf177(%rip), %rsi      # 0x1f0c5
movq %rbx, %rdi
xorl %eax, %eax
callq 0xaa89