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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  movl   $0x100,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x10(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L3
L115:
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    -0x18(%rbp),%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x18(%rbp)
L3:
  mov    -0x18(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jl     L115
  mov    -0x14(%rbp),%edx
  mov    -0x10(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <acc_copyin@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x10(%rbp),%rax
  mov    $0x1,%esi
  mov    %rax,%rdi
  call   <acc_is_present@plt>
  cmp    $0x1,%eax
  je     L48
  mov    $0x0,%eax
  call   <abort@plt>
L48:
  mov    -0x14(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    $0x1,%esi
  mov    %rax,%rdi
  call   <acc_is_present@plt>
  cmp    $0x1,%eax
  je     L80
  mov    $0x0,%eax
  call   <abort@plt>
L80:
  mov    -0x10(%rbp),%rax
  sub    $0x1,%rax
  mov    $0x1,%esi
  mov    %rax,%rdi
  call   <acc_is_present@plt>
  test   %eax,%eax
  je     L125
  mov    $0x0,%eax
  call   <abort@plt>
L125:
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    $0x1,%esi
  mov    %rax,%rdi
  call   <acc_is_present@plt>
  test   %eax,%eax
  je     L67
  mov    $0x0,%eax
  call   <abort@plt>
L67:
  movl   $0x0,-0x18(%rbp)
  jmp    L130
L109:
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    $0x1,%esi
  mov    %rax,%rdi
  call   <acc_is_present@plt>
  cmp    $0x1,%eax
  je     L107
  mov    $0x0,%eax
  call   <abort@plt>
L107:
  addl   $0x1,-0x18(%rbp)
L130:
  mov    -0x18(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jl     L109
  movl   $0x0,-0x18(%rbp)
  jmp    L106
L101:
  mov    -0x14(%rbp),%eax
  sub    -0x18(%rbp),%eax
  mov    -0x18(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x10(%rbp),%rdx
  add    %rcx,%rdx
  mov    %eax,%esi
  mov    %rdx,%rdi
  call   <acc_is_present@plt>
  cmp    $0x1,%eax
  je     L49
  mov    $0x0,%eax
  call   <abort@plt>
L49:
  addl   $0x1,-0x18(%rbp)
L106:
  mov    -0x18(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jl     L101
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <acc_free@plt>
  movl   $0x0,-0x18(%rbp)
  jmp    L38
L120:
  mov    -0x14(%rbp),%eax
  sub    -0x18(%rbp),%eax
  mov    -0x18(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x10(%rbp),%rdx
  add    %rcx,%rdx
  mov    %eax,%esi
  mov    %rdx,%rdi
  call   <acc_is_present@plt>
  test   %eax,%eax
  je     L140
  mov    $0x0,%eax
  call   <abort@plt>
L140:
  addl   $0x1,-0x18(%rbp)
L38:
  mov    -0x18(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jl     L120
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0x0,%eax
  leave
  ret
```

assistant: ```c
int main(int argc, char **argv) {
  const int N = 256;
  int i;
  unsigned char *h;
  void *d;
  h = (unsigned char *)malloc(N);
  for (i = 0; i < N; i++) {
    h[i] = i;
  }
  d = acc_copyin(h, N);
  if (acc_is_present(h, 1) != 1)
    abort();
  if (acc_is_present(h + N - 1, 1) != 1)
    abort();
  if (acc_is_present(h - 1, 1) != 0)
    abort();
  if (acc_is_present(h + N, 1) != 0)
    abort();
  for (i = 0; i < N; i++) {
    if (acc_is_present(h + i, 1) != 1)
      abort();
  }
  for (i = 0; i < N; i++) {
    if (acc_is_present(h + i, N - i) != 1)
      abort();
  }
  acc_free(d);
  for (i = 0; i < N; i++) {
    if (acc_is_present(h + i, N - i) != 0)
      abort();
  }
  free(h);
  return 0;
}
```