// File: /workspace/github_c_makefile_star2_O0/mirth-lang[P]mirth/bin/mirth1.c
// Function: str_pushn
static STR* str_pushn (STR* s, const char* p, USIZE n2) {
    if (n2 == 0) return s;
    ASSERT(s && p);
    ASSERT(n2 <= SIZE_MAX);
    USIZE m = s->cap;
    USIZE n1 = s->size;
    ASSERT(n1 <= SIZE_MAX-n2);
    ASSERT(4 <= SIZE_MAX-n1-n2);
    if ((s->refs == 1) && (n1 + n2 + 4 <= m)) {
        memcpy(s->data + n1, p, (size_t)n2);
        s->size += n2;
        ASSERT(s->size + 4 <= s->cap);
        return s;
    } else {
        USIZE m2 = n1 + n2 + 4;
        if ((s->refs == 1) && (m <= SIZE_MAX-m) && (m2 < m*2)) m2 = m*2;
        STR* str = str_alloc(m2);
        str->size = n1+n2;
        memcpy(str->data, s->data, (size_t)n1);
        memcpy(str->data+n1, p, (size_t)n2);
        decref(MKSTR(s));
        return str;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x1f51b
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1f843
jmp 0x1f51d
cmpq $0x0, -0x10(%rbp)
je 0x1f52b
cmpq $0x0, -0x18(%rbp)
jne 0x1f555
movl $0x2, %edi
leaq 0x335208(%rip), %rsi    # 0x35473f
movl $0x33, %edx
callq 0x5060
callq 0x5310
callq 0x53b0
movl $0x1, %edi
callq 0x5130
jmp 0x1f557
jmp 0x1f559
cmpq $-0x1, -0x20(%rbp)
jbe 0x1f58a
movl $0x2, %edi
leaq 0x335207(%rip), %rsi    # 0x354773
movl $0x3b, %edx
callq 0x5060
callq 0x5310
callq 0x53b0
movl $0x1, %edi
callq 0x5130
jmp 0x1f58c
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq $-0x1, %rcx
subq -0x20(%rbp), %rcx
cmpq %rcx, %rax
jbe 0x1f5e2
movl $0x2, %edi
leaq 0x3351eb(%rip), %rsi    # 0x3547af
movl $0x3e, %edx
callq 0x5060
callq 0x5310
callq 0x53b0
movl $0x1, %edi
callq 0x5130
jmp 0x1f5e4
jmp 0x1f5e6
movq $-0x1, %rcx
subq -0x30(%rbp), %rcx
subq -0x20(%rbp), %rcx
movl $0x4, %eax
cmpq %rcx, %rax
jbe 0x1f629
movl $0x2, %edi
leaq 0x3351e3(%rip), %rsi    # 0x3547ee
movl $0x40, %edx
callq 0x5060
callq 0x5310
callq 0x53b0
movl $0x1, %edi
callq 0x5130
jmp 0x1f62b
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x1f6c2
movq -0x30(%rbp), %rax
addq -0x20(%rbp), %rax
addq $0x4, %rax
cmpq -0x28(%rbp), %rax
ja 0x1f6c2
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
addq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x50e0
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
addq $0x4, %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x1f6b3
movl $0x2, %edi
leaq 0x33519a(%rip), %rsi    # 0x35482f
movl $0x42, %edx
callq 0x5060
callq 0x5310
callq 0x53b0
movl $0x1, %edi
callq 0x5130
jmp 0x1f6b5
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1f843
movq -0x30(%rbp), %rax
addq -0x20(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x1f70a
movq -0x28(%rbp), %rax
movq $-0x1, %rcx
subq -0x28(%rbp), %rcx
cmpq %rcx, %rax
ja 0x1f70a
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
shlq %rcx
cmpq %rcx, %rax
jae 0x1f70a
movq -0x28(%rbp), %rax
shlq %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x1f850
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rcx
addq -0x20(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x40(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
movq -0x30(%rbp), %rdx
callq 0x50e0
movq -0x40(%rbp), %rdi
addq $0x18, %rdi
addq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x50e0
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq 0x3719f0(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x1f839
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq 0x3719c7(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x58(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x60(%rbp), %rax
cmpq $0x0, %rax
je 0x1f839
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq 0x371998(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x68(%rbp)
movq -0x70(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x1f839
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq 0x371973(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x78(%rbp)
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq -0x80(%rbp), %rcx
movl (%rcx), %eax
addl $-0x1, %eax
movl %eax, (%rcx)
cmpl $0x0, %eax
jne 0x1f837
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq 0x37193f(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x88(%rbp)
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x127c0
jmp 0x1f839
jmp 0x1f83b
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq