user: 这段汇编代码用C语言表示是什么样的：

```asm
<UI_CalcWeight>:
  endbr64
  push   %r15
  mov    $0x400,%edx
  lea    D136(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x418,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x408(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbp
  mov    %rbp,%rsi
  call   <trap_Cvar_VariableStringBuffer@plt>
  mov    %rbp,%rdi
  call   <atoi@plt>
  mov    $0x400,%edx
  mov    %rbp,%rsi
  lea    D76(%rip),%rdi
  mov    %eax,%r13d
  call   <trap_Cvar_VariableStringBuffer@plt>
  mov    %rbp,%rdi
  call   <atoi@plt>
  mov    $0x400,%edx
  mov    %rbp,%rsi
  lea    D95(%rip),%rdi
  mov    %eax,%r14d
  call   <trap_Cvar_VariableStringBuffer@plt>
  mov    %rbp,%rdi
  call   <atoi@plt>
  mov    $0x400,%edx
  mov    %rbp,%rsi
  lea    D106(%rip),%rdi
  mov    %eax,%r15d
  call   <trap_Cvar_VariableStringBuffer@plt>
  mov    %rbp,%rdi
  call   <atoi@plt>
  mov    $0x400,%edx
  mov    %rbp,%rsi
  lea    D71(%rip),%rdi
  mov    %eax,%ebx
  call   <trap_Cvar_VariableStringBuffer@plt>
  mov    %rbp,%rdi
  call   <atoi@plt>
  mov    $0x400,%edx
  mov    %rbp,%rsi
  lea    D59(%rip),%rdi
  mov    %eax,%r12d
  call   <trap_Cvar_VariableStringBuffer@plt>
  mov    %rbp,%rdi
  call   <atoi@plt>
  lea    -0xc(%r15),%edx
  movss  D28(%rip),%xmm1
  cmp    $0xc,%edx
  ja     L41
  lea    D113(%rip),%rcx
  pxor   %xmm1,%xmm1
  addss  (%rcx,%rdx,4),%xmm1
L41:
  lea    -0x6(%rbx),%edx
  movss  D126(%rip),%xmm0
  cmp    $0x5,%edx
  ja     L50
  lea    D118(%rip),%rcx
  movss  (%rcx,%rdx,4),%xmm0
L50:
  add    %eax,%r12d
  addss  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  mov    %r12d,%eax
  shr    $0x1f,%eax
  add    %r12d,%eax
  sar    %eax
  cvtsi2ss %eax,%xmm0
  addss  %xmm1,%xmm0
  test   %r14d,%r14d
  je     L43
  addss  D103(%rip),%xmm0
L43:
  test   %r13d,%r13d
  je     L53
  addss  D126(%rip),%xmm0
L53:
  comiss D61(%rip),%xmm0
  jbe    L24
  movss  D61(%rip),%xmm0
L24:
  mov    0x408(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L16
  add    $0x418,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L16:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D136
type: string
name: unpack_data
arguments: label: D76
type: string
name: unpack_data
arguments: label: D95
type: string
name: unpack_data
arguments: label: D106
type: string
name: unpack_data
arguments: label: D71
type: string
name: unpack_data
arguments: label: D59
type: string
name: unpack_data
arguments: label: D28
type: byte[4]
name: unpack_data
arguments: label: D113
type: string
name: unpack_data
arguments: label: D126
type: byte[4]
name: unpack_data
arguments: label: D118
type: string
name: unpack_data
arguments: label: D103
type: f32
name: unpack_data
arguments: label: D61
type: byte[4]

tool: D136: inven_helmet

tool: D76: inven_kevlar

tool: D95: inven_primary

tool: D106: inven_secondary

tool: D71: inven_ammo_primary

tool: D59: inven_ammo_secondary

tool: {"D28": [0x00,0x00,0x70,0x41]}

tool: 

tool: {"D126": [0x00,0x00,0xc0,0x40]}

tool: 

tool: D103: 6.5

tool: {"D61": [0x00,0x00,0x48,0x43]}

assistant: ```c
float UI_CalcWeight(void) {
  float weight = 0;
  float weapon_weight = 0;
  int primary;
  int secondary;
  int priammo;
  int secammo;
  int kevlar;
  int helmet;
  char var[1024];
  trap_Cvar_VariableStringBuffer("inven_helmet", var, sizeof(var));
  helmet = atoi(var);
  trap_Cvar_VariableStringBuffer("inven_kevlar", var, sizeof(var));
  kevlar = atoi(var);
  trap_Cvar_VariableStringBuffer("inven_primary", var, sizeof(var));
  primary = atoi(var);
  trap_Cvar_VariableStringBuffer("inven_secondary", var, sizeof(var));
  secondary = atoi(var);
  trap_Cvar_VariableStringBuffer("inven_ammo_primary", var, sizeof(var));
  priammo = atoi(var);
  trap_Cvar_VariableStringBuffer("inven_ammo_secondary", var, sizeof(var));
  secammo = atoi(var);
  switch (primary) {
  case 15:
    weapon_weight = 19;
    break;
  case 16:
    weapon_weight = 20;
    break;
  case 14:
    weapon_weight = 15;
    break;
  case 12:
    weapon_weight = 20;
    break;
  case 22:
    weapon_weight = 32;
    break;
  case 21:
    weapon_weight = 24;
    break;
  case 19:
    weapon_weight = 20;
    break;
  case 23:
    weapon_weight = 21;
    break;
  case 20:
    weapon_weight = 16;
    break;
  case 24:
    weapon_weight = 17;
    break;
  case 17:
    weapon_weight = 18;
    break;
  case 18:
    weapon_weight = 15;
    break;
  default:
    weapon_weight = 15;
    break;
  }
  weight += weapon_weight;
  switch (secondary) {
  case 11:
  case 10:
    weapon_weight = 9;
    break;
  case 8:
    weapon_weight = 7;
    break;
  case 6:
    weapon_weight = 6;
    break;
  case 7:
    weapon_weight = 6;
    break;
  case 9:
    weapon_weight = 5;
    break;
  default:
    weapon_weight = 6;
    break;
  }
  weight += weapon_weight;
  weight += (priammo + secammo) / 2;
  if (kevlar) {
    weight += 6.5;
  }
  if (helmet) {
    weight += 6;
  }
  if (weight > 200) {
    weight = 200;
  }
  return weight;
}
```