user: What is the c source code of the assembly code below:

```asm
<decode_state>:
  endbr64
  push   %r15
  lea    D437(%rip),%rsi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x28,%rsp
  call   <scan_file@plt>
  lea    D340(%rip),%rsi
  mov    %rbp,%rdi
  mov    %eax,0x1c(%rsp)
  call   <scan_file@plt>
  lea    D412(%rip),%rsi
  mov    %rbp,%rdi
  mov    %eax,0x18(%rsp)
  call   <scan_file@plt>
  lea    D317(%rip),%rsi
  mov    %rbp,%rdi
  mov    %eax,%ebx
  call   <scan_file@plt>
  lea    D51(%rip),%rsi
  mov    %rbp,%rdi
  mov    %eax,0x14(%rsp)
  call   <scan_file@plt>
  lea    D421(%rip),%rsi
  mov    %rbp,%rdi
  mov    %eax,%r14d
  call   <scan_file@plt>
  lea    D383(%rip),%rsi
  mov    %rbp,%rdi
  mov    %eax,%r15d
  call   <scan_file@plt>
  lea    D54(%rip),%rsi
  mov    %rbp,%rdi
  mov    %eax,%r13d
  call   <scan_file@plt>
  lea    D305(%rip),%rsi
  mov    %rbp,%rdi
  mov    %eax,0x10(%rsp)
  call   <scan_file@plt>
  lea    D150(%rip),%rsi
  mov    %rbp,%rdi
  mov    %eax,0xc(%rsp)
  call   <scan_file@plt>
  lea    D252(%rip),%rsi
  mov    %rbp,%rdi
  mov    %eax,%r12d
  call   <scan_file@plt>
  lea    D157(%rip),%rsi
  mov    %rbp,%rdi
  mov    %eax,0x8(%rsp)
  call   <scan_file@plt>
  mov    %rbp,%rsi
  lea    D124(%rip),%rdi
  mov    %eax,0x4(%rsp)
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x1c(%rsp),%edx
  mov    0x10(%rsp),%esi
  xor    %eax,%eax
  lea    D449(%rip),%rdi
  call   <printf@plt>
  mov    0x18(%rsp),%edx
  mov    0xc(%rsp),%esi
  xor    %eax,%eax
  lea    D282(%rip),%rdi
  call   <printf@plt>
  mov    0x14(%rsp),%edx
  mov    0x8(%rsp),%esi
  mov    %r14d,%ecx
  movswl %r14w,%r8d
  lea    D227(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x4(%rsp),%esi
  mov    %r13d,%ecx
  mov    %r15d,%edx
  lea    D22(%rip),%rdi
  xor    %eax,%eax
  movswl %r13w,%r8d
  call   <printf@plt>
  test   $0x2,%bl
  mov    %ebx,%esi
  lea    D161(%rip),%rax
  lea    D109(%rip),%rcx
  lea    D302(%rip),%rdx
  cmove  %rax,%rcx
  test   $0x1,%bl
  lea    D442(%rip),%rax
  cmove  %rax,%rdx
  lea    D315(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  test   $0xc,%bl
  je     L21
L33:
  lea    D324(%rip),%rax
  test   $0x80,%bl
  lea    D107(%rip),%r8
  cmove  %rax,%r8
  lea    D216(%rip),%rcx
  test   $0x40,%bl
  cmove  %rax,%rcx
  lea    D257(%rip),%rdx
  test   $0x20,%bl
  cmove  %rax,%rdx
  lea    D433(%rip),%rsi
  test   $0x10,%bl
  lea    D249(%rip),%rax
  lea    D310(%rip),%rdi
  cmove  %rax,%rsi
  xor    %eax,%eax
  call   <printf@plt>
  mov    %ebx,%esi
  and    $0xf00,%esi
  cmp    $0x9,%esi
  ja     L59
  and    $0x7000,%ebx
  cmp    $0x7,%ebx
  ja     L88
L11:
  lea    D201(%rip),%rdx
  mov    %ebx,%eax
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  nopl   0x0(%rax,%rax,1)
L59:
  lea    D42(%rip),%rdi
  xor    %eax,%eax
  and    $0x7000,%ebx
  call   <printf@plt>
  cmp    $0x7,%ebx
  jbe    L11
  nopl   0x0(%rax)
L88:
  mov    %ebx,%esi
  lea    D113(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L50:
  lea    D344(%rip),%rdi
  call   <puts@plt>
  lea    D324(%rip),%rax
  test   $0x8,%r12b
  lea    D351(%rip),%r9
  cmove  %rax,%r9
  test   $0x4,%r12b
  lea    D440(%rip),%r8
  mov    %r12d,%esi
  cmove  %rax,%r8
  lea    D332(%rip),%rcx
  test   $0x2,%r12b
  cmove  %rax,%rcx
  lea    D247(%rip),%rdx
  test   $0x1,%r12b
  cmove  %rax,%rdx
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  lea    D178(%rip),%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1080 <printf@plt>
  xchg   %ax,%ax
L21:
  lea    D448(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L33
  nopl   0x0(%rax,%rax,1)
  lea    D112(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L50
  nopl   0x0(%rax,%rax,1)
  lea    D202(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L50
  nopl   0x0(%rax,%rax,1)
  lea    D191(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L50
  nopl   0x0(%rax,%rax,1)
  lea    D258(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L50
  nopl   0x0(%rax,%rax,1)
  lea    D367(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L50
```

