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

```asm
<UI_Update>:
  endbr64
  push   %r13
  xor    %eax,%eax
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x8,%rsp
  call   <trap_Cvar_VariableValue@plt>
  lea    D298(%rip),%rsi
  mov    %rbp,%rdi
  mov    %eax,%ebx
  xor    %eax,%eax
  call   <Q_stricmp@plt>
  test   %eax,%eax
  jne    L159
  lea    D569(%rip),%rdi
  call   <UI_Cvar_VariableString@plt>
  lea    D572(%rip),%rdi
  mov    %eax,%esi
L255:
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    1090 <trap_Cvar_Set@plt>
  nopl   (%rax)
L159:
  xor    %eax,%eax
  lea    D102(%rip),%rsi
  mov    %rbp,%rdi
  call   <Q_stricmp@plt>
  test   %eax,%eax
  jne    L73
  lea    D374(%rip),%rdi
  call   <trap_Cvar_VariableValue@plt>
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  comiss D277(%rip),%xmm0
  jae    L80
  xor    %eax,%eax
  comiss D356(%rip),%xmm0
  lea    D599(%rip),%rsi
  lea    D717(%rip),%rdi
  jb     L170
  call   <trap_Cvar_Set@plt>
  lea    D287(%rip),%rsi
L223:
  lea    D733(%rip),%rdi
L222:
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    1090 <trap_Cvar_Set@plt>
  nop
L73:
  xor    %eax,%eax
  lea    D824(%rip),%rsi
  mov    %rbp,%rdi
  call   <Q_stricmp@plt>
  test   %eax,%eax
  je     L122
  lea    D349(%rip),%r12
  xor    %eax,%eax
  mov    %rbp,%rdi
  mov    %r12,%rsi
  call   <Q_stricmp@plt>
  test   %eax,%eax
  jne    L266
  cmp    $0x10,%ebx
  je     L35
  cmp    $0x20,%ebx
  je     L102
  test   %ebx,%ebx
  je     L148
L22:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  cs nopw 0x0(%rax,%rax,1)
L122:
  lea    D572(%rip),%rdi
  call   <UI_Cvar_VariableString@plt>
  lea    D569(%rip),%rdi
  mov    %eax,%esi
  jmp    L255
  nopw   0x0(%rax,%rax,1)
L80:
  lea    D534(%rip),%rsi
  lea    D717(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_Set@plt>
  lea    D806(%rip),%rsi
  jmp    L223
  nopl   0x0(%rax)
L170:
  call   <trap_Cvar_Set@plt>
  lea    D806(%rip),%rsi
  jmp    L223
  nopl   0x0(%rax)
L266:
  lea    D576(%rip),%r13
  xor    %eax,%eax
  mov    %rbp,%rdi
  mov    %r13,%rsi
  call   <Q_stricmp@plt>
  test   %eax,%eax
  jne    L39
  cmp    $0x1,%ebx
  je     L275
  cmp    $0x2,%ebx
  je     L288
  mov    $0x4,%esi
  lea    D617(%rip),%rdi
  test   %ebx,%ebx
  jne    L22
L262:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    10b0 <trap_Cvar_SetValue@plt>
  nopl   0x0(%rax)
L148:
  xor    %esi,%esi
  lea    D473(%rip),%rdi
  call   <trap_Cvar_SetValue@plt>
  xor    %esi,%esi
  lea    D40(%rip),%rdi
  xor    %eax,%eax
  jmp    L262
  nopl   0x0(%rax,%rax,1)
L102:
  mov    $0x18,%esi
  lea    D473(%rip),%rdi
  xor    %eax,%eax
  jmp    L262
  nopl   0x0(%rax,%rax,1)
L35:
  mov    $0x10,%esi
  lea    D473(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  xor    %esi,%esi
  lea    D40(%rip),%rdi
  xor    %eax,%eax
  jmp    L262
L39:
  xor    %eax,%eax
  lea    D644(%rip),%rsi
  mov    %rbp,%rdi
  call   <Q_stricmp@plt>
  test   %eax,%eax
  jne    L247
  cmp    $0x2,%ebx
  je     L309
  jg     L123
  test   %ebx,%ebx
  je     L163
  cmp    $0x1,%ebx
  jne    L22
  mov    $0x1,%esi
  lea    D794(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  mov    $0xc,%esi
  lea    D617(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  xor    %esi,%esi
  lea    D255(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  xor    %esi,%esi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  xor    %esi,%esi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  mov    $0x18,%esi
  lea    D473(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  xor    %esi,%esi
  lea    D173(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  mov    $0x3,%esi
  lea    D558(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  xor    %esi,%esi
  lea    D54(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  xor    %esi,%esi
  lea    D474(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  mov    $0x1,%esi
  lea    D254(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  mov    $0x9c4,%esi
  lea    D387(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  lea    D30(%rip),%rsi
  lea    D561(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_Set@plt>
  xor    %esi,%esi
  lea    D771(%rip),%rdi
  xor    %eax,%eax
  jmp    L262
L123:
  cmp    $0x3,%ebx
  jne    L22
  mov    $0x1,%esi
  lea    D794(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  mov    $0x14,%esi
  lea    D617(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  mov    $0x1,%esi
  lea    D255(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  mov    $0x2,%esi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  mov    $0x10,%esi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  mov    $0x10,%esi
  lea    D473(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  mov    $0x3,%esi
  lea    D558(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  mov    $0x2,%esi
  lea    D173(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  mov    $0x10,%esi
  lea    D54(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  xor    %esi,%esi
  lea    D771(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  xor    %esi,%esi
  lea    D387(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  mov    $0x1,%esi
  lea    D474(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  xor    %esi,%esi
  lea    D254(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  lea    D508(%rip),%rsi
  lea    D561(%rip),%rdi
  jmp    L222
L288:
  mov    $0x14,%esi
  lea    D617(%rip),%rdi
  xor    %eax,%eax
  jmp    L262
L275:
  mov    $0xc,%esi
  lea    D617(%rip),%rdi
  xor    %eax,%eax
  jmp    L262
L247:
  xor    %eax,%eax
  lea    D460(%rip),%rsi
  mov    %rbp,%rdi
  call   <Q_stricmp@plt>
  test   %eax,%eax
  jne    L22
  movsd  D182(%rip),%xmm0
  test   %ebx,%ebx
  je     L119
  movsd  D45(%rip),%xmm0
L119:
  add    $0x8,%rsp
  lea    D59(%rip),%rdi
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  jmp    10b0 <trap_Cvar_SetValue@plt>
L309:
  mov    $0x1,%esi
  lea    D794(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  mov    $0x8,%esi
  lea    D617(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  xor    %esi,%esi
  lea    D255(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  mov    $0x1,%esi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  xor    %esi,%esi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  xor    %esi,%esi
  lea    D473(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  mov    $0x1,%esi
  lea    D173(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  mov    $0x3,%esi
  lea    D558(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  xor    %esi,%esi
  lea    D54(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  xor    %esi,%esi
  lea    D771(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  mov    $0x1,%esi
  lea    D474(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  xor    %esi,%esi
  lea    D254(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  xor    %esi,%esi
  lea    D387(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  lea    D508(%rip),%rsi
  lea    D561(%rip),%rdi
  jmp    L222
L163:
  mov    $0x1,%esi
  lea    D794(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  mov    $0x4,%esi
  lea    D617(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  xor    %esi,%esi
  lea    D255(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  xor    %esi,%esi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  mov    $0x20,%esi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  mov    $0x18,%esi
  lea    D473(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  xor    %esi,%esi
  lea    D173(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  mov    $0x4,%esi
  lea    D558(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  mov    $0x20,%esi
  lea    D54(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  xor    %esi,%esi
  lea    D474(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  mov    $0x1,%esi
  lea    D254(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  mov    $0x1,%esi
  lea    D771(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  mov    $0x9c4,%esi
  lea    D387(%rip),%rdi
  xor    %eax,%eax
  call   <trap_Cvar_SetValue@plt>
  lea    D30(%rip),%rsi
  lea    D561(%rip),%rdi
  jmp    L222
```

