// File: /workspace/github_cpp_makefile_star2_O1/eiskalteschatten[P]developersnotebook/src/components/Modal.cpp
// Function: Modal::show_confirm_modal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int Modal::show_confirm_modal(std::string accept_button, std::string reject_button) {
    #ifdef __APPLE__
        int result = mac_show_confirm_modal(message, sub_message, accept_button, reject_button);
        return result == NSAlertFirstButtonReturn ? MODAL_RESPONSE_ACCEPT : MODAL_RESPONSE_REJECT;
    #else
        GtkWidget *image = gtk_image_new_from_icon_name("dialog-warning", GTK_ICON_SIZE_DIALOG);
        gtk_grid_attach(GTK_GRID(main_grid), image, 0, 0, 1, 2);

        GtkDialogFlags flags = GTK_DIALOG_DESTROY_WITH_PARENT;
        GtkWidget *dialog    = gtk_dialog_new_with_buttons("",
                                                           GTK_WINDOW(parent_window),
                                                           flags,
                                                           reject_button.c_str(),
                                                           GTK_RESPONSE_REJECT,
                                                           accept_button.c_str(),
                                                           GTK_RESPONSE_ACCEPT,
                                                           NULL);

        gtk_container_set_border_width(GTK_CONTAINER(dialog), 10);

        GtkWidget *content_area = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
        gtk_box_pack_start(GTK_BOX(content_area), main_grid, TRUE, FALSE, 0);
        gtk_widget_show_all(dialog);

        int result = gtk_dialog_run(GTK_DIALOG(dialog));

        gtk_widget_destroy(dialog);

        return result == GTK_RESPONSE_ACCEPT ? MODAL_RESPONSE_ACCEPT : MODAL_RESPONSE_REJECT;
    #endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1aec(%rip), %rdi      # 0x2a78b
movl $0x6, %esi
callq 0x8a20
movq %rax, %r12
movq 0x8(%rbx), %r13
callq 0x89d0
movq %r13, %rdi
movq %rax, %rsi
callq 0x8150
movq %rax, %rdi
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
movl $0x2, %r9d
callq 0x8ac0
movq (%rbx), %r12
callq 0x8f40
movq %r12, %rdi
movq %rax, %rsi
callq 0x8150
movq (%r15), %rcx
movq (%r14), %r9
leaq 0xc5a(%rip), %rdi       # 0x29955
movq %rax, %rsi
movl $0x2, %edx
movl $0xfffffffe, %r8d       # imm = 0xFFFFFFFE
xorl %eax, %eax
pushq $0x0
pushq $-0x3
callq 0x87c0
addq $0x10, %rsp
movq %rax, %r14
callq 0x89c0
movq %r14, %rdi
movq %rax, %rsi
callq 0x8150
movq %rax, %rdi
movl $0xa, %esi
callq 0x9000
callq 0x8860
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x8150
movq %rax, %rdi
callq 0x8040
movq %rax, %r12
callq 0x88f0
movq %r12, %rdi
movq %rax, %rsi
callq 0x8150
movq 0x8(%rbx), %rsi
movq %rax, %rdi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x8260
movq %r14, %rdi
callq 0x8c70
movq %r14, %rdi
movq %r15, %rsi
callq 0x8150
movq %rax, %rdi
callq 0x8330
movl %eax, %ebx
movq %r14, %rdi
callq 0x8180
xorl %eax, %eax
cmpl $-0x3, %ebx
setne %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq