// File: /workspace/github_c_makefile_star2_O3/oridb[P]mc/mi/flatten.c
// Function: flatten
static Node *
flatten(Flattenctx *fc, Node *n)
{
	Node *r, *u, *t;

	if (!n)
		return NULL;
	r = NULL;
	switch (n->type) {
	case Nblock:	flattenblk(fc, n);	break;
	case Nloopstmt:	flattenloop(fc, n);	break;
	case Niterstmt:	flatteniter(fc, n);	break;
	case Nifstmt:	flattenif(fc, n, NULL);	break;
	case Nmatchstmt:	flattenmatch(fc, n);	break;
	case Nexpr:	flattenexpr(fc, n);     break;
	case Ndecl:
		append(fc, n);
		r = mkexpr(n->loc, Ovar, n->decl.name, NULL);
		if (n->decl.init) {
			t = rval(fc, n->decl.init);
			u = mkexpr(n->loc, Oasn, r, t, NULL);
			u->expr.type = n->decl.type;
			r->expr.type = n->decl.type;
			r->expr.did = n->decl.did;
			flatten(fc, u);
		}
		break;
	default:
		dumpn(n, stderr);
		die("bad node passsed to flatten()");
		break;
	}
	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
testq %rsi, %rsi
je 0x290a5
movq %rsi, %r14
movq %rdi, %rbx
movl 0x8(%r14), %eax
cmpl $0xb, %eax
jne 0x28ad8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x29218
movq (%r14), %rdi
movq 0x20(%r14), %rdx
movl $0x33, %esi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x1d5e2
movq 0x30(%r14), %rsi
testq %rsi, %rsi
je 0x290a5
movq %rax, %r15
movq %rbx, %rdi
callq 0x2925b
movq (%r14), %rdi
movl $0x1d, %esi
movq %r15, %rdx
movq %rax, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x1d5e2
movq 0x28(%r14), %rcx
movq %rcx, 0x20(%rax)
movq %rcx, 0x20(%r15)
movq 0x18(%r14), %rcx
movq %rcx, 0x38(%r15)
movq %rax, %r14
jmp 0x28a66
decl %eax
cmpl $0x7, %eax
ja 0x290b4
leaq 0xf786(%rip), %rcx      # 0x38270
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x50(%rbx), %r15
movq 0x18(%r14), %rsi
movq %rsi, 0x50(%rbx)
cmpq $0x0, 0x20(%r14)
je 0x28b47
xorl %r12d, %r12d
movq 0x28(%r14), %rax
movq (%rax,%r12,8), %rdi
xorl %esi, %esi
callq 0x144db
movq 0x28(%r14), %rcx
movq %rax, (%rcx,%r12,8)
movq 0x28(%r14), %rax
movq (%rax,%r12,8), %rsi
movq %rbx, %rdi
callq 0x28a49
incq %r12
cmpq 0x20(%r14), %r12
jb 0x28b09
movq 0x50(%rbx), %rsi
cmpq 0x18(%r14), %rsi
jne 0x290d4
cmpb $0x0, 0x10(%r15)
je 0x28de1
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rbx, %rdi
xorl %esi, %esi
movl $0x2, %ecx
callq 0x2985f
jmp 0x28deb
movq %r14, %rdi
callq 0x1d422
cmpl $0x35, %eax
jne 0x28db0
movq 0x50(%r14), %rax
movq (%rax), %rax
cmpl $0x9, 0x8(%rax)
jne 0x28db0
cmpl $0x6, 0x18(%rax)
jne 0x28db0
movq %rbx, %rdi
movq %r14, %rsi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x29218
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x2925b
movq %rax, %r15
movq %rax, %rdi
callq 0x29fee
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0x29de7
movq %rbx, %rdi
movq %rax, %rsi
callq 0x28a49
movq %rbx, %rdi
callq 0x29b32
xorl %r13d, %r13d
leaq 0x10(%rsp), %rdx
movq %r13, (%rdx)
leaq 0x60(%rsp), %r15
movq %r13, (%r15)
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rcx
callq 0x2bd1c
cmpq %r13, (%r15)
je 0x290a5
xorl %r14d, %r14d
movq 0x10(%rsp), %rax
movq (%rax,%r14,8), %rsi
movq %rbx, %rdi
callq 0x28a49
incq %r14
cmpq 0x60(%rsp), %r14
jb 0x28c15
jmp 0x290a5
movq %rbx, %rdi
movq %r14, %rsi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x290f3
movq 0x20(%r14), %rdi
callq 0x1e384
movq %rax, %rdi
callq 0x227ac
movl (%rax), %eax
cmpl $0x14, %eax
je 0x28c6f
cmpl $0x15, %eax
jne 0x28df4
movq %rbx, %rdi
movq %r14, %rsi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x29bbf
movq (%r14), %rdi
callq 0x1de03
movq %rax, %r12
movq (%r14), %rdi
callq 0x1de03
movq %rax, 0x8(%rsp)
movq (%r14), %rdi
callq 0x1de03
movq %rax, %rbp
movq (%r14), %rdi
callq 0x1de03
movq %rax, %r15
movq (%r14), %rdi
callq 0x1de03
movq %rax, %r13
movq 0x50(%rbx), %rax
movq %rax, (%rsp)
movq 0x38(%r14), %rax
movq %rax, 0x50(%rbx)
movq 0x40(%rbx), %rax
movq %rax, 0x20(%rsp)
movups 0x30(%rbx), %xmm0
movaps %xmm0, 0x10(%rsp)
movq %r15, 0x30(%rbx)
movq %r13, 0x38(%rbx)
movq 0x38(%r14), %rax
movq %rax, 0x40(%rbx)
incl 0x48(%rbx)
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x28a49
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x299a5
movq %rbx, %rdi
movq %r12, %rsi
callq 0x28a49
movq 0x30(%r14), %rsi
movq %rbx, %rdi
callq 0x28a49
movq %rbx, %rdi
movq %r15, %rsi
callq 0x28a49
movq 0x28(%r14), %rsi
movq %rbx, %rdi
callq 0x28a49
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x28a49
movq 0x20(%r14), %rsi
movq %rbx, %rdi
movq 0x8(%rsp), %r14
movq %r14, %rdx
movq %r13, %rcx
callq 0x29a89
movq %rbx, %rdi
movq %r14, %rsi
callq 0x28a49
movq %rbx, %rdi
callq 0x29b32
movq %rbx, %rdi
movq %r12, %rsi
callq 0x299a5
movq %rbx, %rdi
movq %r13, %rsi
callq 0x28a49
movq %rbx, %rdi
callq 0x29b32
decl 0x48(%rbx)
movaps 0x10(%rsp), %xmm0
movups %xmm0, 0x30(%rbx)
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rbx)
movq (%rsp), %rax
movq %rax, 0x50(%rbx)
jmp 0x290a5
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2925b
testq %rax, %rax
je 0x28dcb
movq %rbx, %rdi
movq %rax, %rsi
callq 0x29218
movq %rbx, %rdi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x29b32
movq %rbx, %rdi
xorl %edx, %edx
callq 0x298fc
movq %r15, 0x50(%rbx)
jmp 0x290a5
movq 0x18(%r14), %rdi
callq 0x29fee
movq %rax, %r15
movq (%rax), %rdi
movl $0x12, %esi
movq %rax, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x1d5e2
movq %rax, %r12
movq %rax, 0x40(%rsp)
movq %r15, %rdi
movq %r15, 0x8(%rsp)
callq 0x1e384
movq (%r14), %rdi
movq %rax, %rsi
callq 0x22d0e
movq %rax, 0x20(%r12)
movq 0x20(%r14), %rdi
callq 0x29fee
movq %rax, %r13
movq (%r15), %rdi
movl $0x12, %esi
movq %rax, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x1d5e2
movq %rax, %r15
movq %rax, 0x30(%rsp)
movq %r13, %rdi
callq 0x1e384
movq (%r14), %rdi
movq %rax, %rsi
callq 0x22d0e
movq %rax, 0x20(%r15)
leaq 0x39379(%rip), %rax     # 0x621f8
movq (%rax), %rax
movq 0x30(%rax), %rax
movq %rax, (%rsp)
movq (%r14), %rdi
callq 0x1de03
movq %rax, %r15
movq %rax, 0x48(%rsp)
movq (%r14), %rdi
callq 0x1de03
movq %rax, %r12
movq %rax, 0x38(%rsp)
movq (%r14), %rdi
callq 0x1de03
movq %rax, %rbp
movq (%r14), %rdi
callq 0x1de03
movq %rax, 0x58(%rsp)
movq (%r14), %rdi
callq 0x1de03
incl 0x48(%rbx)
movq %rax, 0x50(%rsp)
movq 0x40(%rbx), %rcx
movq %rcx, 0x20(%rsp)
movups 0x30(%rbx), %xmm0
movaps %xmm0, 0x10(%rsp)
movq %rbp, 0x30(%rbx)
movq %rbp, 0x28(%rsp)
movq %rax, 0x38(%rbx)
movq 0x28(%r14), %rax
movq 0x18(%rax), %rax
movq %rax, 0x40(%rbx)
movq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x2925b
movq %r13, %rdi
movq %rax, %rsi
callq 0x29de7
movq %rbx, %rdi
movq %rax, %rsi
callq 0x29218
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x299a5
movq %rbx, %rdi
movq %r15, %rsi
callq 0x28a49
movq 0x28(%r14), %rsi
movq %rbx, %rdi
callq 0x28a49
movq %rbx, %rdi
movq %r12, %rsi
callq 0x28a49
movq %r13, %rdi
callq 0x1e384
movq (%r14), %rdi
leaq 0xeebc(%rip), %rdx      # 0x37e1a
movq (%rsp), %rsi
movq %rax, %rcx
callq 0x299e6
movq (%r14), %rdi
movl $0x2d, %esi
movq %rax, %rdx
movq 0x30(%rsp), %rbp
movq %rbp, %rcx
movq 0x40(%rsp), %r12
movq %r12, %r8
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x1d5e2
movq %rax, %r15
movq (%r14), %rdi
movl $0x1, %esi
callq 0x2289d
movq %rax, 0x20(%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x29218
movq %rbx, %rdi
movq 0x28(%rsp), %rsi
callq 0x28a49
movq %r13, %rdi
callq 0x1e384
movq (%r14), %rdi
leaq 0xee3c(%rip), %rdx      # 0x37e09
movq (%rsp), %rsi
movq %rax, %rcx
callq 0x299e6
movq (%r14), %rdi
movl $0x2d, %esi
movq %rax, %rdx
movq %rbp, %rcx
movq %r12, %r8
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x1d5e2
movq %rax, %r15
movq (%r14), %rdi
movl $0x2, %esi
callq 0x2289d
movq (%r14), %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x1e0f5
movq %rax, %r12
movq %rax, %rdi
callq 0x1e384
movq %rax, 0x20(%r15)
movq %r12, %rdi
movq %r15, %rsi
callq 0x29de7
movq %rbx, %rdi
movq %rax, %rsi
callq 0x29218
movq %rbx, %rdi
movq %r12, %rsi
movq 0x58(%rsp), %r12
movq %r12, %rdx
movq 0x50(%rsp), %r15
movq %r15, %rcx
callq 0x29b75
movq %rbx, %rdi
movq %r12, %rsi
callq 0x28a49
movq 0x18(%r14), %rsi
movq %rbx, %rdi
movq 0x8(%rsp), %rdx
movq 0x48(%rsp), %r14
movq %r14, %rcx
movq 0x38(%rsp), %r8
callq 0x29f14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x299a5
movq %rbx, %rdi
movq %r15, %rsi
callq 0x28a49
decl 0x48(%rbx)
movaps 0x10(%rsp), %xmm0
movups %xmm0, 0x30(%rbx)
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rbx)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1af35(%rip), %rax     # 0x43ff0
movq (%rax), %rsi
movq %r14, %rdi
callq 0x13806
leaq 0xf8f3(%rip), %rdi      # 0x389c0
xorl %eax, %eax
callq 0x13844
leaq 0xf903(%rip), %rdi      # 0x389de
leaq 0xf917(%rip), %rsi      # 0x389f9
leaq 0xf91a(%rip), %rcx      # 0x38a03
movl $0x2ce, %edx            # imm = 0x2CE
callq 0x4180