// File: /workspace/github_c_makefile_star2_O0/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__parse_huffman_block(stbi__zbuf*)
static int stbi__parse_huffman_block(stbi__zbuf *a)
{
   char *zout = a->zout;
   for(;;) {
      int z = stbi__zhuffman_decode(a, &a->z_length);
      if (z < 256) {
         if (z < 0) return stbi__err("bad huffman code","Corrupt PNG"); // error in huffman codes
         if (zout >= a->zout_end) {
            if (!stbi__zexpand(a, zout, 1)) return 0;
            zout = a->zout;
         }
         *zout++ = (char) z;
      } else {
         stbi_uc *p;
         int len,dist;
         if (z == 256) {
            a->zout = zout;
            return 1;
         }
         z -= 257;
         len = stbi__zlength_base[z];
         if (stbi__zlength_extra[z]) len += stbi__zreceive(a, stbi__zlength_extra[z]);
         z = stbi__zhuffman_decode(a, &a->z_distance);
         if (z < 0) return stbi__err("bad huffman code","Corrupt PNG");
         dist = stbi__zdist_base[z];
         if (stbi__zdist_extra[z]) dist += stbi__zreceive(a, stbi__zdist_extra[z]);
         if (zout - a->zout_start < dist) return stbi__err("bad dist","Corrupt PNG");
         if (zout + len > a->zout_end) {
            if (!stbi__zexpand(a, zout, len)) return 0;
            zout = a->zout;
         }
         p = (stbi_uc *) (zout - dist);
         if (dist == 1) { // run of one byte; common in images.
            stbi_uc v = *p;
            if (len) { do *zout++ = v; while (--len); }
         } else {
            if (len) { do *zout++ = *p++; while (--len); }
         }
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x34, %rsi
callq 0x1e190
movl %eax, -0x1c(%rbp)
cmpl $0x100, -0x1c(%rbp)     # imm = 0x100
jge 0x1dd17
cmpl $0x0, -0x1c(%rbp)
jge 0x1dcbf
leaq 0x2d01(%rip), %rdi      # 0x209b3
callq 0x2680
movl %eax, -0x4(%rbp)
jmp 0x1def4
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x28(%rcx), %rax
jb 0x1dcfc
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x1, %edx
callq 0x1dfd0
cmpl $0x0, %eax
jne 0x1dcf0
movl $0x0, -0x4(%rbp)
jmp 0x1def4
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movl -0x1c(%rbp), %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movb %cl, (%rax)
jmp 0x1deef
cmpl $0x100, -0x1c(%rbp)     # imm = 0x100
jne 0x1dd38
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x1def4
movl -0x1c(%rbp), %eax
subl $0x101, %eax            # imm = 0x101
movl %eax, -0x1c(%rbp)
movslq -0x1c(%rbp), %rcx
leaq 0x2822(%rip), %rax      # 0x20570
movl (%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
movslq -0x1c(%rbp), %rcx
leaq 0x2891(%rip), %rax      # 0x205f0
cmpl $0x0, (%rax,%rcx,4)
je 0x1dd82
movq -0x10(%rbp), %rdi
movslq -0x1c(%rbp), %rcx
leaq 0x287c(%rip), %rax      # 0x205f0
movl (%rax,%rcx,4), %esi
callq 0x1d3d0
addl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x818, %rsi            # imm = 0x818
callq 0x1e190
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x1ddb3
leaq 0x2c0d(%rip), %rdi      # 0x209b3
callq 0x2680
movl %eax, -0x4(%rbp)
jmp 0x1def4
movslq -0x1c(%rbp), %rcx
leaq 0x28b2(%rip), %rax      # 0x20670
movl (%rax,%rcx,4), %eax
movl %eax, -0x30(%rbp)
movslq -0x1c(%rbp), %rcx
leaq 0x2921(%rip), %rax      # 0x206f0
cmpl $0x0, (%rax,%rcx,4)
je 0x1ddf2
movq -0x10(%rbp), %rdi
movslq -0x1c(%rbp), %rcx
leaq 0x290c(%rip), %rax      # 0x206f0
movl (%rax,%rcx,4), %esi
callq 0x1d3d0
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x20(%rcx), %rcx
subq %rcx, %rax
movslq -0x30(%rbp), %rcx
cmpq %rcx, %rax
jge 0x1de1e
leaq 0x34f8(%rip), %rdi      # 0x21309
callq 0x2680
movl %eax, -0x4(%rbp)
jmp 0x1def4
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
cmpq 0x28(%rcx), %rax
jbe 0x1de60
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x2c(%rbp), %edx
callq 0x1dfd0
cmpl $0x0, %eax
jne 0x1de54
movl $0x0, -0x4(%rbp)
jmp 0x1def4
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movslq -0x30(%rbp), %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
cmpl $0x1, -0x30(%rbp)
jne 0x1deb1
movq -0x28(%rbp), %rax
movb (%rax), %al
movb %al, -0x31(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x1deaf
jmp 0x1de8b
movb -0x31(%rbp), %cl
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x1de8b
jmp 0x1deaf
jmp 0x1deed
cmpl $0x0, -0x2c(%rbp)
je 0x1deeb
jmp 0x1deb9
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb (%rax), %cl
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x1deb9
jmp 0x1deeb
jmp 0x1deed
jmp 0x1deef
jmp 0x1dc88
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)