// File: /workspace/github_c_makefile_star2_O0/dwbuiten[P]obuparse/obuparse.c
// Function: obp_decode_subexp
static inline int _obp_decode_subexp(_OBPBitReader *br, int32_t numSyms, uint32_t *out, OBPError *err)
{
    int32_t i  = 0;
    int32_t mk = 0;
    int32_t k  = 3;
    while (1) {
        int32_t b2 = i ? k + i - 1 : k;
        int32_t a  = 1 << b2;
        if (numSyms <= mk + 3 * a) {
            uint32_t val;
            int ret = _obp_ns(br, numSyms - mk, &val, err);
            if (ret < 0) {
                return -1;
            }
            *out = val;
            return 0;
        } else {
            int subexp_more_bits;
            _obp_br(subexp_more_bits, br, 1);
            if (subexp_more_bits) {
                i++;
                mk += a;
            } else {
                uint32_t subexp_bits;
                assert(b2 <= 255);
                _obp_br(subexp_bits, br, ((uint8_t)b2));
                *out = subexp_bits + mk;
                return 0;
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x3, -0x34(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0xeda0
movl -0x34(%rbp), %eax
addl -0x2c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0xeda6
movl -0x34(%rbp), %eax
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x3c(%rbp)
movl -0x14(%rbp), %eax
movl -0x30(%rbp), %ecx
imull $0x3, -0x3c(%rbp), %edx
addl %edx, %ecx
cmpl %ecx, %eax
jg 0xee0a
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
subl -0x30(%rbp), %esi
movq -0x28(%rbp), %rcx
leaq -0x40(%rbp), %rdx
callq 0xe5b0
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
jge 0xedf5
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xef52
movl -0x40(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0xef52
jmp 0xee0c
movq -0x10(%rbp), %rax
movzbl 0x20(%rax), %ecx
movl $0x1, %eax
subl %ecx, %eax
addl $0x8, %eax
subl $0x1, %eax
sarl $0x3, %eax
cltq
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x10(%rbp), %rdx
subq 0x10(%rdx), %rcx
cmpq %rcx, %rax
jbe 0xee6c
movq -0x28(%rbp), %rax
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x300(%rip), %rdx       # 0xf159
movb $0x0, %al
callq 0x1030
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xef52
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x3c20
movl %eax, -0x48(%rbp)
cmpl $0x0, -0x48(%rbp)
je 0xee9a
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movl -0x3c(%rbp), %eax
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0xef4b
cmpl $0xff, -0x38(%rbp)
jg 0xeea5
jmp 0xeec4
leaq 0x6ad(%rip), %rdi       # 0xf559
leaq 0x204(%rip), %rsi       # 0xf0b7
movl $0xf3, %edx
leaq 0x6a4(%rip), %rcx       # 0xf563
callq 0x1040
jmp 0xeec6
movl -0x38(%rbp), %eax
movzbl %al, %eax
movq -0x10(%rbp), %rcx
movzbl 0x20(%rcx), %ecx
subl %ecx, %eax
addl $0x8, %eax
subl $0x1, %eax
sarl $0x3, %eax
cltq
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x10(%rbp), %rdx
subq 0x10(%rdx), %rcx
cmpq %rcx, %rax
jbe 0xef24
movq -0x28(%rbp), %rax
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x245(%rip), %rdx       # 0xf159
movb $0x0, %al
callq 0x1030
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xef52
movq -0x10(%rbp), %rdi
movl -0x38(%rbp), %eax
movzbl %al, %esi
callq 0x3c20
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %ecx
addl -0x30(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0xef52
jmp 0xef4d
jmp 0xed8c
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)