user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    $0x1,%r13d
  push   %r12
  push   %rbp
  push   %rbx
  lea    D11(%rip),%rbx
  sub    $0xf8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xe8(%rsp)
  xor    %eax,%eax
  lea    0x38(%rsp),%rax
  mov    %rax,0x8(%rsp)
  lea    0x30(%rsp),%rax
  mov    %rax,0x18(%rsp)
  lea    0x28(%rsp),%rax
  mov    %rax,0x10(%rsp)
  nopl   0x0(%rax,%rax,1)
L145:
  mov    0x8(%rsp),%rcx
  mov    0x18(%rsp),%rdx
  xor    %eax,%eax
  lea    D21(%rip),%rdi
  mov    0x10(%rsp),%rsi
  call   <scanf@plt>
  test   %rax,%rax
  je     L15
  cmpq   $0x0,0x28(%rsp)
  jne    L69
  mov    0x30(%rsp),%rax
  mov    %rax,%rcx
  or     0x38(%rsp),%rcx
  je     L15
L97:
  xor    %ebp,%ebp
  xor    %r14d,%r14d
  test   %rax,%rax
  jle    L65
  xor    %r15d,%r15d
  lea    0x24(%rsp),%r12
  nop
L3:
  mov    %r12,%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    0x24(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x24(%rsp)
  cmp    %r14,0x38(%rsp)
  jle    L127
  cltq
  mov    0x90(%rsp,%rax,4),%edx
  neg    %edx
  mov    %edx,0x90(%rsp,%rax,4)
  imul   0x40(%rsp,%rax,4),%edx
  movslq %edx,%rdx
  add    %rdx,%r14
  cmp    %r14,%rbp
  cmovl  %r14,%rbp
  add    $0x1,%r15
  cmp    0x30(%rsp),%r15
  jl     L3
L65:
  xor    %eax,%eax
  lea    D45(%rip),%rdi
  mov    %r13d,%esi
  call   <printf@plt>
  cmp    %r14,0x38(%rsp)
  jge    L73
  lea    D27(%rip),%rdi
  call   <puts@plt>
L66:
  mov    $0xa,%edi
  add    $0x1,%r13d
  call   <putchar@plt>
  jmp    L145
  nopl   0x0(%rax)
L127:
  add    $0x1,%r15
  cmp    %r15,0x30(%rsp)
  jg     L3
  jmp    L65
  nopl   0x0(%rax)
L69:
  jle    L51
  lea    0x40(%rsp),%r14
  xor    %r12d,%r12d
  lea    0x90(%rsp),%rbp
  nopw   0x0(%rax,%rax,1)
L18:
  movl   $0xffffffff,0x0(%rbp,%r12,4)
  mov    %r14,%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  add    $0x1,%r12
  add    $0x4,%r14
  call   <scanf@plt>
  cmp    %r12,0x28(%rsp)
  jg     L18
L51:
  mov    0x30(%rsp),%rax
  jmp    L97
  nop
L73:
  lea    D15(%rip),%rdi
  call   <puts@plt>
  mov    %rbp,%rsi
  lea    D24(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L66
L15:
  mov    0xe8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L77
  add    $0xf8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L77:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D11
datatype: string
name: parse_data
arguments: label: D21
datatype: string
name: parse_data
arguments: label: D45
datatype: string
name: parse_data
arguments: label: D27
datatype: string
name: parse_data
arguments: label: D15
datatype: string
name: parse_data
arguments: label: D24
datatype: string

tool: D11: %d

tool: D21: %ld %ld %ld

tool: D45: Sequence %d


tool: D27: Fuse was blown.

tool: D15: Fuse was not blown.

tool: D24: Maximal power consumption was %ld amperes.


assistant: ```c
int main() {
  long n, m, c, i, s, Max;
  int t, power[20], on[20], sequence = 0;
  while (scanf("%ld %ld %ld", &n, &m, &c)) {
    if (!n && !m && !c)
      break;
    sequence++;
    for (i = 0; i < n; i++) {
      on[i] = -1;
      scanf("%d", &power[i]);
    }
    for (i = 0, Max = 0, s = 0; i < m; i++) {
      scanf("%d", &t);
      --t;
      if (s < c) {
        on[t] = -on[t];
        s += power[t] * on[t];
        if (s > Max)
          Max = s;
      }
    }
    printf("Sequence %d\n", sequence);
    if (s > c)
      printf("Fuse was blown.\n");
    else {
      printf("Fuse was not blown.\n");
      printf("Maximal power consumption was %ld amperes.\n", Max);
    }
    printf("\n");
  }
  return 0;
}
```