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

```asm
<find_pname>:
  endbr64
  sub    $0x358,%rsp
  mov    %edi,%edx
  mov    %rsi,%r8
  mov    %fs:0x28,%rax
  mov    %rax,0x348(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rdi
  mov    $0x69,%ecx
  rep stos %rax,%es:(%rdi)
  movabs $0x746f6f42334d,%rsi
  mov    $0x0,%edi
  mov    %rsi,(%rsp)
  mov    %rdi,0x8(%rsp)
  movl   $0x20000,0x14(%rsp)
  movabs $0x702d746f6f42334d,%rsi
  movabs $0x656c626174,%rdi
  mov    %rsi,0x18(%rsp)
  mov    %rdi,0x20(%rsp)
  movl   $0x10000,0x2c(%rsp)
  movabs $0x525f746f6f42334d,%rsi
  mov    $0x3131,%edi
  mov    %rsi,0x30(%rsp)
  mov    %rdi,0x38(%rsp)
  movl   $0x200000,0x44(%rsp)
  movabs $0x656c62617450,%rsi
  mov    $0x0,%edi
  mov    %rsi,0x48(%rsp)
  mov    %rdi,0x50(%rsp)
  movl   $0x10000,0x5c(%rsp)
  movabs $0x746f6f6274736146,%rsi
  mov    $0x0,%edi
  mov    %rsi,0x60(%rsp)
  mov    %rdi,0x68(%rsp)
  movl   $0x110000,0x74(%rsp)
  movq   $0x6f676f4c,0x78(%rsp)
  movq   $0x0,0x80(%rsp)
  movl   $0x130000,0x8c(%rsp)
  movabs $0x6c656e72654b,%rsi
  mov    $0x0,%edi
  mov    %rsi,0x90(%rsp)
  mov    %rdi,0x98(%rsp)
  movl   $0x30000,0xa4(%rsp)
  movabs $0x525f6c656e72654b,%rsi
  mov    $0x3131,%edi
  mov    %rsi,0xa8(%rsp)
  mov    %rdi,0xb0(%rsp)
  movl   $0x90000,0xbc(%rsp)
  movabs $0x736b726f577856,%rsi
  mov    $0x0,%edi
  mov    %rsi,0xc0(%rsp)
  mov    %rdi,0xc8(%rsp)
  movl   $0x40000,0xd4(%rsp)
  movabs $0x5f736b726f577856,%rsi
  mov    $0x313152,%edi
  mov    %rsi,0xd8(%rsp)
  mov    %rdi,0xe0(%rsp)
  movl   $0x220000,0xec(%rsp)
  movabs $0x6567616d49334d,%rsi
  mov    $0x0,%edi
  mov    %rsi,0xf0(%rsp)
  mov    %rdi,0xf8(%rsp)
  movl   $0x50000,0x104(%rsp)
  movabs $0x5f6567616d49334d,%rsi
  mov    $0x313152,%edi
  mov    %rsi,0x108(%rsp)
  mov    %rdi,0x110(%rsp)
  movl   $0x230000,0x11c(%rsp)
  movq   $0x505344,0x120(%rsp)
  movq   $0x0,0x128(%rsp)
  movl   $0x60000,0x134(%rsp)
  movabs $0x3131525f505344,%rsi
  mov    $0x0,%edi
  mov    %rsi,0x138(%rsp)
  mov    %rdi,0x140(%rsp)
  movl   $0x240000,0x14c(%rsp)
  movabs $0x64616f6c64764e,%rsi
  mov    $0x0,%edi
  mov    %rsi,0x150(%rsp)
  mov    %rdi,0x158(%rsp)
  movl   $0x70000,0x164(%rsp)
  movabs $0x5f64616f6c64764e,%rsi
  mov    $0x313152,%edi
  mov    %rsi,0x168(%rsp)
  mov    %rdi,0x170(%rsp)
  movl   $0x250000,0x17c(%rsp)
  movabs $0x676d69764e,%rsi
  mov    $0x0,%edi
  mov    %rsi,0x180(%rsp)
  mov    %rdi,0x188(%rsp)
  movl   $0x80000,0x194(%rsp)
  movabs $0x6d6574737953,%rsi
  mov    $0x0,%edi
  mov    %rsi,0x198(%rsp)
  mov    %rdi,0x1a0(%rsp)
  movl   $0x590000,0x1ac(%rsp)
  mov    %rsi,0x1b0(%rsp)
  mov    %rdi,0x1b8(%rsp)
  movl   $0x100000,0x1c4(%rsp)
  movq   $0x505041,0x1c8(%rsp)
  movq   $0x0,0x1d0(%rsp)
  movl   $0x570000,0x1dc(%rsp)
  movq   $0x505041,0x1e0(%rsp)
  movq   $0x0,0x1e8(%rsp)
  movl   $0x5a0000,0x1f4(%rsp)
  movabs $0x6f666e696d654f,%rsi
  mov    $0x0,%edi
  mov    %rsi,0x1f8(%rsp)
  mov    %rdi,0x200(%rsp)
  movl   $0xa0000,0x20c(%rsp)
  movabs $0x4f53494d4f524443,%r9
  mov    $0x0,%r10d
  mov    %r9,0x210(%rsp)
  mov    %r10,0x218(%rsp)
  movl   $0xb0000,0x224(%rsp)
  mov    %rsi,0x228(%rsp)
  mov    %rdi,0x230(%rsp)
  movl   $0x550000,0x23c(%rsp)
  mov    %rsi,0x240(%rsp)
  mov    %rdi,0x248(%rsp)
  movl   $0x510000,0x254(%rsp)
  mov    %rsi,0x258(%rsp)
  mov    %rdi,0x260(%rsp)
  movl   $0x1a0000,0x26c(%rsp)
  movabs $0x4955424557,%rsi
  mov    $0x0,%edi
  mov    %rsi,0x270(%rsp)
  mov    %rdi,0x278(%rsp)
  movl   $0x560000,0x284(%rsp)
  mov    %rsi,0x288(%rsp)
  mov    %rdi,0x290(%rsp)
  movl   $0x5b0000,0x29c(%rsp)
  movabs $0x67666378616d6957,%rsi
  mov    $0x0,%edi
  mov    %rsi,0x2a0(%rsp)
  mov    %rdi,0x2a8(%rsp)
  movl   $0x170000,0x2b4(%rsp)
  movabs $0x66726378616d6957,%rsi
  mov    $0x0,%edi
  mov    %rsi,0x2b8(%rsp)
  mov    %rdi,0x2c0(%rsp)
  movl   $0x180000,0x2cc(%rsp)
  movabs $0x6174616472657355,%rsi
  mov    $0x0,%edi
  mov    %rsi,0x2d0(%rsp)
  mov    %rdi,0x2d8(%rsp)
  movl   $0x190000,0x2e4(%rsp)
  movabs $0x656e696c6e4f,%rsi
  mov    $0x0,%edi
  mov    %rsi,0x2e8(%rsp)
  mov    %rdi,0x2f0(%rsp)
  movl   $0x1b0000,0x2fc(%rsp)
  mov    %rsi,0x300(%rsp)
  mov    %rdi,0x308(%rsp)
  movl   $0x5d0000,0x314(%rsp)
  mov    %rsi,0x318(%rsp)
  mov    %rdi,0x320(%rsp)
  movl   $0x5e0000,0x32c(%rsp)
  lea    0x2c(%rsp),%rcx
  mov    $0x0,%esi
  mov    $0x20000,%eax
L16:
  cmp    %edx,%eax
  je     L8
  add    $0x1,%esi
  add    $0x18,%rcx
  mov    -0x18(%rcx),%eax
  test   %eax,%eax
  jne    L16
L27:
  lea    D6(%rip),%rsi
  mov    %r8,%rdi
  call   <sprintf@plt>
  jmp    L49
L8:
  test   %eax,%eax
  je     L27
  mov    %esi,%esi
  lea    (%rsi,%rsi,2),%rax
  lea    (%rsp,%rax,8),%rsi
  mov    %r8,%rdi
  call   <strcpy@plt>
L49:
  mov    0x348(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L9
  add    $0x358,%rsp
  ret
L9:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D6
type_infered: string

tool: D6: U%08x

assistant: ```c
void find_pname(unsigned int id, unsigned char *pname) {
  unsigned int j;
  struct {
    char name[20];
    int code;
  } pcodes[] = {{"M3Boot", 0x20000}, {"M3Boot-ptable", 0x10000}, {"M3Boot_R11", 0x200000}, {"Ptable", 0x10000}, {"Fastboot", 0x110000}, {"Logo", 0x130000}, {"Kernel", 0x30000}, {"Kernel_R11", 0x90000}, {"VxWorks", 0x40000}, {"VxWorks_R11", 0x220000}, {"M3Image", 0x50000}, {"M3Image_R11", 0x230000}, {"DSP", 0x60000}, {"DSP_R11", 0x240000}, {"Nvdload", 0x70000}, {"Nvdload_R11", 0x250000}, {"Nvimg", 0x80000}, {"System", 0x590000}, {"System", 0x100000}, {"APP", 0x570000}, {"APP", 0x5a0000}, {"Oeminfo", 0xa0000}, {"CDROMISO", 0xb0000}, {"Oeminfo", 0x550000}, {"Oeminfo", 0x510000}, {"Oeminfo", 0x1a0000}, {"WEBUI", 0x560000}, {"WEBUI", 0x5b0000}, {"Wimaxcfg", 0x170000}, {"Wimaxcrf", 0x180000}, {"Userdata", 0x190000}, {"Online", 0x1b0000}, {"Online", 0x5d0000}, {"Online", 0x5e0000}, {0, 0}};
  for (j = 0; pcodes[j].code != 0; j++) {
    if (pcodes[j].code == id)
      break;
  }
  if (pcodes[j].code != 0)
    strcpy(pname, pcodes[j].name);
  else
    sprintf(pname, "U%08x", id);
}
```