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

```asm
<sha1>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %esi,%r15d
  mov    %rdx,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  xor    %eax,%eax
  movabs $0x89abcdef01234567,%rax
  movabs $0x76543210fedcba98,%rdx
  mov    %rax,0x10(%rsp)
  mov    %rdx,0x18(%rsp)
  movl   $0xf0e1d2c3,0x20(%rsp)
  test   %sil,%sil
  je     L138
  movzbl (%rdi),%eax
  mov    %al,0x30(%rsp)
  lea    0x1(%rdi),%rbx
  lea    -0x1(%rsi),%r14d
  movzbl %r14b,%r14d
  add    %rbx,%r14
  mov    $0x8,%r12d
  mov    $0x0,%r13d
  mov    $0x1,%edx
  lea    0x30(%rsp),%rax
  mov    %rax,0x8(%rsp)
  jmp    L74
L138:
  mov    %esi,%r12d
  movb   $0x80,0x30(%rsp)
  mov    %esi,%r13d
  mov    $0x1,%eax
  jmp    L92
L88:
  mov    %eax,%edx
L74:
  cmp    %r14,%rbx
  je     L110
  lea    0x1(%rdx),%eax
  movzbl %dl,%ecx
  movzbl (%rbx),%esi
  mov    %sil,0x30(%rsp,%rcx,1)
  add    $0x8,%r12d
  cmp    $0x1,%r12b
  adc    $0x0,%r13b
  add    $0x1,%rbx
  cmp    $0x3f,%dl
  jne    L88
  lea    0x10(%rsp),%rdi
  mov    0x8(%rsp),%rdx
  mov    %rbp,%rsi
  call   <processBlock@plt>
  mov    $0x0,%eax
L9:
  movzbl 0x0(%rbp,%rax,1),%edx
  mov    %dl,0x10(%rsp,%rax,1)
  add    $0x1,%rax
  cmp    $0x14,%rax
  jne    L9
  mov    $0x0,%eax
  jmp    L88
L110:
  lea    0x0(,%r15,8),%r12d
  lea    0x1(%rdx),%eax
  movzbl %dl,%ecx
  movb   $0x80,0x30(%rsp,%rcx,1)
  cmp    $0x37,%al
  jbe    L40
  cmp    $0x3f,%al
  ja     L42
  movzbl %al,%eax
  lea    0x30(%rsp,%rax,1),%rcx
  lea    0x31(%rsp,%rax,1),%rax
  mov    $0x3e,%esi
  sub    %edx,%esi
  movzbl %sil,%edx
  add    %rdx,%rax
L37:
  movb   $0x0,(%rcx)
  add    $0x1,%rcx
  cmp    %rcx,%rax
  jne    L37
L42:
  lea    0x30(%rsp),%rdx
  lea    0x10(%rsp),%rdi
  mov    %rbp,%rsi
  call   <processBlock@plt>
  mov    $0x0,%eax
L64:
  movzbl 0x0(%rbp,%rax,1),%edx
  mov    %dl,0x10(%rsp,%rax,1)
  add    $0x1,%rax
  cmp    $0x14,%rax
  jne    L64
  mov    $0x0,%eax
L92:
  mov    %eax,%edx
  add    $0x1,%eax
  movzbl %dl,%edx
  movb   $0x0,0x30(%rsp,%rdx,1)
  cmp    $0x3d,%al
  jbe    L92
L130:
  mov    %r13b,0x6e(%rsp)
  mov    %r12b,0x6f(%rsp)
  lea    0x30(%rsp),%rdx
  lea    0x10(%rsp),%rdi
  mov    %rbp,%rsi
  call   <processBlock@plt>
  mov    0x78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L12
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L40:
  cmp    $0x3d,%al
  jbe    L92
  jmp    L130
L12:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void sha1(const unsigned char message[], unsigned char length, unsigned char out[]) {
  unsigned char old[] = {0x67, 0x45, 0x23, 0x01, 0xEF, 0xCD, 0xAB, 0x89, 0x98, 0xBA, 0xDC, 0xFE, 0x10, 0x32, 0x54, 0x76, 0xC3, 0xD2, 0xE1, 0xF0};
  unsigned char lenght_low = 0;
  unsigned char lenght_high = 0;
  unsigned char index = 0;
  unsigned char message_block[64];
  for (unsigned char i = 0; i < length; i++) {
    message_block[index++] = message[i];
    lenght_low += 8;
    if (lenght_low == 0) {
      lenght_high++;
    }
    if (index == 64) {
      processBlock(old, out, message_block);
      for (unsigned char i = 0; i < 20; i++) {
        old[i] = out[i];
      }
      index = 0;
    }
  }
  message_block[index++] = 0x80;
  if (index > 55) {
    while (index < 64) {
      message_block[index++] = 0;
    }
    processBlock(old, out, message_block);
    for (unsigned char i = 0; i < 20; i++) {
      old[i] = out[i];
    }
    index = 0;
  }
  while (index < 62) {
    message_block[index++] = 0;
  }
  message_block[62] = lenght_high;
  message_block[63] = lenght_low;
  processBlock(old, out, message_block);
}
```