user: 请将以下的汇编代码转换成C语言代码:

```asm
<gen_field>:
  endbr64
  push   %r15
  xor    %eax,%eax
  mov    %r9d,%r15d
  push   %r14
  mov    %rdx,%r14
  mov    %rsi,%rdx
  push   %r13
  mov    %rcx,%r13
  push   %r12
  mov    %rsi,%r12
  mov    %rdi,%rsi
  push   %rbp
  mov    %rdi,%rbp
  lea    D34(%rip),%rdi
  push   %rbx
  mov    %r8d,%ebx
  sub    $0x8,%rsp
  call   <printf@plt>
  mov    %r15d,%r8d
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    %rbp,%rsi
  lea    D8(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rsi
  xor    %eax,%eax
  mov    %r14,%r8
  lea    D98(%rip),%rdi
  mov    %r13,%rcx
  mov    %r12,%rdx
  call   <printf@plt>
  lea    D6(%rip),%rsi
  mov    %r14,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L0
  lea    D58(%rip),%rsi
  mov    %r14,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L13
L0:
  mov    %ebx,%r8d
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    %rbp,%rsi
  lea    D99(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %ebx,%r8d
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    %rbp,%rsi
  lea    D85(%rip),%rdi
L37:
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1060 <printf@plt>
  nopl   0x0(%rax)
L13:
  lea    D69(%rip),%rsi
  mov    %r14,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L20
  lea    D40(%rip),%rsi
  mov    %r14,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L39
L20:
  mov    %ebx,%r8d
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    %rbp,%rsi
  lea    D55(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %ebx,%r8d
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    %rbp,%rsi
  lea    D14(%rip),%rdi
  jmp    L37
  nopl   (%rax)
L39:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D34
type_infered: string
name: parse_data
arguments: data_tag: D8
type_infered: string
name: parse_data
arguments: data_tag: D98
type_infered: string
name: parse_data
arguments: data_tag: D6
type_infered: string
name: parse_data
arguments: data_tag: D58
type_infered: string
name: parse_data
arguments: data_tag: D99
type_infered: string
name: parse_data
arguments: data_tag: D85
type_infered: string
name: parse_data
arguments: data_tag: D69
type_infered: string
name: parse_data
arguments: data_tag: D40
type_infered: string
name: parse_data
arguments: data_tag: D55
type_infered: string
name: parse_data
arguments: data_tag: D14
type_infered: string

tool: D34: (def-syntax %s%s-%s-offset %d)


tool: D8: (def-syntax %s%s-%s-size %d)


tool: D98: (def-syntax %s%s-%s-type "%s")


tool: D6: int 

tool: D58: unsigned int 

tool: D99: (def-syntax (%s%s-get-%s ?x)
  (c-get-int ?x %d))


tool: D85: (def-syntax (%s%s-set-%s ?x ?v)
  (c-set-int ?x %d ?v))


tool: D69: short 

tool: D40: unsigned short 

tool: D55: (def-syntax (%s%s-get-%s ?x)
  (c-get-short ?x %d))


tool: D14: (def-syntax (%s%s-set-%s ?x ?v)
  (c-set-short ?x %d ?v))


assistant: ```c
void gen_field(const char *prefix, const char *struct_name, const char *type, const char *field, int offset, int size) {
  printf("(def-syntax %s%s-%s-offset %d)\n", prefix, struct_name, field, offset);
  printf("(def-syntax %s%s-%s-size %d)\n", prefix, struct_name, field, size);
  printf("(def-syntax %s%s-%s-type \"%s\")\n", prefix, struct_name, field, type);
  if (strcmp(type, "int ") == 0 || strcmp(type, "unsigned int ") == 0) {
    printf("(def-syntax (%s%s-get-%s ?x)\n  (c-get-int ?x %d))\n", prefix, struct_name, field, offset);
    printf("(def-syntax (%s%s-set-%s ?x ?v)\n  (c-set-int ?x %d ?v))\n", prefix, struct_name, field, offset);
  } else if (strcmp(type, "short ") == 0 || strcmp(type, "unsigned short ") == 0) {
    printf("(def-syntax (%s%s-get-%s ?x)\n  (c-get-short ?x %d))\n", prefix, struct_name, field, offset);
    printf("(def-syntax (%s%s-set-%s ?x ?v)\n  (c-set-short ?x %d ?v))\n", prefix, struct_name, field, offset);
  }
}
```