// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/startgtk_game.c
// Function: startwin_run
int startwin_run(struct startwin_settings *settings)
{
    if (!gtkenabled || !startwin) return STARTWIN_RUN;

    set_settings(settings);
    setup_config_mode();
    startwinloop = TRUE;
    while (startwinloop) {
        gtk_main_iteration_do(TRUE);
    }
    setup_messages_mode(FALSE);
    set_settings(NULL);

    return retval;
}

// Assembly:
leaq 0xc5d361(%rip), %rax    # 0xc8e074
cmpl $0x0, (%rax)
movl $0x1, %eax
je 0x31064
cmpq $0x0, 0x2fb127(%rip)    # 0x32be50
je 0x31064
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, 0x2fb1ac(%rip)    # 0x32bef0
movq 0x2fb125(%rip), %rbx    # 0x32be70
callq 0x8fd0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8160
xorl %ebp, %ebp
movq %rax, %rdi
xorl %esi, %esi
callq 0x9230
movq 0x2fb10a(%rip), %rbx    # 0x32be78
callq 0x8b90
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8160
leaq 0xb02(%rip), %rsi       # 0x31887
movl $0x1, %edx
movq %rax, %rdi
callq 0x8bb0
movq 0x2fb0e7(%rip), %r14    # 0x32be80
callq 0x90f0
movq %rax, %rbx
movq %r14, %rdi
movq %rax, %rsi
callq 0x8160
movq 0x2fb13d(%rip), %rcx    # 0x32bef0
movl 0x10(%rcx), %esi
movq %rax, %rdi
callq 0x9250
movq 0x2fb0bb(%rip), %rdi    # 0x32be80
movl $0x1, %esi
callq 0x91a0
movq 0x2fb0ca(%rip), %rdi    # 0x32bea0
movq %rbx, %rsi
callq 0x8160
movq 0x2fb10b(%rip), %rcx    # 0x32bef0
movl (%rcx), %esi
movq %rax, %rdi
callq 0x9250
movq 0x2fb0aa(%rip), %rdi    # 0x32bea0
movl $0x1, %esi
callq 0x91a0
movl $0x1, %edi
callq 0x3157c
movq 0x2fb07f(%rip), %rdi    # 0x32be90
movl $0x1, %esi
callq 0x91a0
movq 0x2fb086(%rip), %rdi    # 0x32bea8
movq %rbx, %rsi
callq 0x8160
movq 0x2fb0bf(%rip), %rcx    # 0x32bef0
movl 0x14(%rcx), %esi
movq %rax, %rdi
callq 0x9250
movq 0x2fb065(%rip), %rdi    # 0x32bea8
movl $0x1, %esi
callq 0x91a0
movq 0x2fb05c(%rip), %rdi    # 0x32beb0
movq %rbx, %rsi
callq 0x8160
movq 0x2fb08d(%rip), %rcx    # 0x32bef0
movl 0x18(%rcx), %esi
movq %rax, %rdi
callq 0x9250
movq 0x2fb03b(%rip), %rdi    # 0x32beb0
movl $0x1, %esi
callq 0x91a0
movl 0x9eb1b(%rip), %esi     # 0xcf9a0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl %esi, %esi
jle 0x30ec2
movq 0x2fb05b(%rip), %rcx    # 0x32bef0
movl 0x1c(%rcx), %edx
leaq 0x9eb01(%rip), %rax     # 0xcf9a0
cmpl %edx, %esi
jne 0x30eb3
movl 0x4(%rax), %esi
cmpl 0x20(%rcx), %esi
jne 0x30eb3
movl 0x8(%rax), %esi
cmpl 0x24(%rcx), %esi
je 0x30ecb
movl 0xc(%rax), %esi
addq $0xc, %rax
incl %ebp
testl %esi, %esi
jg 0x30e9f
jmp 0x30ecd
leaq 0x9ead7(%rip), %rax     # 0xcf9a0
jmp 0x30ecd
movl %ebp, %ebx
testl %ebx, %ebx
jns 0x30ee9
movq 0x2fb018(%rip), %rcx    # 0x32bef0
movl 0x1c(%rcx), %edx
movl %edx, (%rax)
movl 0x20(%rcx), %edx
movl %edx, 0x4(%rax)
movl 0x24(%rcx), %ecx
movl %ecx, 0x8(%rax)
movq 0x2fafd0(%rip), %rdi    # 0x32bec0
callq 0x84e0
movl 0x9eaa5(%rip), %eax     # 0xcf9a0
testl %eax, %eax
jle 0x30fcf
movl %ebx, %ecx
movq %rcx, 0x8(%rsp)
leaq 0x9ea9b(%rip), %rbp     # 0xcf9ac
leaq 0x715c1(%rip), %r12     # 0xa24d9
leaq 0x715bf(%rip), %r15     # 0xa24de
leaq 0x715a0(%rip), %r14     # 0xa24c6
xorl %ebx, %ebx
movl %eax, %eax
imulq $0x10624dd3, %rax, %rdx # imm = 0x10624DD3
shrq $0x26, %rdx
cmpl $0x1, -0x4(%rbp)
movl -0x8(%rbp), %ecx
movq %r15, %r8
cmoveq %r12, %r8
leaq 0x30(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x8f20
movq 0x2faf64(%rip), %rdi    # 0x32bec0
leaq 0x10(%rsp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
movq %r13, %r8
movl $0x1, %r9d
xorl %eax, %eax
pushq $-0x1
pushq %rbx
callq 0x8aa0
addq $0x10, %rsp
cmpq %rbx, 0x8(%rsp)
jne 0x30fbd
movq %r15, %r13
movq %r12, %r15
movq 0x2faf25(%rip), %r12    # 0x32beb8
callq 0x88d0
movq %r12, %rdi
movq %r15, %r12
movq %r13, %r15
leaq 0x7151e(%rip), %r14     # 0xa24c6
movq %rax, %rsi
callq 0x8160
movq %rax, %rdi
leaq 0x10(%rsp), %rsi
callq 0x8730
incq %rbx
movl (%rbp), %eax
addq $0xc, %rbp
testl %eax, %eax
jg 0x30f28
movq 0x2faee2(%rip), %rdi    # 0x32beb8
movl $0x1, %esi
callq 0x91a0
movq 0x2faee1(%rip), %rdi    # 0x32bec8
movl $0x1, %esi
callq 0x91a0
movq 0x2faed8(%rip), %rdi    # 0x32bed0
movl $0x1, %esi
callq 0x91a0
movq 0x2fae5f(%rip), %rdi    # 0x32be68
movl $0x1, %esi
callq 0x91a0
movq 0x2fae46(%rip), %rdi    # 0x32be60
movl $0x1, %esi
callq 0x91a0
movb $0x1, 0x2fae31(%rip)    # 0x32be5c
movl $0x1, %edi
callq 0x8570
cmpb $0x0, 0x2fae20(%rip)    # 0x32be5c
jne 0x3102b
xorl %edi, %edi
callq 0x30a7e
movq $0x0, 0x2faea0(%rip) # 0x32bef0
movl 0x9e93a(%rip), %eax     # 0xcf990
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq