// File: /workspace/github_c_makefile_star2_O0/adelciotto[P]scg/examples/seabug.c
// Function: init
static void init(scg_app_t *app, seabug_t *seabug) {
    seabug->x = 0.0f;
    seabug->y = 0.0f;
    seabug->origin_x = app->draw_target->width / 2;
    seabug->origin_y = app->draw_target->height / 2;

    linear_gradient_colors(seabug->left_side_colors, SEABUG_NUM_LEGS,
                           SEABUG_LEFT_SIDE_GRADIENT_START,
                           SEABUG_LEFT_SIDE_GRADIENT_END);
    linear_gradient_colors(seabug->right_side_colors, SEABUG_NUM_LEGS,
                           SEABUG_RIGHT_SIDE_GRADIENT_START,
                           SEABUG_RIGHT_SIDE_GRADIENT_END);

    for (int i = 0; i < SEABUG_NUM_LEGS; i++) {
        seabug->legs[i] =
            (seabug_leg_t){.x0 = 0.0f,
                           .y0 = 0.0f,
                           .x1 = 0.0f,
                           .y1 = 0.0f,
                           .x2 = 0.0f,
                           .y2 = 0.0f,
                           .point_radius = 2,
                           .left_side_color = seabug->left_side_colors[i],
                           .right_side_color = seabug->right_side_colors[i]};
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, (%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x4(%rax)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movl (%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cvtsi2ss %eax, %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x4(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cvtsi2ss %eax, %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, 0xc(%rax)
movq -0x10(%rbp), %rdi
addq $0x490, %rdi            # imm = 0x490
movb $0x60, -0x14(%rbp)
movb $-0xe, -0x13(%rbp)
movb $0x0, -0x12(%rbp)
movb $-0x1, -0x11(%rbp)
movb $-0x1a, -0x18(%rbp)
movb $0x75, -0x17(%rbp)
movb $0x5, -0x16(%rbp)
movb $-0x1, -0x15(%rbp)
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
movl $0x20, %esi
callq 0x6dd0
movq -0x10(%rbp), %rdi
addq $0x510, %rdi            # imm = 0x510
movb $0x0, -0x1c(%rbp)
movb $0x6a, -0x1b(%rbp)
movb $-0x1, -0x1a(%rbp)
movb $-0x1, -0x19(%rbp)
movb $0x79, -0x20(%rbp)
movb $0x9, -0x1f(%rbp)
movb $-0x12, -0x1e(%rbp)
movb $-0x1, -0x1d(%rbp)
movl -0x1c(%rbp), %edx
movl -0x20(%rbp), %ecx
movl $0x20, %esi
callq 0x6dd0
movl $0x0, -0x24(%rbp)
cmpl $0x20, -0x24(%rbp)
jge 0x6977
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
movslq -0x24(%rbp), %rax
imulq $0x24, %rax, %rax
addq %rax, %rdi
movl $0x2, -0x48(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x44(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x40(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x3c(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x38(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x34(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl 0x490(%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl 0x510(%rax,%rcx,4), %eax
movl %eax, -0x28(%rbp)
leaq -0x48(%rbp), %rsi
movl $0x24, %edx
callq 0x21c0
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x68e3
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)