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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x4000(%rsp),%r11
L30:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L30
  sub    $0xe88,%rsp
  lea    D17(%rip),%r12
  mov    %r12,%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x4e78(%rsp)
  xor    %eax,%eax
  lea    0x18(%rsp),%rsi
  call   <scanf@plt>
  mov    0x18(%rsp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,0x18(%rsp)
  test   %eax,%eax
  je     L50
  lea    0x20(%rsp),%rax
  lea    0x60(%rsp),%r15
  mov    %rax,(%rsp)
  lea    0x31(%rsp),%rax
  lea    0x1c(%rsp),%r14
  mov    %rax,0x8(%rsp)
  lea    0x30(%rsp),%rbp
  nopw   0x0(%rax,%rax,1)
L48:
  pxor   %xmm0,%xmm0
  mov    $0x4e10,%edx
  xor    %esi,%esi
  mov    %r15,%rdi
  movaps %xmm0,0x50(%rsp)
  call   <memset@plt>
  mov    %r14,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  movl   $0x6e616d75,0x2b(%rsp)
  movb   $0x6b,0x2f(%rsp)
  call   <scanf@plt>
  mov    %rbp,%rsi
  lea    D23(%rip),%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    0x1c(%rsp),%r8d
  test   %r8d,%r8d
  jle    L139
  mov    %r8d,%r9d
  lea    -0x2(%r8),%esi
  xor    %edi,%edi
  add    0x8(%rsp),%rsi
  sub    $0x1,%r9d
  je     L39
  nopl   (%rax)
L76:
  mov    %rbp,%rax
  nopl   0x0(%rax,%rax,1)
L107:
  movzbl (%rax),%edx
  movzbl 0x1(%rax),%ecx
  cmp    %cl,%dl
  jle    L46
  mov    %cl,(%rax)
  mov    %dl,0x1(%rax)
L46:
  add    $0x1,%rax
  cmp    %rax,%rsi
  jne    L107
  add    $0x1,%edi
  cmp    %r8d,%edi
  jne    L76
L39:
  movslq %r9d,%rax
  movzbl 0x30(%rsp,%rax,1),%eax
  mov    %al,0x2b(%rsp)
  cmp    $0x1,%r8d
  je     L67
  lea    0x2c(%rsp),%rdi
  mov    %r9d,%edx
  mov    %rbp,%rsi
  call   <memcpy@plt>
L67:
  mov    (%rsp),%rsi
  xor    %eax,%eax
  lea    D27(%rip),%rdi
  xor    %r13d,%r13d
  mov    $0x1,%ebx
  call   <scanf@plt>
  cmpq   $0x0,0x20(%rsp)
  je     L126
  nopl   0x0(%rax)
L77:
  mov    0x1c(%rsp),%edi
  mov    %rbx,%rsi
  call   <pow@plt>
  mov    0x20(%rsp),%rcx
  add    %rax,%r13
  mov    %rbx,%rax
  add    $0x1,%rbx
  cmp    %r13,%rcx
  ja     L77
  test   %rax,%rax
  je     L126
  lea    0x50(%rsp),%r9
  movslq 0x1c(%rsp),%r8
  lea    (%r9,%rax,1),%rbx
  mov    %r9,%r13
  mov    %rbx,%rdi
  nopl   0x0(%rax)
L1:
  mov    %rcx,%rax
  xor    %edx,%edx
  div    %r8
  cmp    $0x1,%rdx
  movzbl 0x2b(%rsp,%rdx,1),%eax
  sbb    $0x0,%rcx
  xor    %edx,%edx
  sub    $0x1,%rdi
  mov    %al,(%rdi)
  mov    %rcx,%rax
  div    %r8
  mov    %rax,%rcx
  cmp    %r9,%rdi
  jne    L1
  mov    %rax,0x20(%rsp)
L47:
  movsbl 0x0(%r13),%edi
  add    $0x1,%r13
  call   <putchar@plt>
  cmp    %r13,%rbx
  jne    L47
L126:
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    0x18(%rsp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,0x18(%rsp)
  test   %eax,%eax
  jne    L48
L50:
  mov    0x4e78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L101
  add    $0x4e88,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L139:
  lea    -0x1(%r8),%eax
  cltq
  movzbl 0x30(%rsp,%rax,1),%eax
  mov    %al,0x2b(%rsp)
  jmp    L67
L101:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D17
data_type: string
name: disassemble_data
arguments: label: D23
data_type: string
name: disassemble_data
arguments: label: D27
data_type: string

tool: D17: %d

tool: D23: %s

tool: D27: %llu

assistant: ```c
int main() {
  unsigned long long a, j;
  int times;
  scanf("%d", &times);
  while (times--) {
    char s[20000] = {0}, std[5] = {'u', 'm', 'a', 'n', 'k'}, s2[20000] = {0};
    int sac;
    scanf("%d", &sac);
    int sa;
    char word[27];
    scanf("%s", word);
    int i1, j1;
    for (i1 = 0; i1 < sac; i1++) {
      for (j1 = 0; j1 < sac - 1; j1++) {
        if (word[j1] > word[j1 + 1]) {
          int zw = word[j1];
          word[j1] = word[j1 + 1];
          word[j1 + 1] = zw;
        }
      }
    }
    std[0] = word[sac - 1];
    for (i1 = 1; i1 < sac; i1++)
      std[i1] = word[i1 - 1];
    scanf("%llu", &a);
    unsigned long long sum = 0, i = 1;
    while (a > sum) {
      sum = sum + pow(sac, i);
      i++;
    }
    i--;
    unsigned long long ch = i;
    while (i--) {
      s[i] = std[a % sac];
      if (a % sac == 0)
        a--;
      a = a / sac;
    }
    for (j = 0; j < ch; j++)
      printf("%c", s[j]);
    printf("\n");
  }
  return 0;
}
```