user: Demonstrate the C code that generates the assembly output below:

```asm
<remove_trailing_zeros>:
  endbr64
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    $0x1,%ebx
L134:
  mov    %rbp,%rdi
  call   <strlen@plt>
  movslq %eax,%rdi
  test   %edi,%edi
  jle    L288
  mov    %rbp,%rdx
  xor    %r8d,%r8d
  xor    %r10d,%r10d
  xor    %r9d,%r9d
  xor    %eax,%eax
  jmp    L90
  nopl   0x0(%rax,%rax,1)
L308:
  test   %r8d,%r8d
  jne    L349
  cmp    $0x2e,%cl
  je     L102
  xor    %r10d,%r10d
  xor    %r9d,%r9d
L66:
  add    $0x1,%eax
  add    $0x1,%rdx
  cmp    %eax,%edi
  je     L139
L90:
  movzbl (%rdx),%ecx
  lea    -0x30(%rcx),%esi
  cmp    $0x9,%sil
  ja     L308
  cmp    $0x30,%cl
  je     L75
  add    $0x1,%eax
  mov    $0x1,%r9d
  xor    %r8d,%r8d
  add    $0x1,%rdx
  cmp    %eax,%edi
  jne    L90
L139:
  test   %r8d,%r8d
  je     L193
  mov    %edi,%edx
  sub    %r8d,%edx
  movslq %edx,%rdx
  cmpb   $0x2e,-0x1(%rbp,%rdx,1)
  je     L45
L150:
  movslq %r8d,%r8
  mov    %rbp,%rsi
  movslq %eax,%rdx
  sub    %r8,%rsi
L123:
  movzbl 0x0(%rbp,%rdx,1),%ecx
  mov    %cl,(%rsi,%rdx,1)
  add    $0x1,%rdx
  cmp    %edx,%eax
  jge    L123
L193:
  cmp    $0x1,%edi
  jle    L288
  cmpb   $0x2f,-0x2(%rbp,%rdi,1)
  jle    L288
  cltq
  cmpb   $0x39,0x0(%rbp,%rax,1)
  jg     L288
  lea    -0x1(%rbp,%rdi,1),%rax
  cmpb   $0x2e,(%rax)
  jne    L288
  movb   $0x0,(%rax)
L288:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L75:
  mov    $0x1,%r9d
  test   %r10d,%r10d
  je     L66
  add    $0x1,%r8d
  mov    %r10d,%r9d
  jmp    L66
  nopl   0x0(%rax,%rax,1)
L102:
  test   %r9d,%r9d
  cmovne %r9d,%r10d
  jmp    L66
  nopl   0x0(%rax)
L349:
  mov    %eax,%edx
  sub    %r8d,%edx
  movslq %edx,%rdx
  cmpb   $0x2e,-0x1(%rbp,%rdx,1)
  jne    L58
  add    $0x1,%r8d
L58:
  movslq %eax,%rcx
  mov    %edi,%edx
  movslq %r8d,%rsi
  mov    %rcx,%r10
  sub    %eax,%edx
  sub    %rsi,%r10
  cmp    %eax,%edi
  setge  %r11b
  cmp    $0x6,%edx
  seta   %r9b
  test   %r9b,%r11b
  je     L71
  mov    %rsi,%r9
  not    %r9
  cmp    $0xe,%r9
  jbe    L71
  lea    0x1(%rdx),%esi
  cmp    %eax,%edi
  cmovl  %ebx,%esi
  mov    %esi,%r9d
  cmp    $0xe,%edx
  jbe    L81
  shr    $0x4,%esi
  lea    0x0(%rbp,%rcx,1),%r12
  lea    0x0(%rbp,%r10,1),%r11
  xor    %edx,%edx
  shl    $0x4,%rsi
L359:
  movdqu (%r12,%rdx,1),%xmm0
  movups %xmm0,(%r11,%rdx,1)
  add    $0x10,%rdx
  cmp    %rsi,%rdx
  jne    L359
  mov    %r9d,%edx
  and    $0xfffffff0,%edx
  add    %edx,%eax
  cmp    %edx,%r9d
  je     L134
L60:
  mov    %r9d,%esi
  sub    %edx,%esi
  lea    -0x1(%rsi),%r9d
  cmp    $0x6,%r9d
  jbe    L53
  add    %rbp,%rcx
  add    %rbp,%r10
  mov    (%rcx,%rdx,1),%rcx
  mov    %rcx,(%r10,%rdx,1)
  mov    %esi,%edx
  and    $0xfffffff8,%edx
  add    %edx,%eax
  cmp    %edx,%esi
  je     L134
L53:
  movslq %eax,%rdx
  movzbl 0x0(%rbp,%rdx,1),%ecx
  mov    %eax,%edx
  sub    %r8d,%edx
  movslq %edx,%rdx
  mov    %cl,0x0(%rbp,%rdx,1)
  lea    0x1(%rax),%edx
  cmp    %edx,%edi
  jl     L134
  movslq %edx,%rcx
  sub    %r8d,%edx
  movzbl 0x0(%rbp,%rcx,1),%ecx
  movslq %edx,%rdx
  mov    %cl,0x0(%rbp,%rdx,1)
  lea    0x2(%rax),%edx
  cmp    %edx,%edi
  jl     L134
  movslq %edx,%rcx
  sub    %r8d,%edx
  movzbl 0x0(%rbp,%rcx,1),%ecx
  movslq %edx,%rdx
  mov    %cl,0x0(%rbp,%rdx,1)
  lea    0x3(%rax),%edx
  cmp    %edx,%edi
  jl     L134
  movslq %edx,%rcx
  sub    %r8d,%edx
  movzbl 0x0(%rbp,%rcx,1),%ecx
  movslq %edx,%rdx
  mov    %cl,0x0(%rbp,%rdx,1)
  lea    0x4(%rax),%edx
  cmp    %edx,%edi
  jl     L134
  movslq %edx,%rcx
  sub    %r8d,%edx
  movzbl 0x0(%rbp,%rcx,1),%ecx
  movslq %edx,%rdx
  mov    %cl,0x0(%rbp,%rdx,1)
  lea    0x5(%rax),%edx
  cmp    %edx,%edi
  jl     L134
  movslq %edx,%rcx
  sub    %r8d,%edx
  add    $0x6,%eax
  movzbl 0x0(%rbp,%rcx,1),%ecx
  movslq %edx,%rdx
  mov    %cl,0x0(%rbp,%rdx,1)
  cmp    %eax,%edi
  jl     L134
  movslq %eax,%rdx
  sub    %r8d,%eax
  movzbl 0x0(%rbp,%rdx,1),%edx
  cltq
  mov    %dl,0x0(%rbp,%rax,1)
  jmp    L134
L71:
  mov    %rbp,%rdx
  sub    %rsi,%rdx
  nopl   (%rax)
L70:
  movzbl 0x0(%rbp,%rcx,1),%eax
  mov    %al,(%rdx,%rcx,1)
  add    $0x1,%rcx
  cmp    %ecx,%edi
  jge    L70
  jmp    L134
L81:
  xor    %edx,%edx
  jmp    L60
L45:
  add    $0x1,%r8d
  jmp    L150
```

