user: Demonstrate the C code that generates the assembly output below:

```asm
<main>:
  endbr64
  sub    $0x28,%rsp
  lea    D51(%rip),%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0xf(%rsp),%rcx
  lea    0xe(%rsp),%rdx
  lea    0x10(%rsp),%rsi
  call   <scanf@plt>
  movzbl 0xe(%rsp),%eax
  cmp    $0x69,%al
  je     L94
  sub    $0x66,%eax
  movzbl 0xf(%rsp),%edx
  cmp    $0x13,%al
  jbe    L237
  cmp    $0x69,%dl
  je     L196
  sub    $0x66,%edx
  xor    %eax,%eax
  cmp    $0x13,%dl
  ja     L196
L266:
  movzbl %dl,%edx
  lea    D86(%rip),%rcx
  mov    (%rcx,%rdx,4),%edx
L300:
  movsd  0x10(%rsp),%xmm0
  cmp    %eax,%edx
  je     L126
  jle    L97
  movsd  D112(%rip),%xmm1
  cmp    $0x1,%eax
  je     L198
  test   %eax,%eax
  je     L126
  cmp    $0x2,%eax
  je     L117
  cmp    $0x3,%eax
  jne    L126
  movsd  D74(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x10(%rsp)
  cmp    $0x4,%edx
  je     L126
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,0x10(%rsp)
  cmp    $0x3,%edx
  je     L126
L68:
  movsd  D6(%rip),%xmm1
L188:
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,0x10(%rsp)
  cmp    $0x2,%edx
  je     L126
  jg     L377
L41:
  movsd  D112(%rip),%xmm1
L234:
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,0x10(%rsp)
  cmp    $0x1,%edx
  je     L126
  jg     L198
  nopw   0x0(%rax,%rax,1)
L126:
  lea    D101(%rip),%rdi
  call   <printf@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L353
  xor    %eax,%eax
  add    $0x28,%rsp
  ret
L237:
  movzbl %al,%eax
  lea    D86(%rip),%rcx
  mov    (%rcx,%rax,4),%eax
  cmp    $0x69,%dl
  je     L76
  sub    $0x66,%edx
  cmp    $0x13,%dl
  jbe    L266
  test   %eax,%eax
  je     L196
  cmp    $0x4,%eax
  je     L255
L120:
  movsd  0x10(%rsp),%xmm0
  xor    %edx,%edx
  jmp    L287
  nopl   0x0(%rax)
L198:
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x10(%rsp)
  cmp    $0x2,%edx
  je     L126
  jle    L234
L117:
  movsd  D6(%rip),%xmm1
L377:
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x10(%rsp)
  cmp    $0x3,%edx
  je     L126
  cmp    $0x4,%edx
  jne    L188
L279:
  divsd  D74(%rip),%xmm0
  movsd  %xmm0,0x10(%rsp)
  jmp    L126
L97:
  cmp    $0x4,%eax
  je     L4
L287:
  cmp    $0x2,%eax
  je     L41
  cmp    $0x3,%eax
  jne    L126
  jmp    L68
L4:
  mulsd  D74(%rip),%xmm0
  movsd  %xmm0,0x10(%rsp)
  cmp    $0x3,%edx
  je     L126
  cmp    $0x4,%edx
  je     L279
  jmp    L68
L94:
  movzbl 0xf(%rsp),%edx
  cmp    $0x69,%dl
  je     L196
  sub    $0x66,%edx
  mov    $0x1,%eax
  cmp    $0x13,%dl
  jbe    L266
  jmp    L120
L196:
  movsd  0x10(%rsp),%xmm0
  jmp    L126
L255:
  movsd  D74(%rip),%xmm0
  movsd  D6(%rip),%xmm1
  xor    %edx,%edx
  mulsd  0x10(%rsp),%xmm0
  jmp    L188
L76:
  mov    $0x1,%edx
  jmp    L300
L353:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D51
data_type: string
name: unpack_data
arguments: label: D86
data_type: string
name: unpack_data
arguments: label: D112
data_type: byte[8]
name: unpack_data
arguments: label: D74
data_type: byte[8]
name: unpack_data
arguments: label: D6
data_type: byte[8]
name: unpack_data
arguments: label: D101
data_type: string

tool: D51: %lf %c %c

tool: D86: 

tool: {"D112": [0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x40]}

tool: {"D74": [0x00,0x00,0x00,0x00,0x00,0x80,0x9b,0x40]}

tool: {"D6": [0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x40]}

tool: D101: %.6lf


assistant: ```c
int main(void) {
  double amount;
  char fromUnit, toUnit;
  int from = 0, to = 0;
  scanf("%lf %c %c", &amount, &fromUnit, &toUnit);
  if (fromUnit == 'i')
    from = 1;
  else if (fromUnit == 'f')
    from = 2;
  else if (fromUnit == 'y')
    from = 3;
  else if (fromUnit == 'm')
    from = 4;
  else
    from = 0;
  if (toUnit == 'i')
    to = 1;
  else if (toUnit == 'f')
    to = 2;
  else if (toUnit == 'y')
    to = 3;
  else if (toUnit == 'm')
    to = 4;
  else
    to = 0;
  while (1) {
    if (from == to) {
      printf("%.6lf\n", amount);
      return 0;
    }
    if (to > from) {
      switch (from) {
      case 1:
        amount /= 12;
        from++;
        break;
      case 2:
        amount /= 3;
        from++;
        break;
      case 3:
        amount /= 1760;
        from++;
        break;
      default:
        from = to;
        break;
      }
    } else {
      switch (from) {
      case 4:
        amount *= 1760;
        from--;
        break;
      case 3:
        amount *= 3;
        from--;
        break;
      case 2:
        amount *= 12;
        from--;
        break;
      default:
        from = to;
        break;
      }
    }
  }
}
```