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

```asm
<mime_content_type>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rsi,%rbp
  mov    $0x2e,%esi
  call   <strrchr@plt>
  test   %rax,%rax
  je     L507
  mov    %rax,%rbx
  lea    D759(%rip),%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  lea    D374(%rip),%rsi
  test   %rax,%rax
  jne    L461
L592:
  mov    %rbp,%rdi
  call   <strcpy@plt>
L94:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L507:
  lea    D94(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L94
L461:
  lea    D1280(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D76(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D1023(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D1074(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D1162(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D175(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D415(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D175(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D377(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D1135(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D82(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D1135(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D183(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D1135(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D510(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D191(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D461(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D191(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D1004(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D191(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D811(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D191(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D342(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D214(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D1068(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D381(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D897(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D352(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D1089(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D930(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D722(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D930(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D1179(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D930(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D152(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D930(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D915(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D61(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D809(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D993(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D1105(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D825(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D197(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D147(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D431(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D147(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D418(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D34(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D168(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D34(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D1(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D1124(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D827(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D1124(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D610(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D803(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D705(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D803(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D1048(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D803(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D230(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D1156(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D976(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D72(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D1117(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D318(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D1161(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D523(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D943(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D126(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D989(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D126(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D1139(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D210(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D885(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D210(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D1253(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D379(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D826(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D379(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D779(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D379(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D962(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D379(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D1255(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D31(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D1146(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D307(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D968(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D211(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D1007(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D211(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D1144(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D670(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D7(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D670(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D498(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D1278(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D355(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D1278(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D384(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D635(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D132(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D635(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D139(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D635(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D489(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D1209(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D530(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D1209(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D904(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D1209(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D636(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D1209(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D1249(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D816(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D694(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D468(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D565(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D232(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D1295(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D917(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D926(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  lea    D802(%rip),%rsi
  test   %rax,%rax
  je     L592
  lea    D1123(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  lea    D94(%rip),%rsi
  lea    D802(%rip),%rax
  cmove  %rax,%rsi
  jmp    L592
```

