user: 请从给定的汇编指令推导出C源代码：

```asm
<ImaMashChannel>:
  endbr64
  push   %r15
  mov    %ecx,%r11d
  mov    %edi,%r15d
  push   %r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %r8,(%rsp)
  mov    0x80(%rsp),%ebx
  mov    %r9,0x20(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  test   %ebx,%ebx
  jg     L104
L16:
  sub    $0x8,%rsp
  movswl 0x0(%r13),%edx
  mov    %r11d,%r8d
  mov    %r13,%rcx
  push   0x28(%rsp)
  mov    0x10(%rsp),%r9
  mov    %r15d,%edi
  call   <ImaMashS@plt>
  pop    %rax
  pop    %rdx
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L45
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L104:
  mov    (%r8),%ebp
  lea    0x34(%rsp),%r9
  sub    $0x8,%rsp
  movswl (%rdx),%edx
  mov    %ecx,%r8d
  mov    %ebp,0x3c(%rsp)
  mov    %ebp,%r14d
  push   $0x0
  mov    %ecx,0x38(%rsp)
  mov    %r13,%rcx
  mov    %esi,0x1c(%rsp)
  mov    %r9,0x20(%rsp)
  call   <ImaMashS@plt>
  mov    0x90(%rsp),%r12d
  sub    0x90(%rsp),%r14d
  mov    %eax,0x18(%rsp)
  mov    $0x0,%eax
  pop    %r9
  cmovs  %eax,%r14d
  mov    $0x58,%eax
  add    %ebp,%r12d
  pop    %r10
  cmp    %eax,%r12d
  mov    0xc(%rsp),%esi
  mov    0x28(%rsp),%r11d
  cmovg  %eax,%r12d
  cmp    %r14d,%ebp
  mov    0x10(%rsp),%r9
  setg   %al
  cmp    %r12d,%ebp
  mov    %eax,%edx
  jl     L39
  test   %al,%al
  je     L71
L39:
  mov    %ebp,0x2c(%rsp)
  mov    %r15d,%edi
  xor    %ebx,%ebx
  mov    %r13,%r15
  mov    %r11d,%r8d
  mov    %r14d,%r13d
  mov    %ebp,%r14d
L103:
  test   $0x1,%bl
  jne    L83
  test   %dl,%dl
  je     L83
  sub    $0x1,%r14d
  sub    $0x8,%rsp
  movswl (%r15),%edx
  mov    %r15,%rcx
  mov    %r14d,0x3c(%rsp)
  push   $0x0
  mov    %r9,0x28(%rsp)
  mov    %esi,0x38(%rsp)
  mov    %r8d,0x20(%rsp)
  mov    %edi,0x1c(%rsp)
  call   <ImaMashS@plt>
  pop    %rdi
  pop    %r8
  cmp    0x8(%rsp),%eax
  mov    0xc(%rsp),%edi
  mov    0x28(%rsp),%esi
  mov    0x10(%rsp),%r8d
  mov    0x18(%rsp),%r9
  jge    L83
  mov    0x80(%rsp),%r12d
  mov    $0x0,%edx
  mov    %r14d,%r13d
  mov    %eax,0x8(%rsp)
  sub    0x80(%rsp),%r13d
  mov    %r14d,0x2c(%rsp)
  cmovs  %edx,%r13d
  add    %r14d,%r12d
  mov    $0x58,%edx
  cmp    %edx,%r12d
  cmovg  %edx,%r12d
  nopl   (%rax)
L83:
  cmp    %ebp,%r12d
  setg   %cl
  test   $0x1,%bl
  je     L114
  test   %cl,%cl
  je     L114
  add    $0x1,%ebp
  sub    $0x8,%rsp
  movswl (%r15),%edx
  mov    %r15,%rcx
  mov    %ebp,0x3c(%rsp)
  push   $0x0
  mov    %r9,0x28(%rsp)
  mov    %r8d,0x20(%rsp)
  mov    %edi,0x1c(%rsp)
  mov    %esi,0x38(%rsp)
  call   <ImaMashS@plt>
  pop    %rcx
  pop    %rsi
  cmp    %eax,0x8(%rsp)
  mov    0xc(%rsp),%edi
  mov    0x28(%rsp),%esi
  mov    0x10(%rsp),%r8d
  mov    0x18(%rsp),%r9
  jg     L101
  cmp    %ebp,%r12d
  setg   %cl
  nopw   0x0(%rax,%rax,1)
L114:
  mov    $0x1,%eax
  sub    %ebx,%eax
  cmp    %r13d,%r14d
  mov    %eax,%ebx
  setg   %dl
  jg     L103
  test   %cl,%cl
  jne    L103
  mov    %r15,%r13
  mov    %r8d,%r11d
  mov    %edi,%r15d
L12:
  mov    (%rsp),%rax
  mov    0x2c(%rsp),%ebx
  mov    %ebx,(%rax)
  jmp    L16
  nopl   (%rax)
L101:
  mov    0x80(%rsp),%r12d
  mov    $0x0,%edx
  mov    %ebp,%r13d
  mov    %eax,0x8(%rsp)
  sub    0x80(%rsp),%r13d
  mov    %ebp,0x2c(%rsp)
  cmovs  %edx,%r13d
  add    %ebp,%r12d
  mov    $0x58,%edx
  cmp    %edx,%r12d
  cmovg  %edx,%r12d
  cmp    %r12d,%ebp
  setl   %cl
  jmp    L114
  nopl   0x0(%rax,%rax,1)
L71:
  mov    %ebp,0x2c(%rsp)
  jmp    L12
L45:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void ImaMashChannel(unsigned ch, unsigned chans, const short *ip, int n, int *st, unsigned char *obuff, int opt) {
  int snext, d;
  int s0, d0;
  int s32, d32;
  s32 = s0 = *st;
  if (opt > 0) {
    int low, hi, w;
    int low0, hi0;
    snext = s0;
    d32 = d0 = ImaMashS(ch, chans, ip[0], ip, n, &snext, NULL);
    w = 0;
    low = hi = s0;
    low0 = low - opt;
    if (low0 < 0)
      low0 = 0;
    hi0 = hi + opt;
    if (hi0 > 88)
      hi0 = 88;
    while (low > low0 || hi < hi0) {
      if (!w && low > low0) {
        int d;
        snext = --low;
        d = ImaMashS(ch, chans, ip[0], ip, n, &snext, NULL);
        if (d < d0) {
          d0 = d;
          s0 = low;
          low0 = low - opt;
          if (low0 < 0)
            low0 = 0;
          hi0 = low + opt;
          if (hi0 > 88)
            hi0 = 88;
        }
      }
      if (w && hi < hi0) {
        int d;
        snext = ++hi;
        d = ImaMashS(ch, chans, ip[0], ip, n, &snext, NULL);
        if (d < d0) {
          d0 = d;
          s0 = hi;
          low0 = hi - opt;
          if (low0 < 0)
            low0 = 0;
          hi0 = hi + opt;
          if (hi0 > 88)
            hi0 = 88;
        }
      }
      w = 1 - w;
    }
    *st = s0;
  }
  d = ImaMashS(ch, chans, ip[0], ip, n, st, obuff);
}
```