user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<mutex_attr_show>:
  endbr64
  push   %r12
  mov    %rdi,%rsi
  push   %rbp
  mov    %rdi,%rbp
  lea    D38(%rip),%rdi
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%r12
  call   <printf@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <pthread_mutexattr_gettype@plt>
  test   %eax,%eax
  je     L7
  mov    %eax,%esi
  lea    D19(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L40:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <pthread_mutexattr_getprioceiling@plt>
  mov    %eax,%esi
  test   %eax,%eax
  je     L2
  lea    D74(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L22:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <pthread_mutexattr_getprotocol@plt>
  mov    %eax,%esi
  test   %eax,%eax
  je     L83
  lea    D66(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L71:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <pthread_mutexattr_getpshared@plt>
  mov    %eax,%esi
  test   %eax,%eax
  je     L16
  lea    D77(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L43:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L62
  add    $0x18,%rsp
  pop    %rbp
  pop    %r12
  ret
  cs nopw 0x0(%rax,%rax,1)
L7:
  mov    0x4(%rsp),%edi
  call   <mutex_type_str@plt>
  lea    D23(%rip),%rdi
  mov    %rax,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L40
  nop
L16:
  mov    0x4(%rsp),%edi
  call   <mutex_pshared_str@plt>
  lea    D3(%rip),%rdi
  mov    %rax,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L43
  nopl   0x0(%rax)
L83:
  mov    0x4(%rsp),%edi
  call   <mutex_protocol_str@plt>
  lea    D14(%rip),%rdi
  mov    %rax,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L71
  nop
L2:
  mov    0x4(%rsp),%esi
  lea    D47(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L22
L62:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D38
type: string
name: retrieve_data
arguments: data_label: D19
type: string
name: retrieve_data
arguments: data_label: D74
type: string
name: retrieve_data
arguments: data_label: D66
type: string
name: retrieve_data
arguments: data_label: D77
type: string
name: retrieve_data
arguments: data_label: D23
type: string
name: retrieve_data
arguments: data_label: D3
type: string
name: retrieve_data
arguments: data_label: D14
type: string
name: retrieve_data
arguments: data_label: D47
type: string

tool: D38: mutex attributes @ %10p:


tool: D19: ERROR %d returned from pthread_mutexattr_gettype


tool: D74: ERROR %d returned from pthread_mutexattr_getprioceiling


tool: D66: ERROR %d returned from pthread_mutexattr_getprotocol


tool: D77: ERROR %d returned from pthread_mutexattr_getpshared


tool: D23: type=%s


tool: D3: pshared=%s


tool: D14: protocol=%s


tool: D47: prio_ceiling=%d


assistant: ```c
void mutex_attr_show(const pthread_mutexattr_t *attr) {
  int rc;
  int val;
  printf("mutex attributes @ %10p:\n", attr);
  rc = pthread_mutexattr_gettype(attr, &val);
  if (rc != 0)
    printf("ERROR %d returned from pthread_mutexattr_gettype\n", rc);
  else
    printf("type=%s\n", mutex_type_str(val));
  rc = pthread_mutexattr_getprioceiling(attr, &val);
  if (rc != 0)
    printf("ERROR %d returned from pthread_mutexattr_getprioceiling\n", rc);
  else
    printf("prio_ceiling=%d\n", val);
  rc = pthread_mutexattr_getprotocol(attr, &val);
  if (rc != 0)
    printf("ERROR %d returned from pthread_mutexattr_getprotocol\n", rc);
  else
    printf("protocol=%s\n", mutex_protocol_str(val));
  rc = pthread_mutexattr_getpshared(attr, &val);
  if (rc != 0)
    printf("ERROR %d returned from pthread_mutexattr_getpshared\n", rc);
  else
    printf("pshared=%s\n", mutex_pshared_str(val));
}
```