// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x358, %rsp            # imm = 0x358
movq %rdi, 0x350(%rsp)
movq 0x350(%rsp), %rdx
movq %rdx, 0x48(%rsp)
movl $0x0, 0x33c(%rsp)
addq $0x30, %rdx
leaq 0x9a9e9(%rip), %rsi     # 0xbfc8b
leaq 0x2f8(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0x149e0
movq 0x50(%rsp), %rsi
leaq 0xa2bec(%rip), %rdx     # 0xc7eac
leaq 0x318(%rsp), %rdi
callq 0x147e0
jmp 0x252cf
leaq 0x2f8(%rsp), %rdi
callq 0xdf50
leaq 0x318(%rsp), %rdi
callq 0xd190
movq %rax, %rdi
callq 0xd7c0
movq %rax, 0x40(%rsp)
jmp 0x252f8
movq 0x40(%rsp), %rax
movq %rax, 0x348(%rsp)
cmpq $0x0, %rax
je 0x2559f
jmp 0x25311
movq 0x348(%rsp), %rdi
callq 0xd9e0
movq %rax, 0x38(%rsp)
jmp 0x25325
movq 0x38(%rsp), %rax
movq %rax, 0x340(%rsp)
cmpq $0x0, %rax
je 0x2558e
movq 0x340(%rsp), %rdi
addq $0x13, %rdi
leaq 0x9a94a(%rip), %rsi     # 0xbfc99
callq 0xdab0
cmpl $0x0, %eax
je 0x25589
movq 0x340(%rsp), %rdi
addq $0x13, %rdi
leaq 0x9a928(%rip), %rsi     # 0xbfc98
callq 0xdab0
cmpl $0x0, %eax
je 0x25589
movq 0x340(%rsp), %rax
addq $0x13, %rax
movq %rax, 0x28(%rsp)
leaq 0x2c7(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0xdc30
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0x2c8(%rsp), %rdi
callq 0xdad0
jmp 0x253ba
leaq 0x2c7(%rsp), %rdi
callq 0xdf30
leaq 0x98(%rsp), %rdi
callq 0x29b00
jmp 0x253d6
leaq 0x78(%rsp), %rdi
leaq 0x318(%rsp), %rsi
leaq 0x2c8(%rsp), %rdx
callq 0x35350
jmp 0x253f2
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x35fd0
jmp 0x25406
leaq 0x78(%rsp), %rdi
callq 0xdf50
leaq 0x2c8(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0xd410
movq 0x20(%rsp), %rsi
movq %rax, %rcx
addq $-0x4, %rcx
xorl %eax, %eax
movl %eax, %edx
leaq 0x58(%rsp), %rdi
callq 0xdca0
jmp 0x2543e
leaq 0x2c8(%rsp), %rdi
movq %rdi, 0x10(%rsp)
leaq 0x58(%rsp), %rsi
movq %rsi, 0x8(%rsp)
callq 0xd6f0
movq 0x8(%rsp), %rdi
callq 0xdf50
movq 0x48(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x28b20
movq %rax, 0x18(%rsp)
jmp 0x2547a
movq 0x18(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x36160
jmp 0x2548e
movl 0x33c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x33c(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x26f60
leaq 0x2c8(%rsp), %rdi
callq 0xdf50
jmp 0x25589
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2f0(%rsp)
movl %eax, 0x2ec(%rsp)
leaq 0x2f8(%rsp), %rdi
callq 0xdf50
jmp 0x255d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2f0(%rsp)
movl %eax, 0x2ec(%rsp)
jmp 0x255c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2f0(%rsp)
movl %eax, 0x2ec(%rsp)
leaq 0x2c7(%rsp), %rdi
callq 0xdf30
jmp 0x255c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2f0(%rsp)
movl %eax, 0x2ec(%rsp)
jmp 0x2557a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2f0(%rsp)
movl %eax, 0x2ec(%rsp)
jmp 0x2556d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2f0(%rsp)
movl %eax, 0x2ec(%rsp)
leaq 0x78(%rsp), %rdi
callq 0xdf50
leaq 0x98(%rsp), %rdi
callq 0x26f60
leaq 0x2c8(%rsp), %rdi
callq 0xdf50
jmp 0x255c3
jmp 0x25311
movq 0x348(%rsp), %rdi
callq 0xd780
jmp 0x2559d
jmp 0x2559f
movl 0x33c(%rsp), %eax
movl %eax, 0x4(%rsp)
leaq 0x318(%rsp), %rdi
callq 0xdf50
movl 0x4(%rsp), %eax
addq $0x358, %rsp            # imm = 0x358
retq
leaq 0x318(%rsp), %rdi
callq 0xdf50
movq 0x2f0(%rsp), %rdi
callq 0xd8a0
nopl (%rax)