// File: davidjosepha[P]slitherlink/src/generator/main.cpp
// Function: main
int main(int argc, char * argv[]) {
    clock_t startTime, endTime;

    if (argc == 4) {
        std::istringstream mn(argv[1]);
        std::istringstream nn(argv[2]);
        std::istringstream difficn(argv[3]);
        int m, n;
        std::string difficstr;
        assert(mn >> m && mn.eof());
        assert(nn >> n && nn.eof());
        assert(difficn >> difficstr && difficn.eof());

        Difficulty diffic = (difficstr == "e") ? EASY : HARD;

        startTime = clock();
        Generator g = Generator(m, n, diffic); //one square for left/right top/bottom boundries

        endTime = clock();
        float diff = ((float)endTime - (float)startTime) / CLOCKS_PER_SEC;
        std::cout << "Time to create:\t" << diff << " seconds" << std::endl;

        return EXIT_SUCCESS;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x720, %rsp            # imm = 0x720
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x4, -0x8(%rbp)
jne 0x14734
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x6b8(%rbp)
leaq -0x1c1(%rbp), %rdi
movq %rdi, -0x6b0(%rbp)
callq 0x22d0
movq -0x6b8(%rbp), %rsi
movq -0x6b0(%rbp), %rdx
leaq -0x1c0(%rbp), %rdi
callq 0x2240
jmp 0x141b1
leaq -0x1a0(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
movl $0x8, %edx
callq 0x22b0
jmp 0x141cb
leaq -0x1c0(%rbp), %rdi
callq 0x2110
leaq -0x1c1(%rbp), %rdi
callq 0x21f0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x6c8(%rbp)
leaq -0x379(%rbp), %rdi
movq %rdi, -0x6c0(%rbp)
callq 0x22d0
movq -0x6c8(%rbp), %rsi
movq -0x6c0(%rbp), %rdx
leaq -0x378(%rbp), %rdi
callq 0x2240
jmp 0x14221
leaq -0x358(%rbp), %rdi
leaq -0x378(%rbp), %rsi
movl $0x8, %edx
callq 0x22b0
jmp 0x1423b
leaq -0x378(%rbp), %rdi
callq 0x2110
leaq -0x379(%rbp), %rdi
callq 0x21f0
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x6d8(%rbp)
leaq -0x521(%rbp), %rdi
movq %rdi, -0x6d0(%rbp)
callq 0x22d0
movq -0x6d8(%rbp), %rsi
movq -0x6d0(%rbp), %rdx
leaq -0x520(%rbp), %rdi
callq 0x2240
jmp 0x14291
leaq -0x500(%rbp), %rdi
leaq -0x520(%rbp), %rsi
movl $0x8, %edx
callq 0x22b0
jmp 0x142ab
leaq -0x520(%rbp), %rdi
callq 0x2110
leaq -0x521(%rbp), %rdi
callq 0x21f0
leaq -0x550(%rbp), %rdi
callq 0x2250
leaq -0x1a0(%rbp), %rdi
leaq -0x528(%rbp), %rsi
callq 0x2100
movq %rax, -0x6e0(%rbp)
jmp 0x142eb
movq -0x6e0(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x2210
movb %al, -0x6e1(%rbp)
jmp 0x14309
movb -0x6e1(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x6e2(%rbp)
jne 0x1431e
jmp 0x1434c
movq -0x1a0(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x1a0(%rbp,%rax), %rdi
callq 0x22e0
movb %al, -0x6e3(%rbp)
jmp 0x1433e
movb -0x6e3(%rbp), %al
movb %al, -0x6e2(%rbp)
jmp 0x1434c
movb -0x6e2(%rbp), %al
testb $0x1, %al
jne 0x14358
jmp 0x1435d
jmp 0x1445c
leaq 0x1464(%rip), %rdi      # 0x157c8
leaq 0x1471(%rip), %rsi      # 0x157dc
movl $0x13, %edx
leaq 0x147c(%rip), %rcx      # 0x157f3
callq 0x2120
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d0(%rbp)
movl %eax, -0x1d4(%rbp)
jmp 0x143ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d0(%rbp)
movl %eax, -0x1d4(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x2110
leaq -0x1c1(%rbp), %rdi
callq 0x21f0
jmp 0x14740
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d0(%rbp)
movl %eax, -0x1d4(%rbp)
jmp 0x143f1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d0(%rbp)
movl %eax, -0x1d4(%rbp)
leaq -0x378(%rbp), %rdi
callq 0x2110
leaq -0x379(%rbp), %rdi
callq 0x21f0
jmp 0x14726
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d0(%rbp)
movl %eax, -0x1d4(%rbp)
jmp 0x14434
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d0(%rbp)
movl %eax, -0x1d4(%rbp)
leaq -0x520(%rbp), %rdi
callq 0x2110
leaq -0x521(%rbp), %rdi
callq 0x21f0
jmp 0x1471a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d0(%rbp)
movl %eax, -0x1d4(%rbp)
jmp 0x14702
leaq -0x358(%rbp), %rdi
leaq -0x52c(%rbp), %rsi
callq 0x2100
movq %rax, -0x6f0(%rbp)
jmp 0x14478
movq -0x6f0(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x2210
movb %al, -0x6f1(%rbp)
jmp 0x14496
movb -0x6f1(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x6f2(%rbp)
jne 0x144ab
jmp 0x144d9
movq -0x358(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x358(%rbp,%rax), %rdi
callq 0x22e0
movb %al, -0x6f3(%rbp)
jmp 0x144cb
movb -0x6f3(%rbp), %al
movb %al, -0x6f2(%rbp)
jmp 0x144d9
movb -0x6f2(%rbp), %al
testb $0x1, %al
jne 0x144e5
jmp 0x144e7
jmp 0x14506
leaq 0x131c(%rip), %rdi      # 0x1580a
leaq 0x12e7(%rip), %rsi      # 0x157dc
movl $0x14, %edx
leaq 0x12f2(%rip), %rcx      # 0x157f3
callq 0x2120
leaq -0x500(%rbp), %rdi
leaq -0x550(%rbp), %rsi
callq 0x2220
movq %rax, -0x700(%rbp)
jmp 0x14522
movq -0x700(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x2210
movb %al, -0x701(%rbp)
jmp 0x14540
movb -0x701(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x702(%rbp)
jne 0x14555
jmp 0x14583
movq -0x500(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x500(%rbp,%rax), %rdi
callq 0x22e0
movb %al, -0x703(%rbp)
jmp 0x14575
movb -0x703(%rbp), %al
movb %al, -0x702(%rbp)
jmp 0x14583
movb -0x702(%rbp), %al
testb $0x1, %al
jne 0x1458f
jmp 0x14591
jmp 0x145b0
leaq 0x1286(%rip), %rdi      # 0x1581e
leaq 0x123d(%rip), %rsi      # 0x157dc
movl $0x15, %edx
leaq 0x1248(%rip), %rcx      # 0x157f3
callq 0x2120
leaq 0x128d(%rip), %rsi      # 0x15844
leaq -0x550(%rbp), %rdi
callq 0x14750
movb %al, -0x704(%rbp)
jmp 0x145cb
movb -0x704(%rbp), %al
notb %al
movzbl %al, %eax
andl $0x1, %eax
movl %eax, -0x554(%rbp)
callq 0x2130
movq %rax, -0x18(%rbp)
movl -0x528(%rbp), %esi
movl -0x52c(%rbp), %edx
movl -0x554(%rbp), %ecx
leaq -0x6a0(%rbp), %rdi
callq 0x105b0
jmp 0x14608
callq 0x2130
movq %rax, -0x20(%rbp)
cvtsi2ssq -0x20(%rbp), %xmm0
cvtsi2ssq -0x18(%rbp), %xmm1
subss %xmm1, %xmm0
movss 0x119b(%rip), %xmm1     # 0x157c4
divss %xmm1, %xmm0
movss %xmm0, -0x6a4(%rbp)
movq 0x799c(%rip), %rdi      # 0x1bfd8
leaq 0x1203(%rip), %rsi      # 0x15846
callq 0x21c0
movq %rax, -0x710(%rbp)
jmp 0x14651
movq -0x710(%rbp), %rdi
movss -0x6a4(%rbp), %xmm0
callq 0x2150
movq %rax, -0x718(%rbp)
jmp 0x1466e
movq -0x718(%rbp), %rdi
leaq 0x11db(%rip), %rsi      # 0x15857
callq 0x21c0
movq %rax, -0x720(%rbp)
jmp 0x1468a
movq -0x720(%rbp), %rdi
movq 0x7930(%rip), %rsi      # 0x1bfc8
callq 0x21e0
jmp 0x1469f
movl $0x0, -0x4(%rbp)
leaq -0x6a0(%rbp), %rdi
callq 0x14780
leaq -0x550(%rbp), %rdi
callq 0x2110
leaq -0x500(%rbp), %rdi
callq 0x20d0
leaq -0x358(%rbp), %rdi
callq 0x20d0
leaq -0x1a0(%rbp), %rdi
callq 0x20d0
jmp 0x14734
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d0(%rbp)
movl %eax, -0x1d4(%rbp)
leaq -0x6a0(%rbp), %rdi
callq 0x14780
leaq -0x550(%rbp), %rdi
callq 0x2110
leaq -0x500(%rbp), %rdi
callq 0x20d0
leaq -0x358(%rbp), %rdi
callq 0x20d0
leaq -0x1a0(%rbp), %rdi
callq 0x20d0
jmp 0x14740
movl -0x4(%rbp), %eax
addq $0x720, %rsp            # imm = 0x720
popq %rbp
retq
movq -0x1d0(%rbp), %rdi
callq 0x22c0
nopl (%rax)