tool_calls: name: unpack_data
arguments: data_tag: D298
data_type: string
name: unpack_data
arguments: data_tag: D569
data_type: string
name: unpack_data
arguments: data_tag: D572
data_type: string
name: unpack_data
arguments: data_tag: D102
data_type: string
name: unpack_data
arguments: data_tag: D374
data_type: string
name: unpack_data
arguments: data_tag: D277
data_type: byte[4]
name: unpack_data
arguments: data_tag: D356
data_type: byte[4]
name: unpack_data
arguments: data_tag: D599
data_type: string
name: unpack_data
arguments: data_tag: D717
data_type: string
name: unpack_data
arguments: data_tag: D287
data_type: string
name: unpack_data
arguments: data_tag: D733
data_type: string
name: unpack_data
arguments: data_tag: D824
data_type: string
name: unpack_data
arguments: data_tag: D349
data_type: string
name: unpack_data
arguments: data_tag: D534
data_type: string
name: unpack_data
arguments: data_tag: D806
data_type: string
name: unpack_data
arguments: data_tag: D576
data_type: string
name: unpack_data
arguments: data_tag: D617
data_type: string
name: unpack_data
arguments: data_tag: D473
data_type: string
name: unpack_data
arguments: data_tag: D40
data_type: string
name: unpack_data
arguments: data_tag: D644
data_type: string
name: unpack_data
arguments: data_tag: D794
data_type: string
name: unpack_data
arguments: data_tag: D255
data_type: string
name: unpack_data
arguments: data_tag: D173
data_type: string
name: unpack_data
arguments: data_tag: D558
data_type: string
name: unpack_data
arguments: data_tag: D54
data_type: string
name: unpack_data
arguments: data_tag: D474
data_type: string
name: unpack_data
arguments: data_tag: D254
data_type: string
name: unpack_data
arguments: data_tag: D387
data_type: string
name: unpack_data
arguments: data_tag: D30
data_type: string
name: unpack_data
arguments: data_tag: D561
data_type: string
name: unpack_data
arguments: data_tag: D771
data_type: string
name: unpack_data
arguments: data_tag: D508
data_type: string
name: unpack_data
arguments: data_tag: D460
data_type: string
name: unpack_data
arguments: data_tag: D182
data_type: byte[8]
name: unpack_data
arguments: data_tag: D45
data_type: byte[8]
name: unpack_data
arguments: data_tag: D59
data_type: string

tool: D298: ui_SetName

tool: D569: ui_Name

tool: D572: name

tool: D102: ui_setRate

tool: D374: rate

tool: {"D277": [0x00,0x40,0x9c,0x45]}

tool: {"D356": [0x00,0x00,0x7a,0x45]}

tool: D599: 15

tool: D717: cl_maxpackets

tool: D287: 2

tool: D733: cl_packetdup

tool: D824: ui_GetName

tool: D349: r_colorbits

tool: D534: 30

tool: D806: 1

tool: D576: r_lodbias

tool: D617: r_subdivisions

tool: D473: r_depthbits

tool: D40: r_stencilbits

tool: D644: ui_glCustom

tool: D794: r_fullScreen

tool: D255: r_vertexlight

tool: D173: r_picmip

tool: D558: r_mode

tool: D54: r_texturebits

tool: D474: r_fastSky

tool: D254: r_inGameVideo

tool: D387: cg_brassTime

tool: D30: GL_LINEAR_MIPMAP_LINEAR

tool: D561: r_texturemode

tool: D771: cg_shadows

tool: D508: GL_LINEAR_MIPMAP_NEAREST

tool: D460: ui_mousePitch

tool: {"D182": [0x00,0x00,0x00,0x00,0x2b,0x87,0x96,0x3f]}

tool: {"D45": [0x00,0x00,0x00,0x00,0x2b,0x87,0x96,0xbf]}

tool: D59: m_pitch

