// File: /workspace/github_c_makefile_star2_O2/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 %rbx
subq $0xa8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
movhps 0x155cf(%rip), %xmm0    # xmm0 = xmm0[0,1],mem[0,1]
leaq 0x30(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x10(%rsp), %r15
movl $0x32, (%r15)
leaq 0x1567c(%rip), %rcx     # 0x1b0d0
leaq 0x68(%rsp), %rdi
movq %r15, %rdx
callq 0x6197
movaps 0x155d8(%rip), %xmm0    # 0x1b040
movaps %xmm0, (%r15)
leaq 0x40(%rsp), %rcx
andl $0x0, (%rcx)
leaq 0x50(%rsp), %rdx
xorps %xmm0, %xmm0
movaps %xmm0, (%rdx)
leaq 0x8(%rsp), %r8
movb $0x1, (%r8)
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x61bb
leaq 0x8(%rsp), %rsi
andl $0x0, (%rsi)
movq 0x30(%rsp), %rdi
leaq 0x4(%rsp), %rdx
movl $0x31, (%rdx)
leaq 0x50(%rdi), %rax
leaq 0x40(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x10(%rsp), %r8
xorps %xmm0, %xmm0
movaps %xmm0, (%r8)
movaps 0x15582(%rip), %xmm0    # 0x1b050
leaq 0x50(%rsp), %r9
movaps %xmm0, (%r9)
callq 0x61e2
movq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl $0x32, (%rsi)
leaq 0x4(%rsp), %rdx
movl $0x63, (%rdx)
leaq 0x40(%rdi), %rax
leaq 0x40(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x10(%rsp), %r8
movaps 0x15531(%rip), %xmm0    # 0x1b040
movaps %xmm0, (%r8)
movaps 0x15546(%rip), %xmm0    # 0x1b060
leaq 0x50(%rsp), %r9
movaps %xmm0, (%r9)
callq 0x61e2
leaq 0x50(%rsp), %rsi
movaps 0x1552c(%rip), %xmm0    # 0x1b060
movaps %xmm0, (%rsi)
leaq 0x40(%rsp), %rdx
movaps 0x1550d(%rip), %xmm0    # 0x1b050
movaps %xmm0, (%rdx)
movabsq $0x3fe921fb54442d18, %rax # imm = 0x3FE921FB54442D18
leaq 0x8(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x4(%rsp), %r8
movb $0x1, (%r8)
leaq 0x10(%rsp), %rdi
callq 0x6234
movq 0x10(%rsp), %rdi
leaq 0x4(%rsp), %rsi
movl $0x64, (%rsi)
leaq 0x2c(%rsp), %rdx
movl $0x95, (%rdx)
leaq 0x40(%rdi), %rax
leaq 0x8(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x50(%rsp), %r8
movaps 0x154c2(%rip), %xmm0    # 0x1b060
movaps %xmm0, (%r8)
leaq 0x40(%rsp), %r9
movaps 0x15492(%rip), %xmm0    # 0x1b040
movaps %xmm0, (%r9)
callq 0x61e2
movq 0x10(%rsp), %rdi
leaq 0x4(%rsp), %rsi
movl $0x96, (%rsi)
leaq 0x2c(%rsp), %rdx
movl $0xc7, (%rdx)
leaq 0x50(%rdi), %rax
leaq 0x8(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x50(%rsp), %r8
movaps 0x15466(%rip), %xmm0    # 0x1b050
movaps %xmm0, (%r8)
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %r9
movaps %xmm0, (%r9)
callq 0x61e2
movq %rbx, %rdi
callq 0x816c
leaq 0x98(%rsp), %r15
leaq 0x68(%rsp), %rsi
movq %r15, %rdi
callq 0x7120
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x8158
leaq 0xa0(%rsp), %rdi
callq 0x63e0
leaq 0x88(%rsp), %r15
leaq 0x30(%rsp), %rsi
movq %r15, %rdi
callq 0x7154
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8158
leaq 0x90(%rsp), %rdi
callq 0x63e0
leaq 0x78(%rsp), %r15
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x7168
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8158
leaq 0x80(%rsp), %rdi
callq 0x63e0
xorl %ebp, %ebp
cmpl $0xc8, %ebp
je 0x5cb6
movq %rbx, %rdi
movl %ebp, %esi
callq 0x812e
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7d7c
incl %ebp
jmp 0x5c95
movq %rbx, %rdi
callq 0x828e
leaq 0x18(%rsp), %rdi
callq 0x63e0
leaq 0x38(%rsp), %rdi
callq 0x63e0
leaq 0x70(%rsp), %rdi
callq 0x63e0
addq $0xa8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
jmp 0x5d0f
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
jmp 0x5d0f
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x63e0
jmp 0x5d2d
jmp 0x5d2a
jmp 0x5d2a
jmp 0x5d1e
jmp 0x5d1e
movq %rax, %rbx
jmp 0x5d37
movq %rax, %rbx
jmp 0x5d41
jmp 0x5d2a
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x63e0
leaq 0x38(%rsp), %rdi
callq 0x63e0
leaq 0x70(%rsp), %rdi
callq 0x63e0
movq %rbx, %rdi
callq 0x5500