// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/src/startgtk_game.c
// Function: startwin_puts_inner
static gboolean startwin_puts_inner(gpointer str)
{
    GtkTextBuffer *textbuffer;
    GtkTextIter enditer;
    GtkTextMark *mark;
    const char *aptr, *bptr;

    textbuffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(controls.messagestext));

    gtk_text_buffer_get_end_iter(textbuffer, &enditer);
    for (aptr = bptr = (const char *)str; *aptr != 0; ) {
        switch (*bptr) {
            case '\b':
                if (bptr > aptr) {
                    // Insert any normal characters seen so far.
                    gtk_text_buffer_insert(textbuffer, &enditer, (const gchar *)aptr, (gint)(bptr-aptr)-1);
                }
                gtk_text_buffer_backspace(textbuffer, &enditer, FALSE, TRUE);
                aptr = ++bptr;
                break;
            case 0:
                if (bptr > aptr) {
                    gtk_text_buffer_insert(textbuffer, &enditer, (const gchar *)aptr, (gint)(bptr-aptr));
                }
                aptr = bptr;
                break;
            default:
                bptr++;
                break;
        }
    }

    mark = gtk_text_buffer_create_mark(textbuffer, NULL, &enditer, 1);
    gtk_text_view_scroll_to_mark(GTK_TEXT_VIEW(controls.messagestext), mark, 0.0, FALSE, 0.0, 1.0);
    gtk_text_buffer_delete_mark(textbuffer, mark);

    free(str);
    return FALSE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq 0x32e012(%rip), %rax    # 0x377e58
movq %rax, -0x80(%rbp)
callq 0x8910
movq -0x80(%rbp), %rdi
movq %rax, %rsi
callq 0x8150
movq %rax, %rdi
callq 0x8330
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x8e30
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x49f48
movq -0x78(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x84(%rbp)
testl %eax, %eax
je 0x49f05
jmp 0x49ea3
movl -0x84(%rbp), %eax
subl $0x8, %eax
jne 0x49f37
jmp 0x49eb4
movq -0x78(%rbp), %rax
cmpq -0x70(%rbp), %rax
jbe 0x49edf
movq -0x10(%rbp), %rdi
movq -0x70(%rbp), %rdx
movq -0x78(%rbp), %rax
movq -0x70(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
subl $0x1, %ecx
leaq -0x60(%rbp), %rsi
callq 0x8bb0
movq -0x10(%rbp), %rdi
leaq -0x60(%rbp), %rsi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x8780
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
movq %rax, -0x70(%rbp)
jmp 0x49f43
movq -0x78(%rbp), %rax
cmpq -0x70(%rbp), %rax
jbe 0x49f2d
movq -0x10(%rbp), %rdi
movq -0x70(%rbp), %rdx
movq -0x78(%rbp), %rax
movq -0x70(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
leaq -0x60(%rbp), %rsi
callq 0x8bb0
movq -0x78(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0x49f43
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x49e80
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq -0x60(%rbp), %rdx
movl $0x1, %ecx
callq 0x8d80
movq %rax, -0x68(%rbp)
movq 0x32deef(%rip), %rax    # 0x377e58
movq %rax, -0x90(%rbp)
callq 0x8910
movq -0x90(%rbp), %rdi
movq %rax, %rsi
callq 0x8150
movq %rax, %rdi
movq -0x68(%rbp), %rsi
xorps %xmm1, %xmm1
xorl %edx, %edx
movsd 0xa54c0(%rip), %xmm2    # 0xef458
movaps %xmm1, %xmm0
callq 0x8030
movq -0x10(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x8050
movq -0x8(%rbp), %rdi
callq 0x8260
xorl %eax, %eax
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)