user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<read_IntelHEX>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x468,%rsp
  mov    %rdi,0x18(%rsp)
  mov    %rsi,%rdi
  lea    D3(%rip),%rsi
  mov    %fs:0x28,%rax
  mov    %rax,0x458(%rsp)
  xor    %eax,%eax
  call   <fopen@plt>
  mov    %rax,0x28(%rsp)
  test   %rax,%rax
  je     L776
  lea    0x4c(%rsp),%rsi
  mov    %rax,%rdi
  call   <fstat@plt>
  mov    0x4c(%rsp),%eax
  lea    0x50(%rsp),%rsi
  xor    %r8d,%r8d
  mov    %rsi,0x30(%rsp)
  mov    %eax,0x10(%rsp)
  test   %eax,%eax
  je     L308
  nopl   0x0(%rax)
L668:
  mov    0x10(%rsp),%r15d
  cmp    $0x3ff,%r15d
  jle    L1226
  mov    0x28(%rsp),%rcx
  mov    0x30(%rsp),%rdi
  mov    $0x1,%edx
  mov    $0x400,%esi
  mov    %r8d,0x20(%rsp)
  sub    $0x400,%r15d
  call   <fread@plt>
  mov    0x20(%rsp),%r8d
  mov    %r15d,0x10(%rsp)
  lea    0x51(%rsp),%r15
L1751:
  movzbl (%r15),%eax
  mov    %r8d,0x20(%rsp)
  lea    0x450(%rsp),%r14
  cmp    $0x3a,%al
  jne    L1077
  nopw   0x0(%rax,%rax,1)
L221:
  lea    0x1(%r15),%r12
  lea    -0x1(%r12),%rax
  mov    %r12,%r13
  cmp    %rax,%r14
  jbe    L1404
L112:
  movsbl (%r12),%edi
  cmp    $0x3a,%dil
  jne    L2017
  lea    0x1(%r12),%r15
  cmp    %r14,%r12
  jae    L1404
  movsbl 0x1(%r12),%edi
  cmp    $0x3a,%dil
  je     L637
L216:
  call   <Char2Int@plt>
  cmp    $0xff,%eax
  je     L1425
  mov    %r15,%r13
L67:
  shl    $0x4,%eax
  lea    0x1(%r13),%r15
  mov    %eax,0x8(%rsp)
  cmp    %r14,%r13
  jae    L122
  movzbl 0x1(%r13),%eax
  cmp    $0x3a,%al
  je     L221
  movsbl %al,%edi
  call   <Char2Int@plt>
  mov    %r15,%r8
  cmp    $0xff,%eax
  je     L911
L678:
  or     %eax,0x8(%rsp)
  lea    0x1(%r8),%r15
  mov    0x8(%rsp),%ecx
  cmp    %r14,%r8
  jae    L2002
  movzbl 0x1(%r8),%eax
  mov    %r8,0x20(%rsp)
  mov    %ecx,0xc(%rsp)
  cmp    $0x3a,%al
  je     L221
  movsbl %al,%edi
  call   <Char2Int@plt>
  mov    0x20(%rsp),%r8
  cmp    $0xff,%eax
  je     L523
  shl    $0xc,%eax
  mov    0x8(%rsp),%edx
  lea    0x2(%r8),%r13
  movslq %eax,%rbx
  sar    $0x8,%eax
  add    %ebx,%eax
  mov    %rbx,%rbp
  add    0x18(%rsp),%rbx
  sub    %eax,%edx
  mov    %edx,0xc(%rsp)
  cmp    %r14,%r15
  jae    L1579
  movzbl 0x2(%r8),%eax
  mov    %r8,0x20(%rsp)
  mov    %r13,%r15
  cmp    $0x3a,%al
  je     L221
  movsbl %al,%edi
  call   <Char2Int@plt>
  mov    0x20(%rsp),%r8
  cmp    $0xff,%eax
  je     L461
  shl    $0x8,%eax
  lea    0x3(%r8),%rdx
  or     %eax,%ebp
  mov    %ebp,%eax
  movslq %ebp,%rbx
  add    0x18(%rsp),%rbx
  sar    $0x8,%eax
  add    %ebp,%eax
  sub    %eax,0xc(%rsp)
  cmp    %r14,%r13
  jae    L52
  movzbl 0x3(%r8),%eax
  mov    %rdx,0x20(%rsp)
  mov    %rdx,%r15
  cmp    $0x3a,%al
  je     L221
  movsbl %al,%edi
  call   <Char2Int@plt>
  mov    0x20(%rsp),%rdx
  cmp    $0xff,%eax
  je     L1050
  mov    $0x5,%r8d
  jmp    L1269
  nop
