// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: format_append_chars
static void format_append_chars(s7_scheme *sc, format_data *fdat, char pad, s7_int chars, s7_pointer port)
    {
        if (is_string_port(port))
        {
            if ((port_position(port) + chars) < port_data_size(port))
            {
                local_memset((char *)port_data(port) + port_position(port), pad, chars);
                port_position(port) += chars;
            }
            else
            {
                s7_int new_len;
                new_len = port_position(port) + chars;
                resize_port_data(sc, port, new_len * 2);
                local_memset((char *)port_data(port) + port_position(port), pad, chars);
                port_position(port) = new_len;
            }
            fdat->loc += chars;
            sc->format_column += chars;
        }
        else
        {
            block_t *b;
            char *str;
            b = mallocate(sc, chars + 1);
            str = (char *)block_data(b);
            local_memset((void *)str, pad, chars);
            str[chars] = '\0';
            format_append_string(sc, fdat, str, chars, port);
            liberate(sc, b);
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r13
movq %rdi, %rbx
movq 0x8(%r8), %rax
cmpl $0x1, 0x4(%rax)
jne 0x9919d
movq 0x20(%r12), %rdi
leaq (%rdi,%r14), %r15
cmpq 0x18(%r12), %r15
jge 0x99253
addq 0x10(%r12), %rdi
cmpq $0x8, %r14
jb 0x992b6
movq %r14, %rax
shrq $0x3, %rax
movzbl %bpl, %edx
movabsq $0x101010101010101, %rcx # imm = 0x101010101010101
imulq %rdx, %rcx
movq %rcx, (%rdi)
addq $0x8, %rdi
decq %rax
jne 0x99186
movl %r14d, %edx
andl $0x7, %edx
jmp 0x992b9
movq %r13, (%rsp)
leaq 0x1(%r14), %rsi
movq %rbx, %rdi
callq 0x9357
movq %rax, %r13
movq (%rax), %r15
movzbl %bpl, %esi
movq %r14, %rdx
movq %r15, %rdi
cmpq $0x8, %r14
jb 0x991ed
movq %r14, %rax
shrq $0x3, %rax
movabsq $0x101010101010101, %rcx # imm = 0x101010101010101
imulq %rsi, %rcx
movq %r15, %rdi
movq %rcx, (%rdi)
addq $0x8, %rdi
decq %rax
jne 0x991db
movl %r14d, %edx
andl $0x7, %edx
testq %rdx, %rdx
je 0x991f7
callq 0x8270
movb $0x0, (%r15,%r14)
movq 0x8(%r12), %rax
movq 0x48(%rax), %rax
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq *0x10(%rax)
movq (%rsp), %rax
addq %r14, (%rax)
addl %r14d, 0x238(%rbx)
movslq 0x8(%r13), %rax
cmpq $0x11, %rax
jne 0x9929f
movq (%r13), %rdi
testq %rdi, %rdi
je 0x99242
callq 0x8050
movq $0x0, (%r13)
movl $0x0, 0x8(%r13)
addq $0x838, %rbx            # imm = 0x838
jmp 0x992aa
leaq (%r15,%r15), %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x94b07
movq 0x10(%r12), %rdi
addq 0x20(%r12), %rdi
cmpq $0x8, %r14
jb 0x992d1
movq %r14, %rax
shrq $0x3, %rax
movzbl %bpl, %edx
movabsq $0x101010101010101, %rcx # imm = 0x101010101010101
imulq %rdx, %rcx
movq %rcx, (%rdi)
addq $0x8, %rdi
decq %rax
jne 0x9928b
movl %r14d, %edx
andl $0x7, %edx
jmp 0x992d4
leaq (%rbx,%rax,8), %rbx
addq $0x838, %rbx            # imm = 0x838
movq (%rbx), %rax
movq %rax, 0x18(%r13)
movq %r13, (%rbx)
jmp 0x992f2
movq %r14, %rdx
testq %rdx, %rdx
je 0x992c7
movzbl %bpl, %esi
callq 0x8270
movq 0x20(%r12), %r15
addq %r14, %r15
jmp 0x992e2
movq %r14, %rdx
testq %rdx, %rdx
je 0x992e2
movzbl %bpl, %esi
callq 0x8270
movq %r15, 0x20(%r12)
addq %r14, (%r13)
addl %r14d, 0x238(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq