// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x2556(%rip), %rdi      # 0x23797
pushq $0x6
popq %rsi
callq 0x8a40
movq %rax, %r12
movq 0x8(%rbx), %r13
callq 0x89f0
movq %r13, %rdi
movq %rax, %rsi
callq 0x8150
pushq $0x1
popq %rbp
pushq $0x2
popq %r13
movq %rax, %rdi
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movl %ebp, %r8d
movl %r13d, %r9d
callq 0x8b00
movq (%rbx), %r12
callq 0x8f80
movq %r12, %rdi
movq %rax, %rsi
callq 0x8150
movq (%r15), %rcx
movq (%r14), %r9
leaq 0x16c9(%rip), %rdi      # 0x22965
pushq $-0x2
popq %r8
movq %rax, %rsi
movl %r13d, %edx
xorl %eax, %eax
pushq $0x0
pushq $-0x3
callq 0x8800
popq %rcx
popq %rdx
movq %rax, %r14
callq 0x89e0
movq %r14, %rdi
movq %rax, %rsi
callq 0x8150
pushq $0xa
popq %rsi
movq %rax, %rdi
callq 0x9050
callq 0x88a0
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x8150
movq %rax, %rdi
callq 0x8040
movq %rax, %r12
callq 0x8930
movq %r12, %rdi
movq %rax, %rsi
callq 0x8150
movq 0x8(%rbx), %rsi
movq %rax, %rdi
movl %ebp, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x8270
movq %r14, %rdi
callq 0x8cc0
movq %r14, %rdi
movq %r15, %rsi
callq 0x8150
movq %rax, %rdi
callq 0x8340
movl %eax, %ebx
movq %r14, %rdi
callq 0x81a0
xorl %eax, %eax
cmpl $-0x3, %ebx
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq