// File: /workspace/github_c_makefile_star2_O3/ejunjsh[P]mycc/stmt.c
// Function: single_statement
static struct ASTnode *single_statement(void) {
  struct ASTnode *stmt;
  struct symtable *ctype;
  int linenum= Line;

  switch (Token.token) {
    case T_SEMI:
      // 空语句
      semi();
      break;
    case T_LBRACE:
      // 有 '{', 所以这个是个组合语句
      lbrace();
      stmt = compound_statement(0);
      stmt->linenum= linenum;
      rbrace();
      return (stmt);
    case T_IDENT:
      // 如果标识符不是个typedef,当它为表达式处理
      // 如果是,那就由下面的情况来处理
      if (findtypedef(Text) == NULL) {
        stmt = binexpr(0);
        stmt->linenum= linenum;
        semi();
        return (stmt);
      }
    case T_CHAR:
    case T_INT:
    case T_LONG:
    case T_STRUCT:
    case T_UNION:
    case T_ENUM:
    case T_TYPEDEF:
      // 变量声明
      declaration_list(&ctype, C_LOCAL, T_SEMI, T_EOF, &stmt);
      semi();
      return (stmt);		// 变量声明也可能有赋值
    case T_IF:
      stmt= if_statement(); stmt->linenum= linenum; return(stmt);
    case T_WHILE:
      stmt= while_statement(); stmt->linenum= linenum; return(stmt);
    case T_FOR:
      stmt= for_statement(); stmt->linenum= linenum; return(stmt);
    case T_RETURN:
      stmt= return_statement(); stmt->linenum= linenum; return(stmt);
    case T_BREAK:
      stmt= break_statement(); stmt->linenum= linenum; return(stmt);
    case T_CONTINUE:
      stmt= continue_statement(); stmt->linenum= linenum; return(stmt);
    case T_SWITCH:
      stmt= switch_statement(); stmt->linenum= linenum; return(stmt);
    default:
      // 到这里,剩下的应该就是赋值的语句了
      stmt = binexpr(0);
      stmt->linenum= linenum;
      semi();
      return (stmt);
  }
  return (NULL);		
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
leaq 0x7c44(%rip), %rax      # 0xf368
movl (%rax), %r13d
leaq 0x7c72(%rip), %r15      # 0xf3a0
movl (%r15), %eax
addl $-0x1f, %eax
cmpl $0x18, %eax
ja 0x7978
leaq 0x4208(%rip), %rcx      # 0xb94c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq -0x58(%rbp), %rdi
leaq -0x60(%rbp), %rbx
movl $0x2, %esi
movl $0x35, %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x4312
callq 0x689d
movq (%rbx), %rbx
jmp 0x7ca4
leaq 0x7e57(%rip), %rax      # 0xf5d4
cmpl $0x0, (%rax)
jne 0x778e
leaq 0x4289(%rip), %rdi      # 0xba12
callq 0x6937
leaq 0x7c0b(%rip), %rdi      # 0xf3a0
callq 0x6b20
callq 0x689d
movl $0x30, %edi
jmp 0x77dc
leaq 0x7e27(%rip), %rax      # 0xf5d4
leaq 0x7e24(%rip), %rcx      # 0xf5d8
movl (%rcx), %ecx
orl (%rax), %ecx
jne 0x77c6
leaq 0x422d(%rip), %rdi      # 0xb9ee
callq 0x6937
leaq 0x7bd3(%rip), %rdi      # 0xf3a0
callq 0x6b20
callq 0x689d
movl $0x2f, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x88b3
jmp 0x7c9d
leaq 0x3fe5(%rip), %rsi      # 0xb7db
movl $0x25, %edi
callq 0x6818
callq 0x68df
movl $0x35, %edi
callq 0x4cb0
movq %rax, %rbx
callq 0x689d
xorl %r12d, %r12d
xorl %edi, %edi
callq 0x4d39
movq %rax, %r14
movl 0x4(%rax), %eax
addl $-0x13, %eax
cmpl $-0x7, %eax
movl %r13d, -0x2c(%rbp)
ja 0x7851
movl 0x8(%r14), %esi
movq 0x10(%r14), %rdx
movl $0x2e, %edi
movq %r14, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x88d3
movq %rax, %r14
callq 0x689d
movl $0x3a, %edi
callq 0x4cb0
movq %rax, %r15
callq 0x68f5
leaq 0x7d65(%rip), %r13      # 0xf5d4
incl (%r13)
callq 0x770c
decl (%r13)
movl $0x1d, %edi
xorl %esi, %esi
xorl %edx, %edx
movq %rax, %rcx
xorl %r8d, %r8d
movq %r15, %r9
pushq %r12
pushq %r12
callq 0x8828
addq $0x10, %rsp
movl $0x1f, %edi
xorl %esi, %esi
xorl %edx, %edx
movq %r14, %rcx
xorl %r8d, %r8d
movq %rax, %r9
pushq %r12
pushq %r12
callq 0x8828
addq $0x10, %rsp
movl $0x1d, %edi
xorl %esi, %esi
xorl %edx, %edx
movq %rbx, %rcx
xorl %r8d, %r8d
movq %rax, %r9
pushq %r12
pushq %r12
callq 0x8828
addq $0x10, %rsp
movq %rax, %rbx
jmp 0x7c4f
leaq 0x3eed(%rip), %rsi      # 0xb7d5
movl $0x24, %edi
callq 0x6818
callq 0x68df
xorl %edi, %edi
callq 0x4d39
movq %rax, %rbx
movl 0x4(%rax), %eax
addl $-0x13, %eax
cmpl $-0x7, %eax
ja 0x7929
movl 0x8(%rbx), %esi
movq 0x10(%rbx), %rdx
movl $0x2e, %edi
movq %rbx, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x88d3
movq %rax, %rbx
callq 0x68f5
leaq 0x7c9f(%rip), %r14      # 0xf5d4
incl (%r14)
callq 0x770c
decl (%r14)
movl $0x1f, %edi
xorl %esi, %esi
xorl %edx, %edx
movq %rbx, %rcx
xorl %r8d, %r8d
movq %rax, %r9
jmp 0x7c90
callq 0x689d
xorl %ebx, %ebx
jmp 0x7ca4
leaq 0x7a66(%rip), %rdi      # 0xf3d0
callq 0x8418
testq %rax, %rax
jne 0x774d
xorl %edi, %edi
callq 0x4d39
movq %rax, %rbx
movl %r13d, 0x40(%rax)
callq 0x689d
jmp 0x7ca4
leaq 0x4050(%rip), %rsi      # 0xb9e7
movl $0x26, %edi
callq 0x6818
cmpl $0x39, (%r15)
jne 0x7c57
leaq 0x79c6(%rip), %rbx      # 0xf378
movq (%rbx), %rax
cmpl $0x10, 0x10(%rax)
jne 0x79c7
leaq 0x3fee(%rip), %rdi      # 0xb9b0
callq 0x6937
callq 0x68df
xorl %edi, %edi
callq 0x4d39
movq (%rbx), %rcx
movl 0x10(%rcx), %esi
movq 0x18(%rcx), %rdx
movq %rax, %rdi
xorl %ecx, %ecx
callq 0x8eba
movq %rax, %rbx
testq %rax, %rax
jne 0x79fb
leaq 0x3fdc(%rip), %rdi      # 0xb9d2
callq 0x6937
callq 0x68f5
jmp 0x7c59
callq 0x68b3
xorl %edi, %edi
callq 0x7690
movq %rax, %rbx
movl %r13d, 0x40(%rax)
callq 0x68c9
jmp 0x7ca4
leaq 0x3da4(%rip), %rsi      # 0xb7cd
movl $0x22, %edi
callq 0x6818
callq 0x68df
xorl %edi, %edi
callq 0x4d39
movq %rax, %rbx
movl 0x4(%rax), %eax
addl $-0x13, %eax
cmpl $-0x7, %eax
ja 0x7a6a
movl 0x8(%rbx), %esi
movq 0x10(%rbx), %rdx
movl $0x2e, %edi
movq %rbx, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x88d3
movq %rax, %rbx
callq 0x68f5
callq 0x770c
movq %rax, %r14
cmpl $0x23, (%r15)
jne 0x7c7e
leaq 0x7918(%rip), %rdi      # 0xf3a0
callq 0x6b20
callq 0x770c
movq %rax, %r9
jmp 0x7c81
movl %r13d, -0x2c(%rbp)
leaq 0x78fb(%rip), %r14      # 0xf3a0
movq %r14, %rdi
callq 0x6b20
callq 0x68df
movq $0x0, -0x48(%rbp)
xorl %edi, %edi
callq 0x4d39
movq %rax, %rbx
callq 0x68f5
callq 0x68b3
movl 0x8(%rbx), %edi
callq 0x8e28
testl %eax, %eax
jne 0x7ae6
leaq 0x3f48(%rip), %rdi      # 0xba29
callq 0x6937
movl $0x31, %edi
xorl %esi, %esi
xorl %edx, %edx
movq %rbx, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x88d3
leaq 0x7ad4(%rip), %rcx      # 0xf5d8
incl (%rcx)
movq %rax, %rbx
leaq 0x3fba(%rip), %r13      # 0xbaca
movl $0x0, -0x34(%rbp)
xorl %ecx, %ecx
movq %rcx, -0x40(%rbp)
movq %rax, -0x50(%rbp)
movl (%r14), %r12d
leal -0x2f(%r12), %eax
cmpl $0x2, %eax
jb 0x7b46
cmpl $0x38, %r12d
je 0x7c21
movq 0x8(%r14), %rsi
movq %r13, %rdi
callq 0x683f
jmp 0x7b21
cmpl $0x0, -0x48(%rbp)
je 0x7b5b
leaq 0x3f12(%rip), %rdi      # 0xba65
callq 0x6937
movl (%r14), %r12d
movq %r14, %rdi
callq 0x6b20
cmpl $0x30, %r12d
jne 0x7b7b
movl $0x33, -0x30(%rbp)
movl $0x1, %eax
movq %rax, -0x48(%rbp)
jmp 0x7bc6
xorl %edi, %edi
callq 0x4d39
movq %rax, %r15
cmpl $0x1a, 0x4(%rax)
movq -0x40(%rbp), %r12
je 0x7b9b
leaq 0x3ef6(%rip), %rdi      # 0xba8c
callq 0x6937
movl (%r15), %r15d
movl $0x32, -0x30(%rbp)
testq %r12, %r12
je 0x7bca
cmpl (%r12), %r15d
jne 0x7bbc
leaq 0x3efe(%rip), %rdi      # 0xbab5
callq 0x6937
movq 0x30(%r12), %r12
testq %r12, %r12
jne 0x7baa
movq -0x40(%rbp), %r12
movl $0x40, %edi
leaq 0x29af(%rip), %rsi      # 0xa585
callq 0x6818
cmpl $0x2f, (%r14)
jne 0x7be5
xorl %ecx, %ecx
jmp 0x7bf2
movl $0x1, %edi
callq 0x7690
movq %rax, %rcx
incl -0x34(%rbp)
movl -0x30(%rbp), %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %r8d, %r8d
movl %r15d, %r9d
callq 0x88d3
testq %r12, %r12
je 0x7c19
movq -0x50(%rbp), %rcx
movq %rax, 0x30(%rcx)
jmp 0x7b1d
movq %rax, %rcx
jmp 0x7b19
movl -0x34(%rbp), %r14d
testl %r14d, %r14d
movq -0x40(%rbp), %r15
jne 0x7c3a
leaq 0x3e1d(%rip), %rdi      # 0xba52
callq 0x6937
leaq 0x7997(%rip), %rax      # 0xf5d8
decl (%rax)
movl %r14d, (%rbx)
movq %r15, 0x30(%rbx)
callq 0x68c9
movl -0x2c(%rbp), %eax
movl %eax, 0x40(%rbx)
jmp 0x7ca4
xorl %ebx, %ebx
movl $0x22, %edi
xorl %esi, %esi
xorl %edx, %edx
movq %rbx, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x88d3
movq %rax, %rbx
callq 0x689d
movl %r13d, 0x40(%rbx)
jmp 0x7ca4
xorl %r9d, %r9d
movl $0x1e, %edi
xorl %esi, %esi
xorl %edx, %edx
movq %rbx, %rcx
movq %r14, %r8
pushq $0x0
pushq $0x0
callq 0x8828
addq $0x10, %rsp
movq %rax, %rbx
movl %r13d, 0x40(%rax)
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop