user: What would the C source look like for the assembly code provided here:

```asm
<unicode_to_cp866>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,%eax
  mov    %ax,-0x4(%rbp)
  movzwl -0x4(%rbp),%eax
  shr    $0x8,%ax
  movzwl %ax,%eax
  cmp    $0x25,%eax
  ja     L960
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D30(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D30(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  movzwl -0x4(%rbp),%eax
  cltq
  lea    D10(%rip),%rdx
  movzbl (%rax,%rdx,1),%eax
  jmp    L173
  movzwl -0x4(%rbp),%eax
  movzbl %al,%eax
  cmp    $0x5e,%eax
  ja     L1491
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D12(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D12(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    $0xfffffff0,%eax
  jmp    L173
  mov    $0xfffffff2,%eax
  jmp    L173
  mov    $0xfffffff4,%eax
  jmp    L173
  mov    $0xfffffff6,%eax
  jmp    L173
  mov    $0xffffff80,%eax
  jmp    L173
  mov    $0xffffff81,%eax
  jmp    L173
  mov    $0xffffff82,%eax
  jmp    L173
  mov    $0xffffff83,%eax
  jmp    L173
  mov    $0xffffff84,%eax
  jmp    L173
  mov    $0xffffff85,%eax
  jmp    L173
  mov    $0xffffff86,%eax
  jmp    L173
  mov    $0xffffff87,%eax
  jmp    L173
  mov    $0xffffff88,%eax
  jmp    L173
  mov    $0xffffff89,%eax
  jmp    L173
  mov    $0xffffff8a,%eax
  jmp    L173
  mov    $0xffffff8b,%eax
  jmp    L173
  mov    $0xffffff8c,%eax
  jmp    L173
  mov    $0xffffff8d,%eax
  jmp    L173
  mov    $0xffffff8e,%eax
  jmp    L173
  mov    $0xffffff8f,%eax
  jmp    L173
  mov    $0xffffff90,%eax
  jmp    L173
  mov    $0xffffff91,%eax
  jmp    L173
  mov    $0xffffff92,%eax
  jmp    L173
  mov    $0xffffff93,%eax
  jmp    L173
  mov    $0xffffff94,%eax
  jmp    L173
  mov    $0xffffff95,%eax
  jmp    L173
  mov    $0xffffff96,%eax
  jmp    L173
  mov    $0xffffff97,%eax
  jmp    L173
  mov    $0xffffff98,%eax
  jmp    L173
  mov    $0xffffff99,%eax
  jmp    L173
  mov    $0xffffff9a,%eax
  jmp    L173
  mov    $0xffffff9b,%eax
  jmp    L173
  mov    $0xffffff9c,%eax
  jmp    L173
  mov    $0xffffff9d,%eax
  jmp    L173
  mov    $0xffffff9e,%eax
  jmp    L173
  mov    $0xffffff9f,%eax
  jmp    L173
  mov    $0xffffffa0,%eax
  jmp    L173
  mov    $0xffffffa1,%eax
  jmp    L173
  mov    $0xffffffa2,%eax
  jmp    L173
  mov    $0xffffffa3,%eax
  jmp    L173
  mov    $0xffffffa4,%eax
  jmp    L173
  mov    $0xffffffa5,%eax
  jmp    L173
  mov    $0xffffffa6,%eax
  jmp    L173
  mov    $0xffffffa7,%eax
  jmp    L173
  mov    $0xffffffa8,%eax
  jmp    L173
  mov    $0xffffffa9,%eax
  jmp    L173
  mov    $0xffffffaa,%eax
  jmp    L173
  mov    $0xffffffab,%eax
  jmp    L173
  mov    $0xffffffac,%eax
  jmp    L173
  mov    $0xffffffad,%eax
  jmp    L173
  mov    $0xffffffae,%eax
  jmp    L173
  mov    $0xffffffaf,%eax
  jmp    L173
  mov    $0xffffffe0,%eax
  jmp    L173
  mov    $0xffffffe1,%eax
  jmp    L173
  mov    $0xffffffe2,%eax
  jmp    L173
  mov    $0xffffffe3,%eax
  jmp    L173
  mov    $0xffffffe4,%eax
  jmp    L173
  mov    $0xffffffe5,%eax
  jmp    L173
  mov    $0xffffffe6,%eax
  jmp    L173
  mov    $0xffffffe7,%eax
  jmp    L173
  mov    $0xffffffe8,%eax
  jmp    L173
  mov    $0xffffffe9,%eax
  jmp    L173
  mov    $0xffffffea,%eax
  jmp    L173
  mov    $0xffffffeb,%eax
  jmp    L173
  mov    $0xffffffec,%eax
  jmp    L173
  mov    $0xffffffed,%eax
  jmp    L173
  mov    $0xffffffee,%eax
  jmp    L173
  mov    $0xffffffef,%eax
  jmp    L173
  mov    $0xfffffff1,%eax
  jmp    L173
  mov    $0xfffffff3,%eax
  jmp    L173
  mov    $0xfffffff5,%eax
  jmp    L173
  mov    $0xfffffff7,%eax
  jmp    L173
  movzwl -0x4(%rbp),%eax
  movzbl %al,%eax
  sub    $0x15,%eax
  cmp    $0x1d,%eax
  ja     L1284
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D69(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D69(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    $0x2d,%eax
  jmp    L173
  mov    $0x60,%eax
  jmp    L173
  mov    $0x27,%eax
  jmp    L173
  mov    $0xa,%eax
  jmp    L173
  mov    $0x27,%eax
  jmp    L173
  movzwl -0x4(%rbp),%eax
  movzbl %al,%eax
  cmp    $0x91,%eax
  je     L669
  cmp    $0x91,%eax
  jg     L1051
  cmp    $0x16,%eax
  je     L801
  cmp    $0x2f,%eax
  je     L1018
  jmp    L1051
L801:
  mov    $0xfffffffc,%eax
  jmp    L173
L1018:
  mov    $0x65,%eax
  jmp    L173
L669:
  mov    $0x40,%eax
  jmp    L173
  movzwl -0x4(%rbp),%eax
  movzbl %al,%eax
  cmp    $0x60,%eax
  je     L1233
  cmp    $0x60,%eax
  jg     L1300
  cmp    $0x28,%eax
  je     L434
  cmp    $0x28,%eax
  jg     L1300
  cmp    $0x27,%eax
  je     L1574
  cmp    $0x27,%eax
  jg     L1300
  cmp    $0x19,%eax
  je     L1400
  cmp    $0x1a,%eax
  je     L1229
  jmp    L1300
L1400:
  mov    $0xfffffff9,%eax
  jmp    L173
L1229:
  mov    $0xfffffffb,%eax
  jmp    L173
L1574:
  mov    $0x5e,%eax
  jmp    L173
L434:
  mov    $0x76,%eax
  jmp    L173
L1233:
  mov    $0x23,%eax
  jmp    L173
  movzwl -0x4(%rbp),%eax
  movzbl %al,%eax
  cmp    $0xca,%eax
  ja     L1102
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D89(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D89(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    $0xffffffc4,%eax
  jmp    L173
  mov    $0xffffffb3,%eax
  jmp    L173
  mov    $0xffffffda,%eax
  jmp    L173
  mov    $0xffffffbf,%eax
  jmp    L173
  mov    $0xffffffc0,%eax
  jmp    L173
  mov    $0xffffffd9,%eax
  jmp    L173
  mov    $0xffffffc3,%eax
  jmp    L173
  mov    $0xffffffb4,%eax
  jmp    L173
  mov    $0xffffffc2,%eax
  jmp    L173
  mov    $0xffffffc1,%eax
  jmp    L173
  mov    $0xffffffc5,%eax
  jmp    L173
  mov    $0xffffffcd,%eax
  jmp    L173
  mov    $0xffffffba,%eax
  jmp    L173
  mov    $0xffffffd5,%eax
  jmp    L173
  mov    $0xffffffd6,%eax
  jmp    L173
  mov    $0xffffffc9,%eax
  jmp    L173
  mov    $0xffffffb8,%eax
  jmp    L173
  mov    $0xffffffb7,%eax
  jmp    L173
  mov    $0xffffffbb,%eax
  jmp    L173
  mov    $0xffffffd4,%eax
  jmp    L173
  mov    $0xffffffd3,%eax
  jmp    L173
  mov    $0xffffffc8,%eax
  jmp    L173
  mov    $0xffffffbe,%eax
  jmp    L173
  mov    $0xffffffbd,%eax
  jmp    L173
  mov    $0xffffffbc,%eax
  jmp    L173
  mov    $0xffffffc6,%eax
  jmp    L173
  mov    $0xffffffc7,%eax
  jmp    L173
  mov    $0xffffffcc,%eax
  jmp    L173
  mov    $0xffffffb5,%eax
  jmp    L173
  mov    $0xffffffb6,%eax
  jmp    L173
  mov    $0xffffffb9,%eax
  jmp    L173
  mov    $0xffffffd1,%eax
  jmp    L173
  mov    $0xffffffd2,%eax
  jmp    L173
  mov    $0xffffffcb,%eax
  jmp    L173
  mov    $0xffffffcf,%eax
  jmp    L173
  mov    $0xffffffd0,%eax
  jmp    L173
  mov    $0xffffffca,%eax
  jmp    L173
  mov    $0xffffffd8,%eax
  jmp    L173
  mov    $0xffffffd7,%eax
  jmp    L173
  mov    $0xffffffce,%eax
  jmp    L173
  mov    $0xffffffdf,%eax
  jmp    L173
  mov    $0xffffffdc,%eax
  jmp    L173
  mov    $0xffffffdb,%eax
  jmp    L173
  mov    $0xffffffdd,%eax
  jmp    L173
  mov    $0xffffffde,%eax
  jmp    L173
  mov    $0xffffffb0,%eax
  jmp    L173
  mov    $0xffffffb1,%eax
  jmp    L173
  mov    $0xffffffb2,%eax
  jmp    L173
  mov    $0xfffffffe,%eax
  jmp    L173
  mov    $0x24,%eax
  jmp    L173
L1491:
  nop
  jmp    L960
L1284:
  nop
  jmp    L960
L1051:
  nop
  jmp    L960
L1300:
  nop
  jmp    L960
L1102:
  nop
L960:
  mov    $0x0,%eax
L173:
  pop    %rbp
  ret
```