L2017:
  call   <Char2Int@plt>
  cmp    $0xff,%eax
  jne    L67
  cmp    %r14,%r12
  jae    L1404
  movsbl 0x1(%r12),%edi
  lea    0x1(%r12),%r15
  cmp    $0x3a,%dil
  jne    L216
  nopw   0x0(%rax,%rax,1)
L637:
  add    $0x2,%r12
  lea    -0x1(%r12),%rax
  mov    %r12,%r13
  cmp    %rax,%r14
  ja     L112
L1404:
  xor    %r8d,%r8d
L874:
  mov    0x10(%rsp),%edx
  test   %edx,%edx
  jne    L668
L308:
  mov    0x458(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L993
  add    $0x468,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L1425:
  lea    0x2(%r12),%r13
  cmp    %r14,%r15
  jae    L1404
  movzbl 0x1(%r15),%eax
  cmp    $0x3a,%al
  jne    L1772
  nopw   0x0(%rax,%rax,1)
L855:
  mov    %r13,%r15
  jmp    L221
  nopl   0x0(%rax,%rax,1)
L1226:
  mov    $0x400,%r9d
  mov    %r15d,%esi
  mov    $0x1,%edx
  mov    %r8d,0x20(%rsp)
  sub    %r15d,%r9d
  mov    0x28(%rsp),%r15
  lea    0x450(%rsp),%r14
  movslq %r9d,%r9
  add    0x30(%rsp),%r9
  mov    %r9,%rdi
  mov    %r15,%rcx
  mov    %r9,0x10(%rsp)
  call   <fread@plt>
  mov    %r15,%rdi
  call   <fclose@plt>
  mov    0x10(%rsp),%r9
  lea    0x1(%r9),%r15
  cmp    %r14,%r9
  jae    L308
  movl   $0x0,0x10(%rsp)
  mov    0x20(%rsp),%r8d
  jmp    L1751
L523:
  lea    0x2(%r8),%rcx
  cmp    %r14,%r15
  jae    L1573
  movzbl 0x2(%r8),%eax
  mov    %r8,0x38(%rsp)
  mov    %rcx,%r15
  mov    %rcx,0x20(%rsp)
  cmp    $0x3a,%al
  je     L221
  movsbl %al,%edi
  call   <Char2Int@plt>
  mov    0x20(%rsp),%rcx
  mov    0x38(%rsp),%r8
  cmp    $0xff,%eax
  je     L916
  shl    $0xc,%eax
  mov    0x8(%rsp),%esi
  lea    0x3(%r8),%rdx
  movslq %eax,%rbx
  sar    $0x8,%eax
  add    %ebx,%eax
  mov    %rbx,%rbp
  add    0x18(%rsp),%rbx
  sub    %eax,%esi
  mov    %esi,0xc(%rsp)
  cmp    %r14,%rcx
  jae    L1579
L445:
  movzbl 0x3(%r8),%eax
  mov    %rdx,0x20(%rsp)
  mov    %rdx,%r15
  cmp    $0x3a,%al
  je     L221
  movsbl %al,%edi
  call   <Char2Int@plt>
  mov    0x20(%rsp),%rdx
  mov    $0x4,%r8d
  cmp    $0xff,%eax
  je     L1675
L1269:
  mov    $0x6,%ecx
  sub    %r8d,%ecx
  shl    $0x2,%ecx
L992:
  shl    %cl,%eax
  or     %eax,%ebp
  mov    %ebp,%eax
  movslq %ebp,%rbx
  add    0x18(%rsp),%rbx
  sar    $0x8,%eax
  add    %ebp,%eax
  sub    %eax,0xc(%rsp)
  jmp    L1807
L911:
  lea    0x2(%r13),%r8
  cmp    %r14,%r15
  jae    L122
  movzbl 0x2(%r13),%eax
  mov    %r8,0x20(%rsp)
  mov    %r8,%r15
  cmp    $0x3a,%al
  je     L221
  movsbl %al,%edi
  call   <Char2Int@plt>
  mov    0x20(%rsp),%r8
  cmp    $0xff,%eax
  jne    L678
  lea    0x3(%r13),%r15
  cmp    %r14,%r8
  jae    L122
  movzbl 0x3(%r13),%eax
  cmp    $0x3a,%al
  je     L221
  movsbl %al,%edi
  call   <Char2Int@plt>
  cmp    $0xff,%eax
  je     L420
  mov    %r15,%r8
  jmp    L678
  cs nopw 0x0(%rax,%rax,1)
L776:
  xor    %eax,%eax
  jmp    L308
L122:
  mov    $0x1,%r8d
  jmp    L874
L2002:
  mov    %ecx,0xc(%rsp)
  mov    %ecx,%eax
  mov    $0x2,%r8d
  jmp    L874
L461:
  lea    0x3(%r8),%rdx
  cmp    %r14,%r13
  jb     L445
L1579:
  mov    $0x3,%r8d
  jmp    L874
L1573:
  mov    $0x2,%r8d
  jmp    L874
L1077:
  movsbl %al,%edi
  call   <Char2Int@plt>
  mov    0x20(%rsp),%r8d
  cmp    $0xff,%eax
  je     L89
  lea    0x1(%r8),%edi
  cmp    $0x9,%r8d
  jg     L1471
  ja     L414
  lea    D2(%rip),%rdx
  movslq (%rdx,%r8,4),%rcx
  add    %rdx,%rcx
  notrack jmp *%rcx
L993:
  call   <__stack_chk_fail@plt>
  lea    0x450(%rsp),%r14
L1783:
  or     (%rbx),%al
  subl   $0x1,0x8(%rsp)
  lea    0x1(%r15),%r10
  add    $0x1,%rbx
  mov    %al,-0x1(%rbx)
  movsbl %al,%eax
  sub    %eax,0xc(%rsp)
  mov    0x8(%rsp),%eax
  test   %eax,%eax
  jle    L689
  cmp    %r14,%r15
  jae    L398
  movzbl 0x1(%r15),%eax
  cmp    $0x3a,%al
  je     L720
  movsbl %al,%edi
  mov    %r10,0x20(%rsp)
  call   <Char2Int@plt>
  mov    0x20(%rsp),%r10
  cmp    $0xff,%eax
  je     L769
L1535:
  lea    0x1(%r10),%r15
  cmp    $0x1,%eax
  je     L839
  cmp    %r14,%r10
  jae    L1490
  movzbl 0x1(%r10),%eax
  mov    %r10,0x20(%rsp)
  cmp    $0x3a,%al
  je     L221
  movsbl %al,%edi
  mov    %r15,%r13
  call   <Char2Int@plt>
  mov    0x20(%rsp),%r10
  cmp    $0xff,%eax
  je     L1169
L434:
  shl    $0x4,%eax
  lea    0x1(%r13),%r15
  mov    %al,(%rbx)
  cmp    %r14,%r13
  jae    L613
  movzbl 0x1(%r13),%eax
  cmp    $0x3a,%al
  je     L221
  movsbl %al,%edi
  call   <Char2Int@plt>
  cmp    $0xff,%eax
  jne    L1783
  lea    0x2(%r13),%r8
  cmp    %r14,%r15
  jae    L613
  movzbl 0x2(%r13),%eax
  mov    %r8,0x20(%rsp)
  mov    %r8,%r15
  cmp    $0x3a,%al
  je     L221
  movsbl %al,%edi
  call   <Char2Int@plt>
  mov    0x20(%rsp),%r8
  cmp    $0xff,%eax
  jne    L1783
  lea    0x3(%r13),%r15
  cmp    %r14,%r8
  jae    L613
  movzbl 0x3(%r13),%eax
  cmp    $0x3a,%al
  je     L221
  movsbl %al,%edi
  call   <Char2Int@plt>
  cmp    $0xff,%eax
  jne    L1783
  mov    %r15,%rdx
  mov    $0x9,%r8d
  nopl   (%rax)
L1807:
  lea    0x1(%rdx),%r15
  cmp    %r14,%rdx
  jb     L1751
  jmp    L874
  nopw   0x0(%rax,%rax,1)
L720:
  lea    0x2(%r15),%r13
  cmp    %r14,%r10
  jae    L1404
  movzbl 0x2(%r15),%eax
  cmp    $0x3a,%al
  je     L855
  movsbl %al,%edi
  call   <Char2Int@plt>
  cmp    $0xff,%eax
  jne    L67
  lea    0x3(%r15),%r8
  cmp    %r14,%r13
  jae    L1404
  movzbl 0x3(%r15),%eax
  cmp    $0x3a,%al
  je     L1516
  movsbl %al,%edi
  mov    %r8,0x20(%rsp)
  call   <Char2Int@plt>
  mov    0x20(%rsp),%r8
  mov    %r8,%r13
  cmp    $0xff,%eax
  jne    L67
  lea    0x4(%r15),%rdx
  cmp    %r14,%r8
  jae    L1404
  movzbl 0x4(%r15),%eax
  mov    %rdx,0x20(%rsp)
  mov    %rdx,%r15
  cmp    $0x3a,%al
  je     L221
L1245:
  movsbl %al,%edi
  call   <Char2Int@plt>
  mov    0x20(%rsp),%rdx
  mov    %rdx,%r13
  cmp    $0xff,%eax
  jne    L67
L885:
  xor    %r8d,%r8d
  jmp    L1807
  nopl   0x0(%rax)
L689:
  cmp    %r14,%r15
  jae    L969
  movzbl 0x1(%r15),%eax
  cmp    $0x3a,%al
  je     L720
  movsbl %al,%edi
  mov    %r10,0x20(%rsp)
  call   <Char2Int@plt>
  mov    0x20(%rsp),%r10
  cmp    $0xff,%eax
  mov    %eax,%r8d
  je     L1135
L1524:
  xor    %eax,%eax
  cmp    $0xf,%r8d
  sete   %al
  test   %eax,0xc(%rsp)
  je     L776
  lea    0x450(%rsp),%r14
  lea    0x1(%r10),%r15
  cmp    %r14,%r10
  jae    L1597
  movzbl 0x1(%r10),%eax
  mov    %r10,0x20(%rsp)
  cmp    $0x3a,%al
  je     L221
  movsbl %al,%edi
  mov    %r15,%r13
  call   <Char2Int@plt>
  mov    0x20(%rsp),%r10
  cmp    $0xff,%eax
  mov    %eax,%r8d
  je     L907
L763:
  shl    $0x4,%r8d
  xor    %eax,%eax
  cmp    $0xf0,%r8d
  sete   %al
  and    0xc(%rsp),%eax
  je     L776
  test   %rbx,%rbx
  jne    L1138
  test   %ebp,%ebp
  je     L308
L1138:
  lea    0x450(%rsp),%r14
  lea    0x1(%r13),%r15
  cmp    %r14,%r13
  jae    L1927
  movzbl 0x1(%r13),%eax
  cmp    $0x3a,%al
  je     L221
  movsbl %al,%edi
  lea    0x2(%r13),%r12
  call   <Char2Int@plt>
  cmp    %r14,%r15
  jae    L1927
  movzbl 0x2(%r13),%eax
  mov    %r12,%r15
  cmp    $0x3a,%al
  je     L221
  movsbl %al,%edi
  call   <Char2Int@plt>
  cmp    $0xff,%eax
  je     L884
  lea    0x3(%r13),%r15
  cmp    %r14,%r12
  jae    L1927
  movzbl 0x3(%r13),%eax
  cmp    $0x3a,%al
  je     L221
  movsbl %al,%edi
  call   <Char2Int@plt>
  mov    %eax,%r8d
  cmp    $0xff,%eax
  je     L89
  mov    $0xff,%r10d
L1202:
  mov    %r15,%rdx
  mov    %r10d,%r8d
  jmp    L1807
  nopl   0x0(%rax,%rax,1)
L839:
  cmp    %r14,%r10
  jae    L1860
  movzbl 0x1(%r10),%eax
  cmp    $0x3a,%al
  jne    L1988
  lea    0x2(%r10),%r13
  cmp    %r14,%r15
  jae    L336
  movzbl 0x2(%r10),%eax
  mov    %r10,0x20(%rsp)
  cmp    $0x3a,%al
  je     L210
  movsbl %al,%edi
  xor    %ebp,%ebp
  xor    %ebx,%ebx
  call   <Char2Int@plt>
  mov    0x20(%rsp),%r10
  cmp    $0xff,%eax
  jne    L67
  lea    0x3(%r10),%r8
  cmp    %r14,%r13
  jae    L1404
  movzbl 0x3(%r10),%eax
  mov    %r10,0x38(%rsp)
  mov    %r8,%r15
  mov    %r8,0x20(%rsp)
  cmp    $0x3a,%al
  je     L221
  movsbl %al,%edi
  call   <Char2Int@plt>
  mov    0x20(%rsp),%r8
  mov    0x38(%rsp),%r10
  cmp    $0xff,%eax
  mov    %r8,%r13
  jne    L67
  lea    0x4(%r10),%r15
  cmp    %r14,%r8
  jae    L336
  movzbl 0x4(%r10),%eax
  cmp    $0x3a,%al
  je     L1346
  movsbl %al,%edi
  call   <Char2Int@plt>
  cmp    $0xff,%eax
  je     L1660
  mov    %r15,%r13
  xor    %ebp,%ebp
  xor    %ebx,%ebx
  jmp    L67
  nopl   0x0(%rax)
L1988:
  movsbl %al,%edi
  mov    %r10,0x20(%rsp)
  call   <Char2Int@plt>
  mov    0x20(%rsp),%r10
  cmp    $0xff,%eax
  mov    %eax,%r8d
  je     L357
  mov    %r15,%r10
  xor    %ebx,%ebx
  xor    %ebp,%ebp
  jmp    L1524
L907:
  lea    0x2(%r10),%r13
  cmp    %r14,%r15
  jae    L1597
  movzbl 0x2(%r10),%eax
  mov    %r13,%r15
  cmp    $0x3a,%al
  je     L221
  movsbl %al,%edi
  call   <Char2Int@plt>
  mov    0x20(%rsp),%r10
  cmp    $0xff,%eax
  mov    %eax,%r8d
  jne    L763
  lea    0x3(%r10),%r15
  cmp    %r14,%r13
  jae    L1597
  movzbl 0x3(%r10),%eax
  cmp    $0x3a,%al
  je     L221
  movsbl %al,%edi
  call   <Char2Int@plt>
  mov    %eax,%r8d
  cmp    $0xff,%eax
  je     L1366
L123:
  mov    %r15,%r13
  jmp    L763
  nopl   0x0(%rax)
L1169:
  lea    0x2(%r10),%r13
  cmp    %r14,%r15
  jae    L1490
  movzbl 0x2(%r10),%eax
  mov    %r13,%r15
  cmp    $0x3a,%al
  je     L221
  movsbl %al,%edi
  call   <Char2Int@plt>
  mov    0x20(%rsp),%r10
  cmp    $0xff,%eax
  jne    L434
  lea    0x3(%r10),%r15
  cmp    %r14,%r13
  jae    L1490
  movzbl 0x3(%r10),%eax
  cmp    $0x3a,%al
  je     L221
  movsbl %al,%edi
  call   <Char2Int@plt>
  cmp    $0xff,%eax
  je     L892
  mov    %r15,%r13
  jmp    L434
  nopw   0x0(%rax,%rax,1)
L769:
  lea    0x2(%r15),%r13
  cmp    %r14,%r10
  jae    L398
  movzbl 0x2(%r15),%eax
  cmp    $0x3a,%al
  je     L855
  movsbl %al,%edi
  call   <Char2Int@plt>
  mov    %r13,%r10
  cmp    $0xff,%eax
  jne    L1535
  lea    0x3(%r15),%r10
  cmp    %r14,%r13
  jae    L398
  movzbl 0x3(%r15),%eax
  cmp    $0x3a,%al
  jne    L628
L2029:
  mov    %r10,%r15
  jmp    L221
  nopw   0x0(%rax,%rax,1)
L210:
  mov    %r13,%r15
  xor    %ebp,%ebp
  xor    %ebx,%ebx
  jmp    L221
L1135:
  lea    0x2(%r15),%r13
  cmp    %r14,%r10
  jae    L969
  movzbl 0x2(%r15),%eax
  cmp    $0x3a,%al
  je     L855
  movsbl %al,%edi
  call   <Char2Int@plt>
  mov    %r13,%r10
  mov    %eax,%r8d
  cmp    $0xff,%eax
  jne    L1524
  lea    0x3(%r15),%r10
  cmp    %r14,%r13
  jae    L969
  movzbl 0x3(%r15),%eax
  cmp    $0x3a,%al
  je     L2029
  movsbl %al,%edi
  mov    %r10,0x20(%rsp)
  call   <Char2Int@plt>
  mov    0x20(%rsp),%r10
  cmp    $0xff,%eax
  mov    %eax,%r8d
  jne    L1524
  lea    0x4(%r15),%rdx
  cmp    %r14,%r10
  jae    L969
  movzbl 0x4(%r15),%eax
  mov    %rdx,0x20(%rsp)
  mov    %rdx,%r15
  cmp    $0x3a,%al
  je     L221
  movsbl %al,%edi
  call   <Char2Int@plt>
  mov    0x20(%rsp),%rdx
  cmp    $0xff,%eax
  mov    %eax,%r8d
  je     L27
L1948:
  mov    %r15,%r10
  jmp    L1524
  nopw   0x0(%rax,%rax,1)
L357:
  lea    0x2(%r10),%rbp
  cmp    %r14,%r15
  jae    L1860
  movzbl 0x2(%r10),%eax
  mov    %rbp,%r15
  cmp    $0x3a,%al
  je     L1346
  movsbl %al,%edi
  call   <Char2Int@plt>
  mov    0x20(%rsp),%r10
  cmp    $0xff,%eax
  mov    %eax,%r8d
  je     L1886
  mov    %rbp,%r10
  xor    %ebx,%ebx
  xor    %ebp,%ebp
  jmp    L1524
L1927:
  mov    $0xff,%r8d
  jmp    L874
L1597:
  mov    $0xfe,%r8d
  jmp    L874
L613:
  mov    $0x9,%r8d
  jmp    L874
L1346:
  xor    %ebp,%ebp
  xor    %ebx,%ebx
  jmp    L221
L1490:
  mov    $0x8,%r8d
  jmp    L874
L398:
  mov    $0x7,%r8d
  jmp    L874
L969:
  mov    $0xfd,%r8d
  jmp    L874
L1860:
  xor    %ebx,%ebx
  xor    %ebp,%ebp
  mov    $0xfd,%r8d
  jmp    L874
L1886:
  lea    0x3(%r10),%rbx
  cmp    %r14,%rbp
  jae    L1860
  movzbl 0x3(%r10),%eax
  cmp    $0x3a,%al
  je     L265
  movsbl %al,%edi
  call   <Char2Int@plt>
  mov    0x20(%rsp),%r10
  cmp    $0xff,%eax
  mov    %eax,%r8d
  je     L811
  mov    %rbx,%r10
  xor    %ebp,%ebp
  xor    %ebx,%ebx
  jmp    L1524
  nop
L336:
  xor    %ebx,%ebx
  xor    %ebp,%ebp
  xor    %r8d,%r8d
  jmp    L874
L884:
  mov    %eax,0x20(%rsp)
  lea    0x3(%r13),%r15
  cmp    %r14,%r12
  jae    L1927
  movzbl 0x3(%r13),%eax
  cmp    $0x3a,%al
  je     L221
  movsbl %al,%edi
  call   <Char2Int@plt>
  mov    0x20(%rsp),%r10d
  cmp    $0xff,%eax
  mov    %eax,%r8d
  jne    L1202
L89:
  mov    %r15,%rdx
  jmp    L1807
L628:
  movsbl %al,%edi
  mov    %r10,0x20(%rsp)
  call   <Char2Int@plt>
  mov    0x20(%rsp),%r10
  cmp    $0xff,%eax
  jne    L1535
  lea    0x4(%r15),%rdx
  cmp    %r14,%r10
  jae    L398
  movzbl 0x4(%r15),%eax
  mov    %rdx,0x20(%rsp)
  mov    %rdx,%r15
  cmp    $0x3a,%al
  je     L221
  movsbl %al,%edi
  call   <Char2Int@plt>
  mov    0x20(%rsp),%rdx
  mov    %r15,%r10
  mov    $0x7,%r8d
  cmp    $0xff,%eax
  jne    L1535
  jmp    L1807
L27:
  mov    $0xfd,%r8d
  jmp    L1807
L892:
  mov    %r15,%rdx
  mov    $0x8,%r8d
  jmp    L1807
  mov    %r15,%r13
  lea    0x450(%rsp),%r14
  jmp    L434
L1516:
  mov    %r8,%r15
  jmp    L221
  mov    %r15,%r13
  lea    0x450(%rsp),%r14
  jmp    L67
L1471:
  mov    %r8d,%r10d
  mov    %eax,%r8d
  cmp    $0xfd,%r10d
  je     L1948
  cmp    $0xfe,%r10d
  je     L123
  jmp    L1202
L414:
  mov    %r15,%rdx
  mov    $0x6,%r8d
  lea    0x450(%rsp),%r14
  jmp    L1807
L420:
  mov    %r15,%rdx
  mov    $0x1,%r8d
  jmp    L1807
L1675:
  mov    $0x3,%r8d
  jmp    L1807
L916:
  lea    0x3(%r8),%r15
  cmp    %r14,%rcx
  jae    L1573
  movzbl 0x3(%r8),%eax
  cmp    $0x3a,%al
  je     L221
  movsbl %al,%edi
  call   <Char2Int@plt>
  cmp    $0xff,%eax
  je     L125
L369:
  mov    %r15,%rdx
  mov    $0xc,%ecx
  mov    $0x3,%r8d
  xor    %ebp,%ebp
  jmp    L992
L1772:
  movsbl %al,%edi
  call   <Char2Int@plt>
  cmp    $0xff,%eax
  jne    L67
  lea    0x3(%r12),%rdx
  cmp    %r14,%r13
  jae    L1404
  movzbl 0x2(%r15),%eax
  cmp    $0x3a,%al
  je     L790
  mov    %rdx,0x20(%rsp)
  jmp    L1245
L125:
  mov    %r15,%rdx
  mov    $0x2,%r8d
  jmp    L1807
L790:
  mov    %rdx,%r15
  jmp    L221
L1050:
  mov    $0x4,%r8d
  jmp    L1807
L52:
  mov    $0x4,%r8d
  jmp    L874
  mov    %r15,%r10
  lea    0x450(%rsp),%r14
  jmp    L1535
  mov    %r15,%rdx
  mov    %edi,%r8d
  lea    0x450(%rsp),%r14
  jmp    L1269
  lea    0x450(%rsp),%r14
  jmp    L369
  mov    %r15,%r8
  lea    0x450(%rsp),%r14
  jmp    L678
L1366:
  mov    %r15,%rdx
  mov    $0xfe,%r8d
  jmp    L1807
L1660:
  mov    %r15,%rdx
  jmp    L885
L811:
  lea    0x4(%r10),%r15
  cmp    %r14,%rbx
  jae    L1860
  movzbl 0x4(%r10),%eax
  cmp    $0x3a,%al
  je     L1346
  movsbl %al,%edi
  call   <Char2Int@plt>
  mov    %eax,%r8d
  cmp    $0xff,%eax
  je     L886
  xor    %ebp,%ebp
  xor    %ebx,%ebx
  jmp    L1948
L265:
  mov    %rbx,%r15
  xor    %ebp,%ebp
  xor    %ebx,%ebx
  jmp    L221
L886:
  mov    %r15,%rdx
  xor    %ebx,%ebx
  xor    %ebp,%ebp
  mov    $0xfd,%r8d
  jmp    L1807
```

tool_calls: name: retrieve_data
arguments: data_tag: D3
data_type: string

tool: D3: rb

assistant: ```c
__attribute__((visibility("default"))) bool read_IntelHEX(void *ROM, char *file) {
  FILE *in_file;
  uint8_t parsed, lenght, checksum, mode = 0;
  uint16_t address;
  char buffer[1024];
  char *buffer_ptr;
  char *target_ptr;
  struct stat file_disc;
  if (!(in_file = fopen(file, "rb")))
    return false;
  fstat(in_file, &file_disc);
  for (int size = file_disc.st_size; size;) {
    if (size >= 1024) {
      fread(buffer_ptr = buffer, 1024, 1, in_file);
      size -= 1024;
    } else {
      fread(buffer_ptr = &buffer[1024 - size], size, 1, in_file);
      size = 0;
      fclose(in_file);
    }
    while (buffer_ptr++ < &buffer[1024]) {
      if (*buffer_ptr == ':')
        mode = 0;
      else if ((parsed = Char2Int(*buffer_ptr)) != 255) {
        switch (mode++) {
        case 0:
          lenght = parsed << 4;
          break;
        case 1:
          lenght |= parsed;
          checksum = lenght;
          break;
        case 2:
          address = 0;
        case 3:
        case 4:
        case 5:
          address |= parsed << (4 * (6 - mode));
          checksum -= address + (address >> 8);
          target_ptr = &ROM[address];
          break;
        case 7:
          if (parsed == 1) {
            mode += (253 - 8);
            target_ptr = NULL;
            address = 0;
          }
          break;
        case 8:
          *target_ptr = parsed << 4;
          break;
        case 9:
          *target_ptr |= parsed;
          checksum -= *(target_ptr++);
          if (--lenght > 0)
            mode = 7;
          else
            mode += (253 - 10);
          break;
        case 253:
          if (!(checksum & 0x0F == parsed))
            return false;
          break;
        case 254:
          if (!(checksum & 0xF0 == parsed << 4))
            return false;
          else if ((target_ptr == NULL) && (address == 0))
            return true;
          break;
        case 6:
        case 255:
        default:
          mode--;
          break;
        }
      }
    }
  }
}
```