ylfeng/ReF-Decompile-dataset huggingface dataset:
user: 请将以下的汇编代码转换成C语言代码：

```asm
<digits_of>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %esi,%ebx
  cmp    $0x1a,%edi
  je     L49
  mov    %esi,%eax
  mov    $0x1,%r12d
  cltd
  idiv   %edi
  test   %eax,%eax
  je     L27
  xchg   %ax,%ax
L38:
  cltd
  add    $0x1,%r12d
  idiv   %edi
  test   %eax,%eax
  jne    L38
L27:
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L49:
  xor    %r12d,%r12d
  test   %esi,%esi
  jle    L27
  xor    %ebp,%ebp
  nopl   0x0(%rax)
L46:
  mov    %r12d,%esi
  mov    $0x1a,%edi
  add    $0x1,%r12d
  call   <pow@plt>
  imul   $0x1a,%eax,%eax
  add    %eax,%ebp
  cmp    %ebp,%ebx
  jg     L46
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
int digits_of(int base, int value) {
  int s = 0, i = 0;
  if (base == 26) {
    while (s < value) {
      s += 26 * pow(26, i);
      i++;
    }
    return i;
  } else {
    i = 1;
    while (value /= base)
      i++;
    return i;
  }
}
```
user: 下面的汇编指令对应的C源代码是什么：