tool_calls: name: unpack_data
arguments: label: D437
type_guessed: string
name: unpack_data
arguments: label: D340
type_guessed: string
name: unpack_data
arguments: label: D412
type_guessed: string
name: unpack_data
arguments: label: D317
type_guessed: string
name: unpack_data
arguments: label: D51
type_guessed: string
name: unpack_data
arguments: label: D421
type_guessed: string
name: unpack_data
arguments: label: D383
type_guessed: string
name: unpack_data
arguments: label: D54
type_guessed: string
name: unpack_data
arguments: label: D305
type_guessed: string
name: unpack_data
arguments: label: D150
type_guessed: string
name: unpack_data
arguments: label: D252
type_guessed: string
name: unpack_data
arguments: label: D157
type_guessed: string
name: unpack_data
arguments: label: D124
type_guessed: string
name: unpack_data
arguments: label: D449
type_guessed: string
name: unpack_data
arguments: label: D282
type_guessed: string
name: unpack_data
arguments: label: D227
type_guessed: string
name: unpack_data
arguments: label: D22
type_guessed: string
name: unpack_data
arguments: label: D161
type_guessed: string
name: unpack_data
arguments: label: D109
type_guessed: string
name: unpack_data
arguments: label: D302
type_guessed: string
name: unpack_data
arguments: label: D442
type_guessed: string
name: unpack_data
arguments: label: D315
type_guessed: string
name: unpack_data
arguments: label: D324
type_guessed: string
name: unpack_data
arguments: label: D107
type_guessed: string
name: unpack_data
arguments: label: D216
type_guessed: string
name: unpack_data
arguments: label: D257
type_guessed: string
name: unpack_data
arguments: label: D433
type_guessed: string
name: unpack_data
arguments: label: D249
type_guessed: string
name: unpack_data
arguments: label: D310
type_guessed: string
name: unpack_data
arguments: label: D42
type_guessed: string
name: unpack_data
arguments: label: D113
type_guessed: string
name: unpack_data
arguments: label: D344
type_guessed: string
name: unpack_data
arguments: label: D351
type_guessed: string
name: unpack_data
arguments: label: D440
type_guessed: string
name: unpack_data
arguments: label: D332
type_guessed: string
name: unpack_data
arguments: label: D247
type_guessed: string
name: unpack_data
arguments: label: D178
type_guessed: string
name: unpack_data
arguments: label: D448
type_guessed: string
name: unpack_data
arguments: label: D112
type_guessed: string
name: unpack_data
arguments: label: D202
type_guessed: string
name: unpack_data
arguments: label: D191
type_guessed: string
name: unpack_data
arguments: label: D258
type_guessed: string
name: unpack_data
arguments: label: D367
type_guessed: string

tool: D437: NEXT_DESC_PTR

tool: D340: START_ADDR

tool: D412: CONFIG

tool: D317: X_COUNT

tool: D51: X_MODIFY

tool: D421: Y_COUNT

tool: D383: Y_MODIFY

tool: D54: CURR_DESC_PTR

tool: D305: CURR_ADDR

tool: D150: IRQ_STATUS

tool: D252: CURR_X_COUNT

tool: D157: CURR_Y_COUNT

tool: D124:   --- %s ---


tool: D449: desc: curr: 0x%08x  next: 0x%08x


tool: D282: addr: curr: 0x%08x start: 0x%08x


tool: D227: X: curr: 0x%04x count: 0x%04x mod: 0x%04x (%i)


tool: D22: Y: curr: 0x%04x count: 0x%04x mod: 0x%04x (%i)


tool: D161: read

tool: D109: write

tool: D302: en

tool: D442: dis