assistant: ```c
void remove_trailing_zeros(char *str) {
  int i, j, len, numberfound, dotfound, decimalzerofound, trailingzerofound = 1;
  while (trailingzerofound) {
    numberfound = 0;
    dotfound = 0;
    decimalzerofound = 0;
    trailingzerofound = 0;
    len = strlen(str);
    for (i = 0; i < len; i++) {
      if ((str[i] < '0') || (str[i] > '9')) {
        if (decimalzerofound) {
          if (str[i - decimalzerofound - 1] == '.') {
            decimalzerofound++;
          }
          for (j = i; j < (len + 1); j++) {
            str[j - decimalzerofound] = str[j];
          }
          trailingzerofound = 1;
          break;
        }
        if (str[i] != '.') {
          numberfound = 0;
          dotfound = 0;
          decimalzerofound = 0;
        }
      } else {
        numberfound = 1;
        if (str[i] > '0') {
          decimalzerofound = 0;
        }
      }
      if ((str[i] == '.') && numberfound) {
        dotfound = 1;
      }
      if ((str[i] == '0') && dotfound) {
        decimalzerofound++;
      }
    }
  }
  if (decimalzerofound) {
    if (str[i - decimalzerofound - 1] == '.') {
      decimalzerofound++;
    }
    for (j = i; j < (len + 1); j++) {
      str[j - decimalzerofound] = str[j];
    }
  }
  if (len > 1) {
    if (!((str[len - 2] < '0') || (str[i] > '9'))) {
      if (str[len - 1] == '.') {
        str[len - 1] = 0;
      }
    }
  }
}
```