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

```asm
<comtyp>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rsi,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x1(%rdi),%rbx
  movzbl 0x1(%rdi),%eax
  test   %al,%al
  jne    L416
  mov    $0x3e8,%eax
  jmp    L486
L1168:
  add    $0x1,%rbx
  movzbl (%rbx),%eax
  test   %al,%al
  je     L97
L416:
  cmp    $0x20,%al
  je     L1168
  cmp    $0x9,%al
  je     L1168
  test   %al,%al
  je     L435
  lea    0x1e(%rsp),%r12
  mov    %r12,%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <getwrd@plt>
  movb   $0x0,0x20(%rsp)
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <getmac@plt>
  test   %eax,%eax
  jne    L82
  movzbl (%rbx),%ecx
  movzbl 0x1(%rbx),%edx
  cmp    $0x5c,%cl
  jne    L517
  mov    $0x3e8,%eax
  cmp    $0x22,%dl
  je     L486
L517:
  cmp    $0x61,%cl
  sete   %dil
  cmp    $0x66,%dl
  sete   %sil
  test   %dil,%dil
  je     L299
  mov    $0x30,%eax
  test   %sil,%sil
  jne    L486
L299:
  cmp    $0x64,%dl
  jne    L1291
  mov    $0x31,%eax
  test   %dil,%dil
  jne    L486
L1291:
  cmp    $0x62,%cl
  sete   %r9b
  cmp    $0x6f,%dl
  sete   %dil
  test   %r9b,%r9b
  je     L253
  mov    $0x1a,%eax
  test   %dil,%dil
  jne    L486
L253:
  cmp    $0x70,%dl
  sete   %r8b
  test   %r9b,%r9b
  je     L870
  mov    $0x1,%eax
  test   %r8b,%r8b
  jne    L486
L870:
  cmp    $0x72,%dl
  sete   %r10b
  test   %r9b,%r9b
  je     L497
  mov    $0x2,%eax
  test   %r10b,%r10b
  jne    L486
L497:
  cmp    $0x73,%dl
  sete   %r11b
  test   %r9b,%r9b
  je     L863
  mov    $0x15,%eax
  test   %r11b,%r11b
  jne    L486
L863:
  cmp    $0x63,%cl
  sete   %r9b
  cmp    $0x63,%dl
  sete   %bl
  test   %r9b,%r9b
  je     L441
  mov    $0x18,%eax
  test   %bl,%bl
  jne    L486
L441:
  cmp    $0x65,%dl
  sete   %bpl
  test   %r9b,%r9b
  je     L728
  mov    $0x3,%eax
  test   %bpl,%bpl
  jne    L486
L728:
  cmp    $0x75,%dl
  sete   %r12b
  test   %r9b,%r9b
  je     L868
  mov    $0x20,%eax
  test   %r12b,%r12b
  jne    L486
L868:
  cmp    $0x64,%cl
  sete   %r13b
  test   %bpl,%bpl
  je     L1237
  mov    $0x21,%eax
  test   %r13b,%r13b
  jne    L486
L1237:
  test   %r11b,%r11b
  je     L1383
  mov    $0x33,%eax
  test   %r13b,%r13b
  jne    L486
L1383:
  cmp    $0x65,%cl
  sete   %r13b
  test   %sil,%sil
  je     L713
  mov    $0x1d,%eax
  test   %r13b,%r13b
  jne    L486
L713:
  test   %bl,%bl
  je     L658
  mov    $0x24,%eax
  test   %r13b,%r13b
  jne    L486
L658:
  cmp    $0x68,%dl
  sete   0xd(%rsp)
  movzbl 0xd(%rsp),%r15d
  test   %r13b,%r13b
  je     L86
  mov    $0x1b,%eax
  test   %r15b,%r15b
  jne    L486
L86:
  cmp    $0x6e,%dl
  sete   %r15b
  test   %r15b,%r13b
  jne    L175
  cmp    $0x2e,%cl
  je     L175
  test   %dil,%dil
  je     L570
  mov    $0x26,%eax
  test   %r13b,%r13b
  jne    L486
L570:
  cmp    $0x66,%cl
  sete   %r13b
  cmp    $0x69,%dl
  sete   0xe(%rsp)
  movzbl 0xe(%rsp),%r14d
  test   %r13b,%r13b
  je     L1247
  mov    $0x4,%eax
  test   %r14b,%r14b
  jne    L486
L1247:
  cmp    $0x6c,%dl
  sete   %r14b
  test   %r13b,%r13b
  je     L298
  mov    $0x28,%eax
  test   %r14b,%r14b
  jne    L486
L298:
  test   %dil,%dil
  je     L771
  mov    $0x5,%eax
  test   %r13b,%r13b
  jne    L486
L771:
  cmp    $0x74,%dl
  sete   0xf(%rsp)
  test   %r13b,%r13b
  je     L1083
  mov    $0x25,%eax
  cmpb   $0x0,0xf(%rsp)
  jne    L486
L1083:
  cmp    $0x68,%cl
  jne    L181
  mov    $0x6,%eax
  test   %bpl,%bpl
  jne    L486
L181:
  cmp    $0x69,%cl
  jne    L695
  mov    $0x7,%eax
  test   %r15b,%r15b
  jne    L486
L695:
  cmp    $0x6a,%cl
  jne    L1295
  test   %r12b,%r12b
  jne    L518
L1295:
  cmp    $0x6c,%cl
  sete   %al
  test   %r14b,%r14b
  je     L1343
  test   %al,%al
  jne    L1186
L1343:
  test   %r11b,%r11b
  je     L351
  test   %al,%al
  jne    L1154
L351:
  cmp    $0x6d,%cl
  sete   %r11b
  cmp    $0x31,%dl
  jne    L331
  test   %r11b,%r11b
  jne    L375
L331:
  cmp    $0x32,%dl
  sete   %r12b
  test   %r11b,%r11b
  je     L810
  test   %r12b,%r12b
  jne    L1407
L810:
  cmp    $0x33,%dl
  jne    L1284
  test   %r11b,%r11b
  jne    L857
L1284:
  cmp    $0x34,%dl
  jne    L974
  test   %r11b,%r11b
  jne    L384
L974:
  cmp    $0x6e,%cl
  sete   %r11b
  cmp    $0x61,%dl
  jne    L1045
  test   %r11b,%r11b
  jne    L815
L1045:
  test   %bpl,%bpl
  je     L448
  test   %r11b,%r11b
  jne    L210
L448:
  test   %sil,%sil
  je     L702
  test   %r11b,%r11b
  jne    L413
L702:
  cmp    $0x6a,%dl
  jne    L933
  test   %r11b,%r11b
  jne    L1264
L933:
  test   %r10b,%r10b
  je     L659
  test   %r11b,%r11b
  jne    L1013
L659:
  cmp    $0x6f,%cl
  sete   %r11b
  test   %sil,%sil
  je     L499
  test   %r11b,%r11b
  jne    L478
L499:
  cmpb   $0x0,0xd(%rsp)
  je     L1429
  test   %r11b,%r11b
  jne    L1375
L1429:
  cmp    $0x70,%cl
  sete   %sil
  test   %bl,%bl
  je     L608
  test   %sil,%sil
  jne    L755
L608:
  test   %r14b,%r14b
  je     L1417
  test   %sil,%sil
  jne    L1294
L1417:
  cmp    $0x6d,%dl
  sete   %r11b
  test   %sil,%sil
  je     L1076
  test   %r11b,%r11b
  jne    L1376
L1076:
  test   %dil,%dil
  je     L149
  test   %sil,%sil
  jne    L922
L149:
  cmp    $0x72,%cl
  sete   %dl
  test   %r11b,%r11b
  je     L185
  test   %dl,%dl
  jne    L120
L185:
  test   %r10b,%r10b
  je     L1218
  test   %dl,%dl
  jne    L999
L1218:
  cmp    $0x73,%cl
  sete   %dl
  test   %dil,%dil
  je     L1000
  test   %dl,%dl
  jne    L323
L1000:
  test   %r8b,%r8b
  je     L645
  test   %dl,%dl
  jne    L1260
L645:
  cmp    $0x74,%cl
  sete   %dl
  cmpb   $0x0,0xe(%rsp)
  je     L302
  test   %dl,%dl
  jne    L42
L302:
  test   %r14b,%r14b
  je     L407
  test   %dl,%dl
  jne    L408
L407:
  cmp    $0x75,%cl
  jne    L664
  test   %r14b,%r14b
  jne    L1101
L664:
  test   %r15b,%r15b
  je     L777
  test   %sil,%sil
  jne    L550
L777:
  test   %r9b,%r9b
  je     L212
  test   %r12b,%r12b
  jne    L1393
L212:
  test   %r10b,%r10b
  je     L170
  test   %dl,%dl
  jne    L1167
L170:
  cmpb   $0x0,0xf(%rsp)
  je     L468
  test   %al,%al
  jne    L973
L468:
  test   %bl,%bl
  je     L155
  test   %r13b,%r13b
  je     L155
  mov    $0x2e,%eax
  jmp    L486
L82:
  movslq %eax,%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  mov    $0x0,%eax
  jmp    L486
L97:
  mov    $0x3e8,%eax
L486:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L1142
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L435:
  mov    $0x3e8,%eax
  jmp    L486
L175:
  mov    $0x22,%eax
  jmp    L486
L518:
  mov    $0xf,%eax
  jmp    L486
L1186:
  mov    $0x27,%eax
  jmp    L486
L1154:
  mov    $0x8,%eax
  jmp    L486
L375:
  mov    $0x11,%eax
  jmp    L486
L1407:
  mov    $0x12,%eax
  jmp    L486
L857:
  mov    $0x13,%eax
  jmp    L486
L384:
  mov    $0x14,%eax
  jmp    L486
L815:
  mov    $0x32,%eax
  jmp    L486
L210:
  mov    $0x16,%eax
  jmp    L486
L413:
  mov    $0x9,%eax
  jmp    L486
L1264:
  mov    $0x10,%eax
  jmp    L486
L1013:
  mov    $0x23,%eax
  jmp    L486
L478:
  mov    $0x1e,%eax
  jmp    L486
L1375:
  mov    $0x1c,%eax
  jmp    L486
L755:
  mov    $0x17,%eax
  jmp    L486
L1294:
  mov    $0xa,%eax
  jmp    L486
L1376:
  mov    $0x34,%eax
  jmp    L486
L922:
  mov    $0x19,%eax
  jmp    L486
L120:
  mov    $0xb,%eax
  jmp    L486
L999:
  mov    $0x2a,%eax
  jmp    L486
L323:
  mov    $0x1f,%eax
  jmp    L486
L1260:
  mov    $0xc,%eax
  jmp    L486
L42:
  mov    $0xd,%eax
  jmp    L486
L408:
  mov    $0x2f,%eax
  jmp    L486
L1101:
  mov    $0xe,%eax
  jmp    L486
L550:
  mov    $0x29,%eax
  jmp    L486
L1393:
  mov    $0x2b,%eax
  jmp    L486
L1167:
  mov    $0x2c,%eax
  jmp    L486
L973:
  mov    $0x2d,%eax
  jmp    L486
L155:
  mov    $0xffffffff,%eax
  jmp    L486
L1142:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
comtyp(p, m) char *p;
char *m;
{
  char c1;
  char c2;
  char *s;
  char macnam[10];
  p++;
  while (*p && (*p == ' ' || *p == '\t'))
    p++;
  if (*p == '\0')
    return (1000);
  getwrd(p, macnam);
  macnam[2] = '\0';
  if ((s = getmac(macnam)) != (char *)0) {
    strcpy(m, s);
    return (0);
  }
  c1 = *p++;
  c2 = *p;
  if (c1 == '\\' && c2 == '\"')
    return (1000);
  if (c1 == 'a' && c2 == 'f')
    return (48);
  if (c1 == 'a' && c2 == 'd')
    return (49);
  if (c1 == 'b' && c2 == 'o')
    return (26);
  if (c1 == 'b' && c2 == 'p')
    return (1);
  if (c1 == 'b' && c2 == 'r')
    return (2);
  if (c1 == 'b' && c2 == 's')
    return (21);
  if (c1 == 'c' && c2 == 'c')
    return (24);
  if (c1 == 'c' && c2 == 'e')
    return (3);
  if (c1 == 'c' && c2 == 'u')
    return (32);
  if (c1 == 'd' && c2 == 'e')
    return (33);
  if (c1 == 'd' && c2 == 's')
    return (51);
  if (c1 == 'e' && c2 == 'f')
    return (29);
  if (c1 == 'e' && c2 == 'c')
    return (36);
  if (c1 == 'e' && c2 == 'h')
    return (27);
  if (c1 == 'e' && c2 == 'n')
    return (34);
  if (c1 == '.')
    return (34);
  if (c1 == 'e' && c2 == 'o')
    return (38);
  if (c1 == 'f' && c2 == 'i')
    return (4);
  if (c1 == 'f' && c2 == 'l')
    return (40);
  if (c1 == 'f' && c2 == 'o')
    return (5);
  if (c1 == 'f' && c2 == 't')
    return (37);
  if (c1 == 'h' && c2 == 'e')
    return (6);
  if (c1 == 'i' && c2 == 'n')
    return (7);
  if (c1 == 'j' && c2 == 'u')
    return (15);
  if (c1 == 'l' && c2 == 'l')
    return (39);
  if (c1 == 'l' && c2 == 's')
    return (8);
  if (c1 == 'm' && c2 == '1')
    return (17);
  if (c1 == 'm' && c2 == '2')
    return (18);
  if (c1 == 'm' && c2 == '3')
    return (19);
  if (c1 == 'm' && c2 == '4')
    return (20);
  if (c1 == 'n' && c2 == 'a')
    return (50);
  if (c1 == 'n' && c2 == 'e')
    return (22);
  if (c1 == 'n' && c2 == 'f')
    return (9);
  if (c1 == 'n' && c2 == 'j')
    return (16);
  if (c1 == 'n' && c2 == 'r')
    return (35);
  if (c1 == 'o' && c2 == 'f')
    return (30);
  if (c1 == 'o' && c2 == 'h')
    return (28);
  if (c1 == 'p' && c2 == 'c')
    return (23);
  if (c1 == 'p' && c2 == 'l')
    return (10);
  if (c1 == 'p' && c2 == 'm')
    return (52);
  if (c1 == 'p' && c2 == 'o')
    return (25);
  if (c1 == 'r' && c2 == 'm')
    return (11);
  if (c1 == 'r' && c2 == 'r')
    return (42);
  if (c1 == 's' && c2 == 'o')
    return (31);
  if (c1 == 's' && c2 == 'p')
    return (12);
  if (c1 == 't' && c2 == 'i')
    return (13);
  if (c1 == 't' && c2 == 'l')
    return (47);
  if (c1 == 'u' && c2 == 'l')
    return (14);
  if (c1 == 'p' && c2 == 'n')
    return (41);
  if (c1 == 'r' && c2 == 'r')
    return (42);
  if (c1 == 'c' && c2 == '2')
    return (43);
  if (c1 == 't' && c2 == 'r')
    return (44);
  if (c1 == 'l' && c2 == 't')
    return (45);
  if (c1 == 'f' && c2 == 'c')
    return (46);
  return (-1);
}
```