// File: /workspace/github_cpp_makefile_star2_O1/allasandeep[P]LocationBoundaryFinder/prog1.cc
// Function: processBoundFiles(std::basic_ifstream<char, std::char_traits<char>>&, pg_conn*)
void processBoundFiles(ifstream& is, PGconn *db)
{
	//Required Variables
	string line;	
	int id = 0;
	string minLatitude = "";
	string minLongitude = "";
	string maxLatitude = "";
	string maxLongitude = "";

	//Reading data from file line by line 
	while(std::getline(is,line))
	{
		//Getting the substrings and putting them into the respective variables
		id = stoi(line.substr(0,7));
		minLongitude = line.substr(7,10);
		minLatitude = line.substr(17,9);
		maxLongitude = line.substr(26,10);
		maxLatitude = line.substr(36,9);	        
		char query[150];
		//Converting all the string variables into char *
		char min_longitude[minLongitude.length()+1];
		strcpy(min_longitude, minLongitude.c_str());
		char min_latitude[minLatitude.length()+1];
		strcpy(min_latitude, minLatitude.c_str());
		char max_longitude[maxLongitude.length()+1];
		strcpy(max_longitude, maxLongitude.c_str());
		char max_latitude[maxLatitude.length()+1];
		strcpy(max_latitude, maxLatitude.c_str());
		PGresult * result = nullptr;
		//Psql Query by concatinating with c++ variables
		sprintf(query,"update region set min_latitude = '%s' ,max_latitude = '%s' ,min_longitude = '%s' ,max_longitude = '%s' where id = %d;", min_latitude, max_latitude, min_longitude, max_longitude, id);
		//Executing the query and storing the result in result.
		result = PQexec(db,query);
		//Clearing the result
		PQclear(result);   
	}	

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %rsi, -0xd8(%rbp)
movq %rdi, %r12
leaq -0xb8(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x98(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0xd66(%rip), %rdx       # 0x41b7
leaq -0xa8(%rbp), %rdi
movq %rdx, %rsi
callq 0x39de
leaq -0x78(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0xd48(%rip), %rdx       # 0x41b7
leaq -0x88(%rbp), %rdi
movq %rdx, %rsi
callq 0x39de
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0xd2a(%rip), %rdx       # 0x41b7
leaq -0x68(%rbp), %rdi
movq %rdx, %rsi
callq 0x39de
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0xd0f(%rip), %rdx       # 0x41b7
leaq -0x48(%rbp), %rdi
movq %rdx, %rsi
callq 0x39de
leaq -0x170(%rbp), %r13
leaq -0xc8(%rbp), %rbx
leaq -0x180(%rbp), %r14
movq %r12, -0xd0(%rbp)
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2290
movsbl %al, %edx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2030
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x378a
movl $0x7, %ecx
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2240
movq -0x180(%rbp), %r14
callq 0x2270
movq %rax, %rbx
movl (%rax), %r15d
movl $0x0, (%rax)
movq %r14, %rdi
leaq -0xe8(%rbp), %rsi
movl $0xa, %edx
callq 0x2200
cmpq %r14, -0xe8(%rbp)
je 0x382b
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0x3837
movl (%rbx), %ecx
cmpl $0x22, %ecx
je 0x3837
movq %rax, -0xe0(%rbp)
testl %ecx, %ecx
leaq -0x180(%rbp), %r14
jne 0x357c
movl %r15d, (%rbx)
movq -0x180(%rbp), %rdi
cmpq %r13, %rdi
je 0x3597
movq -0x170(%rbp), %rsi
incq %rsi
callq 0x2070
movl $0x7, %edx
movl $0xa, %ecx
movq %r14, %rdi
leaq -0xc8(%rbp), %rbx
movq %rbx, %rsi
callq 0x2240
leaq -0x88(%rbp), %rdi
movq %r14, %rsi
callq 0x2130
movq -0x180(%rbp), %rdi
cmpq %r13, %rdi
je 0x35dd
movq -0x170(%rbp), %rsi
incq %rsi
callq 0x2070
movl $0x11, %edx
movl $0x9, %ecx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2240
leaq -0xa8(%rbp), %rdi
movq %r14, %rsi
callq 0x2130
movq -0x180(%rbp), %rdi
cmpq %r13, %rdi
je 0x361c
movq -0x170(%rbp), %rsi
incq %rsi
callq 0x2070
movl $0x1a, %edx
movl $0xa, %ecx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2240
leaq -0x48(%rbp), %rdi
movq %r14, %rsi
callq 0x2130
movq -0x180(%rbp), %rdi
cmpq %r13, %rdi
je 0x3658
movq -0x170(%rbp), %rsi
incq %rsi
callq 0x2070
movl $0x24, %edx
movl $0x9, %ecx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2240
leaq -0x68(%rbp), %rdi
movq %r14, %rsi
callq 0x2130
movq -0x180(%rbp), %rdi
cmpq %r13, %rdi
je 0x3694
movq -0x170(%rbp), %rsi
incq %rsi
callq 0x2070
movq %rsp, %r13
movq -0x80(%rbp), %rax
movq %rsp, %rbx
addq $0x10, %rax
andq $-0x10, %rax
subq %rax, %rbx
movq %rbx, %rsp
movq -0x88(%rbp), %rsi
movq %rbx, %rdi
callq 0x20f0
movq -0xa0(%rbp), %rax
movq %rsp, %r14
addq $0x10, %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
movq -0xa8(%rbp), %rsi
movq %r14, %rdi
callq 0x20f0
movq -0x40(%rbp), %rax
movq %rsp, %r15
addq $0x10, %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
movq -0x48(%rbp), %rsi
movq %r15, %rdi
callq 0x20f0
movq -0x60(%rbp), %rax
movq %rsp, %r12
addq $0x10, %rax
andq $-0x10, %rax
subq %rax, %r12
movq %r12, %rsp
movq -0x68(%rbp), %rsi
movq %r12, %rdi
callq 0x20f0
subq $0x8, %rsp
leaq -0x180(%rbp), %rdi
leaq 0xa02(%rip), %rsi       # 0x4138
movq %r14, %rdx
movq %rdi, %r14
movq %r12, %rcx
movq %rbx, %r8
movq %r15, %r9
xorl %eax, %eax
pushq -0xe0(%rbp)
callq 0x2280
addq $0x10, %rsp
movq -0xd8(%rbp), %rdi
movq %r14, %rsi
callq 0x22a0
movq %rax, %rdi
callq 0x2120
movq %r13, %rsp
movq -0xd0(%rbp), %r12
leaq -0x170(%rbp), %r13
leaq -0xc8(%rbp), %rbx
jmp 0x34d0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x37a3
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2070
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x37bc
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2070
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x37d8
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2070
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x37fa
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x2070
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x381c
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x2070
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9f3(%rip), %rdi       # 0x4225
callq 0x2080
leaq 0x9e7(%rip), %rdi       # 0x4225
callq 0x2180
movq %rax, %r14
jmp 0x38ad
movq %rax, %r14
jmp 0x38c6
movq %rax, %r14
jmp 0x38e2
movq %rax, %r14
jmp 0x3904
jmp 0x3891
jmp 0x3891
jmp 0x3891
jmp 0x3891
jmp 0x3891
jmp 0x3891
movq %rax, %r14
cmpl $0x0, (%rbx)
jne 0x3874
movl %r15d, (%rbx)
movq -0x180(%rbp), %rdi
cmpq %r13, %rdi
je 0x3894
movq -0x170(%rbp), %rsi
incq %rsi
callq 0x2070
jmp 0x3894
movq %rax, %r14
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x38ad
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2070
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x38c6
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2070
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x38e2
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2070
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x3904
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x2070
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x3926
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x2070
movq %r14, %rdi
callq 0x21a0