assistant: ```c
void UI_Update(const char *name) {
  int val = trap_Cvar_VariableValue(name);
  if (Q_stricmp(name, "ui_SetName") == 0) {
    trap_Cvar_Set("name", UI_Cvar_VariableString("ui_Name"));
  } else if (Q_stricmp(name, "ui_setRate") == 0) {
    float rate = trap_Cvar_VariableValue("rate");
    if (rate >= 5000) {
      trap_Cvar_Set("cl_maxpackets", "30");
      trap_Cvar_Set("cl_packetdup", "1");
    } else if (rate >= 4000) {
      trap_Cvar_Set("cl_maxpackets", "15");
      trap_Cvar_Set("cl_packetdup", "2");
    } else {
      trap_Cvar_Set("cl_maxpackets", "15");
      trap_Cvar_Set("cl_packetdup", "1");
    }
  } else if (Q_stricmp(name, "ui_GetName") == 0) {
    trap_Cvar_Set("ui_Name", UI_Cvar_VariableString("name"));
  } else if (Q_stricmp(name, "r_colorbits") == 0) {
    switch (val) {
    case 0:
      trap_Cvar_SetValue("r_depthbits", 0);
      trap_Cvar_SetValue("r_stencilbits", 0);
      break;
    case 16:
      trap_Cvar_SetValue("r_depthbits", 16);
      trap_Cvar_SetValue("r_stencilbits", 0);
      break;
    case 32:
      trap_Cvar_SetValue("r_depthbits", 24);
      break;
    }
  } else if (Q_stricmp(name, "r_lodbias") == 0) {
    switch (val) {
    case 0:
      trap_Cvar_SetValue("r_subdivisions", 4);
      break;
    case 1:
      trap_Cvar_SetValue("r_subdivisions", 12);
      break;
    case 2:
      trap_Cvar_SetValue("r_subdivisions", 20);
      break;
    }
  } else if (Q_stricmp(name, "ui_glCustom") == 0) {
    switch (val) {
    case 0:
      trap_Cvar_SetValue("r_fullScreen", 1);
      trap_Cvar_SetValue("r_subdivisions", 4);
      trap_Cvar_SetValue("r_vertexlight", 0);
      trap_Cvar_SetValue("r_lodbias", 0);
      trap_Cvar_SetValue("r_colorbits", 32);
      trap_Cvar_SetValue("r_depthbits", 24);
      trap_Cvar_SetValue("r_picmip", 0);
      trap_Cvar_SetValue("r_mode", 4);
      trap_Cvar_SetValue("r_texturebits", 32);
      trap_Cvar_SetValue("r_fastSky", 0);
      trap_Cvar_SetValue("r_inGameVideo", 1);
      trap_Cvar_SetValue("cg_shadows", 1);
      trap_Cvar_SetValue("cg_brassTime", 2500);
      trap_Cvar_Set("r_texturemode", "GL_LINEAR_MIPMAP_LINEAR");
      break;
    case 1:
      trap_Cvar_SetValue("r_fullScreen", 1);
      trap_Cvar_SetValue("r_subdivisions", 12);
      trap_Cvar_SetValue("r_vertexlight", 0);
      trap_Cvar_SetValue("r_lodbias", 0);
      trap_Cvar_SetValue("r_colorbits", 0);
      trap_Cvar_SetValue("r_depthbits", 24);
      trap_Cvar_SetValue("r_picmip", 0);
      trap_Cvar_SetValue("r_mode", 3);
      trap_Cvar_SetValue("r_texturebits", 0);
      trap_Cvar_SetValue("r_fastSky", 0);
      trap_Cvar_SetValue("r_inGameVideo", 1);
      trap_Cvar_SetValue("cg_brassTime", 2500);
      trap_Cvar_Set("r_texturemode", "GL_LINEAR_MIPMAP_LINEAR");
      trap_Cvar_SetValue("cg_shadows", 0);
      break;
    case 2:
      trap_Cvar_SetValue("r_fullScreen", 1);
      trap_Cvar_SetValue("r_subdivisions", 8);
      trap_Cvar_SetValue("r_vertexlight", 0);
      trap_Cvar_SetValue("r_lodbias", 1);
      trap_Cvar_SetValue("r_colorbits", 0);
      trap_Cvar_SetValue("r_depthbits", 0);
      trap_Cvar_SetValue("r_picmip", 1);
      trap_Cvar_SetValue("r_mode", 3);
      trap_Cvar_SetValue("r_texturebits", 0);
      trap_Cvar_SetValue("cg_shadows", 0);
      trap_Cvar_SetValue("r_fastSky", 1);
      trap_Cvar_SetValue("r_inGameVideo", 0);
      trap_Cvar_SetValue("cg_brassTime", 0);
      trap_Cvar_Set("r_texturemode", "GL_LINEAR_MIPMAP_NEAREST");
      break;
    case 3:
      trap_Cvar_SetValue("r_fullScreen", 1);
      trap_Cvar_SetValue("r_subdivisions", 20);
      trap_Cvar_SetValue("r_vertexlight", 1);
      trap_Cvar_SetValue("r_lodbias", 2);
      trap_Cvar_SetValue("r_colorbits", 16);
      trap_Cvar_SetValue("r_depthbits", 16);
      trap_Cvar_SetValue("r_mode", 3);
      trap_Cvar_SetValue("r_picmip", 2);
      trap_Cvar_SetValue("r_texturebits", 16);
      trap_Cvar_SetValue("cg_shadows", 0);
      trap_Cvar_SetValue("cg_brassTime", 0);
      trap_Cvar_SetValue("r_fastSky", 1);
      trap_Cvar_SetValue("r_inGameVideo", 0);
      trap_Cvar_Set("r_texturemode", "GL_LINEAR_MIPMAP_NEAREST");
      break;
    }
  } else if (Q_stricmp(name, "ui_mousePitch") == 0) {
    if (val == 0) {
      trap_Cvar_SetValue("m_pitch", 0.022f);
    } else {
      trap_Cvar_SetValue("m_pitch", -0.022f);
    }
  }
}
```