user: Translate the below assembly code into C programming language:

```asm
<GetBitRangeFromByte>:
  endbr64
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  movslq %edx,%rbp
  push   %rbx
  mov    %edi,%ebx
  xor    %edi,%edi
  cmp    %ebp,%esi
  setle  %dil
  call   <assert@plt>
  xor    %edi,%edi
  cmp    $0x7,%r12d
  setbe  %dil
  call   <assert@plt>
  xor    %edi,%edi
  cmp    $0x7,%ebp
  setbe  %dil
  call   <assert@plt>
  movslq %r12d,%rdx
  lea    D8(%rip),%rax
  mov    %r12d,%ecx
  lea    (%rax,%rdx,8),%rax
  and    (%rax,%rbp,1),%bl
  movzbl %bl,%eax
  pop    %rbx
  pop    %rbp
  sar    %cl,%eax
  pop    %r12
  ret
```

assistant: ```c
unsigned char GetBitRangeFromByte(unsigned char theByte, int start, int end) {
  static unsigned char bitmask[8][8] = {{
                                            1,
                                            3,
                                            7,
                                            15,
                                            31,
                                            63,
                                            127,
                                            255,
                                        },
                                        {
                                            3,
                                            2,
                                            6,
                                            14,
                                            30,
                                            62,
                                            126,
                                            254,
                                        },
                                        {
                                            7,
                                            6,
                                            4,
                                            12,
                                            28,
                                            60,
                                            124,
                                            252,
                                        },
                                        {
                                            15,
                                            14,
                                            12,
                                            8,
                                            24,
                                            56,
                                            120,
                                            248,
                                        },
                                        {
                                            31,
                                            30,
                                            28,
                                            24,
                                            16,
                                            48,
                                            112,
                                            240,
                                        },
                                        {
                                            63,
                                            62,
                                            60,
                                            56,
                                            48,
                                            32,
                                            96,
                                            224,
                                        },
                                        {
                                            127,
                                            126,
                                            124,
                                            120,
                                            112,
                                            96,
                                            64,
                                            192,
                                        },
                                        {
                                            255,
                                            254,
                                            252,
                                            248,
                                            240,
                                            224,
                                            192,
                                            128,
                                        }};
  assert(start <= end);
  assert(start >= 0 && start <= 7);
  assert(end >= 0 && end <= 7);
  return (theByte & bitmask[start][end]) >> (start);
}
```