user: 请将以下的汇编代码转换成C语言代码：

```asm
<getMemConfig>:
  endbr64
  push   %r14
  mov    %r8,%r14
  push   %r13
  mov    %rcx,%r13
  push   %r12
  mov    %edi,%r12d
  push   %rbp
  mov    %esi,%ebp
  mov    $0x10,%esi
  push   %rbx
  mov    %ebp,%edi
  mov    %rdx,%rbx
  call   <isset@plt>
  test   %rax,%rax
  je     L80
  mov    $0x80,%esi
  mov    %r12d,%edi
  call   <notset@plt>
  test   %rax,%rax
  jne    L93
L80:
  mov    $0x10,%esi
  mov    %ebp,%edi
  call   <isset@plt>
  test   %rax,%rax
  je     L23
  mov    $0x80,%esi
  mov    %r12d,%edi
  call   <isset@plt>
  test   %rax,%rax
  jne    L166
L23:
  mov    $0x10,%esi
  mov    %ebp,%edi
  call   <notset@plt>
  test   %rax,%rax
  je     L141
  mov    $0x80,%esi
  mov    %r12d,%edi
  call   <notset@plt>
  test   %rax,%rax
  jne    L190
L141:
  mov    $0x10,%esi
  mov    %ebp,%edi
  call   <isset@plt>
  test   %rax,%rax
  je     L186
  mov    $0x80,%esi
  mov    %r12d,%edi
  call   <isset@plt>
  test   %rax,%rax
  jne    L177
L186:
  mov    $0x10,%esi
  mov    %ebp,%edi
  call   <notset@plt>
  test   %rax,%rax
  jne    L151
L191:
  mov    $0x20,%ecx
  mov    $0x2,%edx
  mov    $0xff,%eax
L122:
  mov    %ecx,(%r14)
  mov    %edx,0x0(%r13)
  mov    %eax,(%rbx)
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L151:
  mov    $0x80,%esi
  mov    %r12d,%edi
  call   <notset@plt>
  test   %rax,%rax
  je     L191
  mov    $0x20,%esi
  mov    %r12d,%edi
  call   <isset@plt>
  test   %rax,%rax
  je     L191
  mov    $0x20,%ecx
  mov    $0x11,%edx
  mov    $0xff,%eax
  jmp    L122
  nopl   (%rax)
L93:
  mov    $0x20,%esi
  mov    %r12d,%edi
  call   <notset@plt>
  test   %rax,%rax
  je     L80
  mov    $0x2,%ecx
  mov    $0x2,%edx
  mov    $0x1f,%eax
  jmp    L122
  nop
L166:
  mov    $0x20,%esi
  mov    %r12d,%edi
  call   <notset@plt>
  test   %rax,%rax
  je     L23
  mov    $0x10,%ecx
  mov    $0x2,%edx
  mov    $0xff,%eax
  jmp    L122
  nopw   0x0(%rax,%rax,1)
L190:
  mov    $0x20,%esi
  mov    %r12d,%edi
  call   <notset@plt>
  test   %rax,%rax
  je     L141
  mov    $0x10,%ecx
  mov    $0x10,%edx
  mov    $0xff,%eax
  jmp    L122
  nopw   0x0(%rax,%rax,1)
L177:
  mov    $0x20,%esi
  mov    %r12d,%edi
  call   <isset@plt>
  test   %rax,%rax
  je     L186
  mov    $0x20,%ecx
  mov    $0x3,%edx
  mov    $0xff,%eax
  jmp    L122
```

assistant: ```c
void getMemConfig(uint8_t mem_cfg, uint8_t chip_cfg, uint8_t *max_blk, uint8_t *app_areas, uint8_t *kb) {
  if (isset(chip_cfg, 0x10) && notset(mem_cfg, 0x80) && notset(mem_cfg, 0x20)) {
    *kb = 2;
    *app_areas = 2;
    *max_blk = 31;
  } else if (isset(chip_cfg, 0x10) && isset(mem_cfg, 0x80) && notset(mem_cfg, 0x20)) {
    *kb = 16;
    *app_areas = 2;
    *max_blk = 255;
  } else if (notset(chip_cfg, 0x10) && notset(mem_cfg, 0x80) && notset(mem_cfg, 0x20)) {
    *kb = 16;
    *app_areas = 16;
    *max_blk = 255;
  } else if (isset(chip_cfg, 0x10) && isset(mem_cfg, 0x80) && isset(mem_cfg, 0x20)) {
    *kb = 32;
    *app_areas = 3;
    *max_blk = 255;
  } else if (notset(chip_cfg, 0x10) && notset(mem_cfg, 0x80) && isset(mem_cfg, 0x20)) {
    *kb = 32;
    *app_areas = 17;
    *max_blk = 255;
  } else {
    *kb = 32;
    *app_areas = 2;
    *max_blk = 255;
  }
}
```