// File: /workspace/github_c_makefile_star2_O1/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 0x9fa3b
movq 0x20(%r12), %rdi
leaq (%rdi,%r14), %r15
cmpq 0x18(%r12), %r15
jge 0x9fb03
addq 0x10(%r12), %rdi
cmpq $0x8, %r14
jb 0x9fb65
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 0x9fa24
movl %r14d, %edx
andl $0x7, %edx
jmp 0x9fb68
movq %r13, (%rsp)
leaq 0x1(%r14), %rsi
movq %rbx, %rdi
callq 0xa305
movq %rax, %r13
movq (%rax), %r15
movzbl %bpl, %esi
movq %r14, %rdx
movq %r15, %rdi
cmpq $0x8, %r14
jb 0x9fa8b
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 0x9fa79
movl %r14d, %edx
andl $0x7, %edx
testq %rdx, %rdx
je 0x9fa95
callq 0x9270
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 0x9fb4f
movq (%r13), %rdi
testq %rdi, %rdi
je 0x9fae4
callq 0x9050
movq $0x0, (%r13)
movl $0x0, 0x8(%r13)
movq 0x838(%rbx), %rax
movq %rax, 0x18(%r13)
movq %r13, 0x838(%rbx)
jmp 0x9fba1
leaq (%r15,%r15), %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x9b110
movq 0x10(%r12), %rdi
addq 0x20(%r12), %rdi
cmpq $0x8, %r14
jb 0x9fb80
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 0x9fb3b
movl %r14d, %edx
andl $0x7, %edx
jmp 0x9fb83
movq 0x838(%rbx,%rax,8), %rcx
movq %rcx, 0x18(%r13)
movq %r13, 0x838(%rbx,%rax,8)
jmp 0x9fba1
movq %r14, %rdx
testq %rdx, %rdx
je 0x9fb76
movzbl %bpl, %esi
callq 0x9270
movq 0x20(%r12), %r15
addq %r14, %r15
jmp 0x9fb91
movq %r14, %rdx
testq %rdx, %rdx
je 0x9fb91
movzbl %bpl, %esi
callq 0x9270
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