// File: /workspace/github_c_makefile_star2_O1/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 0x2fad8c(%rip), %r14    # 0x32be90
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 0x3115e
movq 0x2fad69(%rip), %r14    # 0x32be98
callq 0x85c0
movq %r14, %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 0x31196
shlq $0x4, %rax
leaq 0x5b8b3d(%rip), %rcx    # 0x5e9cb0
movl (%rcx,%rax), %edx
movq 0x2fad73(%rip), %rsi    # 0x32bef0
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 0x2fad0b(%rip), %r15    # 0x32bea8
callq 0x90f0
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
callq 0x8160
movq %rax, %rdi
callq 0x8400
movq 0x2fad31(%rip), %rcx    # 0x32bef0
movl %eax, 0x14(%rcx)
movq 0x2face7(%rip), %rdi    # 0x32beb0
movq %r14, %rsi
callq 0x8160
movq %rax, %rdi
callq 0x8400
movq 0x2fad10(%rip), %rcx    # 0x32bef0
movl %eax, 0x18(%rcx)
movl $0xffffffff, 0xc(%rsp)  # imm = 0xFFFFFFFF
movq 0x2facc6(%rip), %rdi    # 0x32beb8
movq %rbx, %rsi
callq 0x8160
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x91b0
testl %eax, %eax
je 0x31241
movq 0x2facae(%rip), %rbx    # 0x32bec0
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 0x31271
leaq (%rax,%rax,2), %rax
leaq 0x9e74a(%rip), %rcx     # 0xcf9a0
movl (%rcx,%rax,4), %edx
movq 0x2fac90(%rip), %rsi    # 0x32bef0
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 0x2fac08(%rip), %rdi    # 0x32be80
movq %r14, %rsi
callq 0x8160
movq %rax, %rdi
callq 0x8400
movq 0x2fac61(%rip), %rcx    # 0x32bef0
movl %eax, 0x10(%rcx)
movb $0x0, 0x2fabc3(%rip)    # 0x32be5c
movl $0x1, 0x9e6ed(%rip)     # 0xcf990
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq