// File: /workspace/github_c_makefile_star2_O0/morozov312[P]documentary/./src/processing.c
// Function: Generate_html
int Generate_html(comment* list, char* path, int qty_structs, char* dest_dir)
{
    FILE *documentary, *styles;
    char* ptrFile;
    char* name = Generate_filename(path, dest_dir);
    documentary = fopen(name, "w");
    if (documentary == NULL) {
        printf("%s\n", "Error create html page!");
        return 0;
    }
    /// header
    styles = fopen("/usr/share/documentary/styles/styles.html", "r");
    if (styles == NULL) {
        /// in case when app not installed
        styles = fopen("./styles/styles.html", "r");
        if (styles == NULL) {
            printf("%s\n", "Error, stylesheet not found!");
            return 0;
        }
    }
    while (1) {
        char* temp = (char*)calloc(MAX_LEN_INP_STR, sizeof(char));
        ptrFile = fgets(temp, MAX_LEN_INP_STR, styles);
        if (ptrFile == NULL) {
            if (feof(styles) != 0) {
                break;
            } else {
                continue;
            }
        }
        fputs(temp, documentary);
        free(temp);
    }
    fclose(styles);
    char* filename = Get_filename_without_extension(path);
    fputs(filename, documentary);
    fputs("</h2>", documentary);
    /// document programming language definition
    fputs(Get_document_type(path), documentary);
    // main content
    for (int i = 0; i < qty_structs; i++) {
        if (list[i].comment_data) {
            fputs("<p class=\"comment\">", documentary);
            fputs(list[i].comment_data, documentary);
            fputs("</br></p>", documentary);
            if (strlen(list[i].code_string)) {
                fputs("<code>", documentary);
                fputs(list[i].code_string, documentary);
                fputs("</code></br></br>", documentary);
            }
        }
    }
    /// footer
    fputs("</div></body></html>", documentary);
    fclose(documentary);
    free(name);
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x52b0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
leaq 0x1794(%rip), %rsi      # 0x6c57
callq 0x2200
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x54f4
leaq 0x162b(%rip), %rdi      # 0x6b05
leaq 0x1778(%rip), %rsi      # 0x6c59
movb $0x0, %al
callq 0x20f0
movl $0x0, -0x4(%rbp)
jmp 0x56f3
leaq 0x1776(%rip), %rdi      # 0x6c71
leaq 0x166d(%rip), %rsi      # 0x6b6f
callq 0x2200
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x5553
leaq 0x1782(%rip), %rdi      # 0x6c9b
leaq 0x164f(%rip), %rsi      # 0x6b6f
callq 0x2200
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x5551
leaq 0x15ce(%rip), %rdi      # 0x6b05
leaq 0x1772(%rip), %rsi      # 0x6cb0
movb $0x0, %al
callq 0x20f0
movl $0x0, -0x4(%rbp)
jmp 0x56f3
jmp 0x5553
jmp 0x5555
movl $0x1f4, %edi            # imm = 0x1F4
movl $0x1, %esi
callq 0x2180
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
movq -0x38(%rbp), %rdx
movl $0x1f4, %esi            # imm = 0x1F4
callq 0x2160
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x5597
movq -0x38(%rbp), %rdi
callq 0x21a0
cmpl $0x0, %eax
je 0x5595
jmp 0x55af
jmp 0x5555
movq -0x50(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x2130
movq -0x50(%rbp), %rdi
callq 0x2030
jmp 0x5555
movq -0x38(%rbp), %rdi
callq 0x20a0
movq -0x18(%rbp), %rdi
callq 0x4660
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x2130
movq -0x30(%rbp), %rsi
leaq 0x16f0(%rip), %rdi      # 0x6ccd
callq 0x2130
movq -0x18(%rbp), %rdi
callq 0x53f0
movq %rax, %rdi
movq -0x30(%rbp), %rsi
callq 0x2130
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x56ca
movq -0x10(%rbp), %rax
movslq -0x5c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0x56ba
movq -0x30(%rbp), %rsi
leaq 0x16a5(%rip), %rdi      # 0x6cd3
callq 0x2130
movq -0x10(%rbp), %rax
movslq -0x5c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x30(%rbp), %rsi
callq 0x2130
movq -0x30(%rbp), %rsi
leaq 0x168e(%rip), %rdi      # 0x6ce7
callq 0x2130
movq -0x10(%rbp), %rax
movslq -0x5c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0x20c0
cmpq $0x0, %rax
je 0x56b8
movq -0x30(%rbp), %rsi
leaq 0x166a(%rip), %rdi      # 0x6cf1
callq 0x2130
movq -0x10(%rbp), %rax
movslq -0x5c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
movq -0x30(%rbp), %rsi
callq 0x2130
movq -0x30(%rbp), %rsi
leaq 0x1645(%rip), %rdi      # 0x6cf8
callq 0x2130
jmp 0x56ba
jmp 0x56bc
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x55fe
movq -0x30(%rbp), %rsi
leaq 0x1635(%rip), %rdi      # 0x6d0a
callq 0x2130
movq -0x30(%rbp), %rdi
callq 0x20a0
movq -0x48(%rbp), %rdi
callq 0x2030
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)