// File: /workspace/github_cpp_makefile_star2_O2/pixlark[P]Badge/src/compiler.cc
// Function: Compiler::compile_stmt(Stmt*)
void compile_stmt(Stmt * stmt)
	{
		switch (stmt->kind) {
		case STMT_LET:
			compile_expr(stmt->let.right);
			push(BC::create(BC_LOAD_CONST,
							Value::raise(stmt->let.left),
							stmt->assoc));
			push(BC::create(BC_CREATE_BINDING,
							stmt->assoc));
			break;
		case STMT_SET: {
			compile_expr(stmt->set.right);
			// Deal with l-expr
			auto left = stmt->set.left;
			switch (left->kind) {
			case EXPR_VARIABLE:
				// Simple variable binding
				push(BC::create(BC_LOAD_CONST,
								Value::raise(left->variable),
								stmt->assoc));
				push(BC::create(BC_UPDATE_BINDING,
								stmt->assoc));
				break;
			case EXPR_FIELD:
				// Field of an object
				compile_expr(left->field.left);
				push(BC::create(BC_LOAD_CONST,
								Value::raise(left->field.right),
								stmt->assoc));
				push(BC::create(BC_UPDATE_FIELD,
								stmt->assoc));
				break;
			default:
				fatal_assoc(left->assoc, "Invalid l-expression");
			}
		} break;
		case STMT_RETURN:
			compile_expr(stmt->_return.expr);
			push(BC::create(BC_RETURN, stmt->assoc));
			break;
		case STMT_EXPR:
			compile_expr(stmt->expr);
			push(BC::create(BC_POP_AND_DISCARD, stmt->assoc));
			break;
		case STMT_BREAK:
			compile_expr(stmt->expr);
			push(BC::create(BC_BREAK_BODY, stmt->assoc));
			break;
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl (%rsi), %eax
cmpq $0x4, %rax
ja 0x4e7f
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x4452(%rip), %rcx      # 0x9170
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x5eac
movq 0x8(%r14), %rax
movl 0x4(%r14), %ecx
pushq $0x2
popq %rdx
movl %edx, -0x30(%rbp)
movl %ecx, -0x2c(%rbp)
movl %edx, -0x28(%rbp)
movq %rax, -0x20(%rbp)
movq %rax, 0x10(%rsp)
movups -0x30(%rbp), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x6ef2
movl 0x4(%r14), %eax
movl $0x4, -0x30(%rbp)
jmp 0x4e63
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x5eac
movl 0x4(%r14), %eax
movl $0x22, -0x30(%rbp)
jmp 0x4e63
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x5eac
movl 0x4(%r14), %eax
movl $0x14, -0x30(%rbp)
jmp 0x4e63
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x5eac
movl 0x4(%r14), %eax
movl $0x1, -0x30(%rbp)
jmp 0x4e63
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x5eac
movq 0x8(%r14), %r15
movl (%r15), %eax
cmpl $0xc, %eax
je 0x4e1f
cmpl $0x3, %eax
jne 0x4e8a
movq 0x8(%r15), %rax
movl 0x4(%r14), %ecx
pushq $0x2
popq %rdx
movl %edx, -0x30(%rbp)
movl %ecx, -0x2c(%rbp)
movl %edx, -0x28(%rbp)
movq %rax, -0x20(%rbp)
movq %rax, 0x10(%rsp)
movups -0x30(%rbp), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x6ef2
movl 0x4(%r14), %eax
movl $0x5, -0x30(%rbp)
jmp 0x4e63
movq 0x8(%r15), %rsi
movq %rbx, %rdi
callq 0x5eac
movq 0x10(%r15), %rax
movl 0x4(%r14), %ecx
pushq $0x2
popq %rdx
movl %edx, -0x30(%rbp)
movl %ecx, -0x2c(%rbp)
movl %edx, -0x28(%rbp)
movq %rax, -0x20(%rbp)
movq %rax, 0x10(%rsp)
movups -0x30(%rbp), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x6ef2
movl 0x4(%r14), %eax
movl $0x20, -0x30(%rbp)
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rax
movq %rax, 0x10(%rsp)
movups -0x30(%rbp), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x6ef2
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl 0x4(%r15), %edi
leaq 0x49fb(%rip), %rsi      # 0x9890
xorl %eax, %eax
callq 0x1b51