// File: /workspace/github_c_makefile_star2_O2/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
orl $-0x1, 0xc(%rsp)
movq 0x2f66b3(%rip), %r14    # 0x324eb0
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 0x2e88c
movq 0x2f6690(%rip), %r14    # 0x324eb8
callq 0x85c0
movq %r14, %rdi
movq %rax, %rsi
callq 0x8160
leaq 0x10(%rsp), %rsi
pushq $0x1
popq %rdx
leaq 0xc(%rsp), %r14
pushq $-0x1
popq %r8
movq %rax, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x8970
movslq (%r14), %rax
testq %rax, %rax
js 0x2e88c
shlq $0x4, %rax
leaq 0x5b4467(%rip), %rcx    # 0x5e2cd0
movl (%rcx,%rax), %edx
movq 0x2f669d(%rip), %rsi    # 0x324f10
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 0x2f6635(%rip), %r15    # 0x324ec8
callq 0x90f0
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
callq 0x8160
movq %rax, %rdi
callq 0x8400
movq 0x2f665b(%rip), %rcx    # 0x324f10
movl %eax, 0x14(%rcx)
movq 0x2f6611(%rip), %rdi    # 0x324ed0
movq %r14, %rsi
callq 0x8160
movq %rax, %rdi
callq 0x8400
movq 0x2f663a(%rip), %rcx    # 0x324f10
movl %eax, 0x18(%rcx)
orl $-0x1, 0xc(%rsp)
movq 0x2f65f3(%rip), %rdi    # 0x324ed8
movq %rbx, %rsi
callq 0x8160
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x91b0
testl %eax, %eax
je 0x2e930
movq 0x2f65db(%rip), %rbx    # 0x324ee0
callq 0x85c0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8160
leaq 0x10(%rsp), %rsi
pushq $0x1
popq %rdx
leaq 0xc(%rsp), %rcx
pushq $-0x1
popq %r8
movq %rax, %rdi
xorl %eax, %eax
callq 0x8970
movslq 0xc(%rsp), %rax
testq %rax, %rax
js 0x2e95b
imulq $0xc, %rax, %rax
leaq 0x9a05b(%rip), %rcx     # 0xc89a0
movq 0x2f65c4(%rip), %rdx    # 0x324f10
movq (%rax,%rcx), %rsi
movq %rsi, 0x1c(%rdx)
movl 0x8(%rax,%rcx), %eax
movl %eax, 0x24(%rdx)
movq 0x2f653e(%rip), %rdi    # 0x324ea0
movq %r14, %rsi
callq 0x8160
movq %rax, %rdi
callq 0x8400
movq 0x2f6597(%rip), %rcx    # 0x324f10
movl %eax, 0x10(%rcx)
movb $0x0, 0x2f64f9(%rip)    # 0x324e7c
movl $0x1, 0x9a003(%rip)     # 0xc8990
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq