// File: attractivechaos[P]udb2/stb/./stb.h
// Function: stb_shorten_path_readable
char * stb_shorten_path_readable(char *path, int len)
{
   static char buffer[1024];
   int n = strlen(path),n1,n2,r1,r2;
   char *s;
   if (n <= len) return path;
   if (len > 1024) return path;
   s = stb_strrchr2(path, '/', '\\');
   if (s) {
      n1 = s - path + 1;
      n2 = n - n1;
      ++s;
   } else {
      n1 = 0;
      n2 = n;
      s = path;
   }
   // now we need to reduce r1 and r2 so that they fit in len
   if (n1 < len>>1) {
      r1 = n1;
      r2 = len - r1;
   } else if (n2 < len >> 1) {
      r2 = n2;
      r1 = len - r2;
   } else {
      r1 = n1 * len / n;
      r2 = n2 * len / n;
      if (r1 < len>>2) r1 = len>>2, r2 = len-r1;
      if (r2 < len>>2) r2 = len>>2, r1 = len-r2;
   }
   assert(r1 <= n1 && r2 <= n2);
   if (n1)
      stb__add_section(buffer, path, n1, r1);
   stb__add_section(buffer+r1, s, n2, r2);
   buffer[len] = 0;
   return buffer;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq 0x28(%rsp), %rdi
callq 0x2100
movl %eax, 0x20(%rsp)
movl 0x20(%rsp), %eax
cmpl 0x24(%rsp), %eax
jg 0x6844
movq 0x28(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x6a1a
cmpl $0x400, 0x24(%rsp)      # imm = 0x400
jle 0x685d
movq 0x28(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x6a1a
movq 0x28(%rsp), %rdi
movl $0x2f, %esi
movl $0x5c, %edx
callq 0x5490
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x68af
movq 0x8(%rsp), %rax
movq 0x28(%rsp), %rcx
subq %rcx, %rax
addq $0x1, %rax
movl %eax, 0x1c(%rsp)
movl 0x20(%rsp), %eax
subl 0x1c(%rsp), %eax
movl %eax, 0x18(%rsp)
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x68c9
movl $0x0, 0x1c(%rsp)
movl 0x20(%rsp), %eax
movl %eax, 0x18(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x1c(%rsp), %eax
movl 0x24(%rsp), %ecx
sarl %ecx
cmpl %ecx, %eax
jge 0x68f0
movl 0x1c(%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0x24(%rsp), %eax
subl 0x14(%rsp), %eax
movl %eax, 0x10(%rsp)
jmp 0x6988
movl 0x18(%rsp), %eax
movl 0x24(%rsp), %ecx
sarl %ecx
cmpl %ecx, %eax
jge 0x6914
movl 0x18(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0x24(%rsp), %eax
subl 0x10(%rsp), %eax
movl %eax, 0x14(%rsp)
jmp 0x6986
movl 0x1c(%rsp), %eax
imull 0x24(%rsp), %eax
cltd
idivl 0x20(%rsp)
movl %eax, 0x14(%rsp)
movl 0x18(%rsp), %eax
imull 0x24(%rsp), %eax
cltd
idivl 0x20(%rsp)
movl %eax, 0x10(%rsp)
movl 0x14(%rsp), %eax
movl 0x24(%rsp), %ecx
sarl $0x2, %ecx
cmpl %ecx, %eax
jge 0x695e
movl 0x24(%rsp), %eax
sarl $0x2, %eax
movl %eax, 0x14(%rsp)
movl 0x24(%rsp), %eax
subl 0x14(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
movl 0x24(%rsp), %ecx
sarl $0x2, %ecx
cmpl %ecx, %eax
jge 0x6984
movl 0x24(%rsp), %eax
sarl $0x2, %eax
movl %eax, 0x10(%rsp)
movl 0x24(%rsp), %eax
subl 0x10(%rsp), %eax
movl %eax, 0x14(%rsp)
jmp 0x6986
jmp 0x6988
movl 0x14(%rsp), %eax
cmpl 0x1c(%rsp), %eax
jg 0x699e
movl 0x10(%rsp), %eax
cmpl 0x18(%rsp), %eax
jg 0x699e
jmp 0x69bd
leaq 0x18afb(%rip), %rdi     # 0x1f4a0
leaq 0x189dd(%rip), %rsi     # 0x1f389
movl $0x900, %edx            # imm = 0x900
leaq 0x18afd(%rip), %rcx     # 0x1f4b5
callq 0x2140
cmpl $0x0, 0x1c(%rsp)
je 0x69dd
movq 0x28(%rsp), %rsi
movl 0x1c(%rsp), %edx
movl 0x14(%rsp), %ecx
leaq 0x232a8(%rip), %rdi     # 0x29c80
callq 0x6730
movslq 0x14(%rsp), %rax
leaq 0x23297(%rip), %rdi     # 0x29c80
addq %rax, %rdi
movq 0x8(%rsp), %rsi
movl 0x18(%rsp), %edx
movl 0x10(%rsp), %ecx
callq 0x6730
movslq 0x24(%rsp), %rcx
leaq 0x23276(%rip), %rax     # 0x29c80
movb $0x0, (%rax,%rcx)
leaq 0x2326b(%rip), %rax     # 0x29c80
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)