// File: /workspace/github_c_makefile_star2_O1/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 %rbx
subq $0x10, %rsp
movq %rdi, %rbx
testl %esi, %esi
je 0x3788
movl 0x13c(%rbx), %eax
movl %eax, 0x1a0(%rbx)
movq 0x134(%rbx), %rax
movq %rax, 0x198(%rbx)
addq $0x10, %rsp
popq %rbx
retq
movq 0x198(%rbx), %rax
movq %rax, 0x134(%rbx)
movl 0x1a0(%rbx), %eax
movl %eax, 0x13c(%rbx)
andl $0x1, %eax
movl %eax, (%rsp)
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x37c8
movq 0x30(%rax), %rax
testq %rax, %rax
je 0x37c8
movq 0x10(%rbx), %rdx
movq %rsp, %rsi
movl $0x1, %edi
callq *%rax
movl 0x13c(%rbx), %eax
shrl %eax
andl $0x3, %eax
movl %eax, (%rsp)
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x37f6
movq 0x30(%rax), %rax
testq %rax, %rax
je 0x37f6
movq 0x10(%rbx), %rdx
movq %rsp, %rsi
movl $0x2, %edi
callq *%rax
movl 0x13c(%rbx), %eax
shrl $0x3, %eax
andl $0x1, %eax
movl %eax, (%rsp)
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x3825
movq 0x30(%rax), %rax
testq %rax, %rax
je 0x3825
movq 0x10(%rbx), %rdx
movq %rsp, %rsi
movl $0x3, %edi
callq *%rax
movl 0x13c(%rbx), %eax
shrl $0x4, %eax
andl $0x1, %eax
movl %eax, (%rsp)
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x3854
movq 0x30(%rax), %rax
testq %rax, %rax
je 0x3854
movq 0x10(%rbx), %rdx
movq %rsp, %rsi
movl $0x4, %edi
callq *%rax
movl 0x13c(%rbx), %eax
shrl $0x5, %eax
andl $0x1, %eax
movl %eax, (%rsp)
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x3883
movq 0x30(%rax), %rax
testq %rax, %rax
je 0x3883
movq 0x10(%rbx), %rdx
movq %rsp, %rsi
movl $0x5, %edi
callq *%rax
movl 0x13c(%rbx), %eax
shrl $0x6, %eax
andl $0x1, %eax
movl %eax, (%rsp)
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x38b2
movq 0x30(%rax), %rax
testq %rax, %rax
je 0x38b2
movq 0x10(%rbx), %rdx
movq %rsp, %rsi
movl $0x6, %edi
callq *%rax
movl 0x13c(%rbx), %eax
shrl $0x7, %eax
andl $0x1, %eax
movl %eax, (%rsp)
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x38e1
movq 0x30(%rax), %rax
testq %rax, %rax
je 0x38e1
movq 0x10(%rbx), %rdx
movq %rsp, %rsi
movl $0x7, %edi
callq *%rax
movzbl 0x13d(%rbx), %eax
andl $0xf, %eax
movl %eax, (%rsp)
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x390e
movq 0x30(%rax), %rax
testq %rax, %rax
je 0x390e
movq 0x10(%rbx), %rdx
movq %rsp, %rsi
movl $0x8, %edi
callq *%rax
movl 0x13c(%rbx), %eax
shrl $0xc, %eax
andl $0x1, %eax
movl %eax, (%rsp)
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x393d
movq 0x30(%rax), %rax
testq %rax, %rax
je 0x393d
movq 0x10(%rbx), %rdx
movq %rsp, %rsi
movl $0xb, %edi
callq *%rax
movl 0x13c(%rbx), %eax
shrl $0xd, %eax
andl $0x3, %eax
movl %eax, (%rsp)
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x396c
movq 0x30(%rax), %rax
testq %rax, %rax
je 0x396c
movq 0x10(%rbx), %rdx
movq %rsp, %rsi
movl $0xc, %edi
callq *%rax
movl 0x134(%rbx), %eax
movl %eax, (%rsp)
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x3995
movq 0x30(%rax), %rax
testq %rax, %rax
je 0x3995
movq 0x10(%rbx), %rdx
movq %rsp, %rsi
movl $0x9, %edi
callq *%rax
movl 0x138(%rbx), %eax
movl %eax, (%rsp)
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x3782
movq 0x30(%rax), %rax
testq %rax, %rax
je 0x3782
movq 0x10(%rbx), %rdx
movq %rsp, %rsi
movl $0xa, %edi
callq *%rax
jmp 0x3782