user: 请从给定的汇编指令推导出C源代码:

```asm
<twi_main>:
  endbr64
  push   %r15
  lea    D105(%rip),%r15
  push   %r14
  lea    D152(%rip),%r14
  push   %r13
  lea    D52(%rip),%r13
  push   %r12
  push   %rbp
  lea    D214(%rip),%rbp
  push   %rbx
  lea    D128(%rip),%rbx
  sub    $0x18,%rsp
  nopl   (%rax)
L1:
  lea    D149(%rip),%rdi
  xor    %eax,%eax
  call   <armprintf@plt>
L19:
  xor    %eax,%eax
  call   <armgetchar@plt>
  cmp    $0xffffffff,%eax
  je     L19
  mov    $0x6,%esi
  mov    $0x3,%edi
  call   <twi_read_word@plt>
  lea    D23(%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  D193(%rip),%xmm0
  mov    %r14,%rdi
  xor    %eax,%eax
  cvtss2sd %xmm0,%xmm0
  mulsd  D116(%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    D162(%rip),%rdi
  cvtsi2ss %rax,%xmm0
  mulss  D193(%rip),%xmm0
  mov    %rax,%rdx
  xor    %eax,%eax
  cvtss2sd %xmm0,%xmm0
  mulsd  D116(%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  D193(%rip),%xmm0
  mov    %rax,%rdx
  xor    %eax,%eax
  cvtss2sd %xmm0,%xmm0
  mulsd  D116(%rip),%xmm0
  cvttsd2si %xmm0,%rsi
  sub    $0x6ab3,%esi
  call   <armprintf@plt>
  lea    D60(%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  D193(%rip),%xmm0
  mov    %rax,%rdx
  xor    %eax,%eax
  cvtss2sd %xmm0,%xmm0
  mulsd  D116(%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    D162(%rip),%rdi
  cvtsi2ss %rax,%xmm0
  mulss  D193(%rip),%xmm0
  mov    %rax,%rdx
  cvtss2sd %xmm0,%xmm0
  mulsd  D116(%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  D193(%rip),%xmm0
  mov    %rax,%rdx
  xor    %eax,%eax
  cvtss2sd %xmm0,%xmm0
  mulsd  D116(%rip),%xmm0
  cvttsd2si %xmm0,%rsi
  sub    $0x6ab3,%esi
  call   <armprintf@plt>
  jmp    L1
```

tool_calls: name: unpack_data
arguments: data_tag: D105
datatype: string
name: unpack_data
arguments: data_tag: D152
datatype: string
name: unpack_data
arguments: data_tag: D52
datatype: string
name: unpack_data
arguments: data_tag: D214
datatype: string
name: unpack_data
arguments: data_tag: D128
datatype: string
name: unpack_data
arguments: data_tag: D149
datatype: string
name: unpack_data
arguments: data_tag: D23
datatype: string
name: unpack_data
arguments: data_tag: D193
datatype: byte[4]
name: unpack_data
arguments: data_tag: D116
datatype: f64
name: unpack_data
arguments: data_tag: D162
datatype: string
name: unpack_data
arguments: data_tag: D60
datatype: string

tool: D105: Ambient Raw: %x

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

tool: D52: Zone 1 Raw: %x

tool: D214: Zone 2 Raw: %x

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

tool: D149: Press ENTER to measure...

tool: D23: SENSOR 3------------------

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

tool: D116: 0.02

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

tool: D60: 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;
}
```