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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x240,%rsp
  mov    %edi,-0x234(%rbp)
  mov    %rsi,-0x240(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  jmp    L79
L107:
  lea    -0x210(%rbp),%rax
  mov    %rax,%rsi
  lea    D21(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    -0x210(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x214(%rbp)
  movl   $0x0,-0x220(%rbp)
  movl   $0x0,-0x21c(%rbp)
  jmp    L3
L57:
  mov    -0x224(%rbp),%ecx
  mov    -0x21c(%rbp),%eax
  cltd
  idiv   %ecx
  mov    %edx,%eax
  test   %eax,%eax
  jne    L40
  cmpl   $0x0,-0x21c(%rbp)
  je     L40
  mov    -0x224(%rbp),%eax
  add    %eax,-0x21c(%rbp)
  mov    -0x224(%rbp),%eax
  add    %eax,-0x220(%rbp)
L40:
  mov    -0x220(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x220(%rbp)
  mov    -0x21c(%rbp),%edx
  movslq %edx,%rdx
  movzbl -0x210(%rbp,%rdx,1),%edx
  cltq
  mov    %dl,-0x110(%rbp,%rax,1)
  addl   $0x1,-0x21c(%rbp)
L3:
  mov    -0x21c(%rbp),%eax
  cmp    -0x214(%rbp),%eax
  jl     L57
  mov    -0x224(%rbp),%eax
  add    %eax,%eax
  mov    %eax,-0x220(%rbp)
  mov    -0x224(%rbp),%eax
  mov    %eax,-0x21c(%rbp)
  jmp    L91
L13:
  mov    -0x224(%rbp),%edx
  mov    -0x220(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x21c(%rbp)
  jne    L125
  mov    -0x224(%rbp),%eax
  add    %eax,-0x21c(%rbp)
  mov    -0x224(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,-0x220(%rbp)
L125:
  subl   $0x1,-0x220(%rbp)
  mov    -0x21c(%rbp),%eax
  cltq
  movzbl -0x210(%rbp,%rax,1),%edx
  mov    -0x220(%rbp),%eax
  cltq
  mov    %dl,-0x110(%rbp,%rax,1)
  addl   $0x1,-0x21c(%rbp)
L91:
  mov    -0x21c(%rbp),%eax
  cmp    -0x214(%rbp),%eax
  jl     L13
  lea    -0x110(%rbp),%rdx
  lea    -0x210(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  movl   $0x0,-0x220(%rbp)
  movl   $0x0,-0x218(%rbp)
  jmp    L148
L80:
  mov    -0x218(%rbp),%eax
  mov    %eax,-0x21c(%rbp)
  jmp    L29
L30:
  mov    -0x220(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x220(%rbp)
  mov    -0x21c(%rbp),%edx
  movslq %edx,%rdx
  movzbl -0x210(%rbp,%rdx,1),%edx
  cltq
  mov    %dl,-0x110(%rbp,%rax,1)
  mov    -0x224(%rbp),%eax
  add    %eax,-0x21c(%rbp)
L29:
  mov    -0x21c(%rbp),%eax
  cmp    -0x214(%rbp),%eax
  jl     L30
  addl   $0x1,-0x218(%rbp)
L148:
  mov    -0x224(%rbp),%eax
  cmp    %eax,-0x218(%rbp)
  jl     L80
  mov    -0x220(%rbp),%eax
  cltq
  movb   $0x0,-0x110(%rbp,%rax,1)
  lea    -0x110(%rbp),%rax
  mov    %rax,%rsi
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L79:
  lea    -0x224(%rbp),%rax
  mov    %rax,%rsi
  lea    D14(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  test   %rax,%rax
  je     L109
  mov    -0x224(%rbp),%eax
  test   %eax,%eax
  jne    L107
L109:
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L81
  call   <__stack_chk_fail@plt>
L81:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D21
type: string
name: unpack_data
arguments: tag: D5
type: string
name: unpack_data
arguments: tag: D14
type: string

tool: D21: %s

tool: D5: %s


tool: D14: %d

assistant: ```c
int main(int argc, char **argv) {
  int cur, i, len, offset, range;
  char code[255], solution[255];
  while (scanf("%d", &range) && range) {
    scanf("%s", code);
    len = strlen(code);
    for (cur = 0, i = 0; i < len; i++) {
      if (i % range == 0 && i) {
        i += range;
        cur += range;
      }
      solution[cur++] = code[i];
    }
    for (cur = range * 2, i = range; i < len; ++i) {
      if (cur + range == i) {
        i += range;
        cur += range * 3;
      }
      solution[--cur] = code[i];
    }
    strcpy(code, solution);
    for (cur = 0, offset = 0; offset < range; offset++) {
      for (i = offset; i < len; i += range) {
        solution[cur++] = code[i];
      }
    }
    solution[cur] = '\0';
    printf("%s\n", solution);
  }
  return 0;
}
```