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

```asm
<fpconv_g_fmt>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%rbx
  mov    %esi,%ebp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  lea    0xc(%rsp),%rcx
  lea    0x8(%rsp),%rdx
  lea    0x10(%rsp),%r8
  mov    $0x2,%edi
  call   <dtoa@plt>
  mov    %rax,%r8
  mov    %rbx,%rdx
  cmpl   $0x0,0xc(%rsp)
  je     L79
  lea    0x1(%rbx),%rdx
  movb   $0x2d,(%rbx)
L79:
  mov    0x8(%rsp),%esi
  cmp    $0x270f,%esi
  je     L254
  cmp    $0xfffffffd,%esi
  jl     L172
  cmp    %ebp,%esi
  jle    L189
L172:
  movzbl (%r8),%eax
  mov    %al,(%rdx)
  lea    0x1(%rdx),%rax
  cmpb   $0x0,0x1(%r8)
  je     L251
  lea    0x2(%rdx),%rax
  movb   $0x2e,0x1(%rdx)
  lea    0x2(%r8),%rcx
  movzbl 0x1(%r8),%edi
  mov    %dil,0x2(%rdx)
  test   %dil,%dil
  je     L251
L141:
  add    $0x1,%rax
  add    $0x1,%rcx
  movzbl -0x1(%rcx),%edx
  mov    %dl,(%rax)
  test   %dl,%dl
  jne    L141
L251:
  movb   $0x65,(%rax)
  lea    -0x1(%rsi),%edx
  mov    %edx,0x8(%rsp)
  test   %edx,%edx
  js     L217
  lea    0x2(%rax),%r11
  movb   $0x2b,0x1(%rax)
L287:
  mov    0x8(%rsp),%ecx
  cmp    $0x63,%ecx
  jle    L102
  mov    $0x2,%edi
  mov    $0x64,%edx
L42:
  mov    %edi,%r9d
  add    $0x1,%edi
  mov    %edx,%esi
  lea    (%rdx,%rdx,4),%eax
  add    %eax,%eax
  mov    %eax,%edx
  cmp    %ecx,%eax
  jle    L42
  lea    0x1(%r11),%r10
  mov    %ecx,%eax
  cltd
  idiv   %esi
  add    $0x30,%eax
  mov    %al,(%r11)
  test   %r9d,%r9d
  jle    L206
L338:
  mov    %r10,%rdi
  lea    (%r9,%r10,1),%r11d
L288:
  mov    %ecx,%eax
  cltd
  idiv   %esi
  lea    (%rdx,%rdx,4),%ecx
  add    %ecx,%ecx
  add    $0x1,%rdi
  mov    %ecx,%eax
  cltd
  idiv   %esi
  add    $0x30,%eax
  mov    %al,-0x1(%rdi)
  mov    %r11d,%edx
  sub    %edi,%edx
  test   %edx,%edx
  jg     L288
  lea    -0x1(%r9),%edx
  lea    0x1(%rdx),%rbp
  test   %r9d,%r9d
  mov    $0x1,%esi
  cmovle %rsi,%rbp
  add    %r10,%rbp
  mov    %ecx,0x8(%rsp)
  test   %r9d,%r9d
  mov    $0x0,%ecx
  cmovle %rcx,%rdx
  mov    %al,(%r10,%rdx,1)
L332:
  movb   $0x0,0x0(%rbp)
L162:
  mov    %r8,%rdi
  call   <freedtoa@plt>
  mov    %ebp,%eax
  sub    %ebx,%eax
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L38
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  ret
L254:
  mov    %r8,%rax
L246:
  add    $0x1,%rax
  mov    %rdx,%rbp
  add    $0x1,%rdx
  movzbl -0x1(%rax),%ecx
  mov    %cl,-0x1(%rdx)
  test   %cl,%cl
  jne    L246
  jmp    L162
L217:
  lea    0x2(%rax),%r11
  movb   $0x2d,0x1(%rax)
  mov    $0x1,%eax
  sub    %esi,%eax
  mov    %eax,0x8(%rsp)
  jmp    L287
L206:
  mov    %r10,%rbp
  jmp    L332
L189:
  test   %esi,%esi
  jle    L64
  lea    0x1(%r8),%rcx
  movzbl (%r8),%eax
  mov    %al,(%rdx)
  test   %al,%al
  jne    L7
  jmp    L313
L64:
  movb   $0x30,(%rdx)
  lea    0x2(%rdx),%rax
  movb   $0x2e,0x1(%rdx)
  jns    L81
  mov    $0x2,%ecx
  sub    %esi,%ecx
  add    %rdx,%rcx
  mov    %rax,%rdx
L180:
  add    $0x1,%rdx
  movb   $0x30,-0x1(%rdx)
  cmp    %rcx,%rdx
  jne    L180
  neg    %esi
  add    %rsi,%rax
  movl   $0x0,0x8(%rsp)
L81:
  mov    %r8,%rdx
L212:
  add    $0x1,%rdx
  mov    %rax,%rbp
  add    $0x1,%rax
  movzbl -0x1(%rdx),%ecx
  mov    %cl,-0x1(%rax)
  test   %cl,%cl
  jne    L212
  jmp    L162
L36:
  mov    %rbp,%rdx
L158:
  add    $0x1,%rcx
  movzbl -0x1(%rcx),%eax
  mov    %al,(%rdx)
  test   %al,%al
  je     L101
L7:
  lea    0x1(%rdx),%rbp
  mov    0x8(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x8(%rsp)
  jne    L36
  cmpb   $0x0,(%rcx)
  je     L157
  movb   $0x2e,0x1(%rdx)
  lea    0x2(%rdx),%rdx
  jmp    L158
L101:
  mov    0x8(%rsp),%esi
  test   %esi,%esi
  jle    L202
L313:
  mov    %rdx,%rax
  lea    (%rsi,%rdx,1),%edi
L149:
  add    $0x1,%rax
  movb   $0x30,-0x1(%rax)
  mov    %edi,%ecx
  sub    %eax,%ecx
  test   %ecx,%ecx
  jg     L149
  lea    -0x1(%rsi),%eax
  mov    %eax,%ebp
  add    $0x1,%rbp
  test   %esi,%esi
  mov    $0x1,%ecx
  cmovle %rcx,%rbp
  add    %rdx,%rbp
  test   %esi,%esi
  mov    $0x1,%edx
  cmovle %edx,%esi
  sub    %esi,%eax
  lea    0x1(%rax),%eax
  mov    %eax,0x8(%rsp)
  jmp    L331
L202:
  mov    %rdx,%rbp
  jmp    L331
L102:
  lea    0x1(%r11),%r10
  movslq %ecx,%rax
  imul   $0x66666667,%rax,%rax
  sar    $0x22,%rax
  mov    %ecx,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  add    $0x30,%eax
  mov    %al,(%r11)
  mov    $0xa,%esi
  mov    $0x1,%r9d
  jmp    L338
L157:
  movzbl (%rcx),%eax
  mov    %al,0x1(%rdx)
L331:
  movb   $0x0,0x0(%rbp)
  jmp    L162
L38:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int fpconv_g_fmt(char *b, double x, int precision) {
  register int i, k;
  register char *s;
  int decpt, j, sign;
  char *b0, *s0, *se;
  b0 = b;
  s = s0 = dtoa(x, 2, precision, &decpt, &sign, &se);
  if (sign)
    *b++ = '-';
  if (decpt == 9999) {
    while ((*b++ = *s++))
      ;
    b--;
    goto done0;
  }
  if (decpt <= -4 || decpt > precision) {
    *b++ = *s++;
    if (*s) {
      *b++ = '.';
      while ((*b = *s++))
        b++;
    }
    *b++ = 'e';
    if (--decpt < 0) {
      *b++ = '-';
      decpt = -decpt;
    } else
      *b++ = '+';
    for (j = 2, k = 10; 10 * k <= decpt; j++, k *= 10)
      ;
    for (;;) {
      i = decpt / k;
      *b++ = i + '0';
      if (--j <= 0)
        break;
      decpt -= i * k;
      decpt *= 10;
    }
    *b = 0;
  } else if (decpt <= 0) {
    *b++ = '0';
    *b++ = '.';
    for (; decpt < 0; decpt++)
      *b++ = '0';
    while ((*b++ = *s++))
      ;
    b--;
  } else {
    while ((*b = *s++)) {
      b++;
      if (--decpt == 0 && *s)
        *b++ = '.';
    }
    for (; decpt > 0; decpt--)
      *b++ = '0';
    *b = 0;
  }
done0:
  freedtoa(s0);
  return b - b0;
}
```