```asm
<digits_of>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %esi,%ebx
  cmp    $0x1a,%edi
  je     L4
  mov    %esi,%eax
  mov    $0x1,%r12d
  cltd
  idiv   %edi
  test   %eax,%eax
  je     L37
  xchg   %ax,%ax
L10:
  cltd
  add    $0x1,%r12d
  idiv   %edi
  test   %eax,%eax
  jne    L10
L37:
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L4:
  xor    %r12d,%r12d
  test   %esi,%esi
  jle    L37
  xor    %ebp,%ebp
  nopl   0x0(%rax)
L34:
  mov    %r12d,%esi
  mov    $0x1a,%edi
  add    $0x1,%r12d
  call   <pow@plt>
  imul   $0x1a,%eax,%eax
  add    %eax,%ebp
  cmp    %ebp,%ebx
  jg     L34
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
int digits_of(int base, int value) {
  int s = 0, i = 0;
  if (base == 26) {
    while (s < value) {
      s += 26 * pow(26, i);
      i++;
    }
    return i;
  } else {
    i = 1;
    while (value /= base)
      i++;
    return i;
  }
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<rgph_u32x3_jenkins2v_u32>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    $0x9e3779b9,%edi
  call   <UINT32_C@plt>
  mov    -0x28(%rbp),%rdx
  mov    %eax,(%rdx)
  mov    -0x28(%rbp),%rax
  lea    0x4(%rax),%rbx
  mov    $0x9e3779b9,%edi
  call   <UINT32_C@plt>
  mov    %eax,(%rbx)
  mov    -0x28(%rbp),%rax
  add    $0x8,%rax
  mov    -0x20(%rbp),%rdx
  mov    %edx,(%rax)
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <htole32@plt>
  mov    -0x28(%rbp),%rdx
  mov    (%rdx),%edx
  add    %edx,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x28(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  lea    0x4(%rax),%edx
  mov    -0x28(%rbp),%rax
  add    $0x8,%rax
  mov    %edx,(%rax)
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <rgph_jenkins2_mix@plt>
  nop
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
void rgph_u32x3_jenkins2v_u32(uint32_t value, uintptr_t seed, uint32_t *h) {
  h[0] = UINT32_C(0x9e3779b9);
  h[1] = UINT32_C(0x9e3779b9);
  h[2] = seed;
  h[0] += htole32(value);
  h[2] += sizeof(value);
  rgph_jenkins2_mix(h);
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<rgph_u32x3_jenkins2v_u32>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%ebp
  mov    %rsi,%r12
  mov    %rdx,%rbx
  mov    $0x9e3779b9,%edi
  call   <UINT32_C@plt>
  mov    %eax,(%rbx)
  mov    $0x9e3779b9,%edi
  call   <UINT32_C@plt>
  mov    %eax,0x4(%rbx)
  mov    %r12d,0x8(%rbx)
  mov    %ebp,%edi
  call   <htole32@plt>
  add    %eax,(%rbx)
  addl   $0x4,0x8(%rbx)
  mov    %rbx,%rdi
  call   <rgph_jenkins2_mix@plt>
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

assistant: ```c
void rgph_u32x3_jenkins2v_u32(uint32_t value, uintptr_t seed, uint32_t *h) {
  h[0] = UINT32_C(0x9e3779b9);
  h[1] = UINT32_C(0x9e3779b9);
  h[2] = seed;
  h[0] += htole32(value);
  h[2] += sizeof(value);
  rgph_jenkins2_mix(h);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<rgph_u32x3_jenkins2v_u32>:
  endbr64
  push   %r12
  mov    %edi,%r12d
  mov    $0x9e3779b9,%edi
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  mov    %rsi,%rbx
  call   <UINT32_C@plt>
  mov    $0x9e3779b9,%edi
  mov    %eax,0x0(%rbp)
  call   <UINT32_C@plt>
  mov    %ebx,0x8(%rbp)
  mov    %r12d,%edi
  mov    %eax,0x4(%rbp)
  call   <htole32@plt>
  addl   $0x4,0x8(%rbp)
  pop    %rbx
  mov    %rbp,%rdi
  add    %eax,0x0(%rbp)
  pop    %rbp
  pop    %r12
  jmp    1080 <rgph_jenkins2_mix@plt>
```

assistant: ```c
void rgph_u32x3_jenkins2v_u32(uint32_t value, uintptr_t seed, uint32_t *h) {
  h[0] = UINT32_C(0x9e3779b9);
  h[1] = UINT32_C(0x9e3779b9);
  h[2] = seed;
  h[0] += htole32(value);
  h[2] += sizeof(value);
  rgph_jenkins2_mix(h);
}
```
user: 下面的汇编指令对应的C源代码是什么:

```asm
<rgph_u32x3_jenkins2v_u32>:
  endbr64
  push   %r12
  mov    %edi,%r12d
  mov    $0x9e3779b9,%edi
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  mov    %rsi,%rbx
  call   <UINT32_C@plt>
  mov    $0x9e3779b9,%edi
  mov    %eax,0x0(%rbp)
  call   <UINT32_C@plt>
  movd   %ebx,%xmm1
  mov    %r12d,%edi
  movd   %eax,%xmm0
  punpckldq %xmm1,%xmm0
  movq   %xmm0,0x4(%rbp)
  call   <htole32@plt>
  addl   $0x4,0x8(%rbp)
  pop    %rbx
  mov    %rbp,%rdi
  add    %eax,0x0(%rbp)
  pop    %rbp
  pop    %r12
  jmp    1080 <rgph_jenkins2_mix@plt>
```

assistant: ```c
void rgph_u32x3_jenkins2v_u32(uint32_t value, uintptr_t seed, uint32_t *h) {
  h[0] = UINT32_C(0x9e3779b9);
  h[1] = UINT32_C(0x9e3779b9);
  h[2] = seed;
  h[0] += htole32(value);
  h[2] += sizeof(value);
  rgph_jenkins2_mix(h);
}
```
user: Converte this assembly snippet into its equivalent C code:

```asm
<EMACPHYConfigSet>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    -0x14(%rbp),%eax
  add    $0xfc4,%eax
  cltq
  mov    (%rax),%eax
  and    $0xc0000000,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x14(%rbp),%eax
  add    $0xfc4,%eax
  cltq
  mov    %rax,%rdx
  mov    -0x18(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x18(%rbp),%eax
  and    $0xc0000000,%eax
  test   %eax,%eax
  jne    L28
  mov    $0xf0003000,%edi
  call   <SysCtlPeripheralReset@plt>
  nop
L10:
  mov    $0xf0003000,%edi
  call   <SysCtlPeripheralReady@plt>
  test   %eax,%eax
  je     L10
  mov    $0x3e8,%edi
  call   <SysCtlDelay@plt>
L28:
  mov    -0x18(%rbp),%eax
  and    $0xc0000000,%eax
  cmp    $0xc0000000,%eax
  jne    L45
  mov    $0x400ecfc8,%eax
  mov    (%rax),%eax
  mov    $0x400ecfc8,%edx
  or     $0x30000,%eax
  mov    %eax,(%rdx)
  jmp    L23
L45:
  mov    $0x400ecfc8,%eax
  mov    (%rax),%eax
  mov    $0x400ecfc8,%edx
  and    $0xfffcffff,%eax
  mov    %eax,(%rdx)
L23:
  mov    -0x18(%rbp),%eax
  and    $0xc0000000,%eax
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  cmp    %eax,%edx
  je     L39
  mov    $0x400ec000,%edi
  call   <EMACReset@plt>
  mov    $0x3e8,%edi
  call   <SysCtlDelay@plt>
L39:
  nop
  leave
  ret
```

assistant: ```c
void EMACPHYConfigSet(uint32_t ui32Base, uint32_t ui32Config) {
  uint32_t ui32Val;
  ui32Val = (*((volatile uint32_t *)(ui32Base + 0x00000FC4))) & 0xC0000000;
  (*((volatile uint32_t *)(ui32Base + 0x00000FC4))) = ui32Config;
  if ((ui32Config & 0xC0000000) == 0x00000000) {
    SysCtlPeripheralReset(0xf0003000);
    while (!SysCtlPeripheralReady(0xf0003000)) {
    }
    SysCtlDelay(1000);
  }
  if ((ui32Config & 0xC0000000) == 0xC0000000) {
    (*((volatile uint32_t *)(0x400EC000 + 0x00000FC8))) |= (0x00020000 | 0x00010000);
  } else {
    (*((volatile uint32_t *)(0x400EC000 + 0x00000FC8))) &= ~(0x00020000 | 0x00010000);
  }
  if (ui32Val != (ui32Config & 0xC0000000)) {
    EMACReset(0x400EC000);
    SysCtlDelay(1000);
  }
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<EMACPHYConfigSet>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  add    $0xfc4,%edi
  movslq %edi,%rdi
  mov    (%rdi),%ebp
  and    $0xc0000000,%ebp
  mov    %esi,(%rdi)
  mov    %esi,%ebx
  and    $0xc0000000,%ebx
  je     L48
  cmp    $0xc0000000,%ebx
  jne    L53
  mov    0x400ecfc8,%eax
  or     $0x30000,%eax
  mov    %eax,0x400ecfc8
  jmp    L20
L48:
  mov    $0xf0003000,%edi
  call   <SysCtlPeripheralReset@plt>
L25:
  mov    $0xf0003000,%edi
  call   <SysCtlPeripheralReady@plt>
  test   %eax,%eax
  je     L25
  mov    $0x3e8,%edi
  call   <SysCtlDelay@plt>
L53:
  mov    0x400ecfc8,%eax
  and    $0xfffcffff,%eax
  mov    %eax,0x400ecfc8
L20:
  cmp    %ebp,%ebx
  jne    L18
L8:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L18:
  mov    $0x400ec000,%edi
  call   <EMACReset@plt>
  mov    $0x3e8,%edi
  call   <SysCtlDelay@plt>
  jmp    L8
```

assistant: ```c
void EMACPHYConfigSet(uint32_t ui32Base, uint32_t ui32Config) {
  uint32_t ui32Val;
  ui32Val = (*((volatile uint32_t *)(ui32Base + 0x00000FC4))) & 0xC0000000;
  (*((volatile uint32_t *)(ui32Base + 0x00000FC4))) = ui32Config;
  if ((ui32Config & 0xC0000000) == 0x00000000) {
    SysCtlPeripheralReset(0xf0003000);
    while (!SysCtlPeripheralReady(0xf0003000)) {
    }
    SysCtlDelay(1000);
  }
  if ((ui32Config & 0xC0000000) == 0xC0000000) {
    (*((volatile uint32_t *)(0x400EC000 + 0x00000FC8))) |= (0x00020000 | 0x00010000);
  } else {
    (*((volatile uint32_t *)(0x400EC000 + 0x00000FC8))) &= ~(0x00020000 | 0x00010000);
  }
  if (ui32Val != (ui32Config & 0xC0000000)) {
    EMACReset(0x400EC000);
    SysCtlDelay(1000);
  }
}
```
user: 请从给定的汇编指令推导出C源代码：

```asm
<EMACPHYConfigSet>:
  endbr64
  push   %rbp
  add    $0xfc4,%edi
  push   %rbx
  movslq %edi,%rdi
  mov    %esi,%ebx
  sub    $0x8,%rsp
  mov    (%rdi),%ebp
  mov    %esi,(%rdi)
  and    $0xc0000000,%ebp
  and    $0xc0000000,%ebx
  je     L35
  cmp    $0xc0000000,%ebx
  jne    L4
  mov    0x400ecfc8,%eax
  or     $0x30000,%eax
  mov    %eax,0x400ecfc8
  cmp    %ebp,%ebx
  je     L40
L44:
  mov    $0x400ec000,%edi
  call   <EMACReset@plt>
  add    $0x8,%rsp
  mov    $0x3e8,%edi
  pop    %rbx
  pop    %rbp
  jmp    1080 <SysCtlDelay@plt>
L35:
  mov    $0xf0003000,%edi
  call   <SysCtlPeripheralReset@plt>
  nopw   0x0(%rax,%rax,1)
L30:
  mov    $0xf0003000,%edi
  call   <SysCtlPeripheralReady@plt>
  test   %eax,%eax
  je     L30
  mov    $0x3e8,%edi
  call   <SysCtlDelay@plt>
L4:
  mov    0x400ecfc8,%eax
  and    $0xfffcffff,%eax
  mov    %eax,0x400ecfc8
  cmp    %ebp,%ebx
  jne    L44
L40:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
void EMACPHYConfigSet(uint32_t ui32Base, uint32_t ui32Config) {
  uint32_t ui32Val;
  ui32Val = (*((volatile uint32_t *)(ui32Base + 0x00000FC4))) & 0xC0000000;
  (*((volatile uint32_t *)(ui32Base + 0x00000FC4))) = ui32Config;
  if ((ui32Config & 0xC0000000) == 0x00000000) {
    SysCtlPeripheralReset(0xf0003000);
    while (!SysCtlPeripheralReady(0xf0003000)) {
    }
    SysCtlDelay(1000);
  }
  if ((ui32Config & 0xC0000000) == 0xC0000000) {
    (*((volatile uint32_t *)(0x400EC000 + 0x00000FC8))) |= (0x00020000 | 0x00010000);
  } else {
    (*((volatile uint32_t *)(0x400EC000 + 0x00000FC8))) &= ~(0x00020000 | 0x00010000);
  }
  if (ui32Val != (ui32Config & 0xC0000000)) {
    EMACReset(0x400EC000);
    SysCtlDelay(1000);
  }
}
```
user: 请将以下的汇编代码转换成C语言代码:

```asm
<EMACPHYConfigSet>:
  endbr64
  push   %rbp
  add    $0xfc4,%edi
  push   %rbx
  movslq %edi,%rdi
  mov    %esi,%ebx
  sub    $0x8,%rsp
  mov    (%rdi),%ebp
  mov    %esi,(%rdi)
  and    $0xc0000000,%ebp
  and    $0xc0000000,%ebx
  je     L44
  cmp    $0xc0000000,%ebx
  jne    L8
  mov    0x400ecfc8,%eax
  or     $0x30000,%eax
  mov    %eax,0x400ecfc8
  cmp    %ebp,%ebx
  je     L22
L0:
  mov    $0x400ec000,%edi
  call   <EMACReset@plt>
  add    $0x8,%rsp
  mov    $0x3e8,%edi
  pop    %rbx
  pop    %rbp
  jmp    1080 <SysCtlDelay@plt>
L44:
  mov    $0xf0003000,%edi
  call   <SysCtlPeripheralReset@plt>
  nopw   0x0(%rax,%rax,1)
L10:
  mov    $0xf0003000,%edi
  call   <SysCtlPeripheralReady@plt>
  test   %eax,%eax
  je     L10
  mov    $0x3e8,%edi
  call   <SysCtlDelay@plt>
L8:
  mov    0x400ecfc8,%eax
  and    $0xfffcffff,%eax
  mov    %eax,0x400ecfc8
  cmp    %ebp,%ebx
  jne    L0
L22:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
void EMACPHYConfigSet(uint32_t ui32Base, uint32_t ui32Config) {
  uint32_t ui32Val;
  ui32Val = (*((volatile uint32_t *)(ui32Base + 0x00000FC4))) & 0xC0000000;
  (*((volatile uint32_t *)(ui32Base + 0x00000FC4))) = ui32Config;
  if ((ui32Config & 0xC0000000) == 0x00000000) {
    SysCtlPeripheralReset(0xf0003000);
    while (!SysCtlPeripheralReady(0xf0003000)) {
    }
    SysCtlDelay(1000);
  }
  if ((ui32Config & 0xC0000000) == 0xC0000000) {
    (*((volatile uint32_t *)(0x400EC000 + 0x00000FC8))) |= (0x00020000 | 0x00010000);
  } else {
    (*((volatile uint32_t *)(0x400EC000 + 0x00000FC8))) &= ~(0x00020000 | 0x00010000);
  }
  if (ui32Val != (ui32Config & 0xC0000000)) {
    EMACReset(0x400EC000);
    SysCtlDelay(1000);
  }
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<StringSkipToNons>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x10,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    %rsi,-0x10(%rbp)
  jmp    L77
L43:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  jne    L9
  addq   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L9
  lea    D7(%rip),%rax
  mov    %rax,%rdx
  mov    $0x1,%esi
  mov    $0x80,%edi
  mov    $0x0,%eax
  call   <Dbg@plt>
  mov    -0x8(%rbp),%rax
  jmp    L7
L9:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L56
  mov    -0x10(%rbp),%rax
  mov    %rax,%rcx
  lea    D14(%rip),%rax
  mov    %rax,%rdx
  mov    $0x1,%esi
  mov    $0x80,%edi
  mov    $0x0,%eax
  call   <Dbg@plt>
  mov    -0x8(%rbp),%rax
  jmp    L7
L56:
  addq   $0x1,-0x8(%rbp)
L77:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L1
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    -0x10(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <StringIn@plt>
  test   %rax,%rax
  jne    L43
L1:
  mov    -0x8(%rbp),%rax
L7:
  leave
  ret
```

tool_calls: name: parse_data
arguments: tag: D7
type_guessed: string
name: parse_data
arguments: tag: D14
type_guessed: string

tool: D7: StringSkipNons

tool: D14: StringSkipNons: hit end skipping to <%s>

assistant: ```c
char *StringSkipToNons(char *in, char *seps) {
  while (*in && StringIn(*in, seps)) {
    if (*in == 92) {
      in++;
      if (*in == '\0') {
        Dbg(0x80, 1, "StringSkipNons");
        return (in);
      }
    }
    if (*in == '\0') {
      Dbg(0x80, 1, "StringSkipNons: hit end skipping to <%s>", seps);
      return (in);
    }
    in++;
  }
  return (in);
}
```
user: Demonstrate the C code that generates the assembly output below:

```asm
<StringSkipToNons>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbp
  mov    %rsi,%r12
  movzbl (%rdi),%edi
  mov    %rbp,%rbx
  test   %dil,%dil
  jne    L1
  jmp    L88
L7:
  cmpb   $0x0,(%rbx)
  je     L51
  lea    0x1(%rbx),%rbp
  movzbl 0x1(%rbx),%edi
  test   %dil,%dil
  je     L38
L1:
  movsbl %dil,%edi
  mov    %r12,%rsi
  call   <StringIn@plt>
  test   %rax,%rax
  je     L46
  mov    %rbp,%rbx
  cmpb   $0x5c,0x0(%rbp)
  jne    L7
  lea    0x1(%rbp),%rbx
  cmpb   $0x0,0x1(%rbp)
  jne    L7
  lea    D3(%rip),%rdx
  mov    $0x1,%esi
  mov    $0x80,%edi
  mov    $0x0,%eax
  call   <Dbg@plt>
  jmp    L88
L51:
  mov    %r12,%rcx
  lea    D5(%rip),%rdx
  mov    $0x1,%esi
  mov    $0x80,%edi
  mov    $0x0,%eax
  call   <Dbg@plt>
  jmp    L88
L46:
  mov    %rbp,%rbx
L88:
  mov    %rbx,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L38:
  mov    %rbp,%rbx
  jmp    L88
```

tool_calls: name: unpack_data
arguments: data_label: D3
type_infered: string
name: unpack_data
arguments: data_label: D5
type_infered: string

tool: D3: StringSkipNons

tool: D5: StringSkipNons: hit end skipping to <%s>

assistant: ```c
char *StringSkipToNons(char *in, char *seps) {
  while (*in && StringIn(*in, seps)) {
    if (*in == 92) {
      in++;
      if (*in == '\0') {
        Dbg(0x80, 1, "StringSkipNons");
        return (in);
      }
    }
    if (*in == '\0') {
      Dbg(0x80, 1, "StringSkipNons: hit end skipping to <%s>", seps);
      return (in);
    }
    in++;
  }
  return (in);
}
```
user: 这段汇编代码用C语言表示是什么样的？

```asm
<StringSkipToNons>:
  endbr64
  push   %r13
  mov    %rsi,%r13
  push   %r12
  push   %rbx
  mov    %rdi,%rbx
  movsbl (%rdi),%edi
  test   %dil,%dil
  jne    L38
  jmp    L36
  nopl   0x0(%rax)
L12:
  test   %al,%al
  je     L18
  mov    %rbx,%r12
L54:
  movsbl 0x1(%r12),%edi
  lea    0x1(%r12),%rbx
  test   %dil,%dil
  je     L36
L38:
  mov    %r13,%rsi
  call   <StringIn@plt>
  test   %rax,%rax
  je     L36
  movzbl (%rbx),%eax
  cmp    $0x5c,%al
  jne    L12
  cmpb   $0x0,0x1(%rbx)
  lea    0x1(%rbx),%r12
  jne    L54
  lea    D0(%rip),%rdx
  mov    $0x1,%esi
  mov    $0x80,%edi
  xor    %eax,%eax
  call   <Dbg@plt>
  jmp    L6
  nop
L36:
  mov    %rbx,%r12
L6:
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L18:
  mov    %rbx,%r12
  mov    %r13,%rcx
  mov    $0x1,%esi
  mov    $0x80,%edi
  lea    D18(%rip),%rdx
  call   <Dbg@plt>
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  pop    %r13
  ret
```

tool_calls: name: parse_data
arguments: data_label: D0
datatype: string
name: parse_data
arguments: data_label: D18
datatype: string

tool: D0: StringSkipNons

tool: D18: StringSkipNons: hit end skipping to <%s>

assistant: ```c
char *StringSkipToNons(char *in, char *seps) {
  while (*in && StringIn(*in, seps)) {
    if (*in == 92) {
      in++;
      if (*in == '\0') {
        Dbg(0x80, 1, "StringSkipNons");
        return (in);
      }
    }
    if (*in == '\0') {
      Dbg(0x80, 1, "StringSkipNons: hit end skipping to <%s>", seps);
      return (in);
    }
    in++;
  }
  return (in);
}
```
user: Please show me the C implementation that matches the assembly code listed below:

```asm
<StringSkipToNons>:
  endbr64
  push   %r13
  mov    %rsi,%r13
  push   %r12
  push   %rbx
  mov    %rdi,%rbx
  movsbl (%rdi),%edi
  test   %dil,%dil
  jne    L16
  jmp    L79
  nopl   0x0(%rax)
L12:
  test   %al,%al
  je     L7
  mov    %rbx,%r12
L65:
  movsbl 0x1(%r12),%edi
  lea    0x1(%r12),%rbx
  test   %dil,%dil
  je     L79
L16:
  mov    %r13,%rsi
  call   <StringIn@plt>
  test   %rax,%rax
  je     L79
  movzbl (%rbx),%eax
  cmp    $0x5c,%al
  jne    L12
  cmpb   $0x0,0x1(%rbx)
  lea    0x1(%rbx),%r12
  jne    L65
  lea    D6(%rip),%rdx
  mov    $0x1,%esi
  mov    $0x80,%edi
  xor    %eax,%eax
  call   <Dbg@plt>
  jmp    L77
  nop
L79:
  mov    %rbx,%r12
L77:
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L7:
  mov    %rbx,%r12
  mov    %r13,%rcx
  mov    $0x1,%esi
  mov    $0x80,%edi
  lea    D2(%rip),%rdx
  call   <Dbg@plt>
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  pop    %r13
  ret
```

tool_calls: name: read_data
arguments: label: D6
datatype: string
name: read_data
arguments: label: D2
datatype: string

tool: D6: StringSkipNons

tool: D2: StringSkipNons: hit end skipping to <%s>

assistant: ```c
char *StringSkipToNons(char *in, char *seps) {
  while (*in && StringIn(*in, seps)) {
    if (*in == 92) {
      in++;
      if (*in == '\0') {
        Dbg(0x80, 1, "StringSkipNons");
        return (in);
      }
    }
    if (*in == '\0') {
      Dbg(0x80, 1, "StringSkipNons: hit end skipping to <%s>", seps);
      return (in);
    }
    in++;
  }
  return (in);
}
```
user: What would the C source look like for the assembly code provided here?

```asm
<writeppm>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %edx,-0x30(%rbp)
  mov    %rcx,-0x38(%rbp)
  mov    -0x2c(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x28(%rbp),%rax
  lea    D13(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fopen@plt>
  cltq
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  jne    L3
  mov    $0x1,%eax
  jmp    L0
L3:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x3,%edx
  mov    $0x1,%esi
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  mov    -0x30(%rbp),%ecx
  mov    -0x2c(%rbp),%edx
  mov    -0x10(%rbp),%rax
  lea    D16(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    -0x10(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x4,%edx
  mov    $0x1,%esi
  lea    D22(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  movl   $0x0,-0x18(%rbp)
  jmp    L44
L12:
  mov    -0x14(%rbp),%eax
  cltq
  mov    -0x30(%rbp),%edx
  sub    -0x18(%rbp),%edx
  sub    $0x1,%edx
  imul   -0x14(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x38(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rdi
  mov    -0x10(%rbp),%rdx
  mov    %rdx,%rcx
  mov    %rax,%rdx
  mov    $0x1,%esi
  call   <fwrite@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x14(%rbp),%eax
  cltq
  cmp    %rax,-0x8(%rbp)
  je     L7
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fclose@plt>
  mov    $0x5,%eax
  jmp    L0
L7:
  addl   $0x1,-0x18(%rbp)
L44:
  mov    -0x18(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jl     L12
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fclose@plt>
  mov    $0x0,%eax
L0:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D13
type_infered: string
name: unpack_data
arguments: data_tag: D15
type_infered: string
name: unpack_data
arguments: data_tag: D16
type_infered: string
name: unpack_data
arguments: data_tag: D22
type_infered: string

tool: D13: wb

tool: D15: P6


tool: D16: %d %d


tool: D22: 255


assistant: ```c
signed int writeppm(char *name, signed int xres, signed int yres, unsigned char *imgdata) {
  struct _IO_FILE$link40 *ofp;
  signed int y;
  signed int xbytes = 3 * xres;
  ofp = fopen(name, "wb");
  if (ofp == ((struct _IO_FILE$link40 *)((void *)0)))
    return 1;
  fprintf(ofp, "P6\n");
  fprintf(ofp, "%d %d\n", xres, yres);
  fprintf(ofp, "255\n");
  y = 0;
  while (!(y >= yres)) {
    unsigned long int return_value_fwrite$1;
    return_value_fwrite$1 = fwrite((const void *)&imgdata[(signed long int)(((yres - y) - 1) * xbytes)], (unsigned long int)1, (unsigned long int)xbytes, ofp);
    if (!(return_value_fwrite$1 == (unsigned long int)xbytes)) {
      fclose(ofp);
      return 5;
    }
    y = y + 1;
  }
  fclose(ofp);
  return 0;
}
```