// File: /workspace/github_c_makefile_star2_O2/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 $0x48, %rsp
leaq 0x70a2(%rip), %rax      # 0xe368
movl (%rax), %r12d
leaq 0x70d0(%rip), %r15      # 0xe3a0
movl (%r15), %eax
addl $-0x1f, %eax
cmpl $0x18, %eax
ja 0x7511
leaq 0x3666(%rip), %rcx      # 0xa94c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq -0x50(%rbp), %rdi
pushq $0x2
popq %rsi
pushq $0x35
popq %rdx
leaq -0x58(%rbp), %rbx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x4043
callq 0x647b
movq (%rbx), %rbx
jmp 0x7830
leaq 0x72b9(%rip), %rax      # 0xe5d4
cmpl $0x0, (%rax)
jne 0x732c
leaq 0x36eb(%rip), %rdi      # 0xaa12
callq 0x6515
leaq 0x706d(%rip), %rdi      # 0xe3a0
callq 0x66f4
callq 0x647b
pushq $0x30
jmp 0x7374
leaq 0x728c(%rip), %rax      # 0xe5d4
leaq 0x7289(%rip), %rcx      # 0xe5d8
movl (%rcx), %ecx
orl (%rax), %ecx
jne 0x7361
leaq 0x3692(%rip), %rdi      # 0xa9ee
callq 0x6515
leaq 0x7038(%rip), %rdi      # 0xe3a0
callq 0x66f4
callq 0x647b
pushq $0x2f
popq %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x818c
jmp 0x7829
leaq 0x344c(%rip), %rsi      # 0xa7db
pushq $0x25
popq %rdi
callq 0x63f8
callq 0x64bd
pushq $0x35
popq %rdi
callq 0x493c
movq %rax, %rbx
callq 0x647b
xorl %edi, %edi
callq 0x49b5
movq %rax, %r14
movl 0x4(%rax), %eax
addl $-0x13, %eax
movl %r12d, %r13d
cmpl $-0x7, %eax
ja 0x73e0
movl 0x8(%r14), %esi
movq 0x10(%r14), %rdx
pushq $0x2e
popq %rdi
movq %r14, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x81aa
movq %rax, %r14
callq 0x647b
pushq $0x3a
popq %rdi
callq 0x493c
movq %rax, %r15
callq 0x64d3
leaq 0x71d8(%rip), %r12      # 0xe5d4
incl (%r12)
callq 0x72ae
decl (%r12)
andl $0x0, 0x8(%rsp)
andq $0x0, (%rsp)
pushq $0x1d
popq %r12
movl %r12d, %edi
xorl %esi, %esi
xorl %edx, %edx
movq %rax, %rcx
xorl %r8d, %r8d
movq %r15, %r9
callq 0x8108
andl $0x0, 0x8(%rsp)
andq $0x0, (%rsp)
pushq $0x1f
popq %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r14, %rcx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x8108
andl $0x0, 0x8(%rsp)
andq $0x0, (%rsp)
movl %r12d, %edi
xorl %esi, %esi
xorl %edx, %edx
movq %rbx, %rcx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x8108
movq %rax, %rbx
movl %r13d, 0x40(%rax)
jmp 0x7830
leaq 0x3358(%rip), %rsi      # 0xa7d5
pushq $0x24
popq %rdi
callq 0x63f8
callq 0x64bd
xorl %edi, %edi
callq 0x49b5
movq %rax, %rbx
movl 0x4(%rax), %eax
addl $-0x13, %eax
cmpl $-0x7, %eax
ja 0x74ba
movl 0x8(%rbx), %esi
movq 0x10(%rbx), %rdx
pushq $0x2e
popq %rdi
movq %rbx, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x81aa
movq %rax, %rbx
callq 0x64d3
leaq 0x710e(%rip), %r14      # 0xe5d4
incl (%r14)
callq 0x72ae
decl (%r14)
andl $0x0, 0x8(%rsp)
andq $0x0, (%rsp)
pushq $0x1f
popq %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %rbx, %rcx
xorl %r8d, %r8d
movq %rax, %r9
jmp 0x7824
callq 0x647b
xorl %ebx, %ebx
jmp 0x7830
leaq 0x6ecd(%rip), %rdi      # 0xe3d0
callq 0x7d21
testq %rax, %rax
jne 0x72ef
xorl %edi, %edi
callq 0x49b5
movq %rax, %rbx
movl %r12d, 0x40(%rax)
callq 0x647b
jmp 0x7830
leaq 0x34b7(%rip), %rsi      # 0xa9e7
pushq $0x26
popq %rdi
callq 0x63f8
cmpl $0x39, (%r15)
jne 0x77e5
leaq 0x6e2f(%rip), %rbx      # 0xe378
movq (%rbx), %rax
cmpl $0x10, 0x10(%rax)
jne 0x755e
leaq 0x3457(%rip), %rdi      # 0xa9b0
callq 0x6515
callq 0x64bd
xorl %edi, %edi
callq 0x49b5
movq (%rbx), %rcx
movl 0x10(%rcx), %esi
movq 0x18(%rcx), %rdx
movq %rax, %rdi
xorl %ecx, %ecx
callq 0x87ba
movq %rax, %rbx
testq %rax, %rax
jne 0x7592
leaq 0x3445(%rip), %rdi      # 0xa9d2
callq 0x6515
callq 0x64d3
jmp 0x77e7
callq 0x6491
xorl %edi, %edi
callq 0x723c
movq %rax, %rbx
movl %r12d, 0x40(%rax)
callq 0x64a7
jmp 0x7830
leaq 0x320d(%rip), %rsi      # 0xa7cd
pushq $0x22
popq %rdi
callq 0x63f8
callq 0x64bd
xorl %edi, %edi
callq 0x49b5
movq %rax, %rbx
movl 0x4(%rax), %eax
addl $-0x13, %eax
cmpl $-0x7, %eax
ja 0x75fd
movl 0x8(%rbx), %esi
movq 0x10(%rbx), %rdx
pushq $0x2e
popq %rdi
movq %rbx, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x81aa
movq %rax, %rbx
callq 0x64d3
callq 0x72ae
movq %rax, %r14
cmpl $0x23, (%r15)
jne 0x780a
leaq 0x6d85(%rip), %rdi      # 0xe3a0
callq 0x66f4
callq 0x72ae
movq %rax, %r9
jmp 0x780d
movl %r12d, -0x3c(%rbp)
leaq 0x6d68(%rip), %r14      # 0xe3a0
movq %r14, %rdi
callq 0x66f4
callq 0x64bd
xorl %r15d, %r15d
xorl %edi, %edi
callq 0x49b5
movq %rax, %rbx
callq 0x64d3
callq 0x6491
movl 0x8(%rbx), %edi
callq 0x8728
testl %eax, %eax
jne 0x7674
leaq 0x33ba(%rip), %rdi      # 0xaa29
callq 0x6515
pushq $0x31
popq %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %rbx, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x81aa
movq %rax, %rbx
leaq 0x6f45(%rip), %rax      # 0xe5d8
incl (%rax)
movq $0x0, -0x38(%rbp)
xorl %r13d, %r13d
movq %rax, -0x48(%rbp)
movl %r13d, -0x2c(%rbp)
xorl %eax, %eax
testb $0x1, %al
jne 0x77c4
movl (%r14), %r13d
cmpl $0x38, %r13d
jne 0x76d5
movb $0x1, %al
testl %r15d, %r15d
jne 0x76aa
leaq 0x3389(%rip), %rdi      # 0xaa52
callq 0x6515
xorl %r15d, %r15d
movb $0x1, %al
jmp 0x76aa
leal -0x2f(%r13), %eax
cmpl $0x2, %eax
jb 0x76f0
movq 0x8(%r14), %rsi
leaq 0x33e1(%rip), %rdi      # 0xaaca
callq 0x641f
jmp 0x76a8
cmpl $0x0, -0x2c(%rbp)
je 0x7705
leaq 0x3368(%rip), %rdi      # 0xaa65
callq 0x6515
movl (%r14), %r13d
movq %r14, %rdi
callq 0x66f4
pushq $0x1
popq %rcx
pushq $0x33
popq %rax
cmpl $0x30, %r13d
je 0x7760
xorl %edi, %edi
callq 0x49b5
movq %rax, %r12
cmpl $0x1a, 0x4(%rax)
je 0x7735
leaq 0x335c(%rip), %rdi      # 0xaa8c
callq 0x6515
movl (%r12), %r12d
movq -0x38(%rbp), %r13
testq %r13, %r13
je 0x775a
cmpl (%r13), %r12d
jne 0x7754
leaq 0x3366(%rip), %rdi      # 0xaab5
callq 0x6515
movq 0x30(%r13), %r13
jmp 0x773d
movl -0x2c(%rbp), %ecx
pushq $0x32
popq %rax
movl %ecx, -0x2c(%rbp)
movl %eax, %r13d
pushq $0x40
popq %rdi
leaq 0x1e15(%rip), %rsi      # 0x9585
callq 0x63f8
cmpl $0x2f, (%r14)
jne 0x777f
xorl %ecx, %ecx
jmp 0x778a
pushq $0x1
popq %rdi
callq 0x723c
movq %rax, %rcx
incl %r15d
movl %r13d, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %r8d, %r8d
movl %r12d, %r9d
callq 0x81aa
cmpq $0x0, -0x38(%rbp)
je 0x77b7
movq -0x48(%rbp), %rcx
movq %rax, 0x30(%rcx)
movq %rax, -0x48(%rbp)
jmp 0x76a8
movq %rax, -0x38(%rbp)
movl -0x2c(%rbp), %r13d
jmp 0x76a0
leaq 0x6e0d(%rip), %rax      # 0xe5d8
decl (%rax)
movl %r15d, (%rbx)
movq -0x38(%rbp), %rax
movq %rax, 0x30(%rbx)
callq 0x64a7
movl -0x3c(%rbp), %eax
movl %eax, 0x40(%rbx)
jmp 0x7830
xorl %ebx, %ebx
pushq $0x22
popq %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %rbx, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x81aa
movq %rax, %rbx
callq 0x647b
movl %r12d, 0x40(%rbx)
jmp 0x7830
xorl %r9d, %r9d
andl $0x0, 0x8(%rsp)
andq $0x0, (%rsp)
pushq $0x1e
popq %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %rbx, %rcx
movq %r14, %r8
callq 0x8108
movq %rax, %rbx
movl %r12d, 0x40(%rax)
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop