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

```asm
<twi_main>:
  endbr64
  push   %r15
  lea    D132(%rip),%r15
  push   %r14
  lea    D118(%rip),%r14
  push   %r13
  lea    D208(%rip),%r13
  push   %r12
  push   %rbp
  lea    D112(%rip),%rbp
  push   %rbx
  lea    D182(%rip),%rbx
  sub    $0x18,%rsp
  nopl   (%rax)
L16:
  lea    D81(%rip),%rdi
  xor    %eax,%eax
  call   <armprintf@plt>
L10:
  xor    %eax,%eax
  call   <armgetchar@plt>
  cmp    $0xffffffff,%eax
  je     L10
  mov    $0x6,%esi
  mov    $0x3,%edi
  call   <twi_read_word@plt>
  lea    D129(%rip),%rdi
  mov    %eax,%r12d
  xor    %eax,%eax
  call   <armprintf@plt>
  mov    %r12d,%esi
  mov    %r15,%rdi
  xor    %eax,%eax
  call   <armprintf@plt>
  mov    %r12d,%eax
  pxor   %xmm0,%xmm0
  mov    %r12d,%edx
  cvtsi2ss %rax,%xmm0
  mulss  D161(%rip),%xmm0
  mov    %r14,%rdi
  xor    %eax,%eax
  cvtss2sd %xmm0,%xmm0
  mulsd  D159(%rip),%xmm0
  cvttsd2si %xmm0,%rsi
  sub    $0x6ab3,%esi
  call   <armprintf@plt>
  mov    $0x7,%esi
  mov    $0x3,%edi
  call   <twi_read_word@plt>
  mov    %r13,%rdi
  mov    %eax,0xc(%rsp)
  mov    %eax,%esi
  xor    %eax,%eax
  call   <armprintf@plt>
  mov    0xc(%rsp),%eax
  pxor   %xmm0,%xmm0
  lea    D131(%rip),%rdi
  cvtsi2ss %rax,%xmm0
  mulss  D161(%rip),%xmm0
  mov    %rax,%rdx
  xor    %eax,%eax
  cvtss2sd %xmm0,%xmm0
  mulsd  D159(%rip),%xmm0
  cvttsd2si %xmm0,%rsi
  sub    $0x6ab3,%esi
  call   <armprintf@plt>
  mov    $0x8,%esi
  mov    $0x3,%edi
  call   <twi_read_word@plt>
  mov    %rbp,%rdi
  mov    %eax,0xc(%rsp)
  mov    %eax,%esi
  xor    %eax,%eax
  call   <armprintf@plt>
  mov    0xc(%rsp),%eax
  pxor   %xmm0,%xmm0
  mov    %rbx,%rdi
  cvtsi2ss %rax,%xmm0
  mulss  D161(%rip),%xmm0
  mov    %rax,%rdx
  xor    %eax,%eax
  cvtss2sd %xmm0,%xmm0
  mulsd  D159(%rip),%xmm0
  cvttsd2si %xmm0,%rsi
  sub    $0x6ab3,%esi
  call   <armprintf@plt>
  lea    D165(%rip),%rdi
  xor    %eax,%eax
  call   <armprintf@plt>
  mov    $0x6,%esi
  mov    $0x4,%edi
  call   <twi_read_word@plt>
  mov    %r15,%rdi
  mov    %eax,0xc(%rsp)
  mov    %eax,%esi
  xor    %eax,%eax
  call   <armprintf@plt>
  mov    0xc(%rsp),%eax
  pxor   %xmm0,%xmm0
  mov    %r14,%rdi
  cvtsi2ss %rax,%xmm0
  mulss  D161(%rip),%xmm0
  mov    %rax,%rdx
  xor    %eax,%eax
  cvtss2sd %xmm0,%xmm0
  mulsd  D159(%rip),%xmm0
  cvttsd2si %xmm0,%rsi
  sub    $0x6ab3,%esi
  call   <armprintf@plt>
  mov    $0x7,%esi
  mov    $0x4,%edi
  call   <twi_read_word@plt>
  mov    %r13,%rdi
  mov    %eax,0xc(%rsp)
  mov    %eax,%esi
  xor    %eax,%eax
  call   <armprintf@plt>
  mov    0xc(%rsp),%eax
  pxor   %xmm0,%xmm0
  lea    D131(%rip),%rdi
  cvtsi2ss %rax,%xmm0
  mulss  D161(%rip),%xmm0
  mov    %rax,%rdx
  cvtss2sd %xmm0,%xmm0
  mulsd  D159(%rip),%xmm0
  cvttsd2si %xmm0,%rsi
  sub    $0x6ab3,%esi
  xor    %eax,%eax
  call   <armprintf@plt>
  mov    $0x8,%esi
  mov    $0x4,%edi
  call   <twi_read_word@plt>
  mov    %rbp,%rdi
  mov    %eax,0xc(%rsp)
  mov    %eax,%esi
  xor    %eax,%eax
  call   <armprintf@plt>
  mov    0xc(%rsp),%eax
  pxor   %xmm0,%xmm0
  mov    %rbx,%rdi
  cvtsi2ss %rax,%xmm0
  mulss  D161(%rip),%xmm0
  mov    %rax,%rdx
  xor    %eax,%eax
  cvtss2sd %xmm0,%xmm0
  mulsd  D159(%rip),%xmm0
  cvttsd2si %xmm0,%rsi
  sub    $0x6ab3,%esi
  call   <armprintf@plt>
  jmp    L16
```

