// File: /workspace/github_cpp_makefile_star2_O2/lioncedric[P]cimpressGridCoverage/src/squares.cc
// Function: result[abi:cxx11](int*)
string result(int * squares) {

    string output = "[";
    for (int* ptrSquares = squares; *ptrSquares >= 0; ptrSquares += 3) {
        const int row = *(ptrSquares + 1);
        const int col = *ptrSquares;
        const int square_size = *(ptrSquares + 2);

        if (output != "[") {
            output += ",";
        }
        output += "{ \"X\" : " + IntToString(col - 1) + ", \"Y\" : " + IntToString(row - 1) + ", \"size\" : " + IntToString(square_size) + " }";



    }

    return output + "]";


}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %rsi, %rbx
movq %rdi, 0x8(%rsp)
leaq 0x105e(%rip), %rsi      # 0x409c
leaq 0x18(%rsp), %rdi
leaq 0xd8(%rsp), %rdx
callq 0x2dd2
movq %rbx, %rax
leaq 0xf8(%rsp), %rbp
leaq 0x118(%rsp), %r13
movl (%rax), %ebx
testl %ebx, %ebx
js 0x31d6
movq %r13, %r15
movl 0x4(%rax), %r13d
movq %rax, 0x10(%rsp)
movl 0x8(%rax), %eax
movl %eax, 0x4(%rsp)
leaq 0x18(%rsp), %rdi
leaq 0x1010(%rip), %rsi      # 0x409c
callq 0x3bfe
testb %al, %al
je 0x30a6
leaq 0x18(%rsp), %rdi
leaq 0xffd(%rip), %rsi       # 0x409e
callq 0x22d0
decl %ebx
leaq 0xb8(%rsp), %r14
movq %r14, %rdi
movl %ebx, %esi
callq 0x2fbc
movq %rbp, %rdi
leaq 0xfdc(%rip), %rsi       # 0x40a0
movq %r14, %rdx
callq 0x3c8e
leaq 0x38(%rsp), %rdi
movq %rbp, %rsi
leaq 0xfce(%rip), %rdx       # 0x40a9
callq 0x3c08
decl %r13d
leaq 0x98(%rsp), %r14
movq %r14, %rdi
movl %r13d, %esi
callq 0x2fbc
movq %r15, %r13
movq %r15, %rdi
leaq 0x38(%rsp), %rsi
movq %r14, %rdx
callq 0x3c27
leaq 0xd8(%rsp), %r12
leaq 0x58(%rsp), %rdi
movq %r13, %rsi
leaq 0xf92(%rip), %rdx       # 0x40b2
callq 0x3c08
leaq 0x78(%rsp), %rbx
movq %rbx, %rdi
movl 0x4(%rsp), %esi
callq 0x2fbc
leaq 0x98(%rsp), %r14
leaq 0x138(%rsp), %r15
movq %r15, %rdi
leaq 0x58(%rsp), %rsi
movq %rbx, %rdx
callq 0x3c27
movq %r12, %rdi
movq %r15, %rsi
leaq 0xf5b(%rip), %rdx       # 0x40be
callq 0x3c08
leaq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0x22f0
movq %r12, %rdi
callq 0x20d0
movq %r15, %rdi
callq 0x20d0
leaq 0x78(%rsp), %rdi
callq 0x20d0
leaq 0x58(%rsp), %rdi
callq 0x20d0
movq %r13, %rdi
callq 0x20d0
movq %r14, %rdi
callq 0x20d0
leaq 0x38(%rsp), %rdi
callq 0x20d0
movq %rbp, %rdi
callq 0x20d0
leaq 0xb8(%rsp), %rdi
callq 0x20d0
movq 0x10(%rsp), %rax
addq $0xc, %rax
jmp 0x3063
leaq 0xee4(%rip), %rdx       # 0x40c1
leaq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x3cb2
leaq 0x18(%rsp), %rdi
callq 0x20d0
movq %rbx, %rax
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x32b1
movq %rax, %rbx
jmp 0x329b
movq %rax, %rbx
jmp 0x3284
movq %rax, %rbx
jmp 0x3277
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0x20d0
jmp 0x323a
movq %rax, %rbx
leaq 0x138(%rsp), %rdi
callq 0x20d0
jmp 0x3256
movq %rax, %rbx
jmp 0x328e
movq %rax, %rbx
jmp 0x3260
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x20d0
leaq 0x58(%rsp), %rdi
callq 0x20d0
leaq 0x118(%rsp), %rdi
callq 0x20d0
leaq 0x98(%rsp), %rdi
callq 0x20d0
leaq 0x38(%rsp), %rdi
callq 0x20d0
leaq 0xf8(%rsp), %rdi
callq 0x20d0
leaq 0xb8(%rsp), %rdi
callq 0x20d0
jmp 0x32b4
jmp 0x32b1
movq %rax, %rbx
jmp 0x326a
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x22a0