user: Demonstrate the C code that generates the assembly output below:

```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    D48(%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    D35(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %rbp,%rsi
  xor    %eax,%eax
  mov    %r14,%r8
  lea    D65(%rip),%rdi
  mov    %r13,%rcx
  mov    %r12,%rdx
  call   <printf@plt>
  lea    D70(%rip),%rsi
  mov    %r14,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L0
  lea    D13(%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    D97(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %ebx,%r8d
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    %rbp,%rsi
  lea    D108(%rip),%rdi
L22:
  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    D107(%rip),%rsi
  mov    %r14,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L38
  lea    D56(%rip),%rsi
  mov    %r14,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L7
L38:
  mov    %ebx,%r8d
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    %rbp,%rsi
  lea    D90(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %ebx,%r8d
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    %rbp,%rsi
  lea    D45(%rip),%rdi
  jmp    L22
  nopl   (%rax)
L7:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D48
data_type: string
name: disassemble_data
arguments: tag: D35
data_type: string
name: disassemble_data
arguments: tag: D65
data_type: string
name: disassemble_data
arguments: tag: D70
data_type: string
name: disassemble_data
arguments: tag: D13
data_type: string
name: disassemble_data
arguments: tag: D97
data_type: string
name: disassemble_data
arguments: tag: D108
data_type: string
name: disassemble_data
arguments: tag: D107
data_type: string
name: disassemble_data
arguments: tag: D56
data_type: string
name: disassemble_data
arguments: tag: D90
data_type: string
name: disassemble_data
arguments: tag: D45
data_type: string

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


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


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


tool: D70: int 

tool: D13: unsigned int 

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


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


tool: D107: short 

tool: D56: unsigned short 

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


tool: D45: (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);
  }
}
```