// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/src/startgtk_game.c
// Function: populate_sound_quality
static void populate_sound_quality(gboolean firsttime)
{
    int i, curidx = -1;
    char modestr[64];
    GtkTreeIter iter;

    if (firsttime) {
        for (i = 0; soundQualities[i].frequency > 0; i++) {
            if (soundQualities[i].frequency == settings->samplerate &&
                soundQualities[i].samplesize == settings->bitspersample &&
                soundQualities[i].channels == settings->channels) {
                curidx = i;
                break;
            }
        }
        if (curidx < 0) {
            soundQualities[i].frequency = settings->samplerate;
            soundQualities[i].samplesize = settings->bitspersample;
            soundQualities[i].channels = settings->channels;
        }
    }

    gtk_list_store_clear(controls.soundqualitylist);
    for (i = 0; soundQualities[i].frequency > 0; i++) {
        sprintf(modestr, "%d kHz, %d-bit, %s",
            soundQualities[i].frequency / 1000,
            soundQualities[i].samplesize,
            soundQualities[i].channels == 1 ? "Mono" : "Stereo");
        gtk_list_store_insert_with_values(controls.soundqualitylist,
            &iter, -1,
            0, modestr, 1, i, -1);
        if (i == curidx) {
            gtk_combo_box_set_active_iter(GTK_COMBO_BOX(controls.soundqualitycombo), &iter);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movl %edi, -0x4(%rbp)
movl $0xffffffff, -0xc(%rbp) # imm = 0xFFFFFFFF
cmpl $0x0, -0x4(%rbp)
je 0x4afdb
movl $0x0, -0x8(%rbp)
movslq -0x8(%rbp), %rcx
leaq 0xd00ff(%rip), %rax     # 0x11aff0
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, (%rax)
jle 0x4af77
movslq -0x8(%rbp), %rcx
leaq 0xd00e8(%rip), %rax     # 0x11aff0
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movq 0x32cfa8(%rip), %rcx    # 0x377ec0
cmpl 0x1c(%rcx), %eax
jne 0x4af67
movslq -0x8(%rbp), %rcx
leaq 0xd00c8(%rip), %rax     # 0x11aff0
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq 0x32cf87(%rip), %rcx    # 0x377ec0
cmpl 0x20(%rcx), %eax
jne 0x4af67
movslq -0x8(%rbp), %rcx
leaq 0xd00a7(%rip), %rax     # 0x11aff0
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movq 0x32cf66(%rip), %rcx    # 0x377ec0
cmpl 0x24(%rcx), %eax
jne 0x4af67
movl -0x8(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x4af77
jmp 0x4af69
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x4aee6
cmpl $0x0, -0xc(%rbp)
jge 0x4afd9
movq 0x32cf3c(%rip), %rax    # 0x377ec0
movl 0x1c(%rax), %ecx
movslq -0x8(%rbp), %rdx
leaq 0xd005e(%rip), %rax     # 0x11aff0
imulq $0xc, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq 0x32cf1e(%rip), %rax    # 0x377ec0
movl 0x20(%rax), %ecx
movslq -0x8(%rbp), %rdx
leaq 0xd0040(%rip), %rax     # 0x11aff0
imulq $0xc, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movq 0x32ceff(%rip), %rax    # 0x377ec0
movl 0x24(%rax), %ecx
movslq -0x8(%rbp), %rdx
leaq 0xd0021(%rip), %rax     # 0x11aff0
imulq $0xc, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
jmp 0x4afdb
movq 0x32ceae(%rip), %rdi    # 0x377e90
callq 0x84a0
movl $0x0, -0x8(%rbp)
movslq -0x8(%rbp), %rcx
leaq 0xcfff7(%rip), %rax     # 0x11aff0
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, (%rax)
jle 0x4b0e9
leaq -0x50(%rbp), %rdi
movslq -0x8(%rbp), %rcx
leaq 0xcffd8(%rip), %rax     # 0x11aff0
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl $0x3e8, %ecx            # imm = 0x3E8
cltd
idivl %ecx
movl %eax, %edx
movslq -0x8(%rbp), %rcx
leaq 0xcffba(%rip), %rax     # 0x11aff0
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %ecx
movslq -0x8(%rbp), %rsi
leaq 0xcffa5(%rip), %rax     # 0x11aff0
imulq $0xc, %rsi, %rsi
addq %rsi, %rax
movl 0x8(%rax), %esi
leaq 0xa46fa(%rip), %r8      # 0xef756
leaq 0xa46ee(%rip), %rax     # 0xef751
cmpl $0x1, %esi
cmoveq %rax, %r8
leaq 0xa46cd(%rip), %rsi     # 0xef73e
movb $0x0, %al
callq 0x8e50
movq 0x32ce11(%rip), %rdi    # 0x377e90
leaq -0x50(%rbp), %r8
movl -0x8(%rbp), %eax
leaq -0x70(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
movl $0x1, %r9d
movl %eax, (%rsp)
movl $0xffffffff, 0x8(%rsp)  # imm = 0xFFFFFFFF
movb $0x0, %al
callq 0x8a00
movl -0x8(%rbp), %eax
cmpl -0xc(%rbp), %eax
jne 0x4b0d9
movq 0x32cdd0(%rip), %rax    # 0x377e88
movq %rax, -0x78(%rbp)
callq 0x8850
movq -0x78(%rbp), %rdi
movq %rax, %rsi
callq 0x8150
movq %rax, %rdi
leaq -0x70(%rbp), %rsi
callq 0x86c0
jmp 0x4b0db
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x4afee
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)