user: Converte this assembly snippet into its equivalent C code:

```asm
<reverse_sha256>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %esi,-0x5c(%rbp)
  mov    %edx,-0x60(%rbp)
  mov    %rcx,-0x68(%rbp)
  mov    -0x68(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x3c(%rbp)
  mov    -0x60(%rbp),%edx
  mov    -0x3c(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <pow@plt>
  mov    %eax,-0x38(%rbp)
  movl   $0x0,-0x40(%rbp)
  movq   $0x0,-0x28(%rbp)
  mov    $0x41,%edi
  call   <malloc@plt>
  mov    %rax,-0x20(%rbp)
  mov    -0x60(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x18(%rbp)
  mov    -0x60(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  movl   $0x0,-0x48(%rbp)
  jmp    L121
L82:
  cmpl   $0x0,-0x40(%rbp)
  jne    L37
  cmpl   $0x0,-0x48(%rbp)
  je     L22
  mov    -0x48(%rbp),%eax
  mov    %eax,%edi
  call   <log@plt>
  mov    %eax,%ebx
  mov    -0x3c(%rbp),%eax
  mov    %eax,%edi
  call   <log@plt>
  mov    %eax,%esi
  mov    %ebx,%eax
  cltd
  idiv   %esi
  mov    %eax,%edi
  call   <floor@plt>
  add    $0x1,%eax
  jmp    L48
L22:
  mov    $0x0,%eax
L48:
  mov    %eax,-0x34(%rbp)
  mov    -0x60(%rbp),%eax
  add    %eax,%eax
  sub    -0x34(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x30(%rbp)
  movl   $0x0,-0x4c(%rbp)
  jmp    L49
L63:
  mov    -0x4c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  addl   $0x1,-0x4c(%rbp)
L49:
  mov    -0x60(%rbp),%eax
  sub    -0x34(%rbp),%eax
  cmp    %eax,-0x4c(%rbp)
  jl     L63
  mov    -0x48(%rbp),%eax
  mov    %eax,-0x44(%rbp)
  jmp    L130
L149:
  mov    -0x44(%rbp),%eax
  cltd
  idivl  -0x3c(%rbp)
  mov    %edx,%eax
  movslq %eax,%rdx
  mov    -0x68(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x30(%rbp),%eax
  sub    -0x4c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  movzbl (%rcx),%eax
  mov    %al,(%rdx)
  mov    -0x44(%rbp),%eax
  cltd
  idivl  -0x3c(%rbp)
  mov    %eax,-0x44(%rbp)
  addl   $0x1,-0x4c(%rbp)
L130:
  cmpl   $0x0,-0x44(%rbp)
  je     L92
  mov    -0x4c(%rbp),%eax
  cmp    -0x60(%rbp),%eax
  jl     L149
L92:
  mov    -0x5c(%rbp),%edx
  mov    -0x34(%rbp),%eax
  cmp    %eax,%edx
  cmovl  %eax,%edx
  mov    -0x60(%rbp),%eax
  sub    %edx,%eax
  mov    %eax,-0x2c(%rbp)
  movl   $0x0,-0x4c(%rbp)
  jmp    L114
L72:
  mov    -0x60(%rbp),%eax
  sub    -0x4c(%rbp),%eax
  mov    -0x4c(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x18(%rbp),%rdx
  add    %rdx,%rcx
  mov    -0x20(%rbp),%rdx
  mov    %eax,%esi
  mov    %rcx,%rdi
  call   <sha256@plt>
  mov    %eax,%edx
  mov    -0x58(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L65
  mov    -0x60(%rbp),%eax
  sub    -0x4c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x28(%rbp)
  mov    -0x60(%rbp),%eax
  sub    -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x4c(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x18(%rbp),%rax
  add    %rax,%rcx
  mov    -0x28(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncpy@plt>
  mov    -0x60(%rbp),%eax
  sub    -0x4c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  movl   $0x1,-0x40(%rbp)
  jmp    L50
L65:
  addl   $0x1,-0x4c(%rbp)
L114:
  mov    -0x4c(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jle    L72
  jmp    L50
L37:
  nop
L50:
  addl   $0x1,-0x48(%rbp)
L121:
  mov    -0x48(%rbp),%eax
  cmp    -0x38(%rbp),%eax
  jl     L82
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x28(%rbp),%rax
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
char *reverse_sha256(const char *hash, int min_length, int max_length, const char *character_set) {
  int character_set_length = strlen(character_set), str_length;
  char *str_hash;
  char *str;
  int i, t, range;
  int64_t id, remainder;
  int64_t max_id = pow(character_set_length, max_length);
  int done = 0;
  char *result = NULL;
#pragma omp parallel private(id, i, t, range, remainder, str, str_hash)
  {
    str_hash = (char *)malloc(65 * sizeof(char));
    str = (char *)malloc((max_length + 1) * sizeof(char));
    str[max_length] = '\0';
#pragma omp for schedule(dynamic)
    for (id = 0; id < max_id; ++id) {
#pragma omp flush(done)
      if (done)
        continue;
      str_length = id == 0 ? 0 : (floor(log(id) / log(character_set_length)) + 1);
      t = 2 * max_length - str_length - 1;
      for (i = 0; i < max_length - str_length; ++i)
        str[i] = character_set[0];
      for (remainder = id; remainder && i < max_length; ++i) {
        str[t - i] = character_set[remainder % character_set_length];
        remainder /= character_set_length;
      }
      range = max_length - (str_length > min_length ? str_length : min_length);
      for (i = 0; i <= range; ++i) {
        if (strcmp(hash, sha256(str + i, max_length - i, str_hash)) == 0) {
          result = (char *)malloc((max_length - i + 1) * sizeof(char));
          strncpy(result, str + i, max_length - i);
          result[max_length - i] = '\0';
          done = 1;
          break;
        }
      }
    }
    free(str_hash);
    free(str);
  }
  return result;
}
```