tool_calls: name: read_data
arguments: tag: D759
type_guessed: string
name: read_data
arguments: tag: D374
type_guessed: string
name: read_data
arguments: tag: D94
type_guessed: string
name: read_data
arguments: tag: D1280
type_guessed: string
name: read_data
arguments: tag: D76
type_guessed: string
name: read_data
arguments: tag: D1023
type_guessed: string
name: read_data
arguments: tag: D1074
type_guessed: string
name: read_data
arguments: tag: D1162
type_guessed: string
name: read_data
arguments: tag: D175
type_guessed: string
name: read_data
arguments: tag: D415
type_guessed: string
name: read_data
arguments: tag: D377
type_guessed: string
name: read_data
arguments: tag: D1135
type_guessed: string
name: read_data
arguments: tag: D82
type_guessed: string
name: read_data
arguments: tag: D183
type_guessed: string
name: read_data
arguments: tag: D510
type_guessed: string
name: read_data
arguments: tag: D191
type_guessed: string
name: read_data
arguments: tag: D461
type_guessed: string
name: read_data
arguments: tag: D1004
type_guessed: string
name: read_data
arguments: tag: D811
type_guessed: string
name: read_data
arguments: tag: D342
type_guessed: string
name: read_data
arguments: tag: D214
type_guessed: string
name: read_data
arguments: tag: D1068
type_guessed: string
name: read_data
arguments: tag: D381
type_guessed: string
name: read_data
arguments: tag: D897
type_guessed: string
name: read_data
arguments: tag: D352
type_guessed: string
name: read_data
arguments: tag: D1089
type_guessed: string
name: read_data
arguments: tag: D930
type_guessed: string
name: read_data
arguments: tag: D722
type_guessed: string
name: read_data
arguments: tag: D1179
type_guessed: string
name: read_data
arguments: tag: D152
type_guessed: string
name: read_data
arguments: tag: D915
type_guessed: string
name: read_data
arguments: tag: D61
type_guessed: string
name: read_data
arguments: tag: D809
type_guessed: string
name: read_data
arguments: tag: D993
type_guessed: string
name: read_data
arguments: tag: D1105
type_guessed: string
name: read_data
arguments: tag: D825
type_guessed: string
name: read_data
arguments: tag: D197
type_guessed: string
name: read_data
arguments: tag: D147
type_guessed: string
name: read_data
arguments: tag: D431
type_guessed: string
name: read_data
arguments: tag: D418
type_guessed: string
name: read_data
arguments: tag: D34
type_guessed: string
name: read_data
arguments: tag: D168
type_guessed: string
name: read_data
arguments: tag: D1
type_guessed: string
name: read_data
arguments: tag: D1124
type_guessed: string
name: read_data
arguments: tag: D827
type_guessed: string
name: read_data
arguments: tag: D610
type_guessed: string
name: read_data
arguments: tag: D803
type_guessed: string
name: read_data
arguments: tag: D705
type_guessed: string
name: read_data
arguments: tag: D1048
type_guessed: string
name: read_data
arguments: tag: D230
type_guessed: string
name: read_data
arguments: tag: D1156
type_guessed: string
name: read_data
arguments: tag: D976
type_guessed: string
name: read_data
arguments: tag: D72
type_guessed: string
name: read_data
arguments: tag: D1117
type_guessed: string
name: read_data
arguments: tag: D318
type_guessed: string
name: read_data
arguments: tag: D1161
type_guessed: string
name: read_data
arguments: tag: D523
type_guessed: string
name: read_data
arguments: tag: D943
type_guessed: string
name: read_data
arguments: tag: D126
type_guessed: string
name: read_data
arguments: tag: D989
type_guessed: string
name: read_data
arguments: tag: D1139
type_guessed: string
name: read_data
arguments: tag: D210
type_guessed: string
name: read_data
arguments: tag: D885
type_guessed: string
name: read_data
arguments: tag: D1253
type_guessed: string
name: read_data
arguments: tag: D379
type_guessed: string
name: read_data
arguments: tag: D826
type_guessed: string
name: read_data
arguments: tag: D779
type_guessed: string
name: read_data
arguments: tag: D962
type_guessed: string
name: read_data
arguments: tag: D1255
type_guessed: string
name: read_data
arguments: tag: D31
type_guessed: string
name: read_data
arguments: tag: D1146
type_guessed: string
name: read_data
arguments: tag: D307
type_guessed: string
name: read_data
arguments: tag: D968
type_guessed: string
name: read_data
arguments: tag: D211
type_guessed: string
name: read_data
arguments: tag: D1007
type_guessed: string
name: read_data
arguments: tag: D1144
type_guessed: string
name: read_data
arguments: tag: D670
type_guessed: string
name: read_data
arguments: tag: D7
type_guessed: string
name: read_data
arguments: tag: D498
type_guessed: string
name: read_data
arguments: tag: D1278
type_guessed: string
name: read_data
arguments: tag: D355
type_guessed: string
name: read_data
arguments: tag: D384
type_guessed: string
name: read_data
arguments: tag: D635
type_guessed: string
name: read_data
arguments: tag: D132
type_guessed: string
name: read_data
arguments: tag: D139
type_guessed: string
name: read_data
arguments: tag: D489
type_guessed: string
name: read_data
arguments: tag: D1209
type_guessed: string
name: read_data
arguments: tag: D530
type_guessed: string
name: read_data
arguments: tag: D904
type_guessed: string
name: read_data
arguments: tag: D636
type_guessed: string
name: read_data
arguments: tag: D1249
type_guessed: string
name: read_data
arguments: tag: D816
type_guessed: string
name: read_data
arguments: tag: D694
type_guessed: string
name: read_data
arguments: tag: D468
type_guessed: string
name: read_data
arguments: tag: D565
type_guessed: string
name: read_data
arguments: tag: D232
type_guessed: string
name: read_data
arguments: tag: D1295
type_guessed: string
name: read_data
arguments: tag: D917
type_guessed: string
name: read_data
arguments: tag: D926
type_guessed: string
name: read_data
arguments: tag: D802
type_guessed: string
name: read_data
arguments: tag: D1123
type_guessed: string

