// File: 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:
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x1a0(%rsp)
movq %rsi, 0x198(%rsp)
leaq 0x177(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x9c50
movq 0x20(%rsp), %rdx
leaq 0x2798(%rip), %rsi      # 0x1318a
leaq 0x178(%rsp), %rdi
callq 0xb760
jmp 0x10a01
leaq 0x177(%rsp), %rdi
callq 0x9770
movq 0x198(%rsp), %rax
movq %rax, 0x158(%rsp)
movq 0x158(%rsp), %rax
cmpl $0x0, (%rax)
jl 0x10da6
movq 0x158(%rsp), %rax
movl 0x4(%rax), %eax
movl %eax, 0x154(%rsp)
movq 0x158(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x150(%rsp)
movq 0x158(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0x14c(%rsp)
leaq 0x271f(%rip), %rsi      # 0x1318a
leaq 0x178(%rsp), %rdi
callq 0x12030
movb %al, 0xf(%rsp)
jmp 0x10a7e
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x10a88
jmp 0x10adf
leaq 0x26fd(%rip), %rsi      # 0x1318c
leaq 0x178(%rsp), %rdi
callq 0x9680
jmp 0x10a9e
jmp 0x10adf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x168(%rsp)
movl %eax, 0x164(%rsp)
leaq 0x177(%rsp), %rdi
callq 0x9770
jmp 0x10de8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x168(%rsp)
movl %eax, 0x164(%rsp)
jmp 0x10ddb
movl 0x150(%rsp), %esi
decl %esi
leaq 0x68(%rsp), %rdi
callq 0x10920
jmp 0x10af4
leaq 0x2693(%rip), %rsi      # 0x1318e
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0x121a0
jmp 0x10b0f
leaq 0x2681(%rip), %rdx      # 0x13197
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x12060
jmp 0x10b2d
movl 0x154(%rsp), %esi
decl %esi
leaq 0x48(%rsp), %rdi
callq 0x10920
jmp 0x10b42
leaq 0xc8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x120b0
jmp 0x10b5e
leaq 0x263b(%rip), %rdx      # 0x131a0
leaq 0xe8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x12060
jmp 0x10b7c
movl 0x14c(%rsp), %esi
leaq 0x28(%rsp), %rdi
callq 0x10920
jmp 0x10b8f
leaq 0x108(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x120b0
jmp 0x10bab
leaq 0x25fa(%rip), %rdx      # 0x131ac
leaq 0x128(%rsp), %rdi
leaq 0x108(%rsp), %rsi
callq 0x12060
jmp 0x10bc9
leaq 0x178(%rsp), %rdi
leaq 0x128(%rsp), %rsi
callq 0x9890
jmp 0x10be0
leaq 0x128(%rsp), %rdi
callq 0x93d0
leaq 0x108(%rsp), %rdi
callq 0x93d0
leaq 0x28(%rsp), %rdi
callq 0x93d0
leaq 0xe8(%rsp), %rdi
callq 0x93d0
leaq 0xc8(%rsp), %rdi
callq 0x93d0
leaq 0x48(%rsp), %rdi
callq 0x93d0
leaq 0xa8(%rsp), %rdi
callq 0x93d0
leaq 0x88(%rsp), %rdi
callq 0x93d0
leaq 0x68(%rsp), %rdi
callq 0x93d0
movq 0x158(%rsp), %rax
addq $0xc, %rax
movq %rax, 0x158(%rsp)
jmp 0x10a1e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x168(%rsp)
movl %eax, 0x164(%rsp)
jmp 0x10d9a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x168(%rsp)
movl %eax, 0x164(%rsp)
jmp 0x10d8d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x168(%rsp)
movl %eax, 0x164(%rsp)
jmp 0x10d80
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x168(%rsp)
movl %eax, 0x164(%rsp)
jmp 0x10d76
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x168(%rsp)
movl %eax, 0x164(%rsp)
jmp 0x10d69
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x168(%rsp)
movl %eax, 0x164(%rsp)
jmp 0x10d5c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x168(%rsp)
movl %eax, 0x164(%rsp)
jmp 0x10d52
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x168(%rsp)
movl %eax, 0x164(%rsp)
jmp 0x10d45
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x168(%rsp)
movl %eax, 0x164(%rsp)
leaq 0x128(%rsp), %rdi
callq 0x93d0
leaq 0x108(%rsp), %rdi
callq 0x93d0
leaq 0x28(%rsp), %rdi
callq 0x93d0
leaq 0xe8(%rsp), %rdi
callq 0x93d0
leaq 0xc8(%rsp), %rdi
callq 0x93d0
leaq 0x48(%rsp), %rdi
callq 0x93d0
leaq 0xa8(%rsp), %rdi
callq 0x93d0
leaq 0x88(%rsp), %rdi
callq 0x93d0
leaq 0x68(%rsp), %rdi
callq 0x93d0
jmp 0x10ddb
movq 0x10(%rsp), %rdi
leaq 0x23fd(%rip), %rdx      # 0x131af
leaq 0x178(%rsp), %rsi
callq 0x121f0
jmp 0x10dc1
leaq 0x178(%rsp), %rdi
callq 0x93d0
movq 0x18(%rsp), %rax
addq $0x1a8, %rsp            # imm = 0x1A8
retq
leaq 0x178(%rsp), %rdi
callq 0x93d0
movq 0x168(%rsp), %rdi
callq 0x9c40
nopw %cs:(%rax,%rax)