// File: /workspace/github_c_makefile_star2_O1/coyove[P]chann/./src/tags.h
// Function: TemplateManager::load_templates()
int load_templates(){
		DIR *pDIR;
        struct dirent *entry;
        int c = 0;
        std::string root_dir = "./templates/" + lang + "/";

        if(pDIR = opendir(root_dir.c_str()) ){
            while(entry = readdir(pDIR)){
                if( strcmp(entry->d_name, ".") != 0 && strcmp(entry->d_name, "..") != 0 ){
	                string filename = entry->d_name;

	        		HTMLTemplate tmp;
					tmp.load_file(root_dir + filename);

	            	filename = filename.substr(0, filename.size() - 4);
					m_templates[filename] = tmp;

					c++;
				}

            }
            closedir(pDIR);
        }

        return c;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b8, %rsp            # imm = 0x2B8
movq %rdi, %rbx
leaq 0x30(%rdi), %rdx
leaq 0x5a660(%rip), %rsi     # 0x73cc9
leaq 0x90(%rsp), %r14
movq %r14, %rdi
callq 0x11c7f
leaq 0x61f2c(%rip), %rsi     # 0x7b5ac
movq %r14, %rdi
callq 0xc790
leaq 0x40(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x196b0
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x196b8
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x38(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x196e6
callq 0xc640
movq 0x30(%rsp), %rdi
callq 0xc690
testq %rax, %rax
je 0x1992d
movq %rax, %r15
movq $0x0, 0x8(%rsp)
leaq 0x5a5cb(%rip), %r13     # 0x73cd7
leaq 0x5a5c3(%rip), %rbp     # 0x73cd6
movq %r15, %rdi
callq 0xc8a0
movq %rax, %r12
testq %rax, %rax
je 0x19919
addq $0x13, %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0xc950
testl %eax, %eax
je 0x19713
movq %r12, %rdi
movq %rbp, %rsi
callq 0xc950
testl %eax, %eax
je 0x19713
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r12, %rdi
callq 0xc460
leaq (%rax,%r12), %rdx
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0xedfa
leaq 0x90(%rsp), %rdi
callq 0x1ad7c
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x1e52b
leaq 0x90(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x1ea50
movq %rbx, %r14
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
leaq 0x10(%rsp), %r12
je 0x197bb
callq 0xc640
movq 0x18(%rsp), %rcx
addq $-0x4, %rcx
leaq 0x70(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0xcb00
movq %r12, %rdi
movq %rbx, %rsi
callq 0xc5e0
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x197f8
callq 0xc640
movq %r14, %rbx
movq %r14, %rdi
movq %r12, %rsi
callq 0x1a6da
movq %rax, %r12
movq %rax, %rdi
leaq 0x90(%rsp), %rsi
callq 0xcc40
leaq 0x20(%r12), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x1b1a4
leaq 0x38(%r12), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x20766
leaq 0x88(%r12), %rdi
leaq 0x118(%rsp), %rsi
callq 0x20766
leaq 0xd8(%r12), %rdi
leaq 0x168(%rsp), %rsi
callq 0x1b514
leaq 0x108(%r12), %rdi
leaq 0x198(%rsp), %rsi
callq 0x1b514
leaq 0x138(%r12), %rdi
leaq 0x1c8(%rsp), %rsi
callq 0x1b514
leaq 0x168(%r12), %rdi
leaq 0x1f8(%rsp), %rsi
callq 0x1b79e
leaq 0x198(%r12), %rdi
leaq 0x228(%rsp), %rsi
callq 0x1bb0a
leaq 0x1c8(%r12), %rdi
leaq 0x258(%rsp), %rsi
callq 0x1bdd4
addq $0x1f8, %r12            # imm = 0x1F8
movq %r12, %rdi
leaq 0x288(%rsp), %rsi
callq 0x1c0fa
leaq 0x90(%rsp), %rdi
callq 0x1a17a
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x19908
callq 0xc640
movq 0x8(%rsp), %rax
incl %eax
movq %rax, 0x8(%rsp)
jmp 0x19713
movq %r15, %rdi
callq 0xc660
leaq 0x40(%rsp), %r12
movq 0x8(%rsp), %rbx
jmp 0x1992f
xorl %ebx, %ebx
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x1993e
callq 0xc640
movl %ebx, %eax
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x19985
movq %rax, %rbx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x19988
callq 0xc640
jmp 0x19988
movq %rax, %rbx
jmp 0x19995
jmp 0x199ab
movq %rax, %rbx
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x199b8
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x1a17a
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x199ae
callq 0xc640
jmp 0x199ae
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x199c2
callq 0xc640
movq %rbx, %rdi
callq 0xc760