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

```asm
<do_test>:
  endbr64
  push   %rbp
  xor    %esi,%esi
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%rbp
  mov    %rbp,%rdi
  call   <pthread_rwlock_init@plt>
  test   %rax,%rax
  jne    L179
  lea    D171(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rdi
  call   <pthread_rwlock_rdlock@plt>
  test   %rax,%rax
  jne    L34
  lea    D206(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rdi
  call   <pthread_rwlock_rdlock@plt>
  test   %rax,%rax
  jne    L76
  lea    D228(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rdi
  call   <pthread_rwlock_unlock@plt>
  test   %rax,%rax
  jne    L48
  lea    D72(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rdi
  call   <pthread_rwlock_unlock@plt>
  test   %rax,%rax
  jne    L28
  lea    D181(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rdi
  call   <pthread_rwlock_wrlock@plt>
  test   %rax,%rax
  jne    L177
  lea    D2(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rdi
  call   <pthread_rwlock_unlock@plt>
  test   %rax,%rax
  jne    L234
  lea    D33(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rdi
  call   <pthread_rwlock_wrlock@plt>
  test   %rax,%rax
  jne    L108
  lea    D130(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rdi
  call   <pthread_rwlock_unlock@plt>
  test   %rax,%rax
  jne    L226
  lea    D81(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rdi
  call   <pthread_rwlock_rdlock@plt>
  test   %rax,%rax
  jne    L21
  lea    D76(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rdi
  call   <pthread_rwlock_unlock@plt>
  test   %rax,%rax
  jne    L0
  lea    D223(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rdi
  call   <pthread_rwlock_destroy@plt>
  test   %rax,%rax
  jne    L23
  lea    D44(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  jmp    L14
L34:
  lea    D79(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
L14:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L222
  add    $0x10,%rsp
  pop    %rbp
  ret
  nopl   0x0(%rax,%rax,1)
L179:
  lea    D148(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L14
  nopl   0x0(%rax,%rax,1)
L48:
  lea    D110(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L14
  nopl   0x0(%rax,%rax,1)
L76:
  lea    D167(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L14
  nopl   0x0(%rax,%rax,1)
L28:
  lea    D152(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L14
  nopl   0x0(%rax,%rax,1)
L108:
  lea    D20(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L14
  cs nopw 0x0(%rax,%rax,1)
L177:
  lea    D6(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L14
  cs nopw 0x0(%rax,%rax,1)
L234:
  lea    D88(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L14
  cs nopw 0x0(%rax,%rax,1)
L226:
  lea    D24(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L14
L21:
  lea    D124(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L14
L0:
  lea    D179(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L14
L23:
  lea    D233(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L14
L222:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D171
type: string
name: read_data
arguments: data_tag: D206
type: string
name: read_data
arguments: data_tag: D228
type: string
name: read_data
arguments: data_tag: D72
type: string
name: read_data
arguments: data_tag: D181
type: string
name: read_data
arguments: data_tag: D2
type: string
name: read_data
arguments: data_tag: D33
type: string
name: read_data
arguments: data_tag: D130
type: string
name: read_data
arguments: data_tag: D81
type: string
name: read_data
arguments: data_tag: D76
type: string
name: read_data
arguments: data_tag: D223
type: string
name: read_data
arguments: data_tag: D44
type: string
name: read_data
arguments: data_tag: D79
type: string
name: read_data
arguments: data_tag: D148
type: string
name: read_data
arguments: data_tag: D110
type: string
name: read_data
arguments: data_tag: D167
type: string
name: read_data
arguments: data_tag: D152
type: string
name: read_data
arguments: data_tag: D20
type: string
name: read_data
arguments: data_tag: D6
type: string
name: read_data
arguments: data_tag: D88
type: string
name: read_data
arguments: data_tag: D24
type: string
name: read_data
arguments: data_tag: D124
type: string
name: read_data
arguments: data_tag: D179
type: string
name: read_data
arguments: data_tag: D233
type: string

tool: D171: rwlock_init succeeded

tool: D206: 1st rwlock_rdlock succeeded

tool: D228: 2nd rwlock_rdlock succeeded

tool: D72: 1st rwlock_unlock succeeded

tool: D181: 2nd rwlock_unlock succeeded

tool: D2: 1st rwlock_wrlock succeeded

tool: D33: 3rd rwlock_unlock succeeded

tool: D130: 2nd rwlock_wrlock succeeded

tool: D81: 4th rwlock_unlock succeeded

tool: D76: 3rd rwlock_rdlock succeeded

tool: D223: 5th rwlock_unlock succeeded

tool: D44: rwlock_destroy succeeded

tool: D79: 1st rwlock_rdlock failed

tool: D148: rwlock_init failed

tool: D110: 1st rwlock_unlock failed

tool: D167: 2nd rwlock_rdlock failed

tool: D152: 2nd rwlock_unlock failed

tool: D20: 2nd rwlock_wrlock failed

tool: D6: 1st rwlock_wrlock failed

tool: D88: 3rd rwlock_unlock failed

tool: D24: 4th rwlock_unlock failed

tool: D124: 3rd rwlock_rdlock failed

tool: D179: 5th rwlock_unlock failed

tool: D233: rwlock_destroy failed

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;
}
```