user: 下面的汇编指令对应的C源代码是什么:

```asm
<flash_unlock_block>:
  endbr64
  push   %rbx
  mov    %rdi,%r8
  movslq %esi,%r9
  mov    %edx,%r10d
  and    $0xff800000,%edi
  sub    $0x110,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  mov    %r8d,%eax
  and    $0xff800000,%eax
  cmp    $0xfff,%eax
  jbe    L87
  mov    $0x50,%esi
  mov    %rdi,%rcx
  mov    %si,(%rdi)
  test   %edx,%edx
  jle    L153
L144:
  movslq %r9d,%r11
  mov    %rdi,%rax
  xor    %edx,%edx
  mov    %rsp,%rbx
  and    $0xfffffffffffffffe,%r11
  jmp    L12
  nopl   (%rax)
L189:
  mov    %eax,%esi
  or     $0xd0000000,%esi
  movw   $0x98,(%esi)
  add    $0x4,%esi
L147:
  movzwl (%rsi),%esi
L109:
  mov    %si,(%rbx,%rdx,2)
  add    $0x1,%rdx
  add    %r11,%rax
  cmp    %edx,%r10d
  jle    L180
L12:
  xor    %esi,%esi
  cmp    %rax,%r8
  je     L109
  cmp    $0xfff,%eax
  jbe    L189
  mov    %eax,%esi
  movw   $0x98,(%eax)
  add    $0x4,%rsi
  jmp    L147
L87:
  mov    $0xd0000000,%eax
  mov    $0x50,%edx
  mov    %dx,(%rax)
  mov    %rax,%rcx
  test   %r10d,%r10d
  jg     L144
  nopl   (%rax)
L180:
  cmp    $0xfff,%r8d
  jbe    L175
L153:
  mov    %r8d,%r8d
L18:
  movb   $0x60,(%r8)
  mov    $0x4c4b40,%edx
  movb   $0xd0,(%r8)
  jmp    L163
  nopw   0x0(%rax,%rax,1)
L132:
  sub    $0x1,%edx
  je     L165
L163:
  movzwl (%rcx),%eax
  test   $0x80,%al
  je     L132
  test   %r10d,%r10d
  jle    L165
  lea    -0x1(%r10),%edx
  mov    %rsp,%rsi
  and    $0xfffffffffffffffe,%r9
  lea    0x2(%rsp,%rdx,2),%r8
  jmp    L5
  nopl   0x0(%rax,%rax,1)
L150:
  add    $0x2,%rsi
  add    %r9,%rdi
  cmp    %r8,%rsi
  je     L165
L5:
  cmpw   $0x0,(%rsi)
  je     L150
  mov    %edi,%edx
  mov    %edi,%eax
  or     $0xd0000000,%edx
  cmp    $0xfff,%edi
  cmovbe %rdx,%rax
  mov    $0x4c4b40,%edx
  movb   $0x60,(%rax)
  movb   $0x1,(%rax)
  nopl   0x0(%rax)
L38:
  movzwl (%rcx),%eax
  test   $0x80,%al
  jne    L150
  sub    $0x1,%edx
  jne    L38
L165:
  mov    $0xff,%edx
  mov    %dx,(%rcx)
  mov    0x108(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L166
  add    $0x110,%rsp
  pop    %rbx
  ret
L175:
  or     $0xd0000000,%r8d
  jmp    L18
L166:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int flash_unlock_block(volatile unsigned char *block, int block_size, int blocks) {
  volatile unsigned short *ROM, *bp;
  unsigned short stat;
  int timeout = 5000000;
  unsigned short is_locked[128];
  int i;
  ROM = (unsigned short *)((volatile unsigned char *)(((unsigned)((unsigned long)block & 0xFF800000) < 0x1000) ? ((unsigned)((unsigned long)block & 0xFF800000) | 0xd0000000) : (unsigned)((unsigned long)block & 0xFF800000)));
  ROM[0] = 0x50;
  bp = (unsigned short *)((unsigned long)block & 0xFF800000);
  for (i = 0; i < blocks; i++) {
    if (bp == (unsigned short *)block) {
      is_locked[i] = 0;
    } else {
      *(volatile unsigned short *)((volatile unsigned char *)(((unsigned)(bp) < 0x1000) ? ((unsigned)(bp) | 0xd0000000) : (unsigned)(bp))) = 0x98;
      is_locked[i] = ((volatile unsigned short *)((volatile unsigned char *)(((unsigned)(bp) < 0x1000) ? ((unsigned)(bp) | 0xd0000000) : (unsigned)(bp))))[2];
    }
    bp += block_size / sizeof(*bp);
  }
  ((volatile unsigned char *)(((unsigned)(block) < 0x1000) ? ((unsigned)(block) | 0xd0000000) : (unsigned)(block)))[0] = 0x60;
  ((volatile unsigned char *)(((unsigned)(block) < 0x1000) ? ((unsigned)(block) | 0xd0000000) : (unsigned)(block)))[0] = 0xD0;
  timeout = 5000000;
  while (((stat = ROM[0]) & 0x80) != 0x80) {
    if (--timeout == 0)
      goto done;
  }
  bp = (unsigned short *)((unsigned long)block & 0xFF800000);
  for (i = 0; i < blocks; i++) {
    if (is_locked[i]) {
      *((volatile unsigned char *)(((unsigned)(bp) < 0x1000) ? ((unsigned)(bp) | 0xd0000000) : (unsigned)(bp))) = 0x60;
      *((volatile unsigned char *)(((unsigned)(bp) < 0x1000) ? ((unsigned)(bp) | 0xd0000000) : (unsigned)(bp))) = 0x01;
      timeout = 5000000;
      while (((stat = ROM[0]) & 0x80) != 0x80) {
        if (--timeout == 0)
          goto done;
      }
    }
    bp += block_size / sizeof(*bp);
  }
done:
  ROM[0] = 0xFF;
  return stat;
}
```