user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %r15
  xor    %esi,%esi
  mov    $0x400,%edx
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x828,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x818(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%r15
  lea    0x410(%rsp),%r13
  mov    %r15,%rdi
  call   <memset@plt>
  xor    %esi,%esi
  mov    $0x400,%edx
  mov    %r13,%rdi
  call   <memset@plt>
  lea    D241(%rip),%rdi
  call   <getenv@plt>
  lea    D586(%rip),%rdi
  mov    %rax,%rbp
  call   <getenv@plt>
  test   %rbp,%rbp
  je     L9
  mov    %rax,%r12
  test   %rax,%rax
  je     L107
  mov    %rbp,%rdi
  call   <strlen@plt>
  cmp    $0x39c,%eax
  ja     L225
  mov    %rbp,%rsi
  mov    %r15,%rdi
  call   <strcat@plt>
  mov    $0x4,%edx
  lea    D296(%rip),%rsi
  mov    %r12,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L167
L223:
  lea    D56(%rip),%rsi
  mov    %r15,%rdi
  call   <strcat@plt>
L213:
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <strcat@plt>
  lea    D7(%rip),%rsi
  mov    %r13,%rdi
  call   <strcat@plt>
  lea    D146(%rip),%rsi
  mov    %r15,%rdi
  call   <fopen@plt>
  mov    %rax,%r14
  test   %rax,%rax
  je     L226
  lea    D338(%rip),%rsi
  mov    %r13,%rdi
  call   <fopen@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L15
  mov    %rax,%rcx
  mov    $0x3,%edx
  mov    $0x1,%esi
  lea    D399(%rip),%rdi
  lea    D589(%rip),%r12
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x34,%edx
  mov    $0x1,%esi
  lea    D492(%rip),%rdi
  lea    D185(%rip),%r15
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x18,%edx
  mov    $0x1,%esi
  lea    D277(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x42,%edx
  mov    $0x1,%esi
  lea    D340(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x49,%edx
  mov    $0x1,%esi
  lea    D593(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x8,%edx
  mov    $0x1,%esi
  lea    D28(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x47,%edx
  mov    $0x1,%esi
  lea    D3(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x44,%edx
  mov    $0x1,%esi
  lea    D281(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x23,%edx
  mov    $0x1,%esi
  lea    D597(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x4c,%edx
  mov    $0x1,%esi
  lea    D123(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x4a,%edx
  mov    $0x1,%esi
  lea    D479(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x37,%edx
  mov    $0x1,%esi
  lea    D94(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x4c,%edx
  mov    $0x1,%esi
  lea    D27(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x12,%edx
  mov    $0x1,%esi
  lea    D567(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x4d,%edx
  mov    $0x1,%esi
  lea    D427(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x48,%edx
  mov    $0x1,%esi
  lea    D551(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x46,%edx
  mov    $0x1,%esi
  lea    D445(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x44,%edx
  mov    $0x1,%esi
  lea    D441(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x40,%edx
  mov    $0x1,%esi
  lea    D606(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x47,%edx
  mov    $0x1,%esi
  lea    D406(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x3c,%edx
  mov    $0x1,%esi
  lea    D42(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x49,%edx
  mov    $0x1,%esi
  lea    D255(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x47,%edx
  mov    $0x1,%esi
  lea    D457(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x1d,%edx
  mov    $0x1,%esi
  lea    D79(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x46,%edx
  mov    $0x1,%esi
  lea    D543(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x49,%edx
  mov    $0x1,%esi
  lea    D497(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x44,%edx
  mov    $0x1,%esi
  lea    D495(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x49,%edx
  mov    $0x1,%esi
  lea    D611(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x46,%edx
  mov    $0x1,%esi
  lea    D271(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x47,%edx
  mov    $0x1,%esi
  lea    D616(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x48,%edx
  mov    $0x1,%esi
  lea    D23(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x49,%edx
  mov    $0x1,%esi
  lea    D122(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x48,%edx
  mov    $0x1,%esi
  lea    D58(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x49,%edx
  xor    %r13d,%r13d
  mov    $0x1,%esi
  lea    D432(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x43,%edx
  mov    $0x1,%esi
  lea    D435(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0xa,%edx
  mov    $0x1,%esi
  lea    D598(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x4,%edx
  mov    $0x1,%esi
  lea    D344(%rip),%rdi
  call   <fwrite@plt>
  mov    %r12,%rdi
  mov    %rbp,%rcx
  mov    $0x28,%edx
  mov    $0x1,%esi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x28,%edx
  mov    %r12,%rdi
  mov    $0x1,%esi
  lea    0xd(%rsp),%r12
  call   <fwrite@plt>
  mov    %rbp,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %rbp,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %rbp,%rcx
  mov    $0x1c,%edx
  mov    $0x1,%esi
  lea    D382(%rip),%rdi
  call   <fwrite@plt>
  jmp    L41
  nop
L156:
  add    $0x1,%r13d
L100:
  mov    %rbp,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  mov    %r15,%rdi
  call   <fwrite@plt>
  movzbl %bl,%edx
  lea    D556(%rip),%rsi
  mov    %r12,%rdi
  call   <sprintf@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <fputs@plt>
  mov    %rbp,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  lea    D173(%rip),%rdi
  call   <fwrite@plt>
L41:
  mov    %r14,%rdi
  call   <getc@plt>
  mov    %r14,%rdi
  mov    %eax,%ebx
  call   <feof@plt>
  test   %rax,%rax
  jne    L214
  xor    %esi,%esi
  mov    $0x2,%edx
  mov    %r12,%rdi
  call   <memset@plt>
  cmp    $0x10,%r13d
  jne    L156
  mov    %rbp,%rsi
  mov    $0xa,%edi
  mov    $0x1,%r13d
  call   <fputc@plt>
  jmp    L100
  nopl   0x0(%rax,%rax,1)
L214:
  mov    %rbp,%rcx
  mov    $0x4,%edx
  mov    $0x1,%esi
  lea    D484(%rip),%rdi
  call   <fwrite@plt>
  mov    %r14,%rdi
  call   <fclose@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  xor    %edi,%edi
  call   <exit@plt>
  xor    %eax,%eax
L72:
  mov    0x818(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L191
  add    $0x828,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L167:
  mov    $0x4,%edx
  lea    D35(%rip),%rsi
  mov    %r12,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L177
  mov    $0x4,%edx
  lea    D221(%rip),%rsi
  mov    %r12,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L223
  mov    $0x4,%edx
  lea    D584(%rip),%rsi
  mov    %r12,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L177
  mov    $0x4,%edx
  lea    D293(%rip),%rsi
  mov    %r12,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L177
  mov    $0x4,%edx
  lea    D103(%rip),%rsi
  mov    %r12,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L177
  mov    $0x4,%edx
  lea    D331(%rip),%rsi
  mov    %r12,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L177
  mov    $0x3,%edx
  lea    D174(%rip),%rsi
  mov    %r12,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L177
  mov    $0x3,%edx
  lea    D411(%rip),%rsi
  mov    %r12,%rdi
  call   <strncmp@plt>
  jmp    L223
L177:
  lea    D456(%rip),%rsi
  mov    %r15,%rdi
  call   <strcat@plt>
  jmp    L213
L225:
  lea    D175(%rip),%rdi
  call   <puts@plt>
L69:
  or     $0xffffffff,%eax
  jmp    L72
L107:
  lea    D84(%rip),%rdi
  call   <puts@plt>
  jmp    L69
L9:
  lea    D488(%rip),%rdi
  call   <puts@plt>
  jmp    L69
L15:
  mov    %r13,%rsi
  lea    D44(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L69
L226:
  mov    %r15,%rsi
  lea    D278(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L69
L191:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D241
type_infered: string
name: parse_data
arguments: data_label: D586
type_infered: string
name: parse_data
arguments: data_label: D296
type_infered: string
name: parse_data
arguments: data_label: D56
type_infered: string
name: parse_data
arguments: data_label: D7
type_infered: string
name: parse_data
arguments: data_label: D146
type_infered: string
name: parse_data
arguments: data_label: D338
type_infered: string
name: parse_data
arguments: data_label: D399
type_infered: string
name: parse_data
arguments: data_label: D589
type_infered: string
name: parse_data
arguments: data_label: D492
type_infered: string
name: parse_data
arguments: data_label: D185
type_infered: string
name: parse_data
arguments: data_label: D277
type_infered: string
name: parse_data
arguments: data_label: D340
type_infered: string
name: parse_data
arguments: data_label: D593
type_infered: string
name: parse_data
arguments: data_label: D28
type_infered: string
name: parse_data
arguments: data_label: D3
type_infered: string
name: parse_data
arguments: data_label: D281
type_infered: string
name: parse_data
arguments: data_label: D597
type_infered: string
name: parse_data
arguments: data_label: D123
type_infered: string
name: parse_data
arguments: data_label: D479
type_infered: string
name: parse_data
arguments: data_label: D94
type_infered: string
name: parse_data
arguments: data_label: D27
type_infered: string
name: parse_data
arguments: data_label: D567
type_infered: string
name: parse_data
arguments: data_label: D427
type_infered: string
name: parse_data
arguments: data_label: D551
type_infered: string
name: parse_data
arguments: data_label: D445
type_infered: string
name: parse_data
arguments: data_label: D441
type_infered: string
name: parse_data
arguments: data_label: D606
type_infered: string
name: parse_data
arguments: data_label: D406
type_infered: string
name: parse_data
arguments: data_label: D42
type_infered: string
name: parse_data
arguments: data_label: D255
type_infered: string
name: parse_data
arguments: data_label: D457
type_infered: string
name: parse_data
arguments: data_label: D79
type_infered: string
name: parse_data
arguments: data_label: D543
type_infered: string
name: parse_data
arguments: data_label: D497
type_infered: string
name: parse_data
arguments: data_label: D495
type_infered: string
name: parse_data
arguments: data_label: D611
type_infered: string
name: parse_data
arguments: data_label: D271
type_infered: string
name: parse_data
arguments: data_label: D616
type_infered: string
name: parse_data
arguments: data_label: D23
type_infered: string
name: parse_data
arguments: data_label: D122
type_infered: string
name: parse_data
arguments: data_label: D58
type_infered: string
name: parse_data
arguments: data_label: D432
type_infered: string
name: parse_data
arguments: data_label: D435
type_infered: string
name: parse_data
arguments: data_label: D598
type_infered: string
name: parse_data
arguments: data_label: D344
type_infered: string
name: parse_data
arguments: data_label: D382
type_infered: string
name: parse_data
arguments: data_label: D556
type_infered: string
name: parse_data
arguments: data_label: D173
type_infered: string
name: parse_data
arguments: data_label: D484
type_infered: string
name: parse_data
arguments: data_label: D35
type_infered: string
name: parse_data
arguments: data_label: D221
type_infered: string
name: parse_data
arguments: data_label: D584
type_infered: string
name: parse_data
arguments: data_label: D293
type_infered: string
name: parse_data
arguments: data_label: D103
type_infered: string
name: parse_data
arguments: data_label: D331
type_infered: string
name: parse_data
arguments: data_label: D174
type_infered: string
name: parse_data
arguments: data_label: D411
type_infered: string
name: parse_data
arguments: data_label: D456
type_infered: string
name: parse_data
arguments: data_label: D175
type_infered: string
name: parse_data
arguments: data_label: D84
type_infered: string
name: parse_data
arguments: data_label: D488
type_infered: string
name: parse_data
arguments: data_label: D44
type_infered: string
name: parse_data
arguments: data_label: D278
type_infered: string

tool: D241: RT28xx_DIR

tool: D586: CHIPSET

tool: D296: 2860

tool: D56: /common/rt2860.bin

tool: D7: /include/firmware.h

tool: D146: r

tool: D338: w

tool: D399: /*


tool: D589: /* AUTO GEN PLEASE DO NOT MODIFY IT */ 


tool: D492:  Copyright (c) 2007, Ralink Technology Corporation 


tool: D185: 0x

tool: D277:  All rights reserved. 



tool: D340:  Redistribution.  Redistribution and use in binary form, without 


tool: D593:  modification, are permitted provided that the following conditions are 


tool: D28:  met: 



tool: D3:  	* Redistributions must reproduce the above copyright notice and the 


tool: D281:  	following disclaimer in the documentation and/or other materials 


tool: D597:  	provided with the distribution. 


tool: D123:  	* Neither the name of Ralink Technology Corporation nor the names of its 


tool: D479:  	suppliers may be used to endorse or promote products derived from this 


tool: D94:  	software without specific prior written permission. 


tool: D27:  	* No reverse engineering, decompilation, or disassembly of this software 


tool: D567:  	is permitted. 



tool: D427:  Limited patent license. Ralink Technology Corporation grants a world-wide, 


tool: D551:  royalty-free, non-exclusive license under patents it now or hereafter 


tool: D445:  owns or controls to make, have made, use, import, offer to sell and 


tool: D441:  sell ("Utilize") this software, but solely to the extent that any 


tool: D606:  such patent is necessary to Utilize the software alone, or in 


tool: D406:  combination with an operating system licensed under an approved Open 


tool: D42:  Source license as listed by the Open Source Initiative at 


tool: D255:  http://opensource.org/licenses.  The patent license shall not apply to 


tool: D457:  any other combinations which include this software.  No hardware per 


tool: D79:  se is licensed hereunder. 



tool: D543:  DISCLAIMER.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 


tool: D497:  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 


tool: D495:  BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 


tool: D611:  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 


tool: D271:  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 


tool: D616:  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 


tool: D23:  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 


tool: D122:  OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 


tool: D58:  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 


tool: D432:  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 


tool: D435:  USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 


tool: D598:  DAMAGE. 


tool: D344: */ 


tool: D382: UCHAR FirmwareImage [] = { 


tool: D556: %02x

tool: D173: , 

tool: D484: } ;


tool: D35: 2870

tool: D221: 3090

tool: D584: 2070

tool: D293: 3070

tool: D103: 3572

tool: D331: 3370

tool: D174: USB

tool: D411: PCI

tool: D456: /common/rt2870.bin

tool: D175: Environment value "RT28xx_DIR" is too long!

tool: D84: Environment value "CHIPSET" not export 

tool: D488: Environment value "RT28xx_DIR" not export 

tool: D44: Can't open write file %s 


tool: D278: Can't read file %s 


assistant: ```c
int main(int argc, char *argv[]) {
  FILE *infile, *outfile;
  char infname[1024];
  char outfname[1024];
  char *rt28xxdir;
  char *chipset;
  int i = 0;
  unsigned char c;
  memset(infname, 0, 1024);
  memset(outfname, 0, 1024);
  rt28xxdir = (char *)getenv("RT28xx_DIR");
  chipset = (char *)getenv("CHIPSET");
  if (!rt28xxdir) {
    printf("Environment value \"RT28xx_DIR\" not export \n");
    return -1;
  }
  if (!chipset) {
    printf("Environment value \"CHIPSET\" not export \n");
    return -1;
  }
  if (strlen(rt28xxdir) > (sizeof(infname) - 100)) {
    printf("Environment value \"RT28xx_DIR\" is too long!\n");
    return -1;
  }
  strcat(infname, rt28xxdir);
  if (strncmp(chipset, "2860", 4) == 0)
    strcat(infname, "/common/rt2860.bin");
  else if (strncmp(chipset, "2870", 4) == 0)
    strcat(infname, "/common/rt2870.bin");
  else if (strncmp(chipset, "3090", 4) == 0)
    strcat(infname, "/common/rt2860.bin");
  else if (strncmp(chipset, "2070", 4) == 0)
    strcat(infname, "/common/rt2870.bin");
  else if (strncmp(chipset, "3070", 4) == 0)
    strcat(infname, "/common/rt2870.bin");
  else if (strncmp(chipset, "3572", 4) == 0)
    strcat(infname, "/common/rt2870.bin");
  else if (strncmp(chipset, "3370", 4) == 0)
    strcat(infname, "/common/rt2870.bin");
  else if (strncmp(chipset, "USB", 3) == 0)
    strcat(infname, "/common/rt2870.bin");
  else if (strncmp(chipset, "PCI", 3) == 0)
    strcat(infname, "/common/rt2860.bin");
  else
    strcat(infname, "/common/rt2860.bin");
  strcat(outfname, rt28xxdir);
  strcat(outfname, "/include/firmware.h");
  infile = fopen(infname, "r");
  if (infile == (FILE *)NULL) {
    printf("Can't read file %s \n", infname);
    return -1;
  }
  outfile = fopen(outfname, "w");
  if (outfile == (FILE *)NULL) {
    printf("Can't open write file %s \n", outfname);
    return -1;
  }
  fputs("/*\n", outfile);
  fputs(" Copyright (c) 2007, Ralink Technology Corporation \n", outfile);
  fputs(" All rights reserved. \n\n", outfile);
  fputs(" Redistribution.  Redistribution and use in binary form, without \n", outfile);
  fputs(" modification, are permitted provided that the following conditions are \n", outfile);
  fputs(" met: \n\n", outfile);
  fputs(" \t* Redistributions must reproduce the above copyright notice and the \n", outfile);
  fputs(" \tfollowing disclaimer in the documentation and/or other materials \n", outfile);
  fputs(" \tprovided with the distribution. \n", outfile);
  fputs(" \t* Neither the name of Ralink Technology Corporation nor the names of its \n", outfile);
  fputs(" \tsuppliers may be used to endorse or promote products derived from this \n", outfile);
  fputs(" \tsoftware without specific prior written permission. \n", outfile);
  fputs(" \t* No reverse engineering, decompilation, or disassembly of this software \n", outfile);
  fputs(" \tis permitted. \n\n", outfile);
  fputs(" Limited patent license. Ralink Technology Corporation grants a world-wide, \n", outfile);
  fputs(" royalty-free, non-exclusive license under patents it now or hereafter \n", outfile);
  fputs(" owns or controls to make, have made, use, import, offer to sell and \n", outfile);
  fputs(" sell (\"Utilize\") this software, but solely to the extent that any \n", outfile);
  fputs(" such patent is necessary to Utilize the software alone, or in \n", outfile);
  fputs(" combination with an operating system licensed under an approved Open \n", outfile);
  fputs(" Source license as listed by the Open Source Initiative at \n", outfile);
  fputs(" http://opensource.org/licenses.  The patent license shall not apply to \n", outfile);
  fputs(" any other combinations which include this software.  No hardware per \n", outfile);
  fputs(" se is licensed hereunder. \n\n", outfile);
  fputs(" DISCLAIMER.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND \n", outfile);
  fputs(" CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, \n", outfile);
  fputs(" BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND \n", outfile);
  fputs(" FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE \n", outfile);
  fputs(" COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, \n", outfile);
  fputs(" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, \n", outfile);
  fputs(" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS \n", outfile);
  fputs(" OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND \n", outfile);
  fputs(" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR \n", outfile);
  fputs(" TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE \n", outfile);
  fputs(" USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH \n", outfile);
  fputs(" DAMAGE. \n", outfile);
  fputs("*/ \n", outfile);
  fputs("/* AUTO GEN PLEASE DO NOT MODIFY IT */ \n", outfile);
  fputs("/* AUTO GEN PLEASE DO NOT MODIFY IT */ \n", outfile);
  fputs("\n", outfile);
  fputs("\n", outfile);
  fputs("UCHAR FirmwareImage [] = { \n", outfile);
  while (1) {
    char cc[3];
    c = getc(infile);
    if (feof(infile))
      break;
    memset(cc, 0, 2);
    if (i >= 16) {
      fputs("\n", outfile);
      i = 0;
    }
    fputs("0x", outfile);
    sprintf(cc, "%02x", c);
    fputs(cc, outfile);
    fputs(", ", outfile);
    i++;
  }
  fputs("} ;\n", outfile);
  fclose(infile);
  fclose(outfile);
  exit(0);
}
```