// File: /workspace/github_c_makefile_star2_O0/ShinyaKato[P]skcc/lex.c
// Function: remove_comment
struct utf8c remove_comment(struct pp_token_lexer *lexer) {
  for(; lexer->comment_queue_size < 2; lexer->comment_queue_size++) {
    lexer->comment_queue[lexer->comment_queue_size] = next_source_char(lexer->src);
    if(lexer->comment_queue[lexer->comment_queue_size].bytes == 0) {
      break;
    }
  }

  if(lexer->comment_queue_size == 0) {
    return ueof;
  }

  if(lexer->comment_queue_size == 2) {
    if(lexer->comment_queue[0].sequence[0] == '/') {
      if(lexer->comment_queue[1].sequence[0] == '/') {
        while(1) {
          struct utf8c uc = next_source_char(lexer->src);
          if(uc.bytes == 0) {
            error("reached end of file while removing \"//...\" comment.\n");
          }
          if(uc.sequence[0] == '\n') {
            break;
          }
        }
        struct utf8c uc = single_byte_char('\n');
        lexer->comment_queue_size = 0;
        return uc;
      } else if(lexer->comment_queue[1].sequence[0] == '*') {
        struct utf8c last = next_source_char(lexer->src);
        while(1) {
          struct utf8c uc = next_source_char(lexer->src);
          if(uc.bytes == 0) {
            error("reached end of file while removing \"/* ... */\" comment.\n");
          }
          if(last.sequence[0] == '*' && uc.sequence[0] == '/') {
            break;
          }
          last = uc;
        }
        struct utf8c uc = single_byte_char(' ');
        lexer->comment_queue_size = 0;
        return uc;
      }
    }
  }

  struct utf8c uc = lexer->comment_queue[0];
  lexer->comment_queue_size--;
  for(int i = 0; i < lexer->comment_queue_size; i++) {
    lexer->comment_queue[i] = lexer->comment_queue[i + 1];
  }
  return uc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x2, 0x8(%rax)
jge 0x2427
movq -0x18(%rbp), %rax
movslq 0x8(%rax), %rcx
leaq (%rcx,%rcx,2), %rcx
leaq 0xc(%rax,%rcx,4), %rcx
movq %rcx, -0xd8(%rbp)
movq (%rax), %rdi
callq 0x2010
movq %rax, %rcx
movq -0xd8(%rbp), %rax
movb %dl, -0x30(%rbp)
movq %rcx, -0x38(%rbp)
movq -0x38(%rbp), %rcx
movq %rcx, -0x24(%rbp)
movl -0x30(%rbp), %ecx
movl %ecx, -0x1c(%rbp)
movq -0x24(%rbp), %rcx
movq %rcx, (%rax)
movl -0x1c(%rbp), %ecx
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0xc, %rax
movq -0x18(%rbp), %rcx
movslq 0x8(%rcx), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, (%rax)
jne 0x2413
jmp 0x2427
jmp 0x2415
movq -0x18(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
jmp 0x239f
movq -0x18(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x244a
leaq 0xbc50(%rip), %rax      # 0xe088
movq (%rax), %rcx
movq %rcx, -0xc(%rbp)
movl 0x8(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x267c
movq -0x18(%rbp), %rax
cmpl $0x2, 0x8(%rax)
jne 0x25f4
movq -0x18(%rbp), %rax
movzbl 0x10(%rax), %eax
cmpl $0x2f, %eax
jne 0x25f2
movq -0x18(%rbp), %rax
movzbl 0x1c(%rax), %eax
cmpl $0x2f, %eax
jne 0x24f5
jmp 0x2478
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x2010
movb %dl, -0x50(%rbp)
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x44(%rbp)
movl -0x50(%rbp), %eax
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x44(%rbp)
jne 0x24b9
leaq 0x840a(%rip), %rdi      # 0xa8b0
movl $0x67, %esi
leaq 0x8404(%rip), %rdx      # 0xa8b6
movb $0x0, %al
callq 0x1280
movzbl -0x40(%rbp), %eax
cmpl $0xa, %eax
jne 0x24c4
jmp 0x24c6
jmp 0x2478
movl $0xa, %edi
callq 0x18a0
movb %dl, -0x60(%rbp)
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0xc(%rbp)
movl -0x60(%rbp), %eax
movl %eax, -0x4(%rbp)
movq -0x18(%rbp), %rax
movl $0x0, 0x8(%rax)
jmp 0x267c
movq -0x18(%rbp), %rax
movzbl 0x1c(%rax), %eax
cmpl $0x2a, %eax
jne 0x25ee
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x2010
movb %dl, -0x80(%rbp)
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x74(%rbp)
movl -0x80(%rbp), %eax
movl %eax, -0x6c(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x2010
movb %dl, -0xa0(%rbp)
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x94(%rbp)
movl -0xa0(%rbp), %eax
movl %eax, -0x8c(%rbp)
cmpl $0x0, -0x94(%rbp)
jne 0x2583
leaq 0x8340(%rip), %rdi      # 0xa8b0
movl $0x75, %esi
leaq 0x836f(%rip), %rdx      # 0xa8eb
movb $0x0, %al
callq 0x1280
movzbl -0x70(%rbp), %eax
cmpl $0x2a, %eax
jne 0x259a
movzbl -0x90(%rbp), %eax
cmpl $0x2f, %eax
jne 0x259a
jmp 0x25b3
movq -0x94(%rbp), %rax
movq %rax, -0x74(%rbp)
movl -0x8c(%rbp), %eax
movl %eax, -0x6c(%rbp)
jmp 0x252d
movl $0x20, %edi
callq 0x18a0
movb %dl, -0xb0(%rbp)
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
movq %rax, -0xc(%rbp)
movl -0xb0(%rbp), %eax
movl %eax, -0x4(%rbp)
movq -0x18(%rbp), %rax
movl $0x0, 0x8(%rax)
jmp 0x267c
jmp 0x25f0
jmp 0x25f2
jmp 0x25f4
movq -0x18(%rbp), %rax
movq 0xc(%rax), %rcx
movq %rcx, -0xc(%rbp)
movl 0x14(%rax), %eax
movl %eax, -0x4(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x8(%rax)
movl $0x0, -0xbc(%rbp)
movl -0xbc(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x267a
movq -0x18(%rbp), %rax
addq $0xc, %rax
movslq -0xbc(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movq -0x18(%rbp), %rcx
addq $0xc, %rcx
movl -0xbc(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
imulq $0xc, %rdx, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movl 0x8(%rcx), %ecx
movl %ecx, 0x8(%rax)
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0x261d
jmp 0x267c
movl -0x4(%rbp), %eax
movl %eax, -0xc8(%rbp)
movq -0xc(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
movb -0xc8(%rbp), %dl
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)