// File: /workspace/github_c_makefile_star2_O3/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, 0x48(%rsp)
leaq 0x30(%rdi), %rdx
leaq 0x589d5(%rip), %rsi     # 0x71cc6
leaq 0x90(%rsp), %r14
movq %r14, %rdi
callq 0x11c73
leaq 0x602a4(%rip), %rsi     # 0x795ac
movq %r14, %rdi
callq 0xc790
leaq 0x18(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rax), %rdi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdi
je 0x19337
movq %rdi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x19340
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rdi
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xa0(%rsp), %rcx
movq -0x10(%rcx), %rax
cmpq %rcx, %rax
je 0x19376
movq %rax, %rdi
callq 0xc640
movq 0x8(%rsp), %rdi
callq 0xc690
testq %rax, %rax
je 0x19595
movq %rax, %r15
xorl %r14d, %r14d
leaq 0x90(%rsp), %rbp
leaq 0x50(%rsp), %rbx
movq %r15, %rdi
callq 0xc8a0
movq %rax, %r12
testq %rax, %rax
je 0x19586
cmpb $0x2e, 0x13(%r12)
jne 0x193cb
cmpb $0x0, 0x14(%r12)
je 0x19397
cmpb $0x2e, 0x14(%r12)
jne 0x193cb
cmpb $0x0, 0x15(%r12)
je 0x19397
movq %rbx, %r13
leaq 0x13(%r12), %rbx
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %rbx, %rdi
callq 0xc460
leaq (%r12,%rax), %rdx
addq $0x13, %rdx
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0xedf0
movq %rbp, %rdi
callq 0x1aa02
movq %r13, %rbx
movq %r13, %rdi
leaq 0x8(%rsp), %rsi
movq %r12, %rdx
callq 0x1e1c7
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x1e6ae
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
leaq 0x28(%rsp), %r12
je 0x1943c
callq 0xc640
movq 0x30(%rsp), %rcx
addq $-0x4, %rcx
leaq 0x70(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0xcb00
movq %r12, %rdi
movq %r13, %rsi
callq 0xc5e0
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x19479
callq 0xc640
movq 0x48(%rsp), %rdi
movq %r12, %rsi
callq 0x1a360
movq %rax, %r12
movq %rax, %rdi
movq %rbp, %rsi
callq 0xcc40
leaq 0x20(%r12), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x1ae2a
leaq 0x38(%r12), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x203f0
leaq 0x88(%r12), %rdi
leaq 0x118(%rsp), %rsi
callq 0x203f0
leaq 0xd8(%r12), %rdi
leaq 0x168(%rsp), %rsi
callq 0x1b1be
leaq 0x108(%r12), %rdi
leaq 0x198(%rsp), %rsi
callq 0x1b1be
leaq 0x138(%r12), %rdi
leaq 0x1c8(%rsp), %rsi
callq 0x1b1be
leaq 0x168(%r12), %rdi
leaq 0x1f8(%rsp), %rsi
callq 0x1b446
leaq 0x198(%r12), %rdi
leaq 0x228(%rsp), %rsi
callq 0x1b7b0
leaq 0x1c8(%r12), %rdi
leaq 0x258(%rsp), %rsi
callq 0x1ba78
addq $0x1f8, %r12            # imm = 0x1F8
movq %r12, %rdi
leaq 0x288(%rsp), %rsi
callq 0x1bd9c
movq %rbp, %rdi
callq 0x19de2
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x1957e
callq 0xc640
incl %r14d
jmp 0x19397
movq %r15, %rdi
callq 0xc660
leaq 0x18(%rsp), %rbx
jmp 0x19598
xorl %r14d, %r14d
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x195a7
callq 0xc640
movl %r14d, %eax
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x19622
jmp 0x195ef
movq %rax, %rbx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x195f2
callq 0xc640
jmp 0x195f2
movq %rax, %rbx
jmp 0x195ff
jmp 0x19615
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x19de2
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x19618
callq 0xc640
jmp 0x19618
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1962c
callq 0xc640
movq %rbx, %rdi
callq 0xc760