// File: /workspace/github_c_makefile_star2_O3/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
movq %rsi, %rdi
movl $0x25, %esi
callq 0x6190
testq %rax, %rax
je 0x10e4a
movq %rax, %r15
xorl %ebp, %ebp
movq 0x10(%rbx), %r13
movq 0x30(%rbx), %rax
subq %r13, %rax
cmpq $0x20, %rax
jg 0x10bf5
movq %rbx, %rdi
movl $0x2, %esi
callq 0xb58f
movq 0x10(%rbx), %r13
movq %r15, %rdx
subq %r12, %rdx
leaq 0x10(%r13), %rax
movq %rax, 0x10(%rbx)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x14b50
movq %rax, (%r13)
movzbl 0x8(%rax), %eax
orl $0x40, %eax
movl %eax, 0x8(%r13)
movzbl 0x1(%r15), %eax
cmpl $0x65, %eax
jg 0x10c69
cmpl $0x25, %eax
je 0x10cd6
cmpl $0x63, %eax
je 0x10c9f
cmpl $0x64, %eax
jne 0x10ec6
movq 0x10(%rbx), %rax
leaq 0x10(%rax), %rcx
movq %rcx, 0x10(%rbx)
movl (%r14), %edx
cmpq $0x28, %rdx
ja 0x10da5
movq %rdx, %rcx
addq 0x10(%r14), %rcx
addl $0x8, %edx
movl %edx, (%r14)
jmp 0x10db1
cmpl $0x66, %eax
je 0x10cf7
cmpl $0x70, %eax
je 0x10cb7
cmpl $0x73, %eax
jne 0x10ec6
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x10dba
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x10dc6
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x10d27
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x10d33
movl (%r14), %ecx
cmpq $0x28, %rcx
ja 0x10d52
movq %rcx, %rax
addq 0x10(%r14), %rax
addl $0x8, %ecx
movl %ecx, (%r14)
jmp 0x10d5e
movq 0x10(%rbx), %r12
leaq 0x10(%r12), %rax
movq %rax, 0x10(%rbx)
movl $0x1, %edx
movq %rbx, %rdi
leaq 0x105ec(%rip), %rsi     # 0x212de
jmp 0x10d8b
movq 0x10(%rbx), %rax
leaq 0x10(%rax), %rcx
movq %rcx, 0x10(%rbx)
movl 0x4(%r14), %edx
cmpq $0xa0, %rdx
ja 0x10e0a
movq %rdx, %rcx
addq 0x10(%r14), %rcx
addl $0x10, %edx
movl %edx, 0x4(%r14)
jmp 0x10e16
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movb (%rax), %al
movb %al, (%rsp)
movq 0x10(%rbx), %r12
leaq 0x10(%r12), %rax
movq %rax, 0x10(%rbx)
movl $0x1, %edx
movq %rbx, %rdi
movq %rsp, %rsi
jmp 0x10d8b
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movq (%rax), %rdx
movq %rsp, %r13
movq %r13, %rdi
leaq 0xf7e6(%rip), %rsi      # 0x20554
xorl %eax, %eax
callq 0x6530
movslq %eax, %rdx
movq 0x10(%rbx), %r12
leaq 0x10(%r12), %rax
movq %rax, 0x10(%rbx)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x14b50
movq %rax, (%r12)
movzbl 0x8(%rax), %eax
orl $0x40, %eax
movl %eax, 0x8(%r12)
jmp 0x10e25
movq 0x8(%r14), %rcx
leaq 0x8(%rcx), %rdx
movq %rdx, 0x8(%r14)
xorps %xmm0, %xmm0
cvtsi2sdl (%rcx), %xmm0
jmp 0x10e1a
movq 0x8(%r14), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%r14)
movq (%rax), %r12
testq %r12, %r12
leaq 0x1031b(%rip), %rax     # 0x210ee
cmoveq %rax, %r12
movq %r12, %rdi
callq 0x6170
movq 0x10(%rbx), %r13
leaq 0x10(%r13), %rcx
movq %rcx, 0x10(%rbx)
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x14b50
movq %rax, (%r13)
movzbl 0x8(%rax), %eax
orl $0x40, %eax
movl %eax, 0x8(%r13)
jmp 0x10e25
movq 0x8(%r14), %rcx
leaq 0x8(%rcx), %rdx
movq %rdx, 0x8(%r14)
movsd (%rcx), %xmm0
movsd %xmm0, (%rax)
movl $0x3, 0x8(%rax)
addl $0x2, %ebp
movq %r15, %r12
addq $0x2, %r12
movq %r12, %rdi
movl $0x25, %esi
callq 0x6190
movq %rax, %r15
testq %rax, %rax
jne 0x10bd3
jmp 0x10e4c
xorl %ebp, %ebp
movq 0x10(%rbx), %r14
movq 0x30(%rbx), %rax
subq %r14, %rax
cmpq $0x10, %rax
jg 0x10e6e
movq %rbx, %rdi
movl $0x1, %esi
callq 0xb58f
movq 0x10(%rbx), %r14
movq %r12, %rdi
callq 0x6170
leaq 0x10(%r14), %rcx
movq %rcx, 0x10(%rbx)
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x14b50
movq %rax, (%r14)
movzbl 0x8(%rax), %eax
orl $0x40, %eax
movl %eax, 0x8(%r14)
testl %ebp, %ebp
je 0x10eab
orl $0x1, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x191b3
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 0x10225(%rip), %rsi     # 0x210f5
movq %rbx, %rdi
xorl %eax, %eax
callq 0xb027