tool: D315: dma config: 0x%04x (%sabled %s 

tool: 

tool: D107: interrupt 

tool: D216: di_sel 

tool: D257: sync 

tool: D433: 2D

tool: D249: 1D

tool: D310: %s %s%s%s

tool: D42: NDSIZE:INVALID:%i 

tool: D113: FLOW:INVALID:%i

tool: D344: )

tool: D351: run 

tool: D440: dfetch 

tool: D332: err 

tool: D247: done 

tool: D178: irq status: 0x%04x (%s%s%s%s)


tool: D448: 8-bit 

tool: D112: stop

tool: D202: autobuffer

tool: D191: descriptor_array

tool: D258: descriptor_list_small

tool: D367: descriptor_list_large

assistant: ```c
void decode_state(const char *prefix) {
  unsigned int NEXT_DESC_PTR = scan_file(prefix, "NEXT_DESC_PTR");
  unsigned int START_ADDR = scan_file(prefix, "START_ADDR");
  unsigned int CONFIG = scan_file(prefix, "CONFIG");
  unsigned int X_COUNT = scan_file(prefix, "X_COUNT");
  unsigned int X_MODIFY = scan_file(prefix, "X_MODIFY");
  unsigned int Y_COUNT = scan_file(prefix, "Y_COUNT");
  unsigned int Y_MODIFY = scan_file(prefix, "Y_MODIFY");
  unsigned int CURR_DESC_PTR = scan_file(prefix, "CURR_DESC_PTR");
  unsigned int CURR_ADDR = scan_file(prefix, "CURR_ADDR");
  unsigned int IRQ_STATUS = scan_file(prefix, "IRQ_STATUS");
  unsigned int CURR_X_COUNT = scan_file(prefix, "CURR_X_COUNT");
  unsigned int CURR_Y_COUNT = scan_file(prefix, "CURR_Y_COUNT");
  printf("  --- %s ---\n", prefix);
  printf("desc: curr: 0x%08x  next: 0x%08x\n", CURR_DESC_PTR, NEXT_DESC_PTR);
  printf("addr: curr: 0x%08x start: 0x%08x\n", CURR_ADDR, START_ADDR);
  printf("X: curr: 0x%04x count: 0x%04x mod: 0x%04x (%i)\n", CURR_X_COUNT, X_COUNT, X_MODIFY, (short)X_MODIFY);
  printf("Y: curr: 0x%04x count: 0x%04x mod: 0x%04x (%i)\n", CURR_Y_COUNT, Y_COUNT, Y_MODIFY, (short)Y_MODIFY);
  printf("dma config: 0x%04x (%sabled %s ", CONFIG, (CONFIG & (1 << 0)) ? "en" : "dis", (CONFIG & (0x1 << 1)) ? "write" : "read");
  switch (CONFIG & (0x3 << 2)) {
  case 0x3:
    printf("WDSIZE:INVALID ");
    break;
  case 0x2:
    printf("32-bit ");
    break;
  case 0x1:
    printf("16-bit ");
    break;
  case 0x0:
    printf("8-bit ");
    break;
  }
  printf("%s %s%s%s", (CONFIG & (0x1 << 4)) ? "2D" : "1D", (CONFIG & (0x1 << 5)) ? "sync " : "", (CONFIG & (0x1 << 6)) ? "di_sel " : "", (CONFIG & (0x1 << 7)) ? "interrupt " : "");
  unsigned int NDSIZE = CONFIG & (0xF << 8);
  if (NDSIZE > 0 && NDSIZE < 10)
    printf("NDSIZE_%i ", NDSIZE);
  else if (NDSIZE >= 10)
    printf("NDSIZE:INVALID:%i ", NDSIZE);
  unsigned int FLOW = CONFIG & (0x7 << 12);
  switch (FLOW) {
  case 0:
    printf("stop");
    break;
  case 1:
    printf("autobuffer");
    break;
  case 4:
    printf("descriptor_array");
    break;
  case 6:
    printf("descriptor_list_small");
    break;
  case 7:
    printf("descriptor_list_large");
    break;
  default:
    printf("FLOW:INVALID:%i", FLOW);
  }
  printf(")\n");
  printf("irq status: 0x%04x (%s%s%s%s)\n", IRQ_STATUS, (IRQ_STATUS & (0x1 << 0)) ? "done " : "", (IRQ_STATUS & (0x1 << 1)) ? "err " : "", (IRQ_STATUS & (0x1 << 2)) ? "dfetch " : "", (IRQ_STATUS & (0x1 << 3)) ? "run " : "");
}
```