user: 请从给定的汇编指令推导出C源代码:

```asm
<analyze_code>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r12
  push   %rbx
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x34(%rbp)
  movl   $0x0,-0x14(%rbp)
  movb   $0x0,-0x1d(%rbp)
  movb   $0x0,-0x1c(%rbp)
  movb   $0x0,-0x1b(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L12
L15:
  mov    -0x18(%rbp),%eax
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <get_r_rd@plt>
  mov    %eax,%r12d
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <get_r_rt@plt>
  mov    %eax,%ebx
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <get_r_rs@plt>
  mov    %eax,%edx
  mov    -0x18(%rbp),%eax
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  mov    %r12d,%r8d
  mov    %ebx,%ecx
  mov    %eax,%esi
  lea    D55(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <is_type_r@plt>
  test   %rax,%rax
  je     L71
  mov    $0x0,%eax
  call   <rand@plt>
  cltd
  shr    $0x1f,%edx
  add    %edx,%eax
  and    $0x1,%eax
  sub    %edx,%eax
  mov    %al,-0x1a(%rbp)
  mov    $0x0,%eax
  call   <rand@plt>
  cltd
  shr    $0x1f,%edx
  add    %edx,%eax
  and    $0x1,%eax
  sub    %edx,%eax
  mov    %al,-0x19(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <get_r_func@plt>
  mov    %eax,%edi
  call   <is_r_supported@plt>
  test   %rax,%rax
  je     L71
  cmpb   $0x0,-0x1a(%rbp)
  je     L11
  mov    -0x14(%rbp),%eax
  mov    %eax,%esi
  lea    D25(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <get_r_func@plt>
  mov    %eax,%edi
  call   <is_conmutative@plt>
  test   %rax,%rax
  je     L18
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <get_r_rs@plt>
  mov    %al,-0x1d(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <get_r_rt@plt>
  mov    %al,-0x1c(%rbp)
  movsbl -0x1c(%rbp),%edx
  mov    -0x14(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <set_r_rs@plt>
  mov    %eax,-0x14(%rbp)
  movsbl -0x1d(%rbp),%edx
  mov    -0x14(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <set_r_rt@plt>
  mov    %eax,-0x14(%rbp)
  jmp    L11
L18:
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L11:
  cmpb   $0x0,-0x19(%rbp)
  je     L106
  mov    -0x14(%rbp),%eax
  mov    %eax,%esi
  lea    D67(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <get_r_func@plt>
  and    $0x1,%eax
  test   %eax,%eax
  jne    L16
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <get_r_func@plt>
  lea    0x1(%rax),%edx
  mov    -0x14(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <replace_instruction@plt>
  mov    %eax,%esi
  lea    D49(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <get_r_func@plt>
  lea    0x1(%rax),%edx
  mov    -0x14(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <set_r_func@plt>
  mov    %eax,-0x14(%rbp)
  jmp    L46
L16:
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <get_r_func@plt>
  lea    -0x1(%rax),%edx
  mov    -0x14(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <set_r_func@plt>
  mov    %eax,%esi
  lea    D49(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <get_r_func@plt>
  lea    -0x1(%rax),%edx
  mov    -0x14(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <set_r_func@plt>
  mov    %eax,-0x14(%rbp)
  jmp    L46
L106:
  mov    -0x14(%rbp),%eax
  mov    %eax,%esi
  lea    D9(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L46:
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L71:
  mov    -0x18(%rbp),%eax
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x14(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x18(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x18(%rbp)
L12:
  mov    -0x18(%rbp),%edx
  mov    -0x34(%rbp),%eax
  cmp    %eax,%edx
  jb     L15
  nop
  nop
  add    $0x30,%rsp
  pop    %rbx
  pop    %r12
  pop    %rbp
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D55
type_guessed: string
name: extract_symbolic_data
arguments: tag: D25
type_guessed: string
name: extract_symbolic_data
arguments: tag: D8
type_guessed: string
name: extract_symbolic_data
arguments: tag: D67
type_guessed: string
name: extract_symbolic_data
arguments: tag: D49
type_guessed: string
name: extract_symbolic_data
arguments: tag: D9
type_guessed: string
name: extract_symbolic_data
arguments: tag: D15
type_guessed: string

tool: D55: Instruction: 0x%08x with registers -> RS: %d RT: %d RD: %d


tool: D25: Applying change order registers to: 0x%08x -> 

tool: D8: Not changed due to lack of conmutative property


tool: D67: Applying Sustitute Instruction to: 0x%08x -> 

tool: D49: Changed by 0x%08x 


tool: D9: Any changes kind of changes are applicated to actual instruction 0x%08x

tool: D15: 

-------------------------------------------------


assistant: ```c
void analyze_code(int *instructions, int *new_shellcode, int num_inst) {
  int act_inst = 0x00000000;
  char act_rs = 0x00;
  char act_rt = 0x00;
  char act_rd = 0x00;
  for (unsigned volatile int i = 0x00; i < num_inst; i++) {
    act_inst = instructions[i];
    printf("Instruction: 0x%08x with registers -> RS: %d RT: %d RD: %d\n", instructions[i], get_r_rs(act_inst), get_r_rt(act_inst), get_r_rd(act_inst));
    if (is_type_r(act_inst)) {
      char change_order_regs = rand() % 2;
      char change_instruct = rand() % 2;
      if (is_r_supported(get_r_func(act_inst))) {
        if (change_order_regs) {
          printf("Applying change order registers to: 0x%08x -> ", act_inst);
          if (is_conmutative(get_r_func(act_inst))) {
            act_rs = get_r_rs(act_inst);
            act_rt = get_r_rt(act_inst);
            act_inst = set_r_rs(act_inst, act_rt);
            act_inst = set_r_rt(act_inst, act_rs);
          } else
            printf("Not changed due to lack of conmutative property\n\n");
        }
        if (change_instruct) {
          printf("Applying Sustitute Instruction to: 0x%08x -> ", act_inst);
          if (get_r_func(act_inst) % 2 == 0) {
            printf("Changed by 0x%08x \n", replace_instruction(act_inst, get_r_func(act_inst) + 1));
            act_inst = set_r_func(act_inst, get_r_func(act_inst) + 1);
          } else {
            printf("Changed by 0x%08x \n", set_r_func(act_inst, get_r_func(act_inst) - 1));
            act_inst = set_r_func(act_inst, get_r_func(act_inst) - 1);
          }
        } else
          printf("Any changes kind of changes are applicated to actual instruction 0x%08x", act_inst);
        printf("\n\n-------------------------------------------------\n\n");
      }
    }
    new_shellcode[i] = act_inst;
  }
}
```