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

```asm
<set_operation_mode>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    %edx,-0x1c(%rbp)
  movl   $0x0,-0x4(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  jne    L183
  lea    D24(%rip),%rcx
  jmp    L72
L183:
  lea    D27(%rip),%rcx
L72:
  cmpl   $0x0,-0x18(%rbp)
  jne    L164
  lea    D24(%rip),%rdx
  jmp    L78
L164:
  lea    D27(%rip),%rdx
L78:
  cmpl   $0x0,-0x14(%rbp)
  jne    L201
  lea    D135(%rip),%rax
  jmp    L50
L201:
  lea    D84(%rip),%rax
L50:
  mov    %rcx,%r8
  mov    %rdx,%rcx
  mov    %rax,%rdx
  lea    D50(%rip),%rax
  mov    %rax,%rsi
  lea    D99(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmpl   $0x0,-0x1c(%rbp)
  je     L10
  cmpl   $0x1,-0x1c(%rbp)
  je     L10
  lea    D50(%rip),%rax
  mov    %rax,%rdx
  mov    $0x131,%esi
  lea    D100(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L10:
  cmpl   $0x0,-0x18(%rbp)
  je     L100
  cmpl   $0x1,-0x18(%rbp)
  je     L100
  lea    D50(%rip),%rax
  mov    %rax,%rdx
  mov    $0x132,%esi
  lea    D100(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L100:
  mov    -0x1c(%rbp),%edx
  mov    -0x14(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <wait_for_bridge_setup@plt>
  mov    -0x18(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jne    L147
  cmpl   $0x0,-0x1c(%rbp)
  jne    L147
  lea    D116(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <nvram_safe_get@plt>
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <atoi@plt>
  mov    %eax,-0x4(%rbp)
  movl   $0x0,-0x8(%rbp)
  jmp    L5
L193:
  mov    -0x8(%rbp),%edx
  mov    -0x14(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <set_ap_security@plt>
  addl   $0x1,-0x8(%rbp)
L5:
  mov    -0x8(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jl     L193
  mov    $0x0,%eax
  jmp    L89
L147:
  cmpl   $0x0,-0x1c(%rbp)
  je     L91
  cmpl   $0x1,-0x1c(%rbp)
  je     L23
  jmp    L11
L91:
  mov    -0x1c(%rbp),%edx
  mov    -0x14(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <set_opmode_ap@plt>
  jmp    L145
L23:
  mov    -0x1c(%rbp),%edx
  mov    -0x14(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <set_opmode_sta@plt>
  jmp    L145
L11:
  lea    D42(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0xffffffff,%eax
  jmp    L89
L145:
  mov    $0x0,%eax
L89:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D24
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D27
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D135
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D84
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D50
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D99
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D100
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D116
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D42
type_guessed: string

tool: D24: WLAN_MODE_AP

tool: D27: WLAN_MODE_STA

tool: D135: RADIO_2G

tool: D84: RADIO_5G

tool: D50: set_operation_mode

tool: D99: %s(%s, %s, %s)


tool: D100: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/liutianpingyanxiaoyu/cpe/refs/heads/master/package/liteon-apps/wlan-middleware/src/mid_func.c:%u:%s: Error:Such wlan mode is not supported currently


tool: D116: wlv_rule_max

tool: D42: Error:Such wlan mode is not supported current, please check it

assistant: ```c
int set_operation_mode(int radio, int mode_prev, int mode_curr) {
  int ssid_num = 0;
  int i;
  printf("%s(%s, %s, %s)\r\n", __FUNCTION__, radio == 0 ? "RADIO_2G" : "RADIO_5G", mode_prev == 0 ? "WLAN_MODE_AP" : "WLAN_MODE_STA", mode_curr == 0 ? "WLAN_MODE_AP" : "WLAN_MODE_STA");
  do {
    if (!((0 == mode_curr) || (1 == mode_curr)))
      printf("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/liutianpingyanxiaoyu/cpe/refs/heads/master/package/liteon-apps/wlan-middleware/src/mid_func.c"
             ":%u:%s: "
             "Error:Such wlan mode is not supported currently"
             "\n",
             305, __FUNCTION__);
  } while (0);
  do {
    if (!((0 == mode_prev) || (1 == mode_prev)))
      printf("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/liutianpingyanxiaoyu/cpe/refs/heads/master/package/liteon-apps/wlan-middleware/src/mid_func.c"
             ":%u:%s: "
             "Error:Such wlan mode is not supported currently"
             "\n",
             306, __FUNCTION__);
  } while (0);
  wait_for_bridge_setup(radio, mode_curr);
  if ((mode_prev == mode_curr) && (mode_curr == 0)) {
    ssid_num = atoi(nvram_safe_get("wlv_rule_max"));
    for (i = 0; i < ssid_num; i++) {
      set_ap_security(radio, i);
    }
    return 0;
  }
  switch (mode_curr) {
  case 0:
    set_opmode_ap(radio, mode_curr);
    break;
  case 1:
    set_opmode_sta(radio, mode_curr);
    break;
  default:
    printf("Error:Such wlan mode is not supported current, please check it\n");
    return -1;
  }
  return 0;
}
```