// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: Adam7_getpassvalues
static void Adam7_getpassvalues(unsigned passw[7], unsigned passh[7], size_t filter_passstart[8],
                                size_t padded_passstart[8], size_t passstart[8], unsigned w, unsigned h, unsigned bpp) {
  /*the passstart values have 8 values: the 8th one indicates the byte after the end of the 7th (= last) pass*/
  unsigned i;

  /*calculate width and height in pixels of each pass*/
  for(i = 0; i != 7; ++i) {
    passw[i] = (w + ADAM7_DX[i] - ADAM7_IX[i] - 1) / ADAM7_DX[i];
    passh[i] = (h + ADAM7_DY[i] - ADAM7_IY[i] - 1) / ADAM7_DY[i];
    if(passw[i] == 0) passh[i] = 0;
    if(passh[i] == 0) passw[i] = 0;
  }

  filter_passstart[0] = padded_passstart[0] = passstart[0] = 0;
  for(i = 0; i != 7; ++i) {
    /*if passw[i] is 0, it's 0 bytes, not 1 (no filtertype-byte)*/
    filter_passstart[i + 1] = filter_passstart[i]
                            + ((passw[i] && passh[i]) ? passh[i] * (1u + (passw[i] * bpp + 7u) / 8u) : 0);
    /*bits padded if needed to fill full byte at end of each scanline*/
    padded_passstart[i + 1] = padded_passstart[i] + passh[i] * ((passw[i] * bpp + 7u) / 8u);
    /*only padded at end of reduced image*/
    passstart[i + 1] = passstart[i] + (passh[i] * passw[i] * bpp + 7u) / 8u;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
cmpl $0x7, -0x30(%rbp)
je 0x14c4b
movl -0x2c(%rbp), %eax
movl -0x30(%rbp), %ecx
movl %ecx, %edx
leaq 0x696e(%rip), %rcx      # 0x1b500
addl (%rcx,%rdx,4), %eax
movl -0x30(%rbp), %ecx
movl %ecx, %edx
leaq 0x697f(%rip), %rcx      # 0x1b520
subl (%rcx,%rdx,4), %eax
subl $0x1, %eax
movl -0x30(%rbp), %ecx
movl %ecx, %esi
leaq 0x694d(%rip), %rcx      # 0x1b500
xorl %edx, %edx
divl (%rcx,%rsi,4)
movl %eax, %edx
movq -0x8(%rbp), %rax
movl -0x30(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movl 0x10(%rbp), %eax
movl -0x30(%rbp), %ecx
movl %ecx, %edx
leaq 0x696d(%rip), %rcx      # 0x1b540
addl (%rcx,%rdx,4), %eax
movl -0x30(%rbp), %ecx
movl %ecx, %edx
leaq 0x697e(%rip), %rcx      # 0x1b560
subl (%rcx,%rdx,4), %eax
subl $0x1, %eax
movl -0x30(%rbp), %ecx
movl %ecx, %esi
leaq 0x694c(%rip), %rcx      # 0x1b540
xorl %edx, %edx
divl (%rcx,%rsi,4)
movl %eax, %edx
movq -0x10(%rbp), %rax
movl -0x30(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
movl -0x30(%rbp), %ecx
cmpl $0x0, (%rax,%rcx,4)
jne 0x14c20
movq -0x10(%rbp), %rax
movl -0x30(%rbp), %ecx
movl $0x0, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movl -0x30(%rbp), %ecx
cmpl $0x0, (%rax,%rcx,4)
jne 0x14c3b
movq -0x8(%rbp), %rax
movl -0x30(%rbp), %ecx
movl $0x0, (%rax,%rcx,4)
jmp 0x14c3d
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x14b79
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movl $0x0, -0x30(%rbp)
cmpl $0x7, -0x30(%rbp)
je 0x14d80
movq -0x18(%rbp), %rax
movl -0x30(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movl -0x30(%rbp), %ecx
cmpl $0x0, (%rax,%rcx,4)
je 0x14ccf
movq -0x10(%rbp), %rax
movl -0x30(%rbp), %ecx
cmpl $0x0, (%rax,%rcx,4)
je 0x14ccf
movq -0x10(%rbp), %rax
movl -0x30(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movq -0x8(%rbp), %rcx
movl -0x30(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
imull 0x18(%rbp), %ecx
addl $0x7, %ecx
shrl $0x3, %ecx
addl $0x1, %ecx
imull %ecx, %eax
movl %eax, -0x3c(%rbp)
jmp 0x14cd6
xorl %eax, %eax
movl %eax, -0x3c(%rbp)
jmp 0x14cd6
movq -0x38(%rbp), %rdx
movl -0x3c(%rbp), %eax
movl %eax, %eax
addq %rax, %rdx
movq -0x18(%rbp), %rax
movl -0x30(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movq %rdx, (%rax,%rcx,8)
movq -0x20(%rbp), %rax
movl -0x30(%rbp), %ecx
movq (%rax,%rcx,8), %rdx
movq -0x10(%rbp), %rax
movl -0x30(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movq -0x8(%rbp), %rcx
movl -0x30(%rbp), %esi
movl (%rcx,%rsi,4), %ecx
imull 0x18(%rbp), %ecx
addl $0x7, %ecx
shrl $0x3, %ecx
imull %ecx, %eax
movl %eax, %eax
addq %rax, %rdx
movq -0x20(%rbp), %rax
movl -0x30(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movq %rdx, (%rax,%rcx,8)
movq -0x28(%rbp), %rax
movl -0x30(%rbp), %ecx
movq (%rax,%rcx,8), %rdx
movq -0x10(%rbp), %rax
movl -0x30(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movq -0x8(%rbp), %rcx
movl -0x30(%rbp), %esi
imull (%rcx,%rsi,4), %eax
imull 0x18(%rbp), %eax
addl $0x7, %eax
shrl $0x3, %eax
movl %eax, %eax
addq %rax, %rdx
movq -0x28(%rbp), %rax
movl -0x30(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movq %rdx, (%rax,%rcx,8)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x14c73
popq %rbp
retq
nopw %cs:(%rax,%rax)