user: 请将以下的汇编代码转换成C语言代码：

```asm
<Eratosthenes>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %edi,-0x34(%rbp)
  mov    -0x34(%rbp),%eax
  lea    0x7(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x3,%eax
  add    $0x1,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x24(%rbp),%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x20(%rbp)
  mov    -0x24(%rbp),%edx
  mov    -0x20(%rbp),%rax
  mov    $0xff,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  movl   $0x2,-0x2c(%rbp)
  movl   $0x0,-0x28(%rbp)
  jmp    L46
L58:
  mov    -0x2c(%rbp),%eax
  mov    %eax,%edi
  call   <posInBlock@plt>
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%ebx
  mov    -0x2c(%rbp),%eax
  mov    %eax,%edi
  call   <posInByte@plt>
  movzbl %al,%eax
  mov    %eax,%ecx
  shl    %cl,%ebx
  mov    %ebx,%eax
  and    $0x80,%eax
  cmp    $0x80,%eax
  jne    L12
  mov    -0x2c(%rbp),%eax
  imul   %eax,%eax
  mov    %eax,-0x28(%rbp)
  jmp    L59
L60:
  mov    -0x28(%rbp),%eax
  mov    %eax,%edi
  call   <posInBlock@plt>
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  mov    %eax,%ebx
  mov    -0x28(%rbp),%eax
  mov    %eax,%edi
  call   <posInByte@plt>
  movzbl %al,%eax
  mov    $0x80,%edx
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    %edx,%eax
  not    %eax
  and    %ebx,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0x2c(%rbp),%eax
  add    %eax,-0x28(%rbp)
L59:
  mov    -0x28(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L60
L12:
  addl   $0x1,-0x2c(%rbp)
L46:
  mov    -0x2c(%rbp),%eax
  imul   %eax,%eax
  cmp    %eax,-0x34(%rbp)
  jge    L58
  movl   $0x2,-0x2c(%rbp)
  jmp    L61
L10:
  mov    -0x2c(%rbp),%eax
  mov    %eax,%edi
  call   <posInBlock@plt>
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%ebx
  mov    -0x2c(%rbp),%eax
  mov    %eax,%edi
  call   <posInByte@plt>
  movzbl %al,%eax
  mov    %eax,%ecx
  shl    %cl,%ebx
  mov    %ebx,%eax
  and    $0x80,%eax
  cmp    $0x80,%eax
  jne    L66
  mov    -0x2c(%rbp),%eax
  mov    %eax,%edi
  call   <printWord@plt>
L66:
  addl   $0x1,-0x2c(%rbp)
L61:
  mov    -0x2c(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jle    L10
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  nop
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
void Eratosthenes(int maxval) {
  int array_size = (maxval / 8) + 1;
  unsigned char *temp_array = malloc(array_size);
  memset(temp_array, 0xff, array_size);
  int i = 2;
  int j = 0;
  unsigned char *byte_prt;
  for (; (i * i) <= maxval; i++) {
    byte_prt = temp_array + posInBlock(i);
    if (((byte_prt[0] << posInByte(i)) & 0x80) == 0x80) {
      j = i * i;
      for (; j <= maxval; j = j + i) {
        byte_prt = temp_array + posInBlock(j);
        byte_prt[0] = byte_prt[0] & (~(0x80 >> posInByte(j)));
      }
    }
  }
  for (i = 2; i <= maxval; i++) {
    byte_prt = temp_array + posInBlock(i);
    if (((byte_prt[0] << posInByte(i)) & 0x80) == 0x80) {
      printWord(i);
    }
  }
  free(temp_array);
}
```