// File: aadityanaik[P]LongNums/src/longnums.cpp
// Function: LongNumber::operator<(LongNumber const&)
bool LongNumber::operator<(const LongNumber& X) {
	if (!negative) {
		if (X.negative) {
			return false;
		}

		else {
			if (digits.size() > X.digits.size()) {
				return false;
			} else if (digits.size() == X.digits.size()) {
				for (int i = digits.size() - 1; i >= 0; i--) {
					if (digits[i] < X.digits[i]) {
						return true;
					} else if(digits[i] > X.digits[i]){
						return false;
					}
				}

				return false;
			} else {
				return true;
			}
		}
	}

	else {
		if (!X.negative) {
			return true;
		}

		else {
			if (digits.size() > X.digits.size()) {
				return true;
			} else if (digits.size() == X.digits.size()) {
				for (int i = digits.size() - 1; i >= 0; i--) {
					if (digits[i] > X.digits[i]) {
						return true;
					} else if (digits[i] < X.digits[i]) {
						return false;
					}
				}

				return false;
			} else {
				return false;
			}
		}
	}
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x30(%rsp)
testb $0x1, 0x18(%rax)
jne 0x3638
movq 0x40(%rsp), %rax
testb $0x1, 0x18(%rax)
je 0x3527
movb $0x0, 0x57(%rsp)
jmp 0x374a
movq 0x30(%rsp), %rdi
callq 0x7fb0
movq %rax, 0x28(%rsp)
movq 0x40(%rsp), %rdi
callq 0x7fb0
movq %rax, %rcx
movq 0x28(%rsp), %rax
cmpq %rcx, %rax
jbe 0x3557
movb $0x0, 0x57(%rsp)
jmp 0x374a
movq 0x30(%rsp), %rdi
callq 0x7fb0
movq %rax, 0x20(%rsp)
movq 0x40(%rsp), %rdi
callq 0x7fb0
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
jne 0x362e
movq 0x30(%rsp), %rdi
callq 0x7fb0
subq $0x1, %rax
movl %eax, 0x3c(%rsp)
cmpl $0x0, 0x3c(%rsp)
jl 0x3624
movq 0x30(%rsp), %rdi
movslq 0x3c(%rsp), %rsi
callq 0x8120
movl (%rax), %eax
movl %eax, 0x1c(%rsp)
movq 0x40(%rsp), %rdi
movslq 0x3c(%rsp), %rsi
callq 0x7fd0
movq %rax, %rcx
movl 0x1c(%rsp), %eax
cmpl (%rcx), %eax
jge 0x35d7
movb $0x1, 0x57(%rsp)
jmp 0x374a
movq 0x30(%rsp), %rdi
movslq 0x3c(%rsp), %rsi
callq 0x8120
movl (%rax), %eax
movl %eax, 0x18(%rsp)
movq 0x40(%rsp), %rdi
movslq 0x3c(%rsp), %rsi
callq 0x7fd0
movq %rax, %rcx
movl 0x18(%rsp), %eax
cmpl (%rcx), %eax
jle 0x3610
movb $0x0, 0x57(%rsp)
jmp 0x374a
jmp 0x3612
jmp 0x3614
movl 0x3c(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x3593
movb $0x0, 0x57(%rsp)
jmp 0x374a
movb $0x1, 0x57(%rsp)
jmp 0x374a
movq 0x40(%rsp), %rax
testb $0x1, 0x18(%rax)
jne 0x364d
movb $0x1, 0x57(%rsp)
jmp 0x374a
movq 0x30(%rsp), %rdi
callq 0x7fb0
movq %rax, 0x10(%rsp)
movq 0x40(%rsp), %rdi
callq 0x7fb0
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jbe 0x367d
movb $0x1, 0x57(%rsp)
jmp 0x374a
movq 0x30(%rsp), %rdi
callq 0x7fb0
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rdi
callq 0x7fb0
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jne 0x3745
movq 0x30(%rsp), %rdi
callq 0x7fb0
subq $0x1, %rax
movl %eax, 0x38(%rsp)
cmpl $0x0, 0x38(%rsp)
jl 0x373e
movq 0x30(%rsp), %rdi
movslq 0x38(%rsp), %rsi
callq 0x8120
movl (%rax), %eax
movl %eax, 0x4(%rsp)
movq 0x40(%rsp), %rdi
movslq 0x38(%rsp), %rsi
callq 0x7fd0
movq %rax, %rcx
movl 0x4(%rsp), %eax
cmpl (%rcx), %eax
jle 0x36f6
movb $0x1, 0x57(%rsp)
jmp 0x374a
movq 0x30(%rsp), %rdi
movslq 0x38(%rsp), %rsi
callq 0x8120
movl (%rax), %eax
movl %eax, (%rsp)
movq 0x40(%rsp), %rdi
movslq 0x38(%rsp), %rsi
callq 0x7fd0
movq %rax, %rcx
movl (%rsp), %eax
cmpl (%rcx), %eax
jge 0x372a
movb $0x0, 0x57(%rsp)
jmp 0x374a
jmp 0x372c
jmp 0x372e
movl 0x38(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x38(%rsp)
jmp 0x36b9
movb $0x0, 0x57(%rsp)
jmp 0x374a
movb $0x0, 0x57(%rsp)
movb 0x57(%rsp), %al
andb $0x1, %al
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)