// File: /workspace/github_c_makefile_star2_O1/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 $0x98, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorl %ebp, %ebp
leaq 0x20(%rsp), %r15
movq %rbp, (%r15)
movabsq $0x4059000000000000, %rax # imm = 0x4059000000000000
movq %rax, 0x8(%r15)
leaq 0x40(%rsp), %r12
movl $0x32, (%r12)
leaq 0x60(%rsp), %rdi
movq %rbp, -0x8(%rdi)
leaq 0x1d4e8(%rip), %r9      # 0x23050
leaq 0x58(%rsp), %rsi
leaq 0x30(%rsp), %r13
movq %r13, %rdx
movq %r15, %rcx
movq %r12, %r8
callq 0x69d4
movabsq $0x4084000000000000, %rax # imm = 0x4084000000000000
movq %rax, (%r12)
movabsq $0x4076800000000000, %rax # imm = 0x4076800000000000
movq %rax, 0x8(%r12)
movq %rax, %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r13)
leaq 0x18(%rsp), %r9
movl $0x0, (%r9)
leaq 0x10(%rsp), %rax
movb $0x1, (%rax)
movq %rbp, (%r15)
leaq 0x28(%rsp), %rdi
movq %rax, (%rsp)
leaq 0x20(%rsp), %rsi
leaq 0x14(%rsp), %rdx
leaq 0x40(%rsp), %rcx
leaq 0x30(%rsp), %r8
callq 0x6dd0
movq 0x20(%rsp), %rdi
leaq 0x14(%rsp), %rsi
movl $0x0, (%rsi)
leaq 0x10(%rsp), %rdx
movl $0x31, (%rdx)
leaq 0x50(%rdi), %rax
leaq 0x18(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x40(%rsp), %r8
xorps %xmm0, %xmm0
movaps %xmm0, (%r8)
movabsq $0x4049000000000000, %r13 # imm = 0x4049000000000000
leaq 0x30(%rsp), %r9
movq %r13, (%r9)
movq %r13, 0x8(%r9)
callq 0x65fc
movq 0x20(%rsp), %rdi
leaq 0x14(%rsp), %rsi
movl $0x32, (%rsi)
leaq 0x10(%rsp), %rdx
movl $0x63, (%rdx)
leaq 0x40(%rdi), %rax
leaq 0x18(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x40(%rsp), %r8
movabsq $0x4084000000000000, %rax # imm = 0x4084000000000000
movq %rax, (%r8)
movq %r12, 0x8(%r8)
movabsq $-0x3fb7000000000000, %rbp # imm = 0xC049000000000000
leaq 0x30(%rsp), %r9
movq %rbp, (%r9)
movq %rbp, 0x8(%r9)
callq 0x65fc
movl $0x80, %edi
callq 0x5100
movq %rax, %r15
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x8(%r15)
leaq 0x26b47(%rip), %rax     # 0x2c7f0
movq %rax, (%r15)
leaq 0x10(%r15), %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r15)
movq $0x0, 0x28(%r15)
leaq 0x26ee9(%rip), %rax     # 0x2cbb0
addq $0x10, %rax
movq %rax, 0x10(%r15)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x30(%r15)
movq %rax, 0x38(%r15)
movq %rax, 0x40(%r15)
movq %rax, 0x48(%r15)
leaq 0x50(%r15), %rax
movq %rbp, 0x50(%r15)
movq %rbp, 0x58(%r15)
movq %r13, 0x60(%r15)
movq %r13, 0x68(%r15)
movabsq $0x3fe921fb54442d18, %rcx # imm = 0x3FE921FB54442D18
movq %rcx, 0x70(%r15)
movb $0x1, 0x78(%r15)
leaq 0x14(%rsp), %rsi
movl $0x64, (%rsi)
leaq 0x10(%rsp), %rdx
movl $0x95, (%rdx)
leaq 0x18(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x40(%rsp), %r8
movq %rbp, (%r8)
movq %rbp, 0x8(%r8)
leaq 0x30(%rsp), %r9
movabsq $0x4084000000000000, %rax # imm = 0x4084000000000000
movq %rax, (%r9)
movabsq $0x4076800000000000, %rax # imm = 0x4076800000000000
movq %rax, 0x8(%r9)
movq %r12, %rdi
callq 0x65fc
leaq 0x14(%rsp), %rsi
movl $0x96, (%rsi)
leaq 0x10(%rsp), %rdx
movl $0xc7, (%rdx)
movq %r15, %rax
addq $0x60, %rax
leaq 0x18(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x40(%rsp), %r8
movq %r13, (%r8)
movq %r13, 0x8(%r8)
leaq 0x30(%rsp), %r9
xorps %xmm0, %xmm0
movaps %xmm0, (%r9)
movq %r12, %rdi
callq 0x65fc
movq %rbx, %rdi
callq 0x7f62
movq 0x58(%rsp), %rcx
movq 0x60(%rsp), %rax
movq %rcx, 0x88(%rsp)
movq %rax, 0x90(%rsp)
testq %rax, %rax
je 0x5de3
movq 0x271fb(%rip), %rcx     # 0x2cfd0
cmpb $0x0, (%rcx)
je 0x5ddf
incl 0x8(%rax)
jmp 0x5de3
lock
incl 0x8(%rax)
leaq 0x88(%rsp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x7f4a
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x5e07
callq 0x6882
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x78(%rsp)
movq %rax, 0x80(%rsp)
testq %rax, %rax
je 0x5e38
movq 0x271a6(%rip), %rcx     # 0x2cfd0
cmpb $0x0, (%rcx)
je 0x5e34
incl 0x8(%rax)
jmp 0x5e38
lock
incl 0x8(%rax)
leaq 0x78(%rsp), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x7f4a
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x5e5c
callq 0x6882
movq %r12, 0x68(%rsp)
movq %r15, 0x70(%rsp)
movq 0x27163(%rip), %rax     # 0x2cfd0
cmpb $0x0, (%rax)
je 0x5e78
incl 0x8(%r15)
jmp 0x5e7d
lock
incl 0x8(%r15)
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x7f4a
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x5e9e
callq 0x6882
xorl %ebp, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7f1c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7b24
incl %ebp
cmpl $0xc8, %ebp
jne 0x5ea0
movq %rbx, %rdi
callq 0x80b6
movq %r15, %rdi
callq 0x6882
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x5ede
callq 0x6882
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x5eed
callq 0x6882
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x70(%rsp), %rdi
jmp 0x5f21
movq %rax, %rbx
movq 0x80(%rsp), %rdi
jmp 0x5f21
movq %rax, %rbx
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x5f44
callq 0x6882
jmp 0x5f44
jmp 0x5f41
jmp 0x5f41
jmp 0x5f35
jmp 0x5f35
movq %rax, %rbx
jmp 0x5f4c
movq %rax, %rbx
jmp 0x5f5b
jmp 0x5f41
movq %rax, %rbx
movq %r15, %rdi
callq 0x6882
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x5f5b
callq 0x6882
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x5f6a
callq 0x6882
movq %rbx, %rdi
callq 0x5510