user: What is the c source code of the assembly code below?

```asm
<battery>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    D53(%rip),%rbp
  mov    %rbp,%rsi
  lea    D28(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%rbx
  mov    %rsp,%rdx
  lea    D49(%rip),%r12
  mov    %r12,%rsi
  mov    %rax,%rdi
  call   <fscanf@plt>
  mov    %rbx,%rdi
  call   <fclose@plt>
  mov    %rbp,%rsi
  lea    D20(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%rbx
  lea    0x4(%rsp),%rdx
  mov    %r12,%rsi
  mov    %rax,%rdi
  call   <fscanf@plt>
  mov    %rbx,%rdi
  call   <fclose@plt>
  mov    $0x19,%edi
  call   <malloc@plt>
  mov    %rax,%rbp
  mov    0x4(%rsp),%eax
  mov    (%rsp),%ecx
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %ecx,%xmm1
  divsd  %xmm1,%xmm0
  movsd  D22(%rip),%xmm1
  comisd %xmm0,%xmm1
  jb     L25
  lea    D14(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
L42:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L6
  mov    %rbp,%rax
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L25:
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  cltd
  idiv   %ecx
  mov    %eax,%r12d
  lea    D78(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  mov    $0x1,%ebx
  lea    D59(%rip),%r14
  lea    D37(%rip),%r13
  jmp    L46
L2:
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
L68:
  add    $0x1,%ebx
  cmp    $0xb,%ebx
  je     L54
L46:
  cmp    %ebx,%r12d
  jl     L2
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L68
L54:
  lea    D55(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  jmp    L42
L6:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D53
type: string
name: disassemble_data
arguments: data_label: D28
type: string
name: disassemble_data
arguments: data_label: D49
type: string
name: disassemble_data
arguments: data_label: D20
type: string
name: disassemble_data
arguments: data_label: D22
type: f64
name: disassemble_data
arguments: data_label: D14
type: string
name: disassemble_data
arguments: data_label: D78
type: string
name: disassemble_data
arguments: data_label: D59
type: string
name: disassemble_data
arguments: data_label: D37
type: string
name: disassemble_data
arguments: data_label: D55
type: string

tool: D53: r

tool: D28: /sys/class/power_supply/BAT1/energy_full

tool: D49: %d

tool: D20: /sys/class/power_supply/BAT1/energy_now

tool: D22: 0.05

tool: D14: *** BATTERIE < 5% ***

tool: D78: [

tool: D59:  

tool: D37: #

tool: D55: ]

assistant: ```c
char *battery(void) {
  int nmarks, full, now;
  char *bar;
  FILE *battinfo = fopen("/sys/class/power_supply/BAT1/energy_full", "r");
  fscanf(battinfo, "%d", &full);
  fclose(battinfo);
  battinfo = fopen("/sys/class/power_supply/BAT1/energy_now", "r");
  fscanf(battinfo, "%d", &now);
  fclose(battinfo);
  bar = (char *)malloc(sizeof(char) * 25);
  nmarks = 10 * now / full;
  if ((double)now / full <= 0.05) {
    strcpy(bar, "*** BATTERIE < 5% ***");
  } else {
    strcpy(bar, "[");
    for (int i = 1; i < 11; i++) {
      if (i <= nmarks)
        strcat(bar, "#");
      else
        strcat(bar, " ");
    }
    strcat(bar, "]");
  }
  return bar;
}
```