// File: /workspace/github_c_makefile_star2_O3/neovim[P]libvterm/src/pen.c
// Function: vterm_state_savepen
INTERNAL void vterm_state_savepen(VTermState *state, int save)
{
  if(save) {
    state->saved.pen = state->pen;
  }
  else {
    state->pen = state->saved.pen;

    setpenattr_bool(state, VTERM_ATTR_BOLD,      state->pen.bold);
    setpenattr_int (state, VTERM_ATTR_UNDERLINE, state->pen.underline);
    setpenattr_bool(state, VTERM_ATTR_ITALIC,    state->pen.italic);
    setpenattr_bool(state, VTERM_ATTR_BLINK,     state->pen.blink);
    setpenattr_bool(state, VTERM_ATTR_REVERSE,   state->pen.reverse);
    setpenattr_bool(state, VTERM_ATTR_CONCEAL,   state->pen.conceal);
    setpenattr_bool(state, VTERM_ATTR_STRIKE,    state->pen.strike);
    setpenattr_int (state, VTERM_ATTR_FONT,      state->pen.font);
    setpenattr_bool(state, VTERM_ATTR_SMALL,     state->pen.small);
    setpenattr_int (state, VTERM_ATTR_BASELINE,  state->pen.baseline);

    setpenattr_col( state, VTERM_ATTR_FOREGROUND, state->pen.fg);
    setpenattr_col( state, VTERM_ATTR_BACKGROUND, state->pen.bg);
  }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
testl %esi, %esi
je 0x39af
movl 0x13c(%rbx), %eax
movl %eax, 0x1a0(%rbx)
movq 0x134(%rbx), %rax
movq %rax, 0x198(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq 0x198(%rbx), %rax
movq %rax, 0x134(%rbx)
movl 0x1a0(%rbx), %ecx
movl %ecx, 0x13c(%rbx)
movl %ecx, %eax
andl $0x1, %eax
movl %eax, 0x8(%rsp)
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x39a7
movq 0x30(%rax), %r8
testq %r8, %r8
je 0x3a13
movq 0x10(%rbx), %rdx
leaq 0x8(%rsp), %r14
movl $0x1, %edi
movq %r14, %rsi
callq *%r8
movl 0x13c(%rbx), %ecx
movq 0x8(%rbx), %rax
movl %ecx, %edx
shrl %edx
andl $0x3, %edx
movl %edx, (%r14)
testq %rax, %rax
jne 0x3a1f
jmp 0x39a7
movzwl %cx, %edx
shrl %edx
andl $0x3, %edx
movl %edx, 0x8(%rsp)
movq 0x30(%rax), %r8
testq %r8, %r8
je 0x3a5b
movq 0x10(%rbx), %rdx
leaq 0x8(%rsp), %r14
movl $0x2, %edi
movq %r14, %rsi
callq *%r8
movl 0x13c(%rbx), %ecx
movq 0x8(%rbx), %rax
movl %ecx, %edx
shrl $0x3, %edx
andl $0x1, %edx
movl %edx, (%r14)
testq %rax, %rax
jne 0x3a67
jmp 0x39a7
movl %ecx, %edx
shrl $0x3, %edx
andl $0x1, %edx
movl %edx, 0x8(%rsp)
movq 0x30(%rax), %r8
testq %r8, %r8
je 0x3aa3
movq 0x10(%rbx), %rdx
leaq 0x8(%rsp), %r14
movl $0x3, %edi
movq %r14, %rsi
callq *%r8
movl 0x13c(%rbx), %ecx
movq 0x8(%rbx), %rax
movl %ecx, %edx
shrl $0x4, %edx
andl $0x1, %edx
movl %edx, (%r14)
testq %rax, %rax
jne 0x3aaf
jmp 0x39a7
movl %ecx, %edx
shrl $0x4, %edx
andl $0x1, %edx
movl %edx, 0x8(%rsp)
movq 0x30(%rax), %r8
testq %r8, %r8
je 0x3aeb
movq 0x10(%rbx), %rdx
leaq 0x8(%rsp), %r14
movl $0x4, %edi
movq %r14, %rsi
callq *%r8
movl 0x13c(%rbx), %ecx
movq 0x8(%rbx), %rax
movl %ecx, %edx
shrl $0x5, %edx
andl $0x1, %edx
movl %edx, (%r14)
testq %rax, %rax
jne 0x3af7
jmp 0x39a7
movl %ecx, %edx
shrl $0x5, %edx
andl $0x1, %edx
movl %edx, 0x8(%rsp)
movq 0x30(%rax), %r8
testq %r8, %r8
je 0x3b33
movq 0x10(%rbx), %rdx
leaq 0x8(%rsp), %r14
movl $0x5, %edi
movq %r14, %rsi
callq *%r8
movl 0x13c(%rbx), %ecx
movq 0x8(%rbx), %rax
movl %ecx, %edx
shrl $0x6, %edx
andl $0x1, %edx
movl %edx, (%r14)
testq %rax, %rax
jne 0x3b3f
jmp 0x39a7
movl %ecx, %edx
shrl $0x6, %edx
andl $0x1, %edx
movl %edx, 0x8(%rsp)
movq 0x30(%rax), %r8
testq %r8, %r8
je 0x3b7b
movq 0x10(%rbx), %rdx
leaq 0x8(%rsp), %r14
movl $0x6, %edi
movq %r14, %rsi
callq *%r8
movl 0x13c(%rbx), %ecx
movq 0x8(%rbx), %rax
movl %ecx, %edx
shrl $0x7, %edx
andl $0x1, %edx
movl %edx, (%r14)
testq %rax, %rax
jne 0x3b87
jmp 0x39a7
movl %ecx, %edx
shrl $0x7, %edx
andl $0x1, %edx
movl %edx, 0x8(%rsp)
movq 0x30(%rax), %r8
testq %r8, %r8
je 0x3bc3
movq 0x10(%rbx), %rdx
leaq 0x8(%rsp), %r14
movl $0x7, %edi
movq %r14, %rsi
callq *%r8
movl 0x13c(%rbx), %ecx
movq 0x8(%rbx), %rax
movl %ecx, %edx
shrl $0x8, %edx
andl $0xf, %edx
movl %edx, (%r14)
testq %rax, %rax
jne 0x3bcf
jmp 0x39a7
movl %ecx, %edx
shrl $0x8, %edx
andl $0xf, %edx
movl %edx, 0x8(%rsp)
movq 0x30(%rax), %r8
testq %r8, %r8
je 0x3c0b
movq 0x10(%rbx), %rdx
leaq 0x8(%rsp), %r14
movl $0x8, %edi
movq %r14, %rsi
callq *%r8
movl 0x13c(%rbx), %ecx
movq 0x8(%rbx), %rax
movl %ecx, %edx
shrl $0xc, %edx
andl $0x1, %edx
movl %edx, (%r14)
testq %rax, %rax
jne 0x3c17
jmp 0x39a7
movl %ecx, %edx
shrl $0xc, %edx
andl $0x1, %edx
movl %edx, 0x8(%rsp)
movq 0x30(%rax), %r8
testq %r8, %r8
je 0x3c51
movq 0x10(%rbx), %rdx
leaq 0x8(%rsp), %r14
movl $0xb, %edi
movq %r14, %rsi
callq *%r8
movl 0x13c(%rbx), %ecx
movq 0x8(%rbx), %rax
shrl $0xd, %ecx
andl $0x3, %ecx
movl %ecx, (%r14)
testq %rax, %rax
jne 0x3c5b
jmp 0x39a7
shrl $0xd, %ecx
andl $0x3, %ecx
movl %ecx, 0x8(%rsp)
movq 0x30(%rax), %rcx
testq %rcx, %rcx
je 0x3c8e
movq 0x10(%rbx), %rdx
leaq 0x8(%rsp), %r14
movl $0xc, %edi
movq %r14, %rsi
callq *%rcx
movq 0x8(%rbx), %rax
movl 0x134(%rbx), %ecx
movl %ecx, (%r14)
testq %rax, %rax
jne 0x3c9b
jmp 0x39a7
leaq 0x134(%rbx), %rcx
movl (%rcx), %ecx
movl %ecx, 0x8(%rsp)
movq 0x30(%rax), %rcx
testq %rcx, %rcx
je 0x3cce
movq 0x10(%rbx), %rdx
leaq 0x8(%rsp), %r14
movl $0x9, %edi
movq %r14, %rsi
callq *%rcx
movq 0x8(%rbx), %rax
movl 0x138(%rbx), %ecx
movl %ecx, (%r14)
testq %rax, %rax
jne 0x3cd8
jmp 0x39a7
movl 0x138(%rbx), %ecx
movl %ecx, 0x8(%rsp)
movq 0x30(%rax), %rax
testq %rax, %rax
je 0x39a7
movq 0x10(%rbx), %rdx
leaq 0x8(%rsp), %rsi
movl $0xa, %edi
callq *%rax
jmp 0x39a7