// File: sbingner[P]kerneldec/lzfse/src/lzfse_encode_tables.h
// Function: d_base_from_value
static inline uint8_t d_base_from_value(int32_t value) {
  static const uint8_t sym[64 * 4] = {
      0,  1,  2,  3,  4,  4,  5,  5,  6,  6,  7,  7,  8,  8,  8,  8,  9,  9,
      9,  9,  10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12,
      13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15,
      15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 18, 19, 20, 20, 21, 21,
      22, 22, 23, 23, 24, 24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 26, 27, 27,
      27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29,
      30, 30, 30, 30, 30, 30, 30, 30, 31, 31, 31, 31, 31, 31, 31, 31, 32, 32,
      32, 32, 32, 33, 34, 35, 36, 36, 37, 37, 38, 38, 39, 39, 40, 40, 40, 40,
      41, 41, 41, 41, 42, 42, 42, 42, 43, 43, 43, 43, 44, 44, 44, 44, 44, 44,
      44, 44, 45, 45, 45, 45, 45, 45, 45, 45, 46, 46, 46, 46, 46, 46, 46, 46,
      47, 47, 47, 47, 47, 47, 47, 47, 48, 48, 48, 48, 48, 49, 50, 51, 52, 52,
      53, 53, 54, 54, 55, 55, 56, 56, 56, 56, 57, 57, 57, 57, 58, 58, 58, 58,
      59, 59, 59, 59, 60, 60, 60, 60, 60, 60, 60, 60, 61, 61, 61, 61, 61, 61,
      61, 61, 62, 62, 62, 62, 62, 62, 62, 62, 63, 63, 63, 63, 63, 63, 63, 63,
      0,  0,  0,  0};
  int index = 0;
  int in_range_k;
  in_range_k = (value >= 0 && value < 60);
  index |= (((value - 0) >> 0) + 0) & -in_range_k;
  in_range_k = (value >= 60 && value < 1020);
  index |= (((value - 60) >> 4) + 64) & -in_range_k;
  in_range_k = (value >= 1020 && value < 16380);
  index |= (((value - 1020) >> 8) + 128) & -in_range_k;
  in_range_k = (value >= 16380 && value < 262140);
  index |= (((value - 16380) >> 12) + 192) & -in_range_k;
  return sym[index & 255];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x4(%rbp)
movb %al, -0xd(%rbp)
jl 0x7223
cmpl $0x3c, -0x4(%rbp)
setl %al
movb %al, -0xd(%rbp)
movb -0xd(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0xc(%rbp)
movl -0x4(%rbp), %eax
subl $0x0, %eax
sarl $0x0, %eax
addl $0x0, %eax
xorl %ecx, %ecx
subl -0xc(%rbp), %ecx
andl %ecx, %eax
orl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
xorl %eax, %eax
cmpl $0x3c, -0x4(%rbp)
movb %al, -0xe(%rbp)
jl 0x725f
cmpl $0x3fc, -0x4(%rbp)      # imm = 0x3FC
setl %al
movb %al, -0xe(%rbp)
movb -0xe(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0xc(%rbp)
movl -0x4(%rbp), %eax
subl $0x3c, %eax
sarl $0x4, %eax
addl $0x40, %eax
xorl %ecx, %ecx
subl -0xc(%rbp), %ecx
andl %ecx, %eax
orl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
xorl %eax, %eax
cmpl $0x3fc, -0x4(%rbp)      # imm = 0x3FC
movb %al, -0xf(%rbp)
jl 0x729e
cmpl $0x3ffc, -0x4(%rbp)     # imm = 0x3FFC
setl %al
movb %al, -0xf(%rbp)
movb -0xf(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0xc(%rbp)
movl -0x4(%rbp), %eax
subl $0x3fc, %eax            # imm = 0x3FC
sarl $0x8, %eax
addl $0x80, %eax
xorl %ecx, %ecx
subl -0xc(%rbp), %ecx
andl %ecx, %eax
orl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
xorl %eax, %eax
cmpl $0x3ffc, -0x4(%rbp)     # imm = 0x3FFC
movb %al, -0x10(%rbp)
jl 0x72e1
cmpl $0x3fffc, -0x4(%rbp)    # imm = 0x3FFFC
setl %al
movb %al, -0x10(%rbp)
movb -0x10(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0xc(%rbp)
movl -0x4(%rbp), %eax
subl $0x3ffc, %eax           # imm = 0x3FFC
sarl $0xc, %eax
addl $0xc0, %eax
xorl %ecx, %ecx
subl -0xc(%rbp), %ecx
andl %ecx, %eax
orl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
andl $0xff, %eax
movslq %eax, %rcx
leaq 0x8ae5(%rip), %rax      # 0xfe00
movb (%rax,%rcx), %al
popq %rbp
retq