// File: /workspace/github_c_makefile_star2_O0/sisshiki1969[P]monocc/src/parse.c
// Function: parse_stmt
Node *parse_stmt() {
  if (consume_if(TK_SEMI)) return NULL;
  Node *node;
  Node *then_;
  Token *op_token = token;
  switch (token->kind) {
    case TK_RETURN:
      expect(TK_RETURN);
      if (consume_if(TK_SEMI))
        return new_node_binary(ND_RETURN, NULL, NULL, op_token);
      else {
        node = parse_expr();
        expect(TK_SEMI);
        return new_node_binary(ND_RETURN, node, NULL, op_token);
      }
    case TK_IF:
      expect(TK_IF);
      expect(TK_OP_PAREN);
      node = parse_expr();
      expect(TK_CL_PAREN);
      then_ = parse_stmt();
      if (consume_if(TK_ELSE))
        return new_node_if_then(node, then_, parse_stmt());
      else
        return new_node_if_then(node, then_, NULL);
    case TK_SWITCH:
      switch_level++;
      expect(TK_SWITCH);
      expect(TK_OP_PAREN);
      node = parse_eq_expr();  // this should be a conditional-expr.
      expect(TK_CL_PAREN);
      then_ = parse_stmt();
      switch_level--;
      return new_node_switch(node, then_, op_token);
    case TK_WHILE:
      expect(TK_WHILE);
      expect(TK_OP_PAREN);
      node = parse_expr();
      expect(TK_CL_PAREN);
      return new_node_while(node, parse_stmt());
    case TK_FOR:
      return parse_for();
    case TK_OP_BRACE:
      return parse_block();
    case TK_BREAK:
      expect(TK_BREAK);
      expect(TK_SEMI);
      return new_node(ND_BREAK, op_token);
    case TK_CONTINUE:
      expect(TK_CONTINUE);
      expect(TK_SEMI);
      return new_node(ND_CONTINUE, op_token);
    case TK_CASE:
      if (switch_level == 0)
        error_at_token(op_token,
                       "a case label may only be used within a switch.");
      expect(TK_CASE);
      node = parse_expr();
      expect(TK_COLON);
      then_ = new_node_block(vec_new());
      while (!peek(TK_CASE) && !peek(TK_DEFAULT) && !peek(TK_CL_BRACE))
        add_stmt_to_block(then_, parse_stmt());
      return new_node_case(node, then_, op_token);
    case TK_DEFAULT:
      if (switch_level == 0)
        error_at_token(op_token,
                       "a default label may only be used within a switch.");
      expect(TK_DEFAULT);
      expect(TK_COLON);
      node = parse_stmt();
      return new_node_default(node, op_token);
  }
  node = parse_expr();
  expect(TK_SEMI);
  return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl $0x1c, %edi
callq 0x7860
testb $0x1, %al
jne 0x95f8
jmp 0x9605
movq $0x0, -0x8(%rbp)
jmp 0x997a
leaq 0xbc0c(%rip), %rax      # 0x15218
movq (%rax), %rcx
movq %rcx, -0x20(%rbp)
movq (%rax), %rax
movl (%rax), %eax
addl $-0x1f, %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x13, %eax
ja 0x995f
movq -0x28(%rbp), %rax
leaq 0x6c87(%rip), %rcx      # 0x102bc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x32, %edi
callq 0x7980
movl $0x1c, %edi
callq 0x7860
testb $0x1, %al
jne 0x9658
jmp 0x9676
movq -0x20(%rbp), %rcx
movl $0x23, %edi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x6e30
movq %rax, -0x8(%rbp)
jmp 0x997a
callq 0x9480
movq %rax, -0x10(%rbp)
movl $0x1c, %edi
callq 0x7980
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rcx
movl $0x23, %edi
xorl %eax, %eax
movl %eax, %edx
callq 0x6e30
movq %rax, -0x8(%rbp)
jmp 0x997a
movl $0x29, %edi
callq 0x7980
movl $0x1d, %edi
callq 0x7980
callq 0x9480
movq %rax, -0x10(%rbp)
movl $0x1e, %edi
callq 0x7980
callq 0x95e0
movq %rax, -0x18(%rbp)
movl $0x2a, %edi
callq 0x7860
testb $0x1, %al
jne 0x96e8
jmp 0x9716
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
callq 0x95e0
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq %rax, %rdx
callq 0x72b0
movq %rax, -0x8(%rbp)
jmp 0x997a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x72b0
movq %rax, -0x8(%rbp)
jmp 0x997a
movl 0xbb32(%rip), %eax      # 0x15268
addl $0x1, %eax
movl %eax, 0xbb29(%rip)      # 0x15268
movl $0x2d, %edi
callq 0x7980
movl $0x1d, %edi
callq 0x7980
callq 0x9050
movq %rax, -0x10(%rbp)
movl $0x1e, %edi
callq 0x7980
callq 0x95e0
movq %rax, -0x18(%rbp)
movl 0xbaf3(%rip), %eax      # 0x15268
addl $-0x1, %eax
movl %eax, 0xbaea(%rip)      # 0x15268
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x7330
movq %rax, -0x8(%rbp)
jmp 0x997a
movl $0x2b, %edi
callq 0x7980
movl $0x1d, %edi
callq 0x7980
callq 0x9480
movq %rax, -0x10(%rbp)
movl $0x1e, %edi
callq 0x7980
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
callq 0x95e0
movq -0x40(%rbp), %rdi
movq %rax, %rsi
callq 0x7590
movq %rax, -0x8(%rbp)
jmp 0x997a
callq 0x94a0
movq %rax, -0x8(%rbp)
jmp 0x997a
callq 0x9c60
movq %rax, -0x8(%rbp)
jmp 0x997a
movl $0x30, %edi
callq 0x7980
movl $0x1c, %edi
callq 0x7980
movq -0x20(%rbp), %rsi
movl $0x24, %edi
callq 0x71a0
movq %rax, -0x8(%rbp)
jmp 0x997a
movl $0x31, %edi
callq 0x7980
movl $0x1c, %edi
callq 0x7980
movq -0x20(%rbp), %rsi
movl $0x25, %edi
callq 0x71a0
movq %rax, -0x8(%rbp)
jmp 0x997a
cmpl $0x0, 0xba0e(%rip)      # 0x15268
jne 0x986e
movq -0x20(%rbp), %rdi
leaq 0x6d95(%rip), %rsi      # 0x105fc
movb $0x0, %al
callq 0x5d20
movl $0x2e, %edi
callq 0x7980
callq 0x9480
movq %rax, -0x10(%rbp)
movl $0x24, %edi
callq 0x7980
movb $0x0, %al
callq 0x3fb0
movq %rax, %rdi
callq 0x76a0
movq %rax, -0x18(%rbp)
movl $0x2e, %edi
callq 0x77d0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x41(%rbp)
jne 0x98d9
movl $0x2f, %edi
callq 0x77d0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x41(%rbp)
jne 0x98d9
movl $0x20, %edi
callq 0x77d0
xorb $-0x1, %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x98e2
jmp 0x98fd
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
callq 0x95e0
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0x7700
jmp 0x989e
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x74e0
movq %rax, -0x8(%rbp)
jmp 0x997a
cmpl $0x0, 0xb94d(%rip)      # 0x15268
jne 0x992f
movq -0x20(%rbp), %rdi
leaq 0x6d03(%rip), %rsi      # 0x1062b
movb $0x0, %al
callq 0x5d20
movl $0x2f, %edi
callq 0x7980
movl $0x24, %edi
callq 0x7980
callq 0x95e0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x7540
movq %rax, -0x8(%rbp)
jmp 0x997a
callq 0x9480
movq %rax, -0x10(%rbp)
movl $0x1c, %edi
callq 0x7980
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)