// File: eiskalteschatten[P]developersnotebook/src/components/Modal.cpp
// Function: Modal::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>>, _GtkWidget*)
Modal::Modal(std::string new_message, std::string new_sub_message, GtkWidget *window) {
    message       = new_message;
    sub_message   = new_sub_message;
    parent_window = window;

    #ifndef __APPLE__
        const int grid_spacing = 10;

        main_grid = gtk_grid_new();
        gtk_widget_set_halign(main_grid, GTK_ALIGN_FILL);
        gtk_widget_set_valign(main_grid, GTK_ALIGN_FILL);
        gtk_grid_set_column_spacing(GTK_GRID(main_grid), grid_spacing);
        gtk_grid_set_row_spacing(GTK_GRID(main_grid), grid_spacing);
        gtk_container_set_border_width(GTK_CONTAINER(main_grid), grid_spacing);

        gtk_grid_insert_row(GTK_GRID(main_grid), 0);
        gtk_grid_insert_row(GTK_GRID(main_grid), 1);
        gtk_grid_insert_column(GTK_GRID(main_grid), 0);
        gtk_grid_insert_column(GTK_GRID(main_grid), 1);

        // Message
        GtkWidget *message_label = gtk_label_new(NULL);
        const gchar *format_msg  = "<span font_weight=\"heavy\">\%s</span>";
        const gchar *msg_markup  = g_markup_printf_escaped(format_msg, message.c_str());
        gtk_label_set_markup(GTK_LABEL(message_label), msg_markup);
        gtk_widget_set_halign(message_label, GTK_ALIGN_START);
        gtk_grid_attach(GTK_GRID(main_grid), message_label, 1, 0, 1, 1);

        // Sub message
        GtkWidget *sub_message_label = gtk_label_new(sub_message.c_str());
        gtk_widget_set_halign(sub_message_label, GTK_ALIGN_START);
        gtk_grid_attach(GTK_GRID(main_grid), sub_message_label, 1, 1, 1, 1);
    #endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rsi, -0x58(%rbp)
movq %rdx, -0x78(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x70(%rbp)
addq $0x10, %rdi
movq %rdi, -0x60(%rbp)
callq 0xa5c0
movq -0x70(%rbp), %rdi
addq $0x30, %rdi
movq %rdi, -0x68(%rbp)
callq 0xa5c0
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0xb240
jmp 0x520a8
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdi
addq $0x30, %rdi
callq 0xb240
jmp 0x520bb
movq -0x70(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, (%rax)
movl $0xa, -0x30(%rbp)
callq 0xaea0
movq %rax, -0x80(%rbp)
jmp 0x520d8
movq -0x70(%rbp), %rax
movq -0x80(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0xaff0
jmp 0x520f1
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0xb190
jmp 0x52102
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x90(%rbp)
callq 0xac20
movq -0x90(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0x88(%rbp)
jmp 0x5212e
movq -0x88(%rbp), %rdi
movl $0xa, %esi
callq 0xa2d0
jmp 0x52141
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xa0(%rbp)
callq 0xac20
movq -0xa0(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0x98(%rbp)
jmp 0x5216d
movq -0x98(%rbp), %rdi
movl $0xa, %esi
callq 0xa5f0
jmp 0x52180
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xb0(%rbp)
callq 0xac10
movq -0xb0(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0xa8(%rbp)
jmp 0x521ac
movq -0xa8(%rbp), %rdi
movl $0xa, %esi
callq 0xb350
jmp 0x521bf
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xc0(%rbp)
callq 0xac20
movq -0xc0(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0xb8(%rbp)
jmp 0x521eb
movq -0xb8(%rbp), %rdi
xorl %esi, %esi
callq 0xa400
jmp 0x521fb
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xd0(%rbp)
callq 0xac20
movq -0xd0(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0xc8(%rbp)
jmp 0x52227
movq -0xc8(%rbp), %rdi
movl $0x1, %esi
callq 0xa400
jmp 0x5223a
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xe0(%rbp)
callq 0xac20
movq -0xe0(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0xd8(%rbp)
jmp 0x52266
movq -0xd8(%rbp), %rdi
xorl %esi, %esi
callq 0xa930
jmp 0x52276
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xf0(%rbp)
callq 0xac20
movq -0xf0(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0xe8(%rbp)
jmp 0x522a2
movq -0xe8(%rbp), %rdi
movl $0x1, %esi
callq 0xa930
jmp 0x522b5
xorl %eax, %eax
movl %eax, %edi
callq 0xaa60
movq %rax, -0xf8(%rbp)
jmp 0x522c7
movq -0x70(%rbp), %rdi
movq -0xf8(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq 0x2746(%rip), %rax      # 0x54a23
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x108(%rbp)
addq $0x10, %rdi
callq 0xa1d0
movq -0x108(%rbp), %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xa370
movq %rax, -0x100(%rbp)
jmp 0x5230f
movq -0x100(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x118(%rbp)
callq 0xb0d0
movq -0x118(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0x110(%rbp)
jmp 0x52342
movq -0x110(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0xaf20
jmp 0x52354
movq -0x38(%rbp), %rdi
movl $0x1, %esi
callq 0xaff0
jmp 0x52364
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x128(%rbp)
callq 0xac20
movq -0x128(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0x120(%rbp)
jmp 0x52390
movq -0x120(%rbp), %rdi
movq -0x38(%rbp), %rsi
xorl %ecx, %ecx
movl $0x1, %r9d
movl %r9d, %edx
movl %r9d, %r8d
callq 0xad40
jmp 0x523b0
movq -0x70(%rbp), %rdi
addq $0x30, %rdi
callq 0xa1d0
movq %rax, %rdi
callq 0xaa60
movq %rax, -0x130(%rbp)
jmp 0x523ce
movq -0x130(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
movl $0x1, %esi
callq 0xaff0
jmp 0x523e9
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x140(%rbp)
callq 0xac20
movq -0x140(%rbp), %rdi
movq %rax, %rsi
callq 0xa190
movq %rax, -0x138(%rbp)
jmp 0x52415
movq -0x138(%rbp), %rdi
movq -0x50(%rbp), %rsi
movl $0x1, %r9d
movl %r9d, %edx
movl %r9d, %ecx
movl %r9d, %r8d
callq 0xad40
jmp 0x52436
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
movq -0x68(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0xb430
movq -0x60(%rbp), %rdi
callq 0xb430
movq -0x28(%rbp), %rdi
callq 0xaa00
nopw %cs:(%rax,%rax)