user: Please show me the C implementation that matches the assembly code listed below:

```asm
<parse_line>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x3e8,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%r13
  mov    %rdx,%r15
  mov    %rcx,0x10(%rsp)
  mov    %r8,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x3d8(%rsp)
  xor    %eax,%eax
  movabs $0x6574696877,%rax
  mov    %rax,0x260(%rsp)
  movw   $0x0,0x268(%rsp)
  movq   $0x3163,0x26a(%rsp)
  movw   $0x0,0x272(%rsp)
  movl   $0x0,0x274(%rsp)
  movq   $0x646572,0x278(%rsp)
  movw   $0x0,0x280(%rsp)
  movq   $0x3263,0x282(%rsp)
  movw   $0x0,0x28a(%rsp)
  movl   $0x20,0x28c(%rsp)
  movabs $0x6e65657267,%rax
  mov    %rax,0x290(%rsp)
  movw   $0x0,0x298(%rsp)
  movq   $0x3363,0x29a(%rsp)
  movw   $0x0,0x2a2(%rsp)
  movl   $0x40,0x2a4(%rsp)
  movq   $0x65756c62,0x2a8(%rsp)
  movw   $0x0,0x2b0(%rsp)
  movq   $0x3463,0x2b2(%rsp)
  movw   $0x0,0x2ba(%rsp)
  movl   $0x60,0x2bc(%rsp)
  movabs $0x776f6c6c6579,%rax
  mov    %rax,0x2c0(%rsp)
  movw   $0x0,0x2c8(%rsp)
  movq   $0x3563,0x2ca(%rsp)
  movw   $0x0,0x2d2(%rsp)
  movl   $0x80,0x2d4(%rsp)
  movq   $0x6e617963,0x2d8(%rsp)
  movw   $0x0,0x2e0(%rsp)
  movq   $0x3663,0x2e2(%rsp)
  movw   $0x0,0x2ea(%rsp)
  movl   $0xa0,0x2ec(%rsp)
  movabs $0x61746e6567616d,%rax
  mov    %rax,0x2f0(%rsp)
  movw   $0x0,0x2f8(%rsp)
  movq   $0x3763,0x2fa(%rsp)
  movw   $0x0,0x302(%rsp)
  movl   $0xc0,0x304(%rsp)
  movabs $0x3265756c62,%rax
  mov    %rax,0x308(%rsp)
  movw   $0x0,0x310(%rsp)
  movq   $0x3863,0x312(%rsp)
  movw   $0x0,0x31a(%rsp)
  movl   $0xe0,0x31c(%rsp)
  movq   $0x3078,0x130(%rsp)
  movw   $0x0,0x138(%rsp)
  movb   $0x64,0x13a(%rsp)
  movb   $0x0,0x13b(%rsp)
  movb   $0x0,0x13c(%rsp)
  movq   $0x3079,0x13d(%rsp)
  movw   $0x0,0x145(%rsp)
  movb   $0x64,0x147(%rsp)
  movb   $0x1,0x148(%rsp)
  movb   $0x0,0x149(%rsp)
  movq   $0x307a,0x14a(%rsp)
  movw   $0x0,0x152(%rsp)
  movb   $0x64,0x154(%rsp)
  movb   $0x2,0x155(%rsp)
  movb   $0x0,0x156(%rsp)
  movq   $0x72,0x157(%rsp)
  movw   $0x0,0x15f(%rsp)
  movb   $0x64,0x161(%rsp)
  movb   $0x3,0x162(%rsp)
  movb   $0x0,0x163(%rsp)
  movabs $0x726f6c6f63,%rax
  mov    %rax,0x164(%rsp)
  movw   $0x0,0x16c(%rsp)
  movb   $0x73,0x16e(%rsp)
  movb   $0x0,0x16f(%rsp)
  movb   $0x0,0x170(%rsp)
  movq   $0x3078,0x1e0(%rsp)
  movw   $0x0,0x1e8(%rsp)
  movb   $0x64,0x1ea(%rsp)
  movb   $0x0,0x1eb(%rsp)
  movb   $0x0,0x1ec(%rsp)
  movq   $0x3079,0x1ed(%rsp)
  movw   $0x0,0x1f5(%rsp)
  movb   $0x64,0x1f7(%rsp)
  movb   $0x1,0x1f8(%rsp)
  movb   $0x0,0x1f9(%rsp)
  movq   $0x307a,0x1fa(%rsp)
  movw   $0x0,0x202(%rsp)
  movb   $0x64,0x204(%rsp)
  movb   $0x2,0x205(%rsp)
  movb   $0x0,0x206(%rsp)
  movq   $0x61,0x207(%rsp)
  movw   $0x0,0x20f(%rsp)
  movb   $0x64,0x211(%rsp)
  movb   $0x3,0x212(%rsp)
  movb   $0x0,0x213(%rsp)
  movq   $0x62,0x214(%rsp)
  movw   $0x0,0x21c(%rsp)
  movb   $0x64,0x21e(%rsp)
  movb   $0x4,0x21f(%rsp)
  movb   $0x0,0x220(%rsp)
  movq   $0x63,0x221(%rsp)
  movw   $0x0,0x229(%rsp)
  movb   $0x64,0x22b(%rsp)
  movb   $0x5,0x22c(%rsp)
  movb   $0x0,0x22d(%rsp)
  movabs $0x31726f6c6f63,%rsi
  mov    %rsi,0x22e(%rsp)
  movw   $0x0,0x236(%rsp)
  movb   $0x73,0x238(%rsp)
  movb   $0x0,0x239(%rsp)
  movb   $0x0,0x23a(%rsp)
  movabs $0x32726f6c6f63,%rsi
  mov    %rsi,0x23b(%rsp)
  movw   $0x0,0x243(%rsp)
  movb   $0x73,0x245(%rsp)
  movb   $0x1,0x246(%rsp)
  movb   $0x0,0x247(%rsp)
  movabs $0x656c616373786574,%rdi
  mov    %rdi,0x248(%rsp)
  movw   $0x0,0x250(%rsp)
  movb   $0x64,0x252(%rsp)
  movb   $0x6,0x253(%rsp)
  movb   $0x0,0x254(%rsp)
  movq   $0x3078,0x70(%rsp)
  movw   $0x0,0x78(%rsp)
  movb   $0x64,0x7a(%rsp)
  movb   $0x0,0x7b(%rsp)
  movb   $0x0,0x7c(%rsp)
  movq   $0x3079,0x7d(%rsp)
  movw   $0x0,0x85(%rsp)
  movb   $0x64,0x87(%rsp)
  movb   $0x1,0x88(%rsp)
  movb   $0x0,0x89(%rsp)
  movq   $0x72,0x8a(%rsp)
  movw   $0x0,0x92(%rsp)
  movb   $0x64,0x94(%rsp)
  movb   $0x2,0x95(%rsp)
  movb   $0x0,0x96(%rsp)
  mov    %rax,0x97(%rsp)
  movw   $0x0,0x9f(%rsp)
  movb   $0x73,0xa1(%rsp)
  movb   $0x0,0xa2(%rsp)
  movb   $0x0,0xa3(%rsp)
  movq   $0x3078,0xb0(%rsp)
  movw   $0x0,0xb8(%rsp)
  movb   $0x64,0xba(%rsp)
  movb   $0x0,0xbb(%rsp)
  movb   $0x0,0xbc(%rsp)
  movq   $0x307a,0xbd(%rsp)
  movw   $0x0,0xc5(%rsp)
  movb   $0x64,0xc7(%rsp)
  movb   $0x1,0xc8(%rsp)
  movb   $0x0,0xc9(%rsp)
  movq   $0x72,0xca(%rsp)
  movw   $0x0,0xd2(%rsp)
  movb   $0x64,0xd4(%rsp)
  movb   $0x2,0xd5(%rsp)
  movb   $0x0,0xd6(%rsp)
  mov    %rax,0xd7(%rsp)
  movw   $0x0,0xdf(%rsp)
  movb   $0x73,0xe1(%rsp)
  movb   $0x0,0xe2(%rsp)
  movb   $0x0,0xe3(%rsp)
  movq   $0x3079,0xf0(%rsp)
  movw   $0x0,0xf8(%rsp)
  movb   $0x64,0xfa(%rsp)
  movb   $0x0,0xfb(%rsp)
  movb   $0x0,0xfc(%rsp)
  movq   $0x307a,0xfd(%rsp)
  movw   $0x0,0x105(%rsp)
  movb   $0x64,0x107(%rsp)
  movb   $0x1,0x108(%rsp)
  movb   $0x0,0x109(%rsp)
  movq   $0x72,0x10a(%rsp)
  movw   $0x0,0x112(%rsp)
  movb   $0x64,0x114(%rsp)
  movb   $0x2,0x115(%rsp)
  movb   $0x0,0x116(%rsp)
  mov    %rax,0x117(%rsp)
  movw   $0x0,0x11f(%rsp)
  movb   $0x73,0x121(%rsp)
  movb   $0x0,0x122(%rsp)
  movb   $0x0,0x123(%rsp)
  movq   $0x78,0x40(%rsp)
  movw   $0x0,0x48(%rsp)
  movb   $0x64,0x4a(%rsp)
  movb   $0x0,0x4b(%rsp)
  movb   $0x0,0x4c(%rsp)
  movq   $0x79,0x4d(%rsp)
  movw   $0x0,0x55(%rsp)
  movb   $0x64,0x57(%rsp)
  movb   $0x1,0x58(%rsp)
  movb   $0x0,0x59(%rsp)
  movq   $0x7a,0x5a(%rsp)
  movw   $0x0,0x62(%rsp)
  movb   $0x64,0x64(%rsp)
  movb   $0x2,0x65(%rsp)
  movb   $0x0,0x66(%rsp)
  movq   $0x78,0x180(%rsp)
  movw   $0x0,0x188(%rsp)
  movb   $0x64,0x18a(%rsp)
  movb   $0x0,0x18b(%rsp)
  movb   $0x0,0x18c(%rsp)
  movq   $0x79,0x18d(%rsp)
  movw   $0x0,0x195(%rsp)
  movb   $0x64,0x197(%rsp)
  movb   $0x1,0x198(%rsp)
  movb   $0x0,0x199(%rsp)
  movq   $0x7a,0x19a(%rsp)
  movw   $0x0,0x1a2(%rsp)
  movb   $0x64,0x1a4(%rsp)
  movb   $0x2,0x1a5(%rsp)
  movb   $0x0,0x1a6(%rsp)
  movq   $0x786c,0x1a7(%rsp)
  movw   $0x0,0x1af(%rsp)
  movb   $0x64,0x1b1(%rsp)
  movb   $0x3,0x1b2(%rsp)
  movb   $0x0,0x1b3(%rsp)
  movq   $0x796c,0x1b4(%rsp)
  movw   $0x0,0x1bc(%rsp)
  movb   $0x64,0x1be(%rsp)
  movb   $0x4,0x1bf(%rsp)
  movb   $0x0,0x1c0(%rsp)
  movq   $0x7a6c,0x1c1(%rsp)
  movw   $0x0,0x1c9(%rsp)
  movb   $0x64,0x1cb(%rsp)
  movb   $0x5,0x1cc(%rsp)
  movb   $0x0,0x1cd(%rsp)
  movq   $0x746f72,0x1ce(%rsp)
  movw   $0x0,0x1d6(%rsp)
  movb   $0x64,0x1d8(%rsp)
  movb   $0x6,0x1d9(%rsp)
  movb   $0x0,0x1da(%rsp)
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %rax,%r12
  mov    %eax,0x20(%rsp)
  cltq
  cmpb   $0x29,-0x1(%rbx,%rax,1)
  jne    L124
  mov    $0x0,%eax
L178:
  movzbl (%rbx,%rax,1),%edx
  cmp    $0x28,%dl
  je     L9
  lea    -0x61(%rdx),%ecx
  cmp    $0x19,%cl
  ja     L383
  mov    %dl,0x330(%rsp,%rax,1)
  add    $0x1,%rax
  cmp    $0x10,%rax
  jne    L178
  mov    $0xfffffff8,%eax
L250:
  mov    0x3d8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L244
  add    $0x3e8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L9:
  lea    0x1(%rax),%ebp
  movslq %eax,%rcx
  movb   $0x0,0x330(%rsp,%rcx,1)
  lea    0x330(%rsp),%rdi
  lea    D76(%rip),%rsi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L177
  lea    0x330(%rsp),%rdi
  lea    D69(%rip),%rsi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L366
  lea    0x330(%rsp),%rdi
  lea    D33(%rip),%rsi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L90
  lea    0x330(%rsp),%rdi
  lea    D30(%rip),%rsi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L389
  lea    0x330(%rsp),%rdi
  mov    $0x8,%edx
  lea    D24(%rip),%rsi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L191
  lea    0x330(%rsp),%rdi
  lea    D74(%rip),%rsi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L480
  lea    0x330(%rsp),%rdi
  lea    D12(%rip),%rsi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L74
  lea    0x330(%rsp),%rdi
  lea    D16(%rip),%rsi
  call   <strcmp@plt>
  mov    %eax,%edx
  mov    $0xfffffff6,%eax
  test   %edx,%edx
  jne    L250
  mov    $0x3,%eax
  lea    0xf0(%rsp),%rsi
  mov    %rsi,0x18(%rsp)
  jmp    L241
L480:
  mov    $0x1,%eax
  lea    0x70(%rsp),%rsi
  mov    %rsi,0x18(%rsp)
L241:
  mov    %eax,(%r15)
  mov    $0x5,%eax
  movl   $0x4,0x24(%rsp)
  jmp    L230
L74:
  mov    $0x2,%eax
  lea    0xb0(%rsp),%rsi
  mov    %rsi,0x18(%rsp)
  jmp    L241
L173:
  movb   $0x0,0x326(%rsp,%rbx,1)
  mov    %ebp,%r14d
  mov    $0x1,%ebp
  jmp    L21
L501:
  lea    0x1(%r14),%ecx
  movslq %r14d,%rdx
  mov    %al,0x340(%rsp,%rdx,1)
  cmp    $0x3f,%r14d
  je     L180
  mov    %ecx,%r14d
L21:
  add    $0x1,%rbx
L477:
  mov    %r15,%rdi
  call   <strlen@plt>
  cmp    %rbx,%rax
  jbe    L440
  movzbl (%rbx,%r15,1),%eax
  test   %ebp,%ebp
  jne    L501
  cmp    $0xa,%ebx
  je     L38
  cmp    $0x3d,%al
  je     L173
  mov    %al,0x326(%rsp,%rbx,1)
  jmp    L21
L440:
  movslq %r14d,%rax
  movb   $0x0,0x340(%rsp,%rax,1)
  mov    0x18(%rsp),%rbx
  lea    0x326(%rsp),%r12
  mov    0x28(%rsp),%rbp
L225:
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L36
  add    $0xd,%rbx
  cmp    %rbp,%rbx
  jne    L225
  mov    $0xffffffe0,%eax
  jmp    L250
L270:
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <is_double@plt>
  test   %eax,%eax
  je     L4
  lea    0x340(%rsp),%rdi
  mov    $0x0,%eax
  call   <atof@plt>
  mov    %eax,%edx
  movzbl 0xb(%rbx),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %edx,%xmm0
  mov    0x10(%rsp),%rsi
  movsd  %xmm0,(%rsi,%rax,8)
  jmp    L470
L240:
  mov    0x34(%rsp),%r14d
  mov    %ebp,%eax
  mov    0x38(%rsp),%ebp
  cltq
  lea    (%rax,%rax,2),%rax
  movzbl 0x274(%rsp,%rax,8),%eax
  mov    %al,0x3f(%rsp)
  jmp    L56
L351:
  lea    0x1(%rbp),%ecx
  movslq %ebp,%rdx
  mov    %al,0x380(%rsp,%rdx,1)
  cmp    $0x4a,%ebp
  je     L590
  mov    %ecx,%ebp
L426:
  add    $0x1,%r13
  cmp    %r13d,0x20(%rsp)
  jle    L167
L350:
  mov    (%rsp),%rax
  movzbl (%rax,%r13,1),%eax
  cmp    $0x3b,%al
  je     L0
  cmp    $0x29,%al
  jne    L351
  mov    0x20(%rsp),%esi
  lea    -0x1(%rsi),%edx
  cmp    %r13d,%edx
  jne    L351
L0:
  movslq %ebp,%rbp
  movb   $0x0,0x380(%rsp,%rbp,1)
  movzbl 0x380(%rsp),%eax
  cmp    $0x3d,%al
  je     L258
  test   %al,%al
  je     L258
  mov    $0x0,%ebx
  mov    $0x0,%ebp
  jmp    L477
L177:
  mov    $0x3,%eax
  movl   $0x5,0x24(%rsp)
  lea    0x130(%rsp),%rsi
  mov    %rsi,0x18(%rsp)
L230:
  mov    %eax,0x0(%r13)
  cmp    %ebp,%r12d
  jle    L167
  movslq %ebp,%r13
  mov    0x24(%rsp),%eax
  lea    (%rax,%rax,2),%rdx
  lea    (%rax,%rdx,4),%rax
  add    0x18(%rsp),%rax
  mov    %rax,0x28(%rsp)
  movl   $0x0,0x30(%rsp)
  mov    $0x0,%ebp
  lea    0x380(%rsp),%r15
  mov    %rbx,(%rsp)
  jmp    L350
L366:
  mov    $0x4,%eax
  movl   $0x9,0x24(%rsp)
  lea    0x1e0(%rsp),%rsi
  mov    %rsi,0x18(%rsp)
  jmp    L230
L90:
  mov    $0x1,%eax
  movl   $0x7,0x24(%rsp)
  lea    0x180(%rsp),%rsi
  mov    %rsi,0x18(%rsp)
  jmp    L230
L389:
  mov    $0x2,%eax
  movl   $0x3,0x24(%rsp)
  lea    0x40(%rsp),%rsi
  mov    %rsi,0x18(%rsp)
  jmp    L230
L167:
  mov    0x24(%rsp),%eax
  lea    (%rax,%rax,2),%rdx
  lea    (%rax,%rdx,4),%rax
  mov    0x18(%rsp),%rdx
  add    %rdx,%rax
L356:
  cmpb   $0x0,0xc(%rdx)
  je     L583
  add    $0xd,%rdx
  cmp    %rdx,%rax
  jne    L356
  mov    $0x0,%eax
  jmp    L250
L124:
  mov    $0xfffffff3,%eax
  jmp    L250
L383:
  mov    $0xfffffff9,%eax
  jmp    L250
L191:
  mov    $0xfffffff6,%eax
  jmp    L250
L258:
  mov    $0xffffffde,%eax
  jmp    L250
L38:
  mov    $0xffffffe2,%eax
  jmp    L250
L180:
  mov    $0xffffffe1,%eax
  jmp    L250
L4:
  mov    $0xfffffff4,%eax
  jmp    L250
L444:
  mov    $0xffffffe8,%eax
  jmp    L250
L590:
  mov    $0xfffffffc,%eax
  jmp    L250
L583:
  mov    $0xfffffff2,%eax
  jmp    L250
L262:
  mov    $0xffffffdf,%eax
  jmp    L250
L36:
  mov    %eax,%ebp
  cmpb   $0x0,0xc(%rbx)
  jne    L262
  lea    0x260(%rsp),%r12
  lea    0x340(%rsp),%rax
  cmpb   $0x64,0xa(%rbx)
  je     L270
  mov    %r14d,0x34(%rsp)
  mov    %ebp,0x38(%rsp)
  mov    %rax,%r14
L363:
  mov    %r12,%rsi
  mov    %r14,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L240
  lea    0xa(%r12),%rsi
  mov    %r14,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L240
  add    $0x1,%ebp
  add    $0x18,%r12
  cmp    $0x8,%ebp
  jne    L363
  mov    0x34(%rsp),%r14d
  mov    0x38(%rsp),%ebp
  cmpl   $0x0,0x30(%rsp)
  je     L444
L56:
  movzbl 0xb(%rbx),%eax
  mov    0x8(%rsp),%rsi
  movzbl 0x3f(%rsp),%edi
  mov    %dil,(%rsi,%rax,1)
  movl   $0x1,0x30(%rsp)
L470:
  movb   $0x1,0xc(%rbx)
  jmp    L426
L244:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D76
datatype: string
name: retrieve_data
arguments: data_label: D69
datatype: string
name: retrieve_data
arguments: data_label: D33
datatype: string
name: retrieve_data
arguments: data_label: D30
datatype: string
name: retrieve_data
arguments: data_label: D24
datatype: string
name: retrieve_data
arguments: data_label: D74
datatype: string
name: retrieve_data
arguments: data_label: D12
datatype: string
name: retrieve_data
arguments: data_label: D16
datatype: string

tool: D76: sphere

tool: D69: plane

tool: D33: camera

tool: D30: light

tool: D24: cylinder

tool: D74: cylinderxy

tool: D12: cylinderxz

tool: D16: cylinderyz

assistant: ```c
int parse_line(char *line, int *id, int *cyl_type, double *d_tab, unsigned char *b_tab) {
  typedef struct tS {
    char label[10];
    char data_type;
    unsigned char index;
    unsigned char ok;
  } S;
  typedef struct tCOL {
    char name[10], alt_name[10];
    int id;
  } COL;
  COL col_tab[8] = {{"white", "c1", 0}, {"red", "c2", 32}, {"green", "c3", 64}, {"blue", "c4", 96}, {"yellow", "c5", 128}, {"cyan", "c6", 160}, {"magenta", "c7", 192}, {"blue2", "c8", 224}};
  S s_sph[5] = {{"x0", 'd', 0, 0}, {"y0", 'd', 1, 0}, {"z0", 'd', 2, 0}, {"r", 'd', 3, 0}, {"color", 's', 0, 0}};
  S s_pln[9] = {{"x0", 'd', 0, 0}, {"y0", 'd', 1, 0}, {"z0", 'd', 2, 0}, {"a", 'd', 3, 0}, {"b", 'd', 4, 0}, {"c", 'd', 5, 0}, {"color1", 's', 0, 0}, {"color2", 's', 1, 0}, {"texscale", 'd', 6, 0}};
  S s_cxy[4] = {{"x0", 'd', 0, 0}, {"y0", 'd', 1, 0}, {"r", 'd', 2, 0}, {"color", 's', 0, 0}};
  S s_cxz[4] = {{"x0", 'd', 0, 0}, {"z0", 'd', 1, 0}, {"r", 'd', 2, 0}, {"color", 's', 0, 0}};
  S s_cyz[4] = {{"y0", 'd', 0, 0}, {"z0", 'd', 1, 0}, {"r", 'd', 2, 0}, {"color", 's', 0, 0}};
  S s_lig[3] = {{"x", 'd', 0, 0}, {"y", 'd', 1, 0}, {"z", 'd', 2, 0}};
  S s_cam[7] = {{"x", 'd', 0, 0}, {"y", 'd', 1, 0}, {"z", 'd', 2, 0}, {"lx", 'd', 3, 0}, {"ly", 'd', 4, 0}, {"lz", 'd', 5, 0}, {"rot", 'd', 6, 0}};
  int ln = strlen(line);
  int i, j, k;
  char name[16], c;
  S *s_tab;
  S *s;
  char str[10 + 64 + 1];
  int str_i = 0;
  char label[10];
  char val[64];
  int mode;
  int found_label;
  unsigned char col;
  int num_of_s;
  int ci, col_found = 0;
  if (line[ln - 1] != ')')
    return -13;
  for (i = 0;; i++) {
    if (i == 16)
      return -8;
    c = line[i];
    if (c == '(')
      break;
    if (c < 'a' || c > 'z')
      return -7;
    name[i] = c;
  }
  name[i++] = 0;
  if (strcmp(name, "sphere") == 0) {
    *id = 3;
    s_tab = s_sph;
    num_of_s = 5;
  } else if (strcmp(name, "plane") == 0) {
    *id = 4;
    s_tab = s_pln;
    num_of_s = 9;
  } else if (strcmp(name, "camera") == 0) {
    *id = 1;
    s_tab = s_cam;
    num_of_s = 7;
  } else if (strcmp(name, "light") == 0) {
    *id = 2;
    s_tab = s_lig;
    num_of_s = 3;
  } else if (strncmp(name, "cylinder", 8) == 0) {
    if (strcmp(name, "cylinderxy") == 0) {
      *cyl_type = 1;
      s_tab = s_cxy;
    } else if (strcmp(name, "cylinderxz") == 0) {
      *cyl_type = 2;
      s_tab = s_cxz;
    } else if (strcmp(name, "cylinderyz") == 0) {
      *cyl_type = 3;
      s_tab = s_cyz;
    } else
      return -10;
    *id = 5;
    num_of_s = 4;
  } else
    return -10;
  for (; i < ln; i++) {
    c = line[i];
    if (c == ';' || ((c == ')') && (i == (ln - 1)))) {
      str[str_i] = 0;
      str_i = 0;
      if (!strlen(str) || (str[0] == '='))
        return -34;
      mode = 0;
      for (j = 0; j < strlen(str); j++) {
        c = str[j];
        if (mode == 0) {
          if (j == 10)
            return -30;
          if (c == '=') {
            mode++;
            k = 0;
            label[j] = 0;
          } else
            label[j] = c;
        } else {
          val[k++] = c;
          if (k == 64)
            return -31;
        }
      }
      val[k] = 0;
      s = s_tab;
      found_label = 0;
      for (j = 0; j < num_of_s; j++, s++) {
        if (strcmp(label, s->label) == 0) {
          found_label = 1;
          break;
        }
      }
      if (!found_label)
        return -32;
      if (s->ok)
        return -33;
      if (s->data_type == 'd') {
        if (!is_double(val))
          return -12;
        d_tab[s->index] = atof(val);
      } else {
        for (ci = 0; ci < 8; ci++) {
          if (strcmp(val, col_tab[ci].name) == 0 || strcmp(val, col_tab[ci].alt_name) == 0) {
            col = col_tab[ci].id;
            col_found = 1;
            break;
          }
        }
        if (!col_found)
          return -24;
        b_tab[s->index] = col;
      }
      s->ok = 1;
    } else {
      str[str_i++] = c;
      if (str_i == (10 + 64 + 1))
        return -4;
    }
  }
  s = s_tab;
  for (i = 0; i < num_of_s; i++, s++) {
    if (!s->ok)
      return -14;
  }
  return 0;
}
```