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

```asm
<main>:
  endbr64
  push   %rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    D57(%rip),%rdi
  call   <winopen@plt>
  mov    $0x106,%edi
  call   <unqdevice@plt>
  mov    $0x101,%edi
  call   <qdevice@plt>
  lea    0x6(%rsp),%rbx
L3:
  mov    %rbx,%rdi
  call   <qread@plt>
  cmp    $0x105,%eax
  jne    L3
  movsd  D127(%rip),%xmm2
  movsd  D88(%rip),%xmm1
  mov    D111(%rip),%rax
  movq   %rax,%xmm0
  mov    $0x384,%edi
  call   <perspective@plt>
  movsd  D281(%rip),%xmm0
  mov    $0x0,%edi
  pxor   %xmm5,%xmm5
  movapd %xmm5,%xmm4
  movapd %xmm5,%xmm3
  movsd  D73(%rip),%xmm2
  movapd %xmm0,%xmm1
  call   <lookat@plt>
  mov    $0x0,%edi
  call   <color@plt>
  mov    $0x0,%eax
  call   <clear@plt>
  mov    $0x0,%eax
  call   <makesphere@plt>
  mov    $0x6,%edi
  call   <color@plt>
  mov    $0x0,%eax
  call   <pushmatrix@plt>
  mov    D194(%rip),%rax
  movq   %rax,%xmm2
  movq   %rax,%xmm1
  movq   %rax,%xmm0
  call   <scale@plt>
  mov    $0x1,%edi
  call   <callobj@plt>
  mov    $0x0,%eax
  call   <popmatrix@plt>
  mov    $0x7,%edi
  call   <color@plt>
  mov    $0x0,%eax
  call   <pushmatrix@plt>
  movsd  D135(%rip),%xmm2
  movsd  D71(%rip),%xmm1
  pxor   %xmm0,%xmm0
  call   <translate@plt>
  mov    D17(%rip),%rax
  movq   %rax,%xmm2
  movq   %rax,%xmm1
  movq   %rax,%xmm0
  call   <scale@plt>
  mov    $0x1,%edi
  call   <callobj@plt>
  mov    $0x0,%eax
  call   <popmatrix@plt>
  mov    $0x1,%edi
  call   <color@plt>
  mov    $0x0,%eax
  call   <pushmatrix@plt>
  movsd  D157(%rip),%xmm2
  movsd  D29(%rip),%xmm1
  pxor   %xmm0,%xmm0
  call   <translate@plt>
  movsd  D21(%rip),%xmm0
  movapd %xmm0,%xmm2
  movapd %xmm0,%xmm1
  call   <scale@plt>
  mov    $0x1,%edi
  call   <callobj@plt>
  mov    $0x0,%eax
  call   <popmatrix@plt>
  mov    $0x2,%edi
  call   <color@plt>
  mov    $0x0,%eax
  call   <pushmatrix@plt>
  mov    D26(%rip),%rax
  movq   %rax,%xmm2
  movsd  D278(%rip),%xmm1
  pxor   %xmm0,%xmm0
  call   <translate@plt>
  mov    D84(%rip),%rax
  movq   %rax,%xmm2
  movq   %rax,%xmm1
  movq   %rax,%xmm0
  call   <scale@plt>
  mov    $0x1,%edi
  call   <callobj@plt>
  mov    $0x0,%eax
  call   <popmatrix@plt>
  mov    $0x3,%edi
  call   <color@plt>
  mov    $0x0,%eax
  call   <pushmatrix@plt>
  mov    D26(%rip),%rax
  movq   %rax,%xmm2
  movq   %rax,%xmm1
  pxor   %xmm0,%xmm0
  call   <translate@plt>
  movsd  D141(%rip),%xmm0
  movapd %xmm0,%xmm2
  movapd %xmm0,%xmm1
  call   <scale@plt>
  mov    $0x1,%edi
  call   <callobj@plt>
  mov    $0x0,%eax
  call   <popmatrix@plt>
  mov    $0x4,%edi
  call   <color@plt>
  mov    $0x0,%eax
  call   <pushmatrix@plt>
  mov    D26(%rip),%rax
  movq   %rax,%xmm2
  movsd  D227(%rip),%xmm1
  pxor   %xmm0,%xmm0
  call   <translate@plt>
  mov    D17(%rip),%rax
  movq   %rax,%xmm2
  movq   %rax,%xmm1
  movq   %rax,%xmm0
  call   <scale@plt>
  mov    $0x1,%edi
  call   <callobj@plt>
  mov    $0x0,%eax
  call   <popmatrix@plt>
  lea    D58(%rip),%rdi
  call   <hfont@plt>
  mov    D111(%rip),%rax
  movq   %rax,%xmm3
  pxor   %xmm2,%xmm2
  movq   %rax,%xmm1
  movapd %xmm2,%xmm0
  call   <ortho2@plt>
  mov    $0x1,%edi
  call   <hcentertext@plt>
  mov    D84(%rip),%rax
  movq   %rax,%xmm1
  movsd  D235(%rip),%xmm0
  call   <htextsize@plt>
  mov    D194(%rip),%rax
  movq   %rax,%xmm1
  movsd  D124(%rip),%xmm0
  call   <move2@plt>
  movsd  D23(%rip),%xmm0
  call   <htextang@plt>
  lea    D251(%rip),%rdi
  call   <hcharstr@plt>
  lea    0x6(%rsp),%rdi
  call   <qread@plt>
  mov    $0x0,%eax
  call   <gexit@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L8
  mov    $0x0,%eax
  add    $0x10,%rsp
  pop    %rbx
  ret
L8:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D57
type_infered: string
name: read_data
arguments: label: D127
type_infered: f64
name: read_data
arguments: label: D88
type_infered: f64
name: read_data
arguments: label: D111
type_infered: f64
name: read_data
arguments: label: D281
type_infered: f64
name: read_data
arguments: label: D73
type_infered: f64
name: read_data
arguments: label: D194
type_infered: f64
name: read_data
arguments: label: D135
type_infered: f32[2]
name: read_data
arguments: label: D71
type_infered: f32[2]
name: read_data
arguments: label: D17
type_infered: f64
name: read_data
arguments: label: D157
type_infered: f32[2]
name: read_data
arguments: label: D29
type_infered: f64
name: read_data
arguments: label: D21
type_infered: f64
name: read_data
arguments: label: D26
type_infered: f32[2]
name: read_data
arguments: label: D278
type_infered: f32[2]
name: read_data
arguments: label: D84
type_infered: f64
name: read_data
arguments: label: D141
type_infered: f64
name: read_data
arguments: label: D227
type_infered: f32[2]
name: read_data
arguments: label: D58
type_infered: string
name: read_data
arguments: label: D235
type_infered: f64
name: read_data
arguments: label: D124
type_infered: f64
name: read_data
arguments: label: D23
type_infered: f32[2]
name: read_data
arguments: label: D251
type_infered: string

tool: D57: balls

tool: D127: 500

tool: D88: 0.001

tool: D111: 1

tool: D281: 13

tool: D73: 8

tool: D194: 0.5

tool: {"D135": [0.0,2.6875]}

tool: {"D71": [0.0,-2.6875]}

tool: D17: 0.3

tool: {"D157": [0.0,2.4375]}

tool: D29: 10

tool: D21: 0.2

tool: {"D26": [0.0,-2.5625]}

tool: {"D278": [0.0,2.71875]}

tool: D84: 0.15

tool: D141: 0.12

tool: {"D227": [0.0,-2.8125]}

tool: D58: times.rb

tool: D235: 0.08

tool: D124: 0.8

tool: {"D23": [0.0,-3.3515625]}

tool: D251: I'm very ordinary!

assistant: ```c
main() {
  short val;
  winopen("balls");
  unqdevice(262);
  qdevice(257);
  while (qread(&val) != 261)
    ;
  perspective(900, 1.0, 0.001, 500.0);
  lookat(13.0, 13.0, 8.0, 0.0, 0.0, 0.0, 0);
  color(0);
  clear();
  makesphere();
  color(6);
  pushmatrix();
  scale(0.5, 0.5, 0.5);
  callobj(1L);
  popmatrix();
  color(7);
  pushmatrix();
  translate(0.0, -1.4 * 10.0, 1.4 * 10.0);
  scale(0.3, 0.3, 0.3);
  callobj(1L);
  popmatrix();
  color(1);
  pushmatrix();
  translate(0.0, 10.0, 0.7 * 10.0);
  scale(0.2, 0.2, 0.2);
  callobj(1L);
  popmatrix();
  color(2);
  pushmatrix();
  translate(0.0, 1.5 * 10.0, -10.0);
  scale(0.15, 0.15, 0.15);
  callobj(1L);
  popmatrix();
  color(3);
  pushmatrix();
  translate(0.0, -10.0, -10.0);
  scale(0.12, 0.12, 0.12);
  callobj(1L);
  popmatrix();
  color(4);
  pushmatrix();
  translate(0.0, -2.0 * 10.0, -10.0);
  scale(0.3, 0.3, 0.3);
  callobj(1L);
  popmatrix();
  hfont("times.rb");
  ortho2(0.0, 1.0, 0.0, 1.0);
  hcentertext(1);
  htextsize(0.08, 0.15);
  move2(0.8, 0.5);
  htextang(-90.0);
  hcharstr("I'm very ordinary!");
  qread(&val);
  gexit();
}
```