// File: attractivechaos[P]udb2/stb/./stb.h
// Function: stb_fput_varlen64
void    stb_fput_varlen64(FILE *f, stb_uint64 v)
{
   stb_uint64 z = stb__varlen_xform(v);
   int first=1;
   if (z >= STB_IMM_UINT64(0x100000000000000)) {
      fputc(0xff,f);
      first=0;
   }
   if (z >= STB_IMM_UINT64(0x02000000000000)) fputc((first ? 0xFE : 0)+(char)(z>>56),f), first=0;
   if (z >= STB_IMM_UINT64(0x00040000000000)) fputc((first ? 0xFC : 0)+(char)(z>>48),f), first=0;
   if (z >= STB_IMM_UINT64(0x00000800000000)) fputc((first ? 0xF8 : 0)+(char)(z>>40),f), first=0;
   if (z >= STB_IMM_UINT64(0x00000010000000)) fputc((first ? 0xF0 : 0)+(char)(z>>32),f), first=0;
   if (z >= STB_IMM_UINT64(0x00000000200000)) fputc((first ? 0xE0 : 0)+(char)(z>>24),f), first=0;
   if (z >= STB_IMM_UINT64(0x00000000004000)) fputc((first ? 0xC0 : 0)+(char)(z>>16),f), first=0;
   if (z >= STB_IMM_UINT64(0x00000000000080)) fputc((first ? 0x80 : 0)+(char)(z>> 8),f), first=0; 
   fputc((char)z,f);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jae 0xea2c
movq 0x18(%rsp), %rax
xorq $-0x1, %rax
shlq %rax
addq $0x1, %rax
movq %rax, (%rsp)
jmp 0xea38
movq 0x18(%rsp), %rax
shlq %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x1, 0xc(%rsp)
movabsq $0x100000000000000, %rax # imm = 0x100000000000000
cmpq %rax, 0x10(%rsp)
jb 0xea71
movq 0x20(%rsp), %rsi
movl $0xff, %edi
callq 0x21b0
movl $0x0, 0xc(%rsp)
movabsq $0x2000000000000, %rax  # imm = 0x2000000000000
cmpq %rax, 0x10(%rsp)
jb 0xeab3
movl 0xc(%rsp), %ecx
xorl %edi, %edi
movl $0xfe, %eax
cmpl $0x0, %ecx
cmovnel %eax, %edi
movq 0x10(%rsp), %rax
shrq $0x38, %rax
movsbl %al, %eax
addl %eax, %edi
movq 0x20(%rsp), %rsi
callq 0x21b0
movl $0x0, 0xc(%rsp)
movabsq $0x40000000000, %rax    # imm = 0x40000000000
cmpq %rax, 0x10(%rsp)
jb 0xeaf5
movl 0xc(%rsp), %ecx
xorl %edi, %edi
movl $0xfc, %eax
cmpl $0x0, %ecx
cmovnel %eax, %edi
movq 0x10(%rsp), %rax
shrq $0x30, %rax
movsbl %al, %eax
addl %eax, %edi
movq 0x20(%rsp), %rsi
callq 0x21b0
movl $0x0, 0xc(%rsp)
movabsq $0x800000000, %rax      # imm = 0x800000000
cmpq %rax, 0x10(%rsp)
jb 0xeb37
movl 0xc(%rsp), %ecx
xorl %edi, %edi
movl $0xf8, %eax
cmpl $0x0, %ecx
cmovnel %eax, %edi
movq 0x10(%rsp), %rax
shrq $0x28, %rax
movsbl %al, %eax
addl %eax, %edi
movq 0x20(%rsp), %rsi
callq 0x21b0
movl $0x0, 0xc(%rsp)
cmpq $0x10000000, 0x10(%rsp) # imm = 0x10000000
jb 0xeb73
movl 0xc(%rsp), %ecx
xorl %edi, %edi
movl $0xf0, %eax
cmpl $0x0, %ecx
cmovnel %eax, %edi
movq 0x10(%rsp), %rax
shrq $0x20, %rax
movsbl %al, %eax
addl %eax, %edi
movq 0x20(%rsp), %rsi
callq 0x21b0
movl $0x0, 0xc(%rsp)
cmpq $0x200000, 0x10(%rsp)   # imm = 0x200000
jb 0xebaf
movl 0xc(%rsp), %ecx
xorl %edi, %edi
movl $0xe0, %eax
cmpl $0x0, %ecx
cmovnel %eax, %edi
movq 0x10(%rsp), %rax
shrq $0x18, %rax
movsbl %al, %eax
addl %eax, %edi
movq 0x20(%rsp), %rsi
callq 0x21b0
movl $0x0, 0xc(%rsp)
cmpq $0x4000, 0x10(%rsp)     # imm = 0x4000
jb 0xebeb
movl 0xc(%rsp), %ecx
xorl %edi, %edi
movl $0xc0, %eax
cmpl $0x0, %ecx
cmovnel %eax, %edi
movq 0x10(%rsp), %rax
shrq $0x10, %rax
movsbl %al, %eax
addl %eax, %edi
movq 0x20(%rsp), %rsi
callq 0x21b0
movl $0x0, 0xc(%rsp)
cmpq $0x80, 0x10(%rsp)
jb 0xec27
movl 0xc(%rsp), %ecx
xorl %edi, %edi
movl $0x80, %eax
cmpl $0x0, %ecx
cmovnel %eax, %edi
movq 0x10(%rsp), %rax
shrq $0x8, %rax
movsbl %al, %eax
addl %eax, %edi
movq 0x20(%rsp), %rsi
callq 0x21b0
movl $0x0, 0xc(%rsp)
movq 0x10(%rsp), %rax
movsbl %al, %edi
movq 0x20(%rsp), %rsi
callq 0x21b0
addq $0x28, %rsp
retq
nop