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

```asm
<mc_test_row>:
  endbr64
  push   %r15
  xor    %eax,%eax
  push   %r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %rdx,%rbx
  mov    %rsi,%rdx
  mov    %rdi,%rsi
  lea    D9(%rip),%rdi
  mov    %rbx,%r13
  mov    %rbx,%r14
  and    $0x20,%r13d
  and    $0x40,%r14d
  sub    $0x58,%rsp
  call   <printf@plt>
  mov    %rbx,%rax
  and    $0x8,%eax
  mov    %rax,0x40(%rsp)
  mov    %rbx,%rax
  and    $0x4,%eax
  mov    %rax,0x38(%rsp)
  mov    %rbx,%rax
  and    $0x2,%eax
  mov    %rax,0x30(%rsp)
  mov    %rbx,%rax
  and    $0x1,%eax
  mov    %rax,0x28(%rsp)
  mov    %rbx,%rax
  and    $0x10,%eax
  mov    %rax,0x48(%rsp)
  mov    %rbx,%rax
  and    $0x100,%eax
  mov    %rax,0x10(%rsp)
  mov    %rbx,%rax
  and    $0x80,%eax
  mov    %rax,0x8(%rsp)
  mov    %rbx,%rax
  and    $0x400,%ebx
  mov    %rbx,0x20(%rsp)
  mov    $0x1,%ebx
  and    $0x200,%eax
  lea    -0x1(%rbx),%r15d
  mov    %rax,0x18(%rsp)
  cmp    $0x3,%r15d
  je     L175
L145:
  jg     L79
  cmp    $0x1,%r15d
  je     L25
  cmp    $0x2,%r15d
  jne    L151
  cmpq   $0x0,0x38(%rsp)
  jne    L253
  nopl   0x0(%rax,%rax,1)
L141:
  add    $0x1,%ebx
L208:
  lea    -0x1(%rbx),%r15d
  cmp    $0x3,%r15d
  jne    L145
L175:
  cmpq   $0x0,0x40(%rsp)
  je     L141
L253:
  cmpq   $0x0,0x10(%rsp)
  jne    L66
L44:
  cmpq   $0x0,0x18(%rsp)
  jne    L198
L255:
  cmpq   $0x0,0x20(%rsp)
  jne    L144
L47:
  cmp    $0x5,%ebx
  jne    L141
L286:
  add    $0x58,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L79:
  cmp    $0x4,%r15d
  jne    L151
  cmpq   $0x0,0x48(%rsp)
  je     L286
  cmpq   $0x0,0x10(%rsp)
  je     L44
L66:
  test   %r13,%r13
  je     L367
  xor    %esi,%esi
  xor    %eax,%eax
  mov    %r12,%rcx
  mov    %rbp,%rdx
  mov    %r15d,%edi
  call   <mc_test_row_8@plt>
  test   %eax,%eax
  jne    L263
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <mc_clear_row@plt>
L367:
  test   %r14,%r14
  je     L277
  xor    %esi,%esi
  xor    %eax,%eax
  mov    %r12,%rcx
  mov    %rbp,%rdx
  mov    %r15d,%edi
  call   <mc_test_row_16@plt>
  test   %eax,%eax
  jne    L263
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <mc_clear_row@plt>
L277:
  cmpq   $0x0,0x8(%rsp)
  je     L44
  xor    %esi,%esi
  xor    %eax,%eax
  mov    %r12,%rcx
  mov    %rbp,%rdx
  mov    %r15d,%edi
  call   <mc_test_row_32@plt>
  test   %eax,%eax
  jne    L263
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <mc_clear_row@plt>
  cmpq   $0x0,0x18(%rsp)
  je     L255
  nopl   0x0(%rax,%rax,1)
L198:
  test   %r13,%r13
  je     L134
  xor    %eax,%eax
  mov    %r12,%rcx
  mov    %rbp,%rdx
  mov    $0x1,%esi
  mov    %r15d,%edi
  call   <mc_test_row_8@plt>
  test   %eax,%eax
  jne    L263
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <mc_clear_row@plt>
L134:
  test   %r14,%r14
  je     L287
  xor    %eax,%eax
  mov    %r12,%rcx
  mov    %rbp,%rdx
  mov    $0x1,%esi
  mov    %r15d,%edi
  call   <mc_test_row_16@plt>
  test   %eax,%eax
  jne    L263
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <mc_clear_row@plt>
L287:
  cmpq   $0x0,0x8(%rsp)
  je     L255
  xor    %eax,%eax
  mov    %r12,%rcx
  mov    %rbp,%rdx
  mov    $0x1,%esi
  mov    %r15d,%edi
  call   <mc_test_row_32@plt>
  test   %eax,%eax
  jne    L263
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <mc_clear_row@plt>
  cmpq   $0x0,0x20(%rsp)
  je     L47
  nopw   0x0(%rax,%rax,1)
L144:
  test   %r13,%r13
  je     L268
  xor    %eax,%eax
  mov    %r12,%rcx
  mov    %rbp,%rdx
  mov    $0x2,%esi
  mov    %r15d,%edi
  call   <mc_test_row_8@plt>
  test   %eax,%eax
  jne    L263
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <mc_clear_row@plt>
L268:
  test   %r14,%r14
  je     L45
  xor    %eax,%eax
  mov    %r12,%rcx
  mov    %rbp,%rdx
  mov    $0x2,%esi
  mov    %r15d,%edi
  call   <mc_test_row_16@plt>
  test   %eax,%eax
  jne    L263
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <mc_clear_row@plt>
L45:
  cmpq   $0x0,0x8(%rsp)
  je     L47
  xor    %eax,%eax
  mov    %r12,%rcx
  mov    %rbp,%rdx
  mov    $0x2,%esi
  mov    %r15d,%edi
  call   <mc_test_row_32@plt>
  test   %eax,%eax
  jne    L263
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <mc_clear_row@plt>
  jmp    L47
  nopl   0x0(%rax,%rax,1)
L25:
  cmpq   $0x0,0x30(%rsp)
  jne    L253
  add    $0x1,%ebx
  jmp    L208
  nopl   0x0(%rax)
L151:
  cmpq   $0x0,0x28(%rsp)
  je     L47
  jmp    L253
  nopl   0x0(%rax)
L263:
  add    $0x58,%rsp
  cltq
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: parse_data
arguments: label: D9
type_guessed: string

tool: D9: 
mc_test_row(0x%08lX, 0x%08lX)


assistant: ```c
unsigned long mc_test_row(unsigned long nFrom, unsigned long nTo, unsigned long flags) {
  int nRun, nSize, nSeq;
  int ret = 0;
  printf("\nmc_test_row(0x%08lX, 0x%08lX)\n", nFrom, nTo);
  for (nRun = 0; nRun < 5; nRun++) {
    switch (nRun) {
    case 0:
      if ((flags & 0x00000001LU) != 0x00000001LU)
        continue;
      break;
    case 1:
      if ((flags & 0x00000002LU) != 0x00000002LU)
        continue;
      break;
    case 2:
      if ((flags & 0x00000004LU) != 0x00000004LU)
        continue;
      break;
    case 3:
      if ((flags & 0x00000008LU) != 0x00000008LU)
        continue;
      break;
    case 4:
      if ((flags & 0x00000010LU) != 0x00000010LU)
        continue;
    }
    for (nSeq = 0; nSeq < 3; nSeq++) {
      switch (nSeq) {
      case 0:
        if ((flags & 0x00000100LU) != 0x00000100LU)
          continue;
        break;
      case 1:
        if ((flags & 0x00000200LU) != 0x00000200LU)
          continue;
        break;
      case 2:
        if ((flags & 0x00000400LU) != 0x00000400LU)
          continue;
      }
      for (nSize = 0; nSize < 3; nSize++) {
        switch (nSize) {
        case 0:
          if ((flags & 0x00000020LU) != 0x00000020LU)
            continue;
          ret = mc_test_row_8(nRun, nSeq, nFrom, nTo);
          break;
        case 1:
          if ((flags & 0x00000040LU) != 0x00000040LU)
            continue;
          ret = mc_test_row_16(nRun, nSeq, nFrom, nTo);
          break;
        case 2:
          if ((flags & 0x00000080LU) != 0x00000080LU)
            continue;
          ret = mc_test_row_32(nRun, nSeq, nFrom, nTo);
        }
        if (ret)
          return ret;
        mc_clear_row(nFrom, nTo);
      }
    }
  }
  return 0;
}
```