// File: Blaze2305[P]Compiler-Design-2021-Assignment/src/Utils/Utils.cpp
// Function: Splitpath[abi:cxx11](char const*)
std::vector<std::string> Splitpath(const char * str){
	
	std::set<char> delims{'/'};

	std::vector<std::string> result;
	std::string temp = str;
	char const* pch = temp.c_str();
	char const* start = pch;
	for(; *pch; ++pch){
		if (delims.find(*pch) != delims.end()){
			if (start != pch){
				std::string str(start, pch);
				result.push_back(str);
			}
			else{
				result.push_back("");
			}
			start = pch + 1;
		}
	}
	result.push_back(start);

	return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
movq %rdi, -0x140(%rbp)
movq %rdi, %rax
movq %rax, -0x138(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x2f, -0x51(%rbp)
leaq -0x51(%rbp), %rax
movq %rax, -0x50(%rbp)
movq $0x1, -0x48(%rbp)
leaq -0x53(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x3510
movq -0x130(%rbp), %r8
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x40(%rbp), %rdi
leaq -0x52(%rbp), %rcx
callq 0x16030
jmp 0x14be6
leaq -0x53(%rbp), %rdi
callq 0x3300
movq -0x140(%rbp), %rdi
movb $0x0, -0x65(%rbp)
callq 0x10550
movq -0x10(%rbp), %rax
movq %rax, -0x150(%rbp)
leaq -0x89(%rbp), %rdi
movq %rdi, -0x148(%rbp)
callq 0x3510
movq -0x150(%rbp), %rsi
movq -0x148(%rbp), %rdx
leaq -0x88(%rbp), %rdi
callq 0xb640
jmp 0x14c39
leaq -0x89(%rbp), %rdi
callq 0x3300
leaq -0x88(%rbp), %rdi
callq 0x3100
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rax
cmpb $0x0, (%rax)
je 0x14ea3
movq -0x98(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x16130
movq %rax, -0x158(%rbp)
jmp 0x14c8f
movq -0x158(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x16170
movq %rax, -0xb0(%rbp)
leaq -0xa8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x16100
testb $0x1, %al
jne 0x14cc9
jmp 0x14e8a
movq -0xa0(%rbp), %rax
cmpq -0x98(%rbp), %rax
je 0x14de3
movq -0xa0(%rbp), %rax
movq %rax, -0x170(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x168(%rbp)
leaq -0xd1(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0x3510
movq -0x170(%rbp), %rsi
movq -0x168(%rbp), %rdx
movq -0x160(%rbp), %rcx
leaq -0xd0(%rbp), %rdi
callq 0x161a0
jmp 0x14d2f
leaq -0xd1(%rbp), %rdi
callq 0x3300
movq -0x140(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x10760
jmp 0x14d50
leaq -0xd0(%rbp), %rdi
callq 0x3558
jmp 0x14e78
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x53(%rbp), %rdi
callq 0x3300
jmp 0x14f9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x89(%rbp), %rdi
callq 0x3300
jmp 0x14f8a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x14f57
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xd1(%rbp), %rdi
callq 0x3300
jmp 0x14f57
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x3558
jmp 0x14f57
leaq -0xf9(%rbp), %rdi
movq %rdi, -0x178(%rbp)
callq 0x3510
movq -0x178(%rbp), %rdx
leaq 0x4628(%rip), %rsi      # 0x1942c
leaq -0xf8(%rbp), %rdi
callq 0xb640
jmp 0x14e12
movq -0x140(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x16210
jmp 0x14e27
leaq -0xf8(%rbp), %rdi
callq 0x3558
leaq -0xf9(%rbp), %rdi
callq 0x3300
jmp 0x14e78
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x14e67
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x3558
leaq -0xf9(%rbp), %rdi
callq 0x3300
jmp 0x14f57
movq -0x98(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa0(%rbp)
jmp 0x14e8c
movq -0x98(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x98(%rbp)
jmp 0x14c66
movq -0xa0(%rbp), %rax
movq %rax, -0x188(%rbp)
leaq -0x121(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x3510
movq -0x188(%rbp), %rsi
movq -0x180(%rbp), %rdx
leaq -0x120(%rbp), %rdi
callq 0xb640
jmp 0x14ee0
movq -0x140(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x16210
jmp 0x14ef5
leaq -0x120(%rbp), %rdi
callq 0x3558
leaq -0x121(%rbp), %rdi
callq 0x3300
movb $0x1, -0x65(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x3558
testb $0x1, -0x65(%rbp)
jne 0x14f71
jmp 0x14f65
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x14f4b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x3558
leaq -0x121(%rbp), %rdi
callq 0x3300
leaq -0x88(%rbp), %rdi
callq 0x3558
jmp 0x14f8a
movq -0x140(%rbp), %rdi
callq 0x10570
leaq -0x40(%rbp), %rdi
callq 0x16240
movq -0x138(%rbp), %rax
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq
movq -0x140(%rbp), %rdi
callq 0x10570
leaq -0x40(%rbp), %rdi
callq 0x16240
movq -0x60(%rbp), %rdi
callq 0x3500
nopl (%rax,%rax)