user: What is the c source code of the assembly code below?

```asm
<do_test>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0xc(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <pthread_rwlock_init@plt>
  test   %rax,%rax
  je     L145
  lea    D75(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L130
L145:
  lea    D126(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0xc(%rbp),%rax
  mov    %rax,%rdi
  call   <pthread_rwlock_rdlock@plt>
  test   %rax,%rax
  je     L29
  lea    D61(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L130
L29:
  lea    D193(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0xc(%rbp),%rax
  mov    %rax,%rdi
  call   <pthread_rwlock_rdlock@plt>
  test   %rax,%rax
  je     L214
  lea    D224(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L130
L214:
  lea    D73(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0xc(%rbp),%rax
  mov    %rax,%rdi
  call   <pthread_rwlock_unlock@plt>
  test   %rax,%rax
  je     L194
  lea    D226(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L130
L194:
  lea    D87(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0xc(%rbp),%rax
  mov    %rax,%rdi
  call   <pthread_rwlock_unlock@plt>
  test   %rax,%rax
  je     L113
  lea    D121(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L130
L113:
  lea    D88(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0xc(%rbp),%rax
  mov    %rax,%rdi
  call   <pthread_rwlock_wrlock@plt>
  test   %rax,%rax
  je     L179
  lea    D160(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L130
L179:
  lea    D169(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0xc(%rbp),%rax
  mov    %rax,%rdi
  call   <pthread_rwlock_unlock@plt>
  test   %rax,%rax
  je     L20
  lea    D12(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L130
L20:
  lea    D77(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0xc(%rbp),%rax
  mov    %rax,%rdi
  call   <pthread_rwlock_wrlock@plt>
  test   %rax,%rax
  je     L127
  lea    D84(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L130
L127:
  lea    D230(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0xc(%rbp),%rax
  mov    %rax,%rdi
  call   <pthread_rwlock_unlock@plt>
  test   %rax,%rax
  je     L203
  lea    D198(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L130
L203:
  lea    D53(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0xc(%rbp),%rax
  mov    %rax,%rdi
  call   <pthread_rwlock_rdlock@plt>
  test   %rax,%rax
  je     L204
  lea    D216(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L130
L204:
  lea    D118(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0xc(%rbp),%rax
  mov    %rax,%rdi
  call   <pthread_rwlock_unlock@plt>
  test   %rax,%rax
  je     L83
  lea    D46(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L130
L83:
  lea    D148(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0xc(%rbp),%rax
  mov    %rax,%rdi
  call   <pthread_rwlock_destroy@plt>
  test   %rax,%rax
  je     L243
  lea    D41(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L130
L243:
  lea    D108(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%eax
L130:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L117
  call   <__stack_chk_fail@plt>
L117:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: label: D75
data_type: string
name: unpack_data
arguments: label: D126
data_type: string
name: unpack_data
arguments: label: D61
data_type: string
name: unpack_data
arguments: label: D193
data_type: string
name: unpack_data
arguments: label: D224
data_type: string
name: unpack_data
arguments: label: D73
data_type: string
name: unpack_data
arguments: label: D226
data_type: string
name: unpack_data
arguments: label: D87
data_type: string
name: unpack_data
arguments: label: D121
data_type: string
name: unpack_data
arguments: label: D88
data_type: string
name: unpack_data
arguments: label: D160
data_type: string
name: unpack_data
arguments: label: D169
data_type: string
name: unpack_data
arguments: label: D12
data_type: string
name: unpack_data
arguments: label: D77
data_type: string
name: unpack_data
arguments: label: D84
data_type: string
name: unpack_data
arguments: label: D230
data_type: string
name: unpack_data
arguments: label: D198
data_type: string
name: unpack_data
arguments: label: D53
data_type: string
name: unpack_data
arguments: label: D216
data_type: string
name: unpack_data
arguments: label: D118
data_type: string
name: unpack_data
arguments: label: D46
data_type: string
name: unpack_data
arguments: label: D148
data_type: string
name: unpack_data
arguments: label: D41
data_type: string
name: unpack_data
arguments: label: D108
data_type: string

tool: D75: rwlock_init failed

tool: D126: rwlock_init succeeded

tool: D61: 1st rwlock_rdlock failed

tool: D193: 1st rwlock_rdlock succeeded

tool: D224: 2nd rwlock_rdlock failed

tool: D73: 2nd rwlock_rdlock succeeded

tool: D226: 1st rwlock_unlock failed

tool: D87: 1st rwlock_unlock succeeded

tool: D121: 2nd rwlock_unlock failed

tool: D88: 2nd rwlock_unlock succeeded

tool: D160: 1st rwlock_wrlock failed

tool: D169: 1st rwlock_wrlock succeeded

tool: D12: 3rd rwlock_unlock failed

tool: D77: 3rd rwlock_unlock succeeded

tool: D84: 2nd rwlock_wrlock failed

tool: D230: 2nd rwlock_wrlock succeeded

tool: D198: 4th rwlock_unlock failed

tool: D53: 4th rwlock_unlock succeeded

tool: D216: 3rd rwlock_rdlock failed

tool: D118: 3rd rwlock_rdlock succeeded

tool: D46: 5th rwlock_unlock failed

tool: D148: 5th rwlock_unlock succeeded

tool: D41: rwlock_destroy failed

tool: D108: rwlock_destroy succeeded

assistant: ```c
int do_test(void) {
  pthread_rwlock_t r;
  if (pthread_rwlock_init(&r, NULL) != 0) {
    puts("rwlock_init failed");
    return 1;
  }
  puts("rwlock_init succeeded");
  if (pthread_rwlock_rdlock(&r) != 0) {
    puts("1st rwlock_rdlock failed");
    return 1;
  }
  puts("1st rwlock_rdlock succeeded");
  if (pthread_rwlock_rdlock(&r) != 0) {
    puts("2nd rwlock_rdlock failed");
    return 1;
  }
  puts("2nd rwlock_rdlock succeeded");
  if (pthread_rwlock_unlock(&r) != 0) {
    puts("1st rwlock_unlock failed");
    return 1;
  }
  puts("1st rwlock_unlock succeeded");
  if (pthread_rwlock_unlock(&r) != 0) {
    puts("2nd rwlock_unlock failed");
    return 1;
  }
  puts("2nd rwlock_unlock succeeded");
  if (pthread_rwlock_wrlock(&r) != 0) {
    puts("1st rwlock_wrlock failed");
    return 1;
  }
  puts("1st rwlock_wrlock succeeded");
  if (pthread_rwlock_unlock(&r) != 0) {
    puts("3rd rwlock_unlock failed");
    return 1;
  }
  puts("3rd rwlock_unlock succeeded");
  if (pthread_rwlock_wrlock(&r) != 0) {
    puts("2nd rwlock_wrlock failed");
    return 1;
  }
  puts("2nd rwlock_wrlock succeeded");
  if (pthread_rwlock_unlock(&r) != 0) {
    puts("4th rwlock_unlock failed");
    return 1;
  }
  puts("4th rwlock_unlock succeeded");
  if (pthread_rwlock_rdlock(&r) != 0) {
    puts("3rd rwlock_rdlock failed");
    return 1;
  }
  puts("3rd rwlock_rdlock succeeded");
  if (pthread_rwlock_unlock(&r) != 0) {
    puts("5th rwlock_unlock failed");
    return 1;
  }
  puts("5th rwlock_unlock succeeded");
  if (pthread_rwlock_destroy(&r) != 0) {
    puts("rwlock_destroy failed");
    return 1;
  }
  puts("rwlock_destroy succeeded");
  return 0;
}
```