// File: /workspace/github_c_makefile_star2_O0/neovim[P]libvterm/src/screen.c
// Function: setpenattr
static int setpenattr(VTermAttr attr, VTermValue *val, void *user)
{
  VTermScreen *screen = user;

  switch(attr) {
  case VTERM_ATTR_BOLD:
    screen->pen.bold = val->boolean;
    return 1;
  case VTERM_ATTR_UNDERLINE:
    screen->pen.underline = val->number;
    return 1;
  case VTERM_ATTR_ITALIC:
    screen->pen.italic = val->boolean;
    return 1;
  case VTERM_ATTR_BLINK:
    screen->pen.blink = val->boolean;
    return 1;
  case VTERM_ATTR_REVERSE:
    screen->pen.reverse = val->boolean;
    return 1;
  case VTERM_ATTR_CONCEAL:
    screen->pen.conceal = val->boolean;
    return 1;
  case VTERM_ATTR_STRIKE:
    screen->pen.strike = val->boolean;
    return 1;
  case VTERM_ATTR_FONT:
    screen->pen.font = val->number;
    return 1;
  case VTERM_ATTR_FOREGROUND:
    screen->pen.fg = val->color;
    return 1;
  case VTERM_ATTR_BACKGROUND:
    screen->pen.bg = val->color;
    return 1;
  case VTERM_ATTR_SMALL:
    screen->pen.small = val->boolean;
    return 1;
  case VTERM_ATTR_BASELINE:
    screen->pen.baseline = val->number;
    return 1;

  case VTERM_N_ATTRS:
    return 0;
  }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x8(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0xc, %eax
ja 0x7f71
movq -0x28(%rbp), %rax
leaq 0xb5d2(%rip), %rcx      # 0x13338
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movl (%rax), %edx
movq -0x20(%rbp), %rax
movl 0x88(%rax), %ecx
andl $0x1, %edx
andl $-0x2, %ecx
orl %edx, %ecx
movl %ecx, 0x88(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x7f78
movq -0x10(%rbp), %rax
movl (%rax), %edx
movq -0x20(%rbp), %rax
movl 0x88(%rax), %ecx
andl $0x3, %edx
shll %edx
andl $-0x7, %ecx
orl %edx, %ecx
movl %ecx, 0x88(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x7f78
movq -0x10(%rbp), %rax
movl (%rax), %edx
movq -0x20(%rbp), %rax
movl 0x88(%rax), %ecx
andl $0x1, %edx
shll $0x3, %edx
andl $-0x9, %ecx
orl %edx, %ecx
movl %ecx, 0x88(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x7f78
movq -0x10(%rbp), %rax
movl (%rax), %edx
movq -0x20(%rbp), %rax
movl 0x88(%rax), %ecx
andl $0x1, %edx
shll $0x4, %edx
andl $-0x11, %ecx
orl %edx, %ecx
movl %ecx, 0x88(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x7f78
movq -0x10(%rbp), %rax
movl (%rax), %edx
movq -0x20(%rbp), %rax
movl 0x88(%rax), %ecx
andl $0x1, %edx
shll $0x5, %edx
andl $-0x21, %ecx
orl %edx, %ecx
movl %ecx, 0x88(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x7f78
movq -0x10(%rbp), %rax
movl (%rax), %edx
movq -0x20(%rbp), %rax
movl 0x88(%rax), %ecx
andl $0x1, %edx
shll $0x6, %edx
andl $-0x41, %ecx
orl %edx, %ecx
movl %ecx, 0x88(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x7f78
movq -0x10(%rbp), %rax
movl (%rax), %edx
movq -0x20(%rbp), %rax
movl 0x88(%rax), %ecx
andl $0x1, %edx
shll $0x7, %edx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
orl %edx, %ecx
movl %ecx, 0x88(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x7f78
movq -0x10(%rbp), %rax
movl (%rax), %edx
movq -0x20(%rbp), %rax
movl 0x88(%rax), %ecx
andl $0xf, %edx
shll $0x8, %edx
andl $0xfffff0ff, %ecx       # imm = 0xFFFFF0FF
orl %edx, %ecx
movl %ecx, 0x88(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x7f78
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, 0x80(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x7f78
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, 0x84(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x7f78
movq -0x10(%rbp), %rax
movl (%rax), %edx
movq -0x20(%rbp), %rax
movl 0x88(%rax), %ecx
andl $0x1, %edx
shll $0xc, %edx
andl $0xffffefff, %ecx       # imm = 0xFFFFEFFF
orl %edx, %ecx
movl %ecx, 0x88(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x7f78
movq -0x10(%rbp), %rax
movl (%rax), %edx
movq -0x20(%rbp), %rax
movl 0x88(%rax), %ecx
andl $0x3, %edx
shll $0xd, %edx
andl $0xffff9fff, %ecx       # imm = 0xFFFF9FFF
orl %edx, %ecx
movl %ecx, 0x88(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x7f78
movl $0x0, -0x4(%rbp)
jmp 0x7f78
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)