user: 请将以下的汇编代码转换成C语言代码：

```asm
<calc_stream_size>:
  endbr64
  movzbl (%rdi),%eax
  xor    %r11d,%r11d
  test   %al,%al
  je     L396
  mov    %rdi,%r10
  lea    D8(%rip),%rdi
L92:
  cmp    $0x69,%al
  je     L132
  cmp    $0x6f,%al
  je     L246
  cmp    $0x63,%al
  sete   %al
  movzbl %al,%eax
  add    %rax,%r11
L350:
  movzbl 0x1(%r10),%eax
  add    $0x1,%r10
  test   %al,%al
  jne    L92
L396:
  mov    %r11,%rax
  ret
L246:
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
L261:
  mov    %r10,0x8(%rsp)
  lea    D8(%rip),%r8
  xor    %r9d,%r9d
  mov    $0x69,%eax
  mov    %r11,(%rsp)
  mov    %r9,%rbx
  mov    %r8,%r11
L93:
  cmp    $0x69,%al
  je     L54
  cmp    $0x6f,%al
  je     L204
  cmp    $0x63,%al
  sete   %al
  movzbl %al,%eax
  add    %rax,%rbx
L81:
  movzbl 0x1(%r11),%eax
  add    $0x1,%r11
  test   %al,%al
  jne    L93
  mov    (%rsp),%r11
  mov    0x8(%rsp),%r10
  add    %rbx,%r11
  jmp    L124
  xchg   %ax,%ax
L27:
  cmp    $0x6f,%al
  je     L261
  cmp    $0x63,%al
  sete   %al
  movzbl %al,%eax
  add    %rax,%r11
L124:
  movzbl 0x1(%r10),%eax
  add    $0x1,%r10
  test   %al,%al
  je     L36
L191:
  cmp    $0x69,%al
  jne    L27
  movzbl 0x1(%r10),%eax
  add    $0x1,%r10
  add    $0x4,%r11
  test   %al,%al
  jne    L191
L36:
  add    $0x68,%rsp
  mov    %r11,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L204:
  mov    %r11,0x10(%rsp)
  lea    D8(%rip),%r9
  xor    %r10d,%r10d
  mov    $0x69,%eax
  mov    %rbx,0x18(%rsp)
  mov    %r9,%rbp
  mov    %r10,%r12
L147:
  cmp    $0x69,%al
  je     L489
  cmp    $0x6f,%al
  je     L8
  cmp    $0x63,%al
  sete   %al
  movzbl %al,%eax
  add    %rax,%r12
L222:
  movzbl 0x1(%rbp),%eax
  add    $0x1,%rbp
  test   %al,%al
  jne    L147
  mov    0x18(%rsp),%rbx
  mov    0x10(%rsp),%r11
  add    %r12,%rbx
  jmp    L81
  nopl   0x0(%rax)
L8:
  mov    %rbp,0x20(%rsp)
  lea    D8(%rip),%r11
  xor    %ebx,%ebx
  mov    $0x69,%eax
  mov    %r11,%r13
  mov    %r12,%r11
L171:
  cmp    $0x69,%al
  je     L211
  cmp    $0x6f,%al
  je     L372
  cmp    $0x63,%al
  sete   %al
  movzbl %al,%eax
  add    %rax,%rbx
L424:
  movzbl 0x1(%r13),%eax
  add    $0x1,%r13
  test   %al,%al
  jne    L171
  mov    %r11,%r12
  mov    0x20(%rsp),%rbp
  add    %rbx,%r12
  jmp    L222
  nopw   0x0(%rax,%rax,1)
L372:
  lea    D8(%rip),%r14
  xor    %ebp,%ebp
  mov    %r13,%rdx
  mov    %rbx,%rcx
  mov    $0x69,%eax
L267:
  cmp    $0x69,%al
  je     L104
  cmp    $0x6f,%al
  je     L183
  cmp    $0x63,%al
  sete   %al
  movzbl %al,%eax
  add    %rax,%rbp
L373:
  movzbl 0x1(%r14),%eax
  add    $0x1,%r14
  test   %al,%al
  jne    L267
  mov    %rcx,%rbx
  mov    %rdx,%r13
  add    %rbp,%rbx
  jmp    L424
  nopl   0x0(%rax,%rax,1)
L54:
  add    $0x4,%rbx
  jmp    L81
  nopl   0x0(%rax)
L183:
  lea    D8(%rip),%r15
  xor    %r12d,%r12d
  mov    $0x69,%eax
  mov    %rbp,%rsi
L293:
  cmp    $0x69,%al
  je     L9
  cmp    $0x6f,%al
  je     L270
  cmp    $0x63,%al
  sete   %al
  movzbl %al,%eax
  add    %rax,%r12
L221:
  movzbl 0x1(%r15),%eax
  add    $0x1,%r15
  test   %al,%al
  jne    L293
  mov    %rsi,%rbp
  add    %r12,%rbp
  jmp    L373
  cs nopw 0x0(%rax,%rax,1)
L489:
  add    $0x4,%r12
  jmp    L222
  nopl   0x0(%rax)
L270:
  lea    D8(%rip),%r13
  xor    %ebx,%ebx
  mov    $0x69,%eax
  mov    %r12,%r8
L18:
  cmp    $0x69,%al
  je     L358
  cmp    $0x6f,%al
  je     L14
  cmp    $0x63,%al
  sete   %al
  movzbl %al,%eax
  add    %rax,%rbx
L448:
  movzbl 0x1(%r13),%eax
  add    $0x1,%r13
  test   %al,%al
  jne    L18
  mov    %r8,%r12
  add    %rbx,%r12
  jmp    L221
  nopl   (%rax)
L211:
  add    $0x4,%rbx
  jmp    L424
  nopl   0x0(%rax)
L132:
  add    $0x4,%r11
  jmp    L350
  nopl   0x0(%rax)
L14:
  mov    %r14,0x28(%rsp)
  mov    %rdx,%r14
  mov    %r15,%rdx
  mov    %rcx,%r15
  lea    D8(%rip),%r12
  mov    %rdx,%rcx
  mov    %r13,%r9
  mov    %rbx,%r10
  mov    0x28(%rsp),%rdx
  xor    %ebp,%ebp
  mov    $0x69,%eax
  mov    %r11,%r13
  mov    %r12,%rbx
L496:
  cmp    $0x69,%al
  je     L486
  cmp    $0x6f,%al
  je     L403
  cmp    $0x63,%al
  sete   %al
  movzbl %al,%eax
  add    %rax,%rbp
L175:
  movzbl 0x1(%rbx),%eax
  add    $0x1,%rbx
  test   %al,%al
  jne    L496
  mov    %rdx,%r12
  mov    %rcx,%rax
  mov    %r10,%rbx
  mov    %r13,%r11
  mov    %r14,%rdx
  mov    %r15,%rcx
  mov    %r9,%r13
  mov    %rax,%r15
  mov    %r12,%r14
  add    %rbp,%rbx
  jmp    L448
  cs nopw 0x0(%rax,%rax,1)
L104:
  add    $0x4,%rbp
  jmp    L373
  nopl   0x0(%rax)
L403:
  lea    D8(%rip),%r11
  mov    %rbx,0x28(%rsp)
  xor    %r12d,%r12d
  mov    $0x69,%eax
  mov    %rbp,0x30(%rsp)
  mov    %r11,%rbx
  mov    %rdx,%rbp
L386:
  cmp    $0x69,%al
  je     L205
  cmp    $0x6f,%al
  je     L355
  cmp    $0x63,%al
  sete   %al
  movzbl %al,%eax
  add    %rax,%r12
L138:
  movzbl 0x1(%rbx),%eax
  add    $0x1,%rbx
  test   %al,%al
  jne    L386
  mov    %rbp,%rdx
  mov    0x30(%rsp),%rbp
  mov    0x28(%rsp),%rbx
  add    %r12,%rbp
  jmp    L175
  nopw   0x0(%rax,%rax,1)
L9:
  add    $0x4,%r12
  jmp    L221
  nopl   0x0(%rax)
L358:
  add    $0x4,%rbx
  jmp    L448
  nopl   0x0(%rax)
L486:
  add    $0x4,%rbp
  jmp    L175
  nopl   0x0(%rax)
L355:
  mov    %r10,0x58(%rsp)
  mov    %r9,0x50(%rsp)
  mov    %r8,0x48(%rsp)
  mov    %rcx,0x40(%rsp)
  mov    %rsi,0x38(%rsp)
  call   <calc_stream_size>
  mov    0x58(%rsp),%r10
  mov    0x50(%rsp),%r9
  lea    D8(%rip),%rdi
  mov    0x48(%rsp),%r8
  mov    0x40(%rsp),%rcx
  add    %rax,%r12
  mov    0x38(%rsp),%rsi
  jmp    L138
  cs nopw 0x0(%rax,%rax,1)
L205:
  add    $0x4,%r12
  jmp    L138
```

tool_calls: name: disassemble_data
arguments: data_tag: D8
type: string

tool: D8: iiiic

assistant: ```c
size_t calc_stream_size(const char *type) {
  size_t size = 0;
  for (; *type != 0; type++) {
    switch (*type) {
    case 'i':
      size += 4;
      break;
    case 'c':
      size += 1;
      break;
    case 'o':
      size += calc_stream_size("iiiic");
      break;
    default:
      size += 0;
    }
  }
  return size;
}
```