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

```asm
<encrypt>:
  endbr64
  push   %r12
  mov    %rdi,%r12
  lea    0x8(%rsi),%rdi
  mov    %rsi,%rcx
  push   %rbp
  and    $0xfffffffffffffff8,%rdi
  lea    0x9c4(%rsi),%rbp
  push   %rbx
  sub    %rdi,%rcx
  mov    %rsi,%rbx
  add    $0x9c4,%ecx
  shr    $0x3,%ecx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  movq   $0x0,(%rsi)
  movq   $0x0,0x9bc(%rsi)
  rep stos %rax,%es:(%rdi)
  lea    D5(%rip),%rdi
  call   <printf@plt>
  lea    0x4(%rsp),%rsi
  lea    D6(%rip),%rdi
  call   <scanf@plt>
  xor    %eax,%eax
  call   <getchar@plt>
  mov    0x4(%rsp),%edi
  mov    %r12,%rsi
  mov    %rbx,%rcx
  nopl   0x0(%rax,%rax,1)
L51:
  xor    %edx,%edx
  jmp    L40
  nopl   0x0(%rax)
L292:
  lea    -0x41(%rax),%r8d
  cmp    $0x19,%r8b
  jbe    L106
L293:
  mov    %al,(%rcx,%rdx,1)
  add    $0x1,%rdx
  cmp    $0x32,%rdx
  je     L248
L40:
  movzbl (%rsi,%rdx,1),%eax
  lea    -0x61(%rax),%r8d
  cmp    $0x19,%r8b
  ja     L292
  movsbl %r8b,%r8d
  add    %edi,%r8d
  movslq %r8d,%rax
  mov    %r8d,%r9d
  imul   $0x4ec4ec4f,%rax,%rax
  sar    $0x1f,%r9d
  sar    $0x23,%rax
  sub    %r9d,%eax
  imul   $0x1a,%eax,%r9d
  mov    %r8d,%eax
  sub    %r9d,%eax
  lea    0x1a(%rax),%r8d
  cmovs  %r8d,%eax
  add    $0x61,%eax
  mov    %al,(%rcx,%rdx,1)
  add    $0x1,%rdx
  cmp    $0x32,%rdx
  jne    L40
L248:
  add    $0x32,%rcx
  add    $0x32,%rsi
  cmp    %rcx,%rbp
  jne    L51
  mov    %r12,%rsi
  mov    %rbx,%rcx
  nopl   (%rax)
L56:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L179:
  movzbl (%rcx,%rax,1),%edx
  mov    %dl,(%rsi,%rax,1)
  add    $0x1,%rax
  cmp    $0x32,%rax
  jne    L179
  add    $0x32,%rcx
  add    $0x32,%rsi
  cmp    %rcx,%rbp
  jne    L56
  lea    0x9c4(%r12),%rsi
  mov    %rbx,%rdi
  add    $0x9f6,%r12
  nopl   0x0(%rax,%rax,1)
L157:
  lea    -0x9c4(%rsi),%rdx
  mov    %rdi,%rax
  jmp    L242
  nopl   0x0(%rax)
L288:
  movzbl (%rdx),%ecx
  add    $0x32,%rdx
  add    $0x1,%rax
  mov    %cl,-0x1(%rax)
  cmp    %rsi,%rdx
  je     L170
L242:
  movzbl (%rax),%ecx
  cmp    $0xa,%cl
  je     L230
  cmp    $0xd,%cl
  jne    L288
L230:
  xor    %ecx,%ecx
  add    $0x32,%rdx
  add    $0x1,%rax
  mov    %cl,-0x1(%rax)
  cmp    %rsi,%rdx
  jne    L242
L170:
  lea    0x1(%rdx),%rsi
  add    $0x32,%rdi
  cmp    %r12,%rsi
  jne    L157
  mov    %rbx,%rsi
  nopw   0x0(%rax,%rax,1)
L123:
  mov    $0x31,%edx
  nopl   (%rax)
L27:
  cmpb   $0x0,(%rsi,%rdx,1)
  movslq %edx,%rcx
  je     L73
  lea    -0x1(%rcx,%rsi,1),%rax
  mov    %rax,%rcx
  sub    %rdx,%rcx
  cmp    %rcx,%rax
  je     L140
L65:
  cmpb   $0x0,(%rax)
  jne    L294
  movb   $0x20,(%rax)
L294:
  sub    $0x1,%rax
  cmp    %rcx,%rax
  jne    L65
L140:
  add    $0x32,%rsi
  cmp    %rbp,%rsi
  jne    L123
L224:
  xor    %esi,%esi
  lea    0x992(%rbx),%r8
  lea    -0x32(%rbx),%rdi
  nopl   0x0(%rax)
L18:
  lea    (%r8,%rsi,1),%rcx
  mov    $0x31,%eax
  nopl   0x0(%rax)
L219:
  mov    %eax,%edx
  sub    $0x1,%eax
  cmpb   $0x0,(%rcx)
  je     L104
  movslq %edx,%rax
  lea    (%rdi,%rsi,1),%rdx
  lea    (%rax,%rax,4),%rax
  lea    (%rax,%rax,4),%rax
  lea    -0x32(%rsi,%rax,2),%rax
  add    %rbx,%rax
  cmp    %rax,%rdx
  je     L278
L210:
  cmpb   $0x0,(%rax)
  jne    L149
  movb   $0x20,(%rax)
L149:
  sub    $0x32,%rax
  cmp    %rax,%rdx
  jne    L210
L278:
  add    $0x1,%rsi
  cmp    $0x32,%rsi
  jne    L18
L194:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L262
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopw   0x0(%rax,%rax,1)
L106:
  movsbl %r8b,%r8d
  add    %edi,%r8d
  movslq %r8d,%rax
  mov    %r8d,%r9d
  imul   $0x4ec4ec4f,%rax,%rax
  sar    $0x1f,%r9d
  sar    $0x23,%rax
  sub    %r9d,%eax
  imul   $0x1a,%eax,%r9d
  mov    %r8d,%eax
  sub    %r9d,%eax
  lea    0x1a(%rax),%r8d
  cmovs  %r8d,%eax
  add    $0x41,%eax
  jmp    L293
  nopl   0x0(%rax)
L104:
  sub    $0x32,%rcx
  cmp    $0xffffffff,%eax
  jne    L219
  add    $0x1,%rsi
  cmp    $0x32,%rsi
  jne    L18
  jmp    L194
  nopl   (%rax)
L73:
  sub    $0x1,%rdx
  jae    L27
  add    $0x32,%rsi
  cmp    %rbp,%rsi
  jne    L123
  jmp    L224
L262:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D5
type: string
name: extract_symbolic_data
arguments: label: D6
type: string

tool: D5: Input an integer N to encrypt: 

tool: D6: %i

assistant: ```c
void encrypt(char str[50][50], char encrypted[50][50]) {
  int n, i, j, fromZero, temp = 0;
  int length = 50;
  for (i = 0; i < length; i++) {
    for (j = 0; j < length; j++) {
      encrypted[i][j] = '\0';
    }
  }
  printf("Input an integer N to encrypt: ");
  scanf("%i", &n);
  getchar();
  for (i = 0; i < length; i++) {
    for (j = 0; j < length; j++) {
      if (str[i][j] >= 'a' && str[i][j] <= 'z') {
        fromZero = str[i][j] - 'a';
        temp = (fromZero + n) % 26;
        while (temp < 0)
          temp += 26;
        encrypted[i][j] = temp + 'a';
      } else if (str[i][j] >= 'A' && str[i][j] <= 'Z') {
        fromZero = str[i][j] - 'A';
        temp = (fromZero + n) % 26;
        while (temp < 0)
          temp += 26;
        encrypted[i][j] = temp + 'A';
      } else {
        encrypted[i][j] = str[i][j];
      }
    }
  }
  for (i = 0; i < length; i++) {
    for (j = 0; j < length; j++) {
      str[i][j] = encrypted[i][j];
    }
  }
  for (i = 0; i < length; i++) {
    for (j = 0; j < length; j++) {
      if (encrypted[i][j] == '\n' || encrypted[i][j] == '\r') {
        encrypted[i][j] = '\0';
      } else {
        encrypted[i][j] = str[j][i];
      }
    }
  }
  int charFound;
  for (i = 0; i < length; i++) {
    charFound = 0;
    for (j = length - 1; j >= 0; j--) {
      if (!charFound && encrypted[i][j] != '\0')
        charFound = 1;
      if (charFound && encrypted[i][j] == '\0')
        encrypted[i][j] = ' ';
    }
  }
  for (j = 0; j < length; j++) {
    charFound = 0;
    for (i = length - 1; i >= 0; i--) {
      if (!charFound && encrypted[i][j] != '\0')
        charFound = 1;
      if (charFound && encrypted[i][j] == '\0')
        encrypted[i][j] = ' ';
    }
  }
}
```