user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<opt_med7_uint8>:
  endbr64
  movzbl (%rdi),%r10d
  movzbl 0x5(%rdi),%esi
  cmp    %sil,%r10b
  jbe    L90
  mov    %r10d,%eax
  mov    %sil,(%rdi)
  mov    %r10b,0x5(%rdi)
  mov    %esi,%r10d
  mov    %eax,%esi
L90:
  movzbl 0x3(%rdi),%eax
  cmp    %r10b,%al
  jae    L4
  mov    %r10d,%edx
  mov    %al,(%rdi)
  mov    %r10b,0x3(%rdi)
  mov    %eax,%r10d
  mov    %edx,%eax
L4:
  movzbl 0x1(%rdi),%ecx
  movzbl 0x6(%rdi),%r8d
  cmp    %r8b,%cl
  jbe    L5
  mov    %ecx,%edx
  mov    %r8b,0x1(%rdi)
  mov    %cl,0x6(%rdi)
  mov    %r8d,%ecx
  mov    %edx,%r8d
L5:
  movzbl 0x2(%rdi),%r9d
  movzbl 0x4(%rdi),%edx
  cmp    %dl,%r9b
  jbe    L63
  mov    %r9d,%r11d
  mov    %dl,0x2(%rdi)
  mov    %r9b,0x4(%rdi)
  mov    %edx,%r9d
  mov    %r11d,%edx
L63:
  cmp    %r10b,%cl
  jae    L15
  mov    %r10b,0x1(%rdi)
  mov    %cl,(%rdi)
  mov    %r10d,%ecx
L15:
  cmp    %sil,%al
  jbe    L69
  mov    %eax,%r10d
  mov    %sil,0x3(%rdi)
  mov    %al,0x5(%rdi)
  mov    %esi,%eax
  mov    %r10d,%esi
L69:
  cmp    %r8b,%r9b
  jbe    L109
  mov    %r9d,%r10d
  mov    %r8b,0x2(%rdi)
  mov    %r9b,0x6(%rdi)
  mov    %r8d,%r9d
  mov    %r10d,%r8d
L109:
  cmp    %r9b,%al
  jae    L60
  mov    %r9b,0x3(%rdi)
  mov    %al,0x2(%rdi)
  mov    %r9d,%eax
L60:
  cmp    %r8b,%al
  jbe    L68
  mov    %r8b,0x3(%rdi)
  mov    %al,0x6(%rdi)
  mov    %r8d,%eax
L68:
  cmp    %dl,%sil
  jae    L83
  mov    %sil,0x4(%rdi)
  mov    %dl,0x5(%rdi)
  mov    %esi,%edx
L83:
  cmp    %cl,%dl
  jae    L26
  mov    %ecx,%esi
  mov    %dl,0x1(%rdi)
  mov    %cl,0x4(%rdi)
  mov    %edx,%ecx
  mov    %esi,%edx
L26:
  cmp    %al,%cl
  jbe    L13
  mov    %cl,0x3(%rdi)
  mov    %al,0x1(%rdi)
  mov    %ecx,%eax
L13:
  cmp    %dl,%al
  jbe    L92
  mov    %dl,0x3(%rdi)
  mov    %al,0x4(%rdi)
  mov    %edx,%eax
L92:
  ret
```

assistant: ```c
unsigned char opt_med7_uint8(unsigned char *p, int n) {
  {
    if ((p[0]) > (p[5])) {
      unsigned char temp = ((p[0]));
      ((p[0])) = ((p[5]));
      ((p[5])) = temp;
    };
  };
  {
    if ((p[0]) > (p[3])) {
      unsigned char temp = ((p[0]));
      ((p[0])) = ((p[3]));
      ((p[3])) = temp;
    };
  };
  {
    if ((p[1]) > (p[6])) {
      unsigned char temp = ((p[1]));
      ((p[1])) = ((p[6]));
      ((p[6])) = temp;
    };
  };
  {
    if ((p[2]) > (p[4])) {
      unsigned char temp = ((p[2]));
      ((p[2])) = ((p[4]));
      ((p[4])) = temp;
    };
  };
  {
    if ((p[0]) > (p[1])) {
      unsigned char temp = ((p[0]));
      ((p[0])) = ((p[1]));
      ((p[1])) = temp;
    };
  };
  {
    if ((p[3]) > (p[5])) {
      unsigned char temp = ((p[3]));
      ((p[3])) = ((p[5]));
      ((p[5])) = temp;
    };
  };
  {
    if ((p[2]) > (p[6])) {
      unsigned char temp = ((p[2]));
      ((p[2])) = ((p[6]));
      ((p[6])) = temp;
    };
  };
  {
    if ((p[2]) > (p[3])) {
      unsigned char temp = ((p[2]));
      ((p[2])) = ((p[3]));
      ((p[3])) = temp;
    };
  };
  {
    if ((p[3]) > (p[6])) {
      unsigned char temp = ((p[3]));
      ((p[3])) = ((p[6]));
      ((p[6])) = temp;
    };
  };
  {
    if ((p[4]) > (p[5])) {
      unsigned char temp = ((p[4]));
      ((p[4])) = ((p[5]));
      ((p[5])) = temp;
    };
  };
  {
    if ((p[1]) > (p[4])) {
      unsigned char temp = ((p[1]));
      ((p[1])) = ((p[4]));
      ((p[4])) = temp;
    };
  };
  {
    if ((p[1]) > (p[3])) {
      unsigned char temp = ((p[1]));
      ((p[1])) = ((p[3]));
      ((p[3])) = temp;
    };
  };
  {
    if ((p[3]) > (p[4])) {
      unsigned char temp = ((p[3]));
      ((p[3])) = ((p[4]));
      ((p[4])) = temp;
    };
  };
  return (p[3]);
}
```