user: What would the C source look like for the assembly code provided here:

```asm
<do_test>:
  endbr64
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%rdi
  mov    $0x0,%esi
  call   <pthread_rwlock_init@plt>
  test   %rax,%rax
  jne    L120
  lea    D55(%rip),%rdi
  call   <puts@plt>
  lea    0x4(%rsp),%rdi
  call   <pthread_rwlock_rdlock@plt>
  test   %rax,%rax
  jne    L136
  lea    D155(%rip),%rdi
  call   <puts@plt>
  lea    0x4(%rsp),%rdi
  call   <pthread_rwlock_rdlock@plt>
  test   %rax,%rax
  jne    L109
  lea    D237(%rip),%rdi
  call   <puts@plt>
  lea    0x4(%rsp),%rdi
  call   <pthread_rwlock_unlock@plt>
  test   %rax,%rax
  jne    L111
  lea    D231(%rip),%rdi
  call   <puts@plt>
  lea    0x4(%rsp),%rdi
  call   <pthread_rwlock_unlock@plt>
  test   %rax,%rax
  jne    L130
  lea    D102(%rip),%rdi
  call   <puts@plt>
  lea    0x4(%rsp),%rdi
  call   <pthread_rwlock_wrlock@plt>
  test   %rax,%rax
  jne    L74
  lea    D2(%rip),%rdi
  call   <puts@plt>
  lea    0x4(%rsp),%rdi
  call   <pthread_rwlock_unlock@plt>
  test   %rax,%rax
  jne    L232
  lea    D93(%rip),%rdi
  call   <puts@plt>
  lea    0x4(%rsp),%rdi
  call   <pthread_rwlock_wrlock@plt>
  test   %rax,%rax
  jne    L159
  lea    D84(%rip),%rdi
  call   <puts@plt>
  lea    0x4(%rsp),%rdi
  call   <pthread_rwlock_unlock@plt>
  test   %rax,%rax
  jne    L65
  lea    D135(%rip),%rdi
  call   <puts@plt>
  lea    0x4(%rsp),%rdi
  call   <pthread_rwlock_rdlock@plt>
  test   %rax,%rax
  jne    L38
  lea    D224(%rip),%rdi
  call   <puts@plt>
  lea    0x4(%rsp),%rdi
  call   <pthread_rwlock_unlock@plt>
  test   %rax,%rax
  jne    L68
  lea    D160(%rip),%rdi
  call   <puts@plt>
  lea    0x4(%rsp),%rdi
  call   <pthread_rwlock_destroy@plt>
  test   %rax,%rax
  jne    L203
  lea    D111(%rip),%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  jmp    L72
L120:
  lea    D27(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
L72:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L83
  add    $0x18,%rsp
  ret
L136:
  lea    D72(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L72
L109:
  lea    D189(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L72
L111:
  lea    D63(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L72
L130:
  lea    D202(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L72
L74:
  lea    D48(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L72
L232:
  lea    D43(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L72
L159:
  lea    D16(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L72
L65:
  lea    D143(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L72
L38:
  lea    D82(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L72
L68:
  lea    D187(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L72
L203:
  lea    D113(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L72
L83:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D55
type_infered: string
name: extract_symbolic_data
arguments: tag: D155
type_infered: string
name: extract_symbolic_data
arguments: tag: D237
type_infered: string
name: extract_symbolic_data
arguments: tag: D231
type_infered: string
name: extract_symbolic_data
arguments: tag: D102
type_infered: string
name: extract_symbolic_data
arguments: tag: D2
type_infered: string
name: extract_symbolic_data
arguments: tag: D93
type_infered: string
name: extract_symbolic_data
arguments: tag: D84
type_infered: string
name: extract_symbolic_data
arguments: tag: D135
type_infered: string
name: extract_symbolic_data
arguments: tag: D224
type_infered: string
name: extract_symbolic_data
arguments: tag: D160
type_infered: string
name: extract_symbolic_data
arguments: tag: D111
type_infered: string
name: extract_symbolic_data
arguments: tag: D27
type_infered: string
name: extract_symbolic_data
arguments: tag: D72
type_infered: string
name: extract_symbolic_data
arguments: tag: D189
type_infered: string
name: extract_symbolic_data
arguments: tag: D63
type_infered: string
name: extract_symbolic_data
arguments: tag: D202
type_infered: string
name: extract_symbolic_data
arguments: tag: D48
type_infered: string
name: extract_symbolic_data
arguments: tag: D43
type_infered: string
name: extract_symbolic_data
arguments: tag: D16
type_infered: string
name: extract_symbolic_data
arguments: tag: D143
type_infered: string
name: extract_symbolic_data
arguments: tag: D82
type_infered: string
name: extract_symbolic_data
arguments: tag: D187
type_infered: string
name: extract_symbolic_data
arguments: tag: D113
type_infered: string

tool: D55: rwlock_init succeeded

tool: D155: 1st rwlock_rdlock succeeded

tool: D237: 2nd rwlock_rdlock succeeded

tool: D231: 1st rwlock_unlock succeeded

tool: D102: 2nd rwlock_unlock succeeded

tool: D2: 1st rwlock_wrlock succeeded

tool: D93: 3rd rwlock_unlock succeeded

tool: D84: 2nd rwlock_wrlock succeeded

tool: D135: 4th rwlock_unlock succeeded

tool: D224: 3rd rwlock_rdlock succeeded

tool: D160: 5th rwlock_unlock succeeded

tool: D111: rwlock_destroy succeeded

tool: D27: rwlock_init failed

tool: D72: 1st rwlock_rdlock failed

tool: D189: 2nd rwlock_rdlock failed

tool: D63: 1st rwlock_unlock failed

tool: D202: 2nd rwlock_unlock failed

tool: D48: 1st rwlock_wrlock failed

tool: D43: 3rd rwlock_unlock failed

tool: D16: 2nd rwlock_wrlock failed

tool: D143: 4th rwlock_unlock failed

tool: D82: 3rd rwlock_rdlock failed

tool: D187: 5th rwlock_unlock failed

tool: D113: 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;
}
```