user: Please show me the C implementation that matches the assembly code listed below:

```asm
<cmdCfgAdslSetting>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  lea    D71(%rip),%rsi
  push   %rbx
  mov    %rbp,%rdi
  xor    %ebx,%ebx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%r12
  mov    %r12,%rdx
  call   <getArgValue@plt>
  mov    %r12,%rdx
  lea    D32(%rip),%rsi
  mov    %rbp,%rdi
  cmp    $0x1,%eax
  sete   %bl
  call   <getArgValue@plt>
  shl    $0x3,%ebx
  mov    %r12,%rdx
  mov    %rbp,%rdi
  mov    %eax,%r8d
  mov    %ebx,%eax
  lea    D79(%rip),%rsi
  or     $0x2,%eax
  cmp    $0x1,%r8d
  cmove  %eax,%ebx
  call   <getArgValue@plt>
  mov    %r12,%rdx
  lea    D86(%rip),%rsi
  mov    %rbp,%rdi
  mov    %eax,%r8d
  mov    %ebx,%eax
  or     $0x1,%eax
  cmp    $0x1,%r8d
  cmove  %eax,%ebx
  call   <getArgValue@plt>
  mov    %r12,%rdx
  lea    D58(%rip),%rsi
  mov    %rbp,%rdi
  mov    %eax,%r8d
  mov    %ebx,%eax
  or     $0x10,%eax
  cmp    $0x1,%r8d
  cmove  %eax,%ebx
  call   <getArgValue@plt>
  mov    %r12,%rdx
  lea    D0(%rip),%rsi
  mov    %rbp,%rdi
  mov    %eax,%r8d
  mov    %ebx,%eax
  or     $0x40,%eax
  cmp    $0x1,%r8d
  cmove  %eax,%ebx
  call   <getArgValue@plt>
  mov    %r12,%rdx
  lea    D43(%rip),%rsi
  mov    %rbp,%rdi
  mov    %eax,%r8d
  mov    %ebx,%eax
  or     $0x20,%eax
  cmp    $0x1,%r8d
  cmove  %eax,%ebx
  call   <getArgValue@plt>
  mov    %r12,%rdx
  lea    D81(%rip),%rsi
  mov    %rbp,%rdi
  mov    %eax,%r8d
  mov    %ebx,%eax
  or     $0x80,%al
  cmp    $0x1,%r8d
  cmove  %eax,%ebx
  call   <getArgValue@plt>
  lea    D97(%rip),%rsi
  mov    %rbp,%rdi
  mov    %r12,%rdx
  cmp    $0x1,%eax
  sete   %r13b
  call   <getArgValue@plt>
  movzwl %bx,%edi
  mov    %eax,%r8d
  mov    %r13d,%eax
  or     $0x2,%eax
  cmp    $0x1,%r8d
  cmove  %eax,%r13d
  movsbl %r13b,%esi
  call   <setAdslSettings@plt>
  cmp    $0xffffffff,%eax
  je     L8
L29:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L3
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L8:
  lea    D74(%rip),%rdi
  call   <printf@plt>
  jmp    L29
L3:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D71
type_infered: string
name: read_data
arguments: tag: D32
type_infered: string
name: read_data
arguments: tag: D79
type_infered: string
name: read_data
arguments: tag: D86
type_infered: string
name: read_data
arguments: tag: D58
type_infered: string
name: read_data
arguments: tag: D0
type_infered: string
name: read_data
arguments: tag: D43
type_infered: string
name: read_data
arguments: tag: D81
type_infered: string
name: read_data
arguments: tag: D97
type_infered: string
name: read_data
arguments: tag: D74
type_infered: string

tool: D71: g.lite

tool: D32: g.dmt

tool: D79: t1.413

tool: D86: adsl2

tool: D58: adsl2+

tool: D0: annexl

tool: D43: annexm

tool: D81: bitswap

tool: D97: sra

tool: D74: Set ADSL error!


assistant: ```c
void cmdCfgAdslSetting(int cmdType, struct cmd_arg *pCmdArg) {
  unsigned short mode = 0;
  char olr = 0;
  int intVal;
  if (getArgValue(pCmdArg, "g.lite", (void *)&intVal) == 1) {
    mode |= 0x0008;
  }
  if (getArgValue(pCmdArg, "g.dmt", (void *)&intVal) == 1) {
    mode |= 0x0002;
  }
  if (getArgValue(pCmdArg, "t1.413", (void *)&intVal) == 1) {
    mode |= 0x0001;
  }
  if (getArgValue(pCmdArg, "adsl2", (void *)&intVal) == 1) {
    mode |= 0x0010;
  }
  if (getArgValue(pCmdArg, "adsl2+", (void *)&intVal) == 1) {
    mode |= 0x0040;
  }
  if (getArgValue(pCmdArg, "annexl", (void *)&intVal) == 1) {
    mode |= 0x0020;
  }
  if (getArgValue(pCmdArg, "annexm", (void *)&intVal) == 1) {
    mode |= 0x0080;
  }
  if (getArgValue(pCmdArg, "bitswap", (void *)&intVal) == 1) {
    olr |= 1;
  }
  if (getArgValue(pCmdArg, "sra", (void *)&intVal) == 1) {
    olr |= 2;
  }
  if (setAdslSettings(mode, olr) == -1) {
    printf("Set ADSL error!\n");
  }
}
```