// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: ensureBits32
static LODEPNG_INLINE unsigned ensureBits32(LodePNGBitReader* reader, size_t nbits) {
  size_t start = reader->bp >> 3u;
  size_t size = reader->size;
  if(start + 4u < size) {
    reader->buffer = (unsigned)reader->data[start + 0] | ((unsigned)reader->data[start + 1] << 8u) |
                     ((unsigned)reader->data[start + 2] << 16u) | ((unsigned)reader->data[start + 3] << 24u);
    reader->buffer >>= (reader->bp & 7u);
    reader->buffer |= (((unsigned)reader->data[start + 4] << 24u) << (8u - (reader->bp & 7u)));
    return 1;
  } else {
    reader->buffer = 0;
    if(start + 0u < size) reader->buffer |= reader->data[start + 0];
    if(start + 1u < size) reader->buffer |= ((unsigned)reader->data[start + 1] << 8u);
    if(start + 2u < size) reader->buffer |= ((unsigned)reader->data[start + 2] << 16u);
    if(start + 3u < size) reader->buffer |= ((unsigned)reader->data[start + 3] << 24u);
    reader->buffer >>= (reader->bp & 7u);
    return reader->bp + nbits <= reader->bitsize;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
shrq $0x3, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
addq $0x4, %rax
cmpq -0x28(%rbp), %rax
jae 0x419a
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movzbl (%rax,%rcx), %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rdx
movzbl 0x1(%rax,%rdx), %eax
shll $0x8, %eax
orl %eax, %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rdx
movzbl 0x2(%rax,%rdx), %eax
shll $0x10, %eax
orl %eax, %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rdx
movzbl 0x3(%rax,%rdx), %eax
shll $0x18, %eax
orl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
andq $0x7, %rcx
movq -0x10(%rbp), %rax
movl 0x20(%rax), %edx
shrl %cl, %edx
movl %edx, %ecx
movl %ecx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movzbl 0x4(%rax,%rcx), %eax
shll $0x18, %eax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rdx
andq $0x7, %rdx
movl $0x8, %ecx
subq %rdx, %rcx
shll %cl, %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
orl 0x20(%rax), %ecx
movl %ecx, 0x20(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x4286
movq -0x10(%rbp), %rax
movl $0x0, 0x20(%rax)
movq -0x20(%rbp), %rax
addq $0x0, %rax
cmpq -0x28(%rbp), %rax
jae 0x41cc
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movzbl (%rax,%rcx), %ecx
movq -0x10(%rbp), %rax
orl 0x20(%rax), %ecx
movl %ecx, 0x20(%rax)
movq -0x20(%rbp), %rax
addq $0x1, %rax
cmpq -0x28(%rbp), %rax
jae 0x41f7
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rax,%rcx), %ecx
shll $0x8, %ecx
movq -0x10(%rbp), %rax
orl 0x20(%rax), %ecx
movl %ecx, 0x20(%rax)
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jae 0x4222
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movzbl 0x2(%rax,%rcx), %ecx
shll $0x10, %ecx
movq -0x10(%rbp), %rax
orl 0x20(%rax), %ecx
movl %ecx, 0x20(%rax)
movq -0x20(%rbp), %rax
addq $0x3, %rax
cmpq -0x28(%rbp), %rax
jae 0x424d
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movzbl 0x3(%rax,%rcx), %ecx
shll $0x18, %ecx
movq -0x10(%rbp), %rax
orl 0x20(%rax), %ecx
movl %ecx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
andq $0x7, %rcx
movq -0x10(%rbp), %rax
movl 0x20(%rax), %edx
shrl %cl, %edx
movl %edx, %ecx
movl %ecx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
addq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
setbe %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)