user: What would the C source look like for the assembly code provided here?

```asm
<smallest>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    $0xffffffff,%r13d
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x98,%rsp
  mov    %rdi,0x18(%rsp)
  mov    $0x18,%edi
  lea    0x20(%rsp),%r15
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  call   <malloc@plt>
  movsbl %bl,%edx
  lea    D27(%rip),%rsi
  mov    %r15,%rdi
  mov    %rax,%r14
  xor    %eax,%eax
  call   <sprintf@plt>
  nopl   0x0(%rax)
L71:
  mov    %r15,%rdi
  add    $0x1,%r13d
  call   <strlen@plt>
  mov    %r13d,%esi
  mov    %r15,%rdi
  mov    %eax,%edx
  call   <smallest_idx_between@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L71
  cltq
  movzbl 0x20(%rsp,%rax,1),%ebx
  mov    %rax,0x10(%rsp)
  lea    (%r15,%rax,1),%rbp
  mov    %bl,0xf(%rsp)
  mov    $0x1,%ebx
  sub    %r15,%rbx
  jmp    L64
  xchg   %ax,%ax
L86:
  movzbl 0x1(%rbp),%eax
  add    $0x1,%rbp
  mov    %al,-0x1(%rbp)
L64:
  mov    %r15,%rdi
  call   <strlen@plt>
  lea    (%rbx,%rbp,1),%rcx
  cltq
  cmp    %rcx,%rax
  ja     L86
  mov    %r15,%rdi
  call   <strlen@plt>
  movsbl 0xf(%rsp),%ebx
  mov    %r15,%rdi
  sub    $0x1,%eax
  cltq
  movb   $0x0,0x20(%rsp,%rax,1)
  test   %r13d,%r13d
  je     L69
  call   <strlen@plt>
  mov    %r15,%rdi
  add    $0x1,%eax
  cltq
  movb   $0x0,0x20(%rsp,%rax,1)
  call   <strlen@plt>
  cmp    %eax,%r13d
  jge    L80
  mov    %eax,%edx
  cltq
  sub    %r13d,%edx
  lea    -0x1(%rax),%rsi
  sub    $0x1,%edx
  sub    %rdx,%rax
  lea    0x1(%rdx),%r9
  sub    %rdx,%rsi
  add    %r15,%rsi
  lea    (%r15,%rax,1),%rdi
  mov    %r9,%rdx
  call   <memmove@plt>
  mov    %r13d,%eax
L80:
  movzbl 0xf(%rsp),%esi
  cltq
  mov    %r15,%rdi
  mov    %sil,0x20(%rsp,%rax,1)
  call   <atoi@plt>
L58:
  pxor   %xmm0,%xmm0
  cmpb   $0x30,0xf(%rsp)
  mov    %rax,(%r14)
  movhps 0x10(%rsp),%xmm0
  jne    L12
  cmp    $0x1,%r12d
  jg     L12
L59:
  mov    0x18(%rsp),%rsi
  movups %xmm0,0x8(%r14)
  mov    %ebx,%r8d
  mov    %r13d,%ecx
  mov    %r12d,%edx
  lea    D14(%rip),%rdi
  call   <printf@plt>
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L38
  add    $0x98,%rsp
  mov    %r14,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L69:
  call   <atoi@plt>
  mov    %r15,%rdi
  mov    %ebx,%edx
  lea    D20(%rip),%rsi
  mov    %rax,(%r14)
  mov    %rax,%rcx
  xor    %eax,%eax
  call   <sprintf@plt>
  mov    %r15,%rdi
  call   <atoi@plt>
  jmp    L58
  nopl   0x0(%rax,%rax,1)
L12:
  movq   0x10(%rsp),%xmm0
  movslq %r13d,%rax
  movq   %rax,%xmm1
  punpcklqdq %xmm1,%xmm0
  jmp    L59
L38:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D27
type_guessed: string
name: disassemble_data
arguments: data_label: D14
type_guessed: string
name: disassemble_data
arguments: data_label: D20
type_guessed: string

tool: D27: %lld

tool: D14: n: %lld ; m_i: %d ; tmp: %d ; %c


tool: D20: %c%lld

assistant: ```c
long long *smallest(long long n) {
  long long *result = malloc(3 * sizeof *result);
  char temp[100];
  sprintf(temp, "%lld", n);
  int min_idx = 0;
  int tmp = -1;
  do {
    tmp++;
    min_idx = smallest_idx_between(temp, tmp, strlen(temp));
  } while (min_idx == 0);
  char temp_char = temp[min_idx];
  for (size_t i = min_idx + 1; i < strlen(temp); ++i)
    temp[i - 1] = temp[i];
  temp[strlen(temp) - 1] = '\0';
  if (tmp > 0) {
    temp[strlen(temp) + 1] = '\0';
    int i;
    for (i = strlen(temp); i >= tmp + 1; --i) {
      temp[i] = temp[i - 1];
    }
    temp[i] = temp_char;
    result[0] = atoi(temp);
  } else {
    result[0] = atoi(temp);
    sprintf(temp, "%c%lld", temp_char, result[0]);
    result[0] = atoi(temp);
  }
  if (temp_char != '0' || min_idx > 1) {
    result[1] = min_idx;
    result[2] = tmp;
  } else {
    result[1] = 0;
    result[2] = min_idx;
  }
  printf("n: %lld ; m_i: %d ; tmp: %d ; %c\n", n, min_idx, tmp, temp_char);
  return result;
}
```