// File: /workspace/github_cpp_makefile_star2_O2/AlexTheMagnus[P]Project_Hex/src/infraestructure/iconChanger.cc
// Function: NativeIconChanger::createNewAppFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void createNewAppFile(string settingFileName, string iconName) {
        string fileLine;
        std::ifstream settingFile = openFile(getSettingFileFullPath(settingFileName));
        std::ofstream tempSettingFile(getAptAppsPath() + getTempFileName());

        if (!(settingFile.is_open()) || !(tempSettingFile.is_open())) {  //no se pudo abrir alguno de los 2
            printErrorOpeningAppFileMessage();
            exit(-1);
        }

        while (getline(settingFile, fileLine, '\n')) {
            if ((fileLine.compare(0, 5, "Icon=")) == 0) {
                fileLine = "Icon=" + getIconFullPath(iconName);
            }
            tempSettingFile << fileLine << std::endl;
        }

        settingFile.close();
        tempSettingFile.close();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4f8, %rsp            # imm = 0x4F8
movq %rdx, -0x38(%rbp)
movq %rdi, %rbx
leaq -0xe8(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0xb8(%rbp), %rdi
callq 0x21e0
leaq -0xd8(%rbp), %rdi
leaq -0xb8(%rbp), %rdx
movq %rbx, %rsi
callq 0x335c
leaq -0x520(%rbp), %rdi
leaq -0xd8(%rbp), %rdx
movq %rbx, %rsi
callq 0x3308
leaq -0xd8(%rbp), %rdi
callq 0x20b0
leaq -0xb8(%rbp), %rdi
callq 0x20b0
leaq 0x8(%rbx), %rsi
leaq -0x58(%rbp), %rdi
callq 0x21e0
leaq -0x98(%rbp), %rdi
movq %rbx, %rsi
callq 0x342a
leaq -0x78(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0x98(%rbp), %rdx
callq 0x33b8
leaq -0x318(%rbp), %rdi
leaq -0x78(%rbp), %rsi
pushq $0x10
popq %rdx
callq 0x22b0
movq %rbx, -0x30(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x20b0
leaq -0x98(%rbp), %rdi
callq 0x20b0
leaq -0x58(%rbp), %rdi
callq 0x20b0
leaq -0x4a8(%rbp), %rdi
callq 0x2040
testb %al, %al
je 0x3108
leaq -0x2a8(%rbp), %rdi
callq 0x2040
testb %al, %al
je 0x3108
leaq -0xf8(%rbp), %r12
leaq 0x10f6(%rip), %r14      # 0x4105
leaq -0x118(%rbp), %r15
leaq -0x58(%rbp), %rbx
leaq -0x78(%rbp), %r13
leaq -0x520(%rbp), %rdi
movq %r12, %rsi
pushq $0xa
popq %rdx
callq 0x2290
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x30ba
movq %r12, %rdi
xorl %esi, %esi
pushq $0x5
popq %rdx
movq %r14, %rcx
callq 0x21d0
testl %eax, %eax
jne 0x309e
movq %r15, %rdi
movq -0x38(%rbp), %rsi
callq 0x21e0
movq %rbx, %rdi
movq -0x30(%rbp), %rsi
movq %r15, %rdx
callq 0x34dc
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x34ad
movq %r12, %rdi
movq %r13, %rsi
callq 0x21b0
movq %r13, %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x20b0
movq %r15, %rdi
callq 0x20b0
leaq -0x318(%rbp), %rdi
movq %r12, %rsi
callq 0x2160
movq %rax, %rdi
callq 0x20c0
jmp 0x301e
leaq -0x520(%rbp), %rdi
callq 0x2030
leaq -0x318(%rbp), %rdi
callq 0x21f0
leaq -0x318(%rbp), %rdi
callq 0x2210
leaq -0x520(%rbp), %rdi
callq 0x2060
leaq -0xf8(%rbp), %rdi
callq 0x20b0
addq $0x4f8, %rsp            # imm = 0x4F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x344e
pushq $-0x1
popq %rdi
callq 0x21a0
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x20b0
jmp 0x312a
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
callq 0x20b0
jmp 0x313b
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x20b0
jmp 0x31a4
movq %rax, %rbx
jmp 0x31a4
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x20b0
jmp 0x315f
movq %rax, %rbx
leaq -0xb8(%rbp), %rdi
callq 0x20b0
jmp 0x31b0
movq %rax, %rbx
jmp 0x31b0
jmp 0x3195
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x20b0
jmp 0x3185
movq %rax, %rbx
leaq -0x118(%rbp), %rdi
callq 0x20b0
jmp 0x3198
jmp 0x3195
movq %rax, %rbx
leaq -0x318(%rbp), %rdi
callq 0x2210
leaq -0x520(%rbp), %rdi
callq 0x2060
leaq -0xf8(%rbp), %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x2260