// File: allasandeep[P]LocationBoundaryFinder/prog2.cc
// Function: formatOutputString[abi:cxx11](int)
string formatOutputString(int boundary)
{
	double dd;
	int d = 0, m = 0;
	float value = 0, seconds = 0;
	string sTemp = "",s = "", outString = "";	
	dd = (double)boundary/ (double)1000000;
	//Formula to convert to DMS
	d = dd;
	m = (dd-d) * 60;
	value = (dd-(double)d - ((double)m/(double)60))*3600;
	seconds = roundf(value * 100)/100;
	sTemp = to_string(seconds);
	s = sTemp.substr(0,sTemp.length()-4);
	//Appendning the DMS values to the string as to be displayed
	outString += to_string(d);
	outString += " degrees, "; 
	outString += to_string(m); 
	outString += " minutes, "; 
	outString += s;
	outString += " seconds ";

	return outString;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x120(%rbp)
movq %rdi, %rax
movq %rax, -0x118(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
leaq -0x49(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x22c0
movq -0x110(%rbp), %rdx
leaq 0x1cb0(%rip), %rsi      # 0x517d
leaq -0x48(%rbp), %rdi
callq 0x3840
jmp 0x34d8
leaq -0x49(%rbp), %rdi
callq 0x2380
leaq -0x81(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0x22c0
movq -0x128(%rbp), %rdx
leaq 0x1c7b(%rip), %rsi      # 0x517d
leaq -0x80(%rbp), %rdi
callq 0x3840
jmp 0x350d
leaq -0x81(%rbp), %rdi
callq 0x2380
movb $0x0, -0x82(%rbp)
leaq -0x83(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x22c0
movq -0x120(%rbp), %rdi
movq -0x130(%rbp), %rdx
leaq 0x1c35(%rip), %rsi      # 0x517d
callq 0x3840
jmp 0x354f
leaq -0x83(%rbp), %rdi
callq 0x2380
cvtsi2sdl -0xc(%rbp), %xmm0
movsd 0x1aa0(%rip), %xmm1     # 0x5008
divsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
cvttsd2si -0x18(%rbp), %eax
movl %eax, -0x1c(%rbp)
movsd -0x18(%rbp), %xmm0
cvtsi2sdl -0x1c(%rbp), %xmm1
subsd %xmm1, %xmm0
movsd 0x1a81(%rip), %xmm2     # 0x5010
mulsd %xmm2, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x20(%rbp)
movsd -0x18(%rbp), %xmm0
cvtsi2sdl -0x1c(%rbp), %xmm1
subsd %xmm1, %xmm0
cvtsi2sdl -0x20(%rbp), %xmm1
divsd %xmm2, %xmm1
subsd %xmm1, %xmm0
movsd 0x1a5b(%rip), %xmm1     # 0x5018
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x24(%rbp)
movss -0x24(%rbp), %xmm0
movss 0x1a49(%rip), %xmm1     # 0x5020
movss %xmm1, -0x134(%rbp)
mulss %xmm1, %xmm0
callq 0x2110
movss -0x134(%rbp), %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0x28(%rbp)
movss -0x28(%rbp), %xmm0
leaq -0xa8(%rbp), %rdi
callq 0x39b0
jmp 0x360c
leaq -0x48(%rbp), %rdi
movq %rdi, -0x140(%rbp)
leaq -0xa8(%rbp), %rsi
movq %rsi, -0x148(%rbp)
callq 0x2180
movq -0x148(%rbp), %rdi
callq 0x2240
movq -0x140(%rbp), %rdi
callq 0x21a0
movq -0x140(%rbp), %rsi
movq %rax, %rcx
addq $-0x4, %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0xc8(%rbp), %rdi
callq 0x22d0
jmp 0x3662
leaq -0x80(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
movq %rsi, -0x150(%rbp)
callq 0x2180
movq -0x150(%rbp), %rdi
callq 0x2240
movl -0x1c(%rbp), %esi
leaq -0xe8(%rbp), %rdi
callq 0x3a00
jmp 0x3696
movq -0x120(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x2060
jmp 0x36ab
leaq -0xe8(%rbp), %rdi
callq 0x2240
movq -0x120(%rbp), %rdi
leaq 0x1afc(%rip), %rsi      # 0x51c1
callq 0x20b0
jmp 0x36cc
movl -0x20(%rbp), %esi
leaq -0x108(%rbp), %rdi
callq 0x3a00
jmp 0x36dd
movq -0x120(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x2060
jmp 0x36f2
leaq -0x108(%rbp), %rdi
callq 0x2240
movq -0x120(%rbp), %rdi
leaq 0x1ac0(%rip), %rsi      # 0x51cc
callq 0x20b0
jmp 0x3713
movq -0x120(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x2060
jmp 0x3725
movq -0x120(%rbp), %rdi
leaq 0x1aa4(%rip), %rsi      # 0x51d7
callq 0x20b0
jmp 0x373a
movb $0x1, -0x82(%rbp)
testb $0x1, -0x82(%rbp)
jne 0x37f2
jmp 0x37e6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x49(%rbp), %rdi
callq 0x2380
jmp 0x3832
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x81(%rbp), %rdi
callq 0x2380
jmp 0x3829
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x83(%rbp), %rdi
callq 0x2380
jmp 0x3820
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x3814
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x2240
jmp 0x3814
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x2240
jmp 0x3814
movq -0x120(%rbp), %rdi
callq 0x2240
leaq -0x80(%rbp), %rdi
callq 0x2240
leaq -0x48(%rbp), %rdi
callq 0x2240
movq -0x118(%rbp), %rax
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
movq -0x120(%rbp), %rdi
callq 0x2240
leaq -0x80(%rbp), %rdi
callq 0x2240
leaq -0x48(%rbp), %rdi
callq 0x2240
movq -0x58(%rbp), %rdi
callq 0x2200
nopl (%rax,%rax)