// File: /workspace/github_c_makefile_star2_O3/algorithm-archivists[P]GathVL/vis_test.cpp
// Function: first_scene(camera&, scene&)
void first_scene(camera& cam, scene& world) {
    auto title = std::make_shared<text>(vec{0, 100}, 50, "GathVL Test");

    auto ball = std::make_shared<ellipse>(vec{640, 360}, vec{0, 0}, 0, true);

    ball->add_animator<vec_animator>(0, 49, &ball->size, vec{0, 0},
                                     vec{50,50});

    ball->add_animator<vec_animator>(50, 99, &ball->location, vec{640, 360},
                                     vec{-50, -50});

    auto rec = std::make_shared<rectangle>(vec{-50, -50}, vec{50, 50}, M_PI / 4,
                                           true);

    rec->add_animator<vec_animator>(100, 149, &rec->location, vec{-50, -50},
                                    vec{640, 360});

    rec->add_animator<vec_animator>(150, 199, &rec->size, vec{50, 50},
                                    vec{0, 0});

    world.add_layer();
    world.add_object(title, 0);
    world.add_object(ball, 1);
    world.add_object(rec, 1);

    for (int i = 0; i < 200; ++i) {
        world.update(i);
        cam.encode_frame(world);
    }

    world.clear();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r14
movq %rdi, %r15
xorps %xmm0, %xmm0
movhps 0x1d4ce(%rip), %xmm0    # xmm0 = xmm0[0,1],mem[0,1]
leaq 0x30(%rsp), %rcx
movaps %xmm0, (%rcx)
leaq 0x20(%rsp), %r8
movl $0x32, (%r8)
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x1d56e(%rip), %r9      # 0x230d0
leaq 0x10(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x694e
movl $0x90, %edi
callq 0x5100
movq %rax, %rbx
movabsq $0x100000001, %rbp      # imm = 0x100000001
movq %rbp, 0x8(%rax)
leaq 0x26bdd(%rip), %rax     # 0x2c770
movq %rax, (%rbx)
leaq 0x10(%rbx), %r13
xorps %xmm1, %xmm1
movups %xmm1, 0x18(%rbx)
xorl %eax, %eax
movq %rax, 0x28(%rbx)
leaq 0x26e82(%rip), %rcx     # 0x2ca30
addq $0x10, %rcx
movq %rcx, 0x10(%rbx)
movaps 0x1d483(%rip), %xmm0    # 0x23040
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x40(%rbx)
movaps 0x1d484(%rip), %xmm0    # 0x23050
movups %xmm0, 0x50(%rbx)
leaq 0x60(%rbx), %rdi
movups %xmm1, 0x60(%rbx)
movq %rax, 0x70(%rbx)
movsd 0x1d42c(%rip), %xmm0    # 0x23010
movups %xmm0, 0x78(%rbx)
movb $0x1, 0x88(%rbx)
leaq 0x4(%rsp), %rsi
movl $0x0, (%rsi)
movq %rsp, %rdx
movl $0x31, (%rdx)
leaq 0x8(%rsp), %rcx
movq %rdi, (%rcx)
leaq 0x30(%rsp), %r8
movaps %xmm1, (%r8)
movaps 0x1d445(%rip), %xmm0    # 0x23060
leaq 0x20(%rsp), %r9
movaps %xmm0, (%r9)
movq %r13, %rdi
callq 0x6562
movq %rbx, %rax
addq $0x50, %rax
leaq 0x4(%rsp), %rsi
movl $0x32, (%rsi)
movq %rsp, %rdx
movl $0x63, (%rdx)
leaq 0x8(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x30(%rsp), %r8
movaps 0x1d3f5(%rip), %xmm0    # 0x23050
movaps %xmm0, (%r8)
movaps 0x1d40a(%rip), %xmm0    # 0x23070
leaq 0x20(%rsp), %r9
movaps %xmm0, (%r9)
movq %r13, %rdi
callq 0x6562
movl $0x80, %edi
callq 0x5100
movq %rax, %r12
movq %rbp, 0x8(%rax)
leaq 0x26b41(%rip), %rax     # 0x2c7d0
movq %rax, (%r12)
leaq 0x10(%r12), %rbp
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r12)
movq $0x0, 0x28(%r12)
leaq 0x26eff(%rip), %rax     # 0x2cbb0
addq $0x10, %rax
movq %rax, 0x10(%r12)
movaps 0x1d37f(%rip), %xmm0    # 0x23040
movups %xmm0, 0x30(%r12)
movups %xmm0, 0x40(%r12)
leaq 0x50(%r12), %rax
movaps 0x1d397(%rip), %xmm1    # 0x23070
movups %xmm1, 0x50(%r12)
movaps 0x1d37a(%rip), %xmm0    # 0x23060
movups %xmm0, 0x60(%r12)
movabsq $0x3fe921fb54442d18, %rcx # imm = 0x3FE921FB54442D18
movq %rcx, 0x70(%r12)
movb $0x1, 0x78(%r12)
leaq 0x4(%rsp), %rsi
movl $0x64, (%rsi)
movq %rsp, %rdx
movl $0x95, (%rdx)
leaq 0x8(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x30(%rsp), %r8
movaps %xmm1, (%r8)
leaq 0x20(%rsp), %r9
movaps 0x1d31e(%rip), %xmm0    # 0x23050
movaps %xmm0, (%r9)
movq %rbp, %rdi
callq 0x6562
movq %r12, %rax
addq $0x60, %rax
leaq 0x4(%rsp), %rsi
movl $0x96, (%rsi)
movq %rsp, %rdx
movl $0xc7, (%rdx)
leaq 0x8(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x30(%rsp), %r8
movaps 0x1d2f3(%rip), %xmm0    # 0x23060
movaps %xmm0, (%r8)
leaq 0x20(%rsp), %r9
xorps %xmm0, %xmm0
movaps %xmm0, (%r9)
movq %rbp, %rdi
callq 0x6562
movq %r14, %rdi
callq 0x7d9e
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x68(%rsp)
movq %rax, 0x70(%rsp)
testq %rax, %rax
je 0x5dbb
movq 0x27223(%rip), %rcx     # 0x2cfd0
cmpb $0x0, (%rcx)
je 0x5db7
incl 0x8(%rax)
jmp 0x5dbb
lock
incl 0x8(%rax)
leaq 0x68(%rsp), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x7d86
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x5dd9
callq 0x67ea
movq %r13, 0x58(%rsp)
movq %rbx, 0x60(%rsp)
movq 0x271e6(%rip), %r13     # 0x2cfd0
cmpb $0x0, (%r13)
je 0x5df6
incl 0x8(%rbx)
jmp 0x5dfa
lock
incl 0x8(%rbx)
leaq 0x58(%rsp), %rsi
movq %r14, %rdi
movl $0x1, %edx
callq 0x7d86
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x5e1b
callq 0x67ea
movq %rbp, 0x48(%rsp)
movq %r12, 0x50(%rsp)
cmpb $0x0, (%r13)
je 0x5e33
incl 0x8(%r12)
jmp 0x5e39
lock
incl 0x8(%r12)
leaq 0x48(%rsp), %rsi
movq %r14, %rdi
movl $0x1, %edx
callq 0x7d86
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x5e5a
callq 0x67ea
xorl %ebp, %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x7d58
movq %r15, %rdi
movq %r14, %rsi
callq 0x795e
incl %ebp
cmpl $0xc8, %ebp
jne 0x5e5c
movq %r14, %rdi
callq 0x7ef2
movq %r12, %rdi
callq 0x67ea
movq %rbx, %rdi
callq 0x67ea
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x5ea2
callq 0x67ea
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x50(%rsp), %rdi
jmp 0x5ecd
movq %rax, %r14
movq 0x60(%rsp), %rdi
jmp 0x5ecd
movq %rax, %r14
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x5ef0
callq 0x67ea
jmp 0x5ef0
jmp 0x5eed
jmp 0x5eed
jmp 0x5ee1
jmp 0x5ee1
movq %rax, %r14
jmp 0x5ef8
movq %rax, %r14
jmp 0x5f00
jmp 0x5eed
movq %rax, %r14
movq %r12, %rdi
callq 0x67ea
movq %rbx, %rdi
callq 0x67ea
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x5f0f
callq 0x67ea
movq %r14, %rdi
callq 0x5500