assistant: ```c
unsigned char unicode_to_cp866(unsigned short val) {
  static char tab0[256] = {
      0, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0xfd, 0, 0, 0, 0, 0, 0, 0, '^', 0, 0, 0, 0xf8, 0, 0, 0, 0, 0, 0, 0xfa, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'x', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  };
  switch (val >> 8) {
  case 0x00:
    return tab0[val];
  case 0x04:
    switch ((unsigned char)val) {
    case 0x01:
      return 0xf0;
    case 0x04:
      return 0xf2;
    case 0x07:
      return 0xf4;
    case 0x0e:
      return 0xf6;
    case 0x10:
      return 0x80;
    case 0x11:
      return 0x81;
    case 0x12:
      return 0x82;
    case 0x13:
      return 0x83;
    case 0x14:
      return 0x84;
    case 0x15:
      return 0x85;
    case 0x16:
      return 0x86;
    case 0x17:
      return 0x87;
    case 0x18:
      return 0x88;
    case 0x19:
      return 0x89;
    case 0x1a:
      return 0x8a;
    case 0x1b:
      return 0x8b;
    case 0x1c:
      return 0x8c;
    case 0x1d:
      return 0x8d;
    case 0x1e:
      return 0x8e;
    case 0x1f:
      return 0x8f;
    case 0x20:
      return 0x90;
    case 0x21:
      return 0x91;
    case 0x22:
      return 0x92;
    case 0x23:
      return 0x93;
    case 0x24:
      return 0x94;
    case 0x25:
      return 0x95;
    case 0x26:
      return 0x96;
    case 0x27:
      return 0x97;
    case 0x28:
      return 0x98;
    case 0x29:
      return 0x99;
    case 0x2a:
      return 0x9a;
    case 0x2b:
      return 0x9b;
    case 0x2c:
      return 0x9c;
    case 0x2d:
      return 0x9d;
    case 0x2e:
      return 0x9e;
    case 0x2f:
      return 0x9f;
    case 0x30:
      return 0xa0;
    case 0x31:
      return 0xa1;
    case 0x32:
      return 0xa2;
    case 0x33:
      return 0xa3;
    case 0x34:
      return 0xa4;
    case 0x35:
      return 0xa5;
    case 0x36:
      return 0xa6;
    case 0x37:
      return 0xa7;
    case 0x38:
      return 0xa8;
    case 0x39:
      return 0xa9;
    case 0x3a:
      return 0xaa;
    case 0x3b:
      return 0xab;
    case 0x3c:
      return 0xac;
    case 0x3d:
      return 0xad;
    case 0x3e:
      return 0xae;
    case 0x3f:
      return 0xaf;
    case 0x40:
      return 0xe0;
    case 0x41:
      return 0xe1;
    case 0x42:
      return 0xe2;
    case 0x43:
      return 0xe3;
    case 0x44:
      return 0xe4;
    case 0x45:
      return 0xe5;
    case 0x46:
      return 0xe6;
    case 0x47:
      return 0xe7;
    case 0x48:
      return 0xe8;
    case 0x49:
      return 0xe9;
    case 0x4a:
      return 0xea;
    case 0x4b:
      return 0xeb;
    case 0x4c:
      return 0xec;
    case 0x4d:
      return 0xed;
    case 0x4e:
      return 0xee;
    case 0x4f:
      return 0xef;
    case 0x51:
      return 0xf1;
    case 0x54:
      return 0xf3;
    case 0x57:
      return 0xf5;
    case 0x5e:
      return 0xf7;
    }
    break;
  case 0x20:
    switch ((unsigned char)val) {
    case 0x15:
      return '-';
    case 0x18:
      return '`';
    case 0x19:
      return '\'';
    case 0x28:
      return 0x0a;
    case 0x32:
      return '\'';
    }
    break;
  case 0x21:
    switch ((unsigned char)val) {
    case 0x16:
      return 0xfc;
    case 0x2f:
      return 'e';
    case 0x91:
      return '@';
    }
    break;
  case 0x22:
    switch ((unsigned char)val) {
    case 0x19:
      return 0xf9;
    case 0x1a:
      return 0xfb;
    case 0x27:
      return '^';
    case 0x28:
      return 'v';
    case 0x60:
      return '#';
    }
    break;
  case 0x25:
    switch ((unsigned char)val) {
    case 0x00:
      return 0xc4;
    case 0x02:
      return 0xb3;
    case 0x0c:
      return 0xda;
    case 0x10:
      return 0xbf;
    case 0x14:
      return 0xc0;
    case 0x18:
      return 0xd9;
    case 0x1c:
      return 0xc3;
    case 0x24:
      return 0xb4;
    case 0x2c:
      return 0xc2;
    case 0x34:
      return 0xc1;
    case 0x3c:
      return 0xc5;
    case 0x50:
      return 0xcd;
    case 0x51:
      return 0xba;
    case 0x52:
      return 0xd5;
    case 0x53:
      return 0xd6;
    case 0x54:
      return 0xc9;
    case 0x55:
      return 0xb8;
    case 0x56:
      return 0xb7;
    case 0x57:
      return 0xbb;
    case 0x58:
      return 0xd4;
    case 0x59:
      return 0xd3;
    case 0x5a:
      return 0xc8;
    case 0x5b:
      return 0xbe;
    case 0x5c:
      return 0xbd;
    case 0x5d:
      return 0xbc;
    case 0x5e:
      return 0xc6;
    case 0x5f:
      return 0xc7;
    case 0x60:
      return 0xcc;
    case 0x61:
      return 0xb5;
    case 0x62:
      return 0xb6;
    case 0x63:
      return 0xb9;
    case 0x64:
      return 0xd1;
    case 0x65:
      return 0xd2;
    case 0x66:
      return 0xcb;
    case 0x67:
      return 0xcf;
    case 0x68:
      return 0xd0;
    case 0x69:
      return 0xca;
    case 0x6a:
      return 0xd8;
    case 0x6b:
      return 0xd7;
    case 0x6c:
      return 0xce;
    case 0x80:
      return 0xdf;
    case 0x84:
      return 0xdc;
    case 0x88:
      return 0xdb;
    case 0x8c:
      return 0xdd;
    case 0x90:
      return 0xde;
    case 0x91:
      return 0xb0;
    case 0x92:
      return 0xb1;
    case 0x93:
      return 0xb2;
    case 0xa0:
      return 0xfe;
    case 0xca:
      return '$';
    }
    break;
  }
  return 0;
}
```