tool_calls: name: parse_data
arguments: data_label: D132
data_type: string
name: parse_data
arguments: data_label: D118
data_type: string
name: parse_data
arguments: data_label: D208
data_type: string
name: parse_data
arguments: data_label: D112
data_type: string
name: parse_data
arguments: data_label: D182
data_type: string
name: parse_data
arguments: data_label: D81
data_type: string
name: parse_data
arguments: data_label: D129
data_type: string
name: parse_data
arguments: data_label: D161
data_type: byte[4]
name: parse_data
arguments: data_label: D159
data_type: f64
name: parse_data
arguments: data_label: D131
data_type: string
name: parse_data
arguments: data_label: D165
data_type: string

tool: D132: Ambient Raw: %x

tool: D118: Ambient Temp: %d.%d C

tool: D208: Zone 1 Raw: %x

tool: D112: Zone 2 Raw: %x

tool: D182: Zone 2 Temp: %d.%d C

tool: D81: Press ENTER to measure...

tool: D129: SENSOR 3------------------

tool: {"D161": [0x00,0x00,0xc8,0x42]}

tool: D159: 0.02

tool: D131: Zone 1 Temp: %d.%d C

tool: D165: SENSOR 4------------------

assistant: ```c
int twi_main() {
  unsigned int data = 0;
  unsigned int object, ambient;
  unsigned char addr1 = 0x03;
  unsigned char addr2 = 0x04;
  while (1) {
    armprintf("Press ENTER to measure...\r");
    while (armgetchar() == -1)
      ;
    data = twi_read_word(addr1, 0x06);
    armprintf("SENSOR 3------------------\r");
    armprintf("Ambient Raw: %x\r", data);
    ambient = (unsigned int)(((float)data * 100) * 0.02) - 27315;
    armprintf("Ambient Temp: %d.%d C\r", ambient, data);
    data = twi_read_word(addr1, 0x07);
    armprintf("Zone 1 Raw: %x\r", data);
    object = (unsigned int)(((float)data * 100) * 0.02) - 27315;
    armprintf("Zone 1 Temp: %d.%d C\r", object, data);
    data = twi_read_word(addr1, 0x08);
    armprintf("Zone 2 Raw: %x\r", data);
    object = (unsigned int)(((float)data * 100) * 0.02) - 27315;
    armprintf("Zone 2 Temp: %d.%d C\r", object, data);
    armprintf("SENSOR 4------------------\r");
    data = twi_read_word(addr2, 0x06);
    armprintf("Ambient Raw: %x\r", data);
    ambient = (unsigned int)(((float)data * 100) * 0.02) - 27315;
    armprintf("Ambient Temp: %d.%d C\r", ambient, data);
    data = twi_read_word(addr2, 0x07);
    armprintf("Zone 1 Raw: %x\r", data);
    object = (unsigned int)(((float)data * 100) * 0.02) - 27315;
    armprintf("Zone 1 Temp: %d.%d C\r", object, data);
    data = twi_read_word(addr2, 0x08);
    armprintf("Zone 2 Raw: %x\r", data);
    object = (unsigned int)(((float)data * 100) * 0.02) - 27315;
    armprintf("Zone 2 Temp: %d.%d C\r", object, data);
  }
  return 0;
}
```