// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/src/startgtk_game.c
// Function: on_startbutton_clicked
static void on_startbutton_clicked(GtkButton *button, gpointer user_data)
{
    int mode = -1;
    GtkTreeIter iter;

    (void)button; (void)user_data;

    if (gtk_combo_box_get_active_iter(GTK_COMBO_BOX(controls.vmode3dcombo), &iter)) {
        gtk_tree_model_get(GTK_TREE_MODEL(controls.vmode3dlist), &iter, 1 /*index*/, &mode, -1);
    }
    if (mode >= 0) {
        settings->xdim3d = validmode[mode].xdim;
        settings->ydim3d = validmode[mode].ydim;
        settings->bpp3d = validmode[mode].bpp;
        settings->fullscreen = validmode[mode].fs;
    }

    settings->usemouse = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(controls.usemousecheck));
    settings->usejoy = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(controls.usejoystickcheck));

    mode = -1;
    if (gtk_combo_box_get_active_iter(GTK_COMBO_BOX(controls.soundqualitycombo), &iter)) {
        gtk_tree_model_get(GTK_TREE_MODEL(controls.soundqualitylist), &iter, 1 /*index*/, &mode, -1);
    }
    if (mode >= 0) {
        settings->samplerate = soundQualities[mode].frequency;
        settings->bitspersample = soundQualities[mode].samplesize;
        settings->channels = soundQualities[mode].channels;
    }

    settings->forcesetup = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(controls.alwaysshowcheck));

    startwinloop = FALSE;   // Break the loop.
    retval = STARTWIN_RUN;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl $0xffffffff, 0xc(%rsp)  # imm = 0xFFFFFFFF
movq 0x2fca83(%rip), %r14    # 0x32eeb0
callq 0x88d0
movq %rax, %rbx
movq %r14, %rdi
movq %rax, %rsi
callq 0x8160
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x91b0
testl %eax, %eax
je 0x324c0
movq 0x2fca60(%rip), %r14    # 0x32eeb8
callq 0x85c0
movq %r14, %rdi
movq %rax, %rsi
callq 0x8160
leaq 0x10(%rsp), %rsi
leaq 0xc(%rsp), %r14
movq %rax, %rdi
movl $0x1, %edx
movq %r14, %rcx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %eax, %eax
callq 0x8970
movslq (%r14), %rax
testq %rax, %rax
js 0x324c0
shlq $0x4, %rax
leaq 0x5ba833(%rip), %rcx    # 0x5eccd0
movl (%rcx,%rax), %edx
movq 0x2fca69(%rip), %rsi    # 0x32ef10
movl %edx, 0x4(%rsi)
movl 0x4(%rcx,%rax), %edx
movl %edx, 0x8(%rsi)
movzbl 0x8(%rcx,%rax), %edx
movl %edx, 0xc(%rsi)
movzbl 0x9(%rcx,%rax), %eax
movl %eax, (%rsi)
movq 0x2fca01(%rip), %r15    # 0x32eec8
callq 0x90f0
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
callq 0x8160
movq %rax, %rdi
callq 0x8400
movq 0x2fca27(%rip), %rcx    # 0x32ef10
movl %eax, 0x14(%rcx)
movq 0x2fc9dd(%rip), %rdi    # 0x32eed0
movq %r14, %rsi
callq 0x8160
movq %rax, %rdi
callq 0x8400
movq 0x2fca06(%rip), %rcx    # 0x32ef10
movl %eax, 0x18(%rcx)
movl $0xffffffff, 0xc(%rsp)  # imm = 0xFFFFFFFF
movq 0x2fc9bc(%rip), %rdi    # 0x32eed8
movq %rbx, %rsi
callq 0x8160
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x91b0
testl %eax, %eax
je 0x3256b
movq 0x2fc9a4(%rip), %rbx    # 0x32eee0
callq 0x85c0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8160
leaq 0x10(%rsp), %rsi
leaq 0xc(%rsp), %rcx
movq %rax, %rdi
movl $0x1, %edx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %eax, %eax
callq 0x8970
movslq 0xc(%rsp), %rax
testq %rax, %rax
js 0x3259b
leaq (%rax,%rax,2), %rax
leaq 0xa0420(%rip), %rcx     # 0xd29a0
movl (%rcx,%rax,4), %edx
movq 0x2fc986(%rip), %rsi    # 0x32ef10
movl %edx, 0x1c(%rsi)
movl 0x4(%rcx,%rax,4), %edx
movl %edx, 0x20(%rsi)
movl 0x8(%rcx,%rax,4), %eax
movl %eax, 0x24(%rsi)
movq 0x2fc8fe(%rip), %rdi    # 0x32eea0
movq %r14, %rsi
callq 0x8160
movq %rax, %rdi
callq 0x8400
movq 0x2fc957(%rip), %rcx    # 0x32ef10
movl %eax, 0x10(%rcx)
movb $0x0, 0x2fc8b9(%rip)    # 0x32ee7c
movl $0x1, 0xa03c3(%rip)     # 0xd2990
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq