// File: /workspace/github_cpp_makefile_star2_O1/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, -0xb8(%rbp)
movq %rdi, %rbx
leaq -0x80(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0xc8(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq -0xd8(%rbp), %rdi
movq %rax, %rsi
callq 0x4142
leaq -0x118(%rbp), %rdi
leaq -0xd8(%rbp), %rdx
movq %rbx, %rsi
callq 0x3d7e
leaq -0x520(%rbp), %rdi
leaq -0x118(%rbp), %rdx
movq %rbx, %rsi
callq 0x3d28
leaq -0x108(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3582
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x21a0
movq -0xd8(%rbp), %rdi
cmpq %r14, %rdi
je 0x359d
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x21a0
leaq -0x58(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %rdi
callq 0x4142
leaq -0xe8(%rbp), %r14
movq %r14, -0x10(%r14)
movabsq $0x656c6946706d6574, %rax # imm = 0x656C6946706D6574
movq %rax, (%r14)
movl $0x7478742e, 0x8(%r14)  # imm = 0x7478742E
movq $0xc, -0x8(%r14)
movb $0x0, 0xc(%r14)
movq -0x68(%rbp), %rcx
movq -0x60(%rbp), %r8
leaq 0xc(%r8), %rax
movl $0xf, %edx
cmpq %r15, %rcx
je 0x3600
movq -0x58(%rbp), %rdx
cmpq $0xf, %rax
ja 0x361d
cmpq %rdx, %rax
jbe 0x361d
leaq -0xf8(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21b0
jmp 0x362e
leaq -0x68(%rbp), %rdi
movl $0xc, %edx
movq %r14, %rsi
callq 0x2080
leaq -0x38(%rbp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x364f
movq %rsi, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x3655
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq -0x318(%rbp), %rdi
leaq -0x48(%rbp), %rsi
movl $0x10, %edx
callq 0x22b0
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x369f
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21a0
movq -0xf8(%rbp), %rdi
cmpq %r14, %rdi
je 0x36ba
movq -0xe8(%rbp), %rsi
incq %rsi
callq 0x21a0
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x36cf
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x21a0
movq %rbx, -0x70(%rbp)
leaq -0x4a8(%rbp), %rdi
callq 0x2050
testb %al, %al
je 0x3911
leaq -0x2a8(%rbp), %rdi
callq 0x2050
testb %al, %al
je 0x3911
leaq -0x90(%rbp), %r12
leaq 0x19fc(%rip), %r13      # 0x5105
leaq -0x318(%rbp), %rbx
leaq -0x520(%rbp), %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x2290
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3889
movl $0x5, %edx
movq %r12, %rdi
xorl %esi, %esi
movq %r13, %rcx
callq 0x21f0
testl %eax, %eax
jne 0x3844
leaq -0xa0(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0xb8(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0xb0(%rbp), %r14
movq %r14, %rdi
callq 0x4142
leaq -0x68(%rbp), %r15
movq %r15, %rdi
movq -0x70(%rbp), %rsi
movq %r14, %rdx
callq 0x3efc
leaq -0x38(%rbp), %r14
movl $0x5, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r13, %rcx
callq 0x21b0
movq %r14, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x37ca
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x37d1
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r12, %rdi
leaq -0x48(%rbp), %rsi
callq 0x21e0
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x3809
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21a0
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x3822
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x21a0
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x3844
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x21a0
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq %rbx, %rdi
callq 0x21c0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
jmp 0x3710
leaq -0x520(%rbp), %rdi
callq 0x2040
leaq -0x318(%rbp), %rdi
callq 0x2200
movq 0x3720(%rip), %rax      # 0x6fc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x310(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x318(%rbp,%rcx)
callq 0x2160
leaq -0x220(%rbp), %rdi
callq 0x2090
leaq -0x520(%rbp), %rdi
callq 0x2060
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x38ff
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x21a0
addq $0x4f8, %rsp            # imm = 0x4F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x70(%rbp), %rdi
callq 0x3e4a
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x21d0
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3945
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21a0
jmp 0x3945
movq %rax, %rbx
movq -0xf8(%rbp), %rdi
cmpq %r14, %rdi
je 0x3960
movq -0xe8(%rbp), %rsi
incq %rsi
callq 0x21a0
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x3a27
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x21a0
jmp 0x3a27
movq %rax, %rbx
jmp 0x3a27
movq %rax, %rbx
leaq -0x108(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x39ad
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x21a0
jmp 0x39ad
movq %rax, %rbx
movq -0xd8(%rbp), %rdi
cmpq %r14, %rdi
je 0x3a33
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x21a0
jmp 0x3a33
movq %rax, %rbx
jmp 0x3a33
jmp 0x3a18
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x39f4
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x21a0
jmp 0x39f4
jmp 0x3a18
movq %rax, %rbx
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x3a1b
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x21a0
jmp 0x3a1b
movq %rax, %rbx
leaq -0x318(%rbp), %rdi
callq 0x2220
leaq -0x520(%rbp), %rdi
callq 0x2060
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x3a4f
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x21a0
movq %rbx, %rdi
callq 0x2260
nop