tool: D759: .txt

tool: D374: text/plain

tool: D94: application/octet-stream

tool: D1280: .css

tool: D76: text/css

tool: D1023: .js

tool: D1074: text/javascript

tool: D1162: .xml

tool: D175: text/xml

tool: D415: .xsl

tool: D377: .xhtm

tool: D1135: application/xhtml+xml

tool: D82: .xhtml

tool: D183: .xht

tool: D510: .html

tool: D191: text/html

tool: D461: .htm

tool: D1004: .shtml

tool: D811: .hts

tool: D342: .gif

tool: D214: image/gif

tool: D1068: .png

tool: D381: image/png

tool: D897: .bmp

tool: D352: application/x-MS-bmp

tool: D1089: .jpg

tool: D930: image/jpeg

tool: D722: .jpeg

tool: D1179: .jpe

tool: D152: .jpz

tool: D915: .wav

tool: D61: audio/wav

tool: D809: .wma

tool: D993: audio/x-ms-wma

tool: D1105: .wmv

tool: D825: audio/x-ms-wmv

tool: D197: .au

tool: D147: audio/basic

tool: D431: .snd

tool: D418: .midi

tool: D34: audio/midi

tool: D168: .mid

tool: D1: .mp3

tool: D1124: audio/x-mpeg

tool: D827: .mp2

tool: D610: .rm

tool: D803: audio/x-pn-realaudio

tool: D705: .rmvb

tool: D1048: .rmm

tool: D230: .avi

tool: D1156: video/x-msvideo

tool: D976: .3gp

tool: D72: video/3gpp

tool: D1117: .mov

tool: D318: video/quicktime

tool: D1161: .wmx

tool: D523: video/x-ms-wmx

tool: D943: .asf

tool: D126: video/x-ms-asf

tool: D989: .asx

tool: D1139: .mp4

tool: D210: video/mp4

tool: D885: .mpg4

tool: D1253: .mpe

tool: D379: video/mpeg

tool: D826: .mpeg

tool: D779: .mpg

tool: D962: .mpga

tool: D1255: .pdf

tool: D31: application/pdf

tool: D1146: .rtf

tool: D307: application/rtf

tool: D968: .doc

tool: D211: application/msword

tool: D1007: .dot

tool: D1144: .xls

tool: D670: application/msexcel

tool: D7: .xla

tool: D498: .hlp

tool: D1278: application/mshelp

tool: D355: .chm

tool: D384: .swf

tool: D635: application/x-shockwave-flash

tool: D132: .swfl

tool: D139: .cab

tool: D489: .ppt

tool: D1209: application/mspowerpoint

tool: D530: .ppz

tool: D904: .pps

tool: D636: .pot

tool: D1249: .zip

tool: D816: application/zip

tool: D694: .rar

tool: D468: application/x-rar-compressed

tool: D565: .gz

tool: D232: application/x-gzip

tool: D1295: .jar

tool: D917: application/java-archive

tool: D926: .tgz

tool: D802: application/x-tar

tool: D1123: .tar

assistant: ```c
void mime_content_type(const char *name, char *ret) {
  char *dot, *buf;
  dot = strrchr(name, '.');
  if (!dot) {
    buf = "application/octet-stream";
    strcpy(ret, buf);
  } else {
    if (strcmp(dot, ".txt") == 0) {
      buf = "text/plain";
    } else if (strcmp(dot, ".css") == 0) {
      buf = "text/css";
    } else if (strcmp(dot, ".js") == 0) {
      buf = "text/javascript";
    } else if (strcmp(dot, ".xml") == 0 || strcmp(dot, ".xsl") == 0) {
      buf = "text/xml";
    } else if (strcmp(dot, ".xhtm") == 0 || strcmp(dot, ".xhtml") == 0 || strcmp(dot, ".xht") == 0) {
      buf = "application/xhtml+xml";
    } else if (strcmp(dot, ".html") == 0 || strcmp(dot, ".htm") == 0 || strcmp(dot, ".shtml") == 0 || strcmp(dot, ".hts") == 0) {
      buf = "text/html";
    } else if (strcmp(dot, ".gif") == 0) {
      buf = "image/gif";
    } else if (strcmp(dot, ".png") == 0) {
      buf = "image/png";
    } else if (strcmp(dot, ".bmp") == 0) {
      buf = "application/x-MS-bmp";
    } else if (strcmp(dot, ".jpg") == 0 || strcmp(dot, ".jpeg") == 0 || strcmp(dot, ".jpe") == 0 || strcmp(dot, ".jpz") == 0) {
      buf = "image/jpeg";
    } else if (strcmp(dot, ".wav") == 0) {
      buf = "audio/wav";
    } else if (strcmp(dot, ".wma") == 0) {
      buf = "audio/x-ms-wma";
    } else if (strcmp(dot, ".wmv") == 0) {
      buf = "audio/x-ms-wmv";
    } else if (strcmp(dot, ".au") == 0 || strcmp(dot, ".snd") == 0) {
      buf = "audio/basic";
    } else if (strcmp(dot, ".midi") == 0 || strcmp(dot, ".mid") == 0) {
      buf = "audio/midi";
    } else if (strcmp(dot, ".mp3") == 0 || strcmp(dot, ".mp2") == 0) {
      buf = "audio/x-mpeg";
    } else if (strcmp(dot, ".rm") == 0 || strcmp(dot, ".rmvb") == 0 || strcmp(dot, ".rmm") == 0) {
      buf = "audio/x-pn-realaudio";
    } else if (strcmp(dot, ".avi") == 0) {
      buf = "video/x-msvideo";
    } else if (strcmp(dot, ".3gp") == 0) {
      buf = "video/3gpp";
    } else if (strcmp(dot, ".mov") == 0) {
      buf = "video/quicktime";
    } else if (strcmp(dot, ".wmx") == 0) {
      buf = "video/x-ms-wmx";
    } else if (strcmp(dot, ".asf") == 0 || strcmp(dot, ".asx") == 0) {
      buf = "video/x-ms-asf";
    } else if (strcmp(dot, ".mp4") == 0 || strcmp(dot, ".mpg4") == 0) {
      buf = "video/mp4";
    } else if (strcmp(dot, ".mpe") == 0 || strcmp(dot, ".mpeg") == 0 || strcmp(dot, ".mpg") == 0 || strcmp(dot, ".mpga") == 0) {
      buf = "video/mpeg";
    } else if (strcmp(dot, ".pdf") == 0) {
      buf = "application/pdf";
    } else if (strcmp(dot, ".rtf") == 0) {
      buf = "application/rtf";
    } else if (strcmp(dot, ".doc") == 0 || strcmp(dot, ".dot") == 0) {
      buf = "application/msword";
    } else if (strcmp(dot, ".xls") == 0 || strcmp(dot, ".xla") == 0) {
      buf = "application/msexcel";
    } else if (strcmp(dot, ".hlp") == 0 || strcmp(dot, ".chm") == 0) {
      buf = "application/mshelp";
    } else if (strcmp(dot, ".swf") == 0 || strcmp(dot, ".swfl") == 0 || strcmp(dot, ".cab") == 0) {
      buf = "application/x-shockwave-flash";
    } else if (strcmp(dot, ".ppt") == 0 || strcmp(dot, ".ppz") == 0 || strcmp(dot, ".pps") == 0 || strcmp(dot, ".pot") == 0) {
      buf = "application/mspowerpoint";
    } else if (strcmp(dot, ".zip") == 0) {
      buf = "application/zip";
    } else if (strcmp(dot, ".rar") == 0) {
      buf = "application/x-rar-compressed";
    } else if (strcmp(dot, ".gz") == 0) {
      buf = "application/x-gzip";
    } else if (strcmp(dot, ".jar") == 0) {
      buf = "application/java-archive";
    } else if (strcmp(dot, ".tgz") == 0 || strcmp(dot, ".tar") == 0) {
      buf = "application/x-tar";
    } else {
      buf = "application/octet-stream";
    }
    strcpy(ret, buf);
  }
}
```