// File: /workspace/github_c_makefile_star2_O1/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
movq %rsi, %r14
movq %rdi, %rbx
testq %r14, %r14
je 0x29597
movl 0x8(%r14), %eax
cmpl $0xb, %eax
jne 0x28fca
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2970a
movq (%r14), %rdi
movq 0x20(%r14), %rdx
movl $0x33, %esi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x1d832
movq 0x30(%r14), %rsi
testq %rsi, %rsi
je 0x29597
movq %rax, %r15
movq %rbx, %rdi
callq 0x2974d
movq (%r14), %rdi
movl $0x1d, %esi
movq %r15, %rdx
movq %rax, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x1d832
movq 0x28(%r14), %rcx
movq %rcx, 0x20(%rax)
movq 0x28(%r14), %rcx
movq %rcx, 0x20(%r15)
movq 0x18(%r14), %rcx
movq %rcx, 0x38(%r15)
movq %rax, %r14
jmp 0x28f4b
decl %eax
cmpl $0x7, %eax
ja 0x295a6
leaq 0xf2c4(%rip), %rcx      # 0x382a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x50(%rbx), %r15
movq 0x18(%r14), %rax
movq %rax, 0x50(%rbx)
cmpq $0x0, 0x20(%r14)
je 0x2902b
xorl %r12d, %r12d
movq 0x28(%r14), %rax
movq (%rax,%r12,8), %rdi
xorl %esi, %esi
callq 0x14703
movq 0x28(%r14), %rcx
movq %rax, (%rcx,%r12,8)
movq 0x28(%r14), %rax
movq (%rax,%r12,8), %rsi
movq %rbx, %rdi
callq 0x28f37
incq %r12
cmpq 0x20(%r14), %r12
jb 0x28ffb
movq 0x50(%rbx), %rsi
cmpq 0x18(%r14), %rsi
jne 0x295c6
cmpb $0x0, 0x10(%r15)
je 0x292d3
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rbx, %rdi
xorl %esi, %esi
movl $0x2, %ecx
callq 0x29d47
jmp 0x292dd
movq %r14, %rdi
callq 0x1d672
cmpl $0x35, %eax
jne 0x292a2
movq 0x50(%r14), %rax
movq (%rax), %rax
cmpl $0x9, 0x8(%rax)
jne 0x292a2
cmpl $0x6, 0x18(%rax)
jne 0x292a2
movq %rbx, %rdi
movq %r14, %rsi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2970a
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x2974d
movq %rax, %r15
movq %rax, %rdi
callq 0x2a4e0
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0x2a2d9
movq %rbx, %rdi
movq %rax, %rsi
callq 0x28f37
movq %rbx, %rdi
callq 0x2a026
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 0x2c215
cmpq %r13, (%r15)
je 0x29597
xorl %r14d, %r14d
movq 0x10(%rsp), %rax
movq (%rax,%r14,8), %rsi
movq %rbx, %rdi
callq 0x28f37
incq %r14
cmpq 0x60(%rsp), %r14
jb 0x29107
jmp 0x29597
movq %rbx, %rdi
movq %r14, %rsi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x295e5
movq 0x20(%r14), %rdi
callq 0x1e5d4
movq %rax, %rdi
callq 0x22c44
movl (%rax), %eax
cmpl $0x14, %eax
je 0x29161
cmpl $0x15, %eax
jne 0x292e6
movq %rbx, %rdi
movq %r14, %rsi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2a0b1
movq (%r14), %rdi
callq 0x1e053
movq %rax, %r12
movq (%r14), %rdi
callq 0x1e053
movq %rax, 0x8(%rsp)
movq (%r14), %rdi
callq 0x1e053
movq %rax, %rbp
movq (%r14), %rdi
callq 0x1e053
movq %rax, %r15
movq (%r14), %rdi
callq 0x1e053
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 0x28f37
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x29e99
movq %rbx, %rdi
movq %r12, %rsi
callq 0x28f37
movq 0x30(%r14), %rsi
movq %rbx, %rdi
callq 0x28f37
movq %rbx, %rdi
movq %r15, %rsi
callq 0x28f37
movq 0x28(%r14), %rsi
movq %rbx, %rdi
callq 0x28f37
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x28f37
movq 0x20(%r14), %rsi
movq %rbx, %rdi
movq 0x8(%rsp), %r14
movq %r14, %rdx
movq %r13, %rcx
callq 0x29f7d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x28f37
movq %rbx, %rdi
callq 0x2a026
movq %rbx, %rdi
movq %r12, %rsi
callq 0x29e99
movq %rbx, %rdi
movq %r13, %rsi
callq 0x28f37
movq %rbx, %rdi
callq 0x2a026
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 0x29597
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2974d
testq %rax, %rax
je 0x292bd
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2970a
movq %rbx, %rdi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2a026
movq %rbx, %rdi
xorl %edx, %edx
callq 0x29df0
movq %r15, 0x50(%rbx)
jmp 0x29597
movq 0x18(%r14), %rdi
callq 0x2a4e0
movq %rax, %r15
movq (%rax), %rdi
movl $0x12, %esi
movq %rax, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x1d832
movq %rax, %r12
movq %rax, 0x40(%rsp)
movq %r15, %rdi
movq %r15, 0x8(%rsp)
callq 0x1e5d4
movq (%r14), %rdi
movq %rax, %rsi
callq 0x231bc
movq %rax, 0x20(%r12)
movq 0x20(%r14), %rdi
callq 0x2a4e0
movq %rax, %r13
movq (%r15), %rdi
movl $0x12, %esi
movq %rax, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x1d832
movq %rax, %r15
movq %rax, 0x30(%rsp)
movq %r13, %rdi
callq 0x1e5d4
movq (%r14), %rdi
movq %rax, %rsi
callq 0x231bc
movq %rax, 0x20(%r15)
leaq 0x38e87(%rip), %rax     # 0x621f8
movq (%rax), %rax
movq 0x30(%rax), %rax
movq %rax, (%rsp)
movq (%r14), %rdi
callq 0x1e053
movq %rax, %r15
movq %rax, 0x48(%rsp)
movq (%r14), %rdi
callq 0x1e053
movq %rax, %r12
movq %rax, 0x38(%rsp)
movq (%r14), %rdi
callq 0x1e053
movq %rax, %rbp
movq (%r14), %rdi
callq 0x1e053
movq %rax, 0x58(%rsp)
movq (%r14), %rdi
callq 0x1e053
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 0x2974d
movq %r13, %rdi
movq %rax, %rsi
callq 0x2a2d9
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2970a
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x29e99
movq %rbx, %rdi
movq %r15, %rsi
callq 0x28f37
movq 0x28(%r14), %rsi
movq %rbx, %rdi
callq 0x28f37
movq %rbx, %rdi
movq %r12, %rsi
callq 0x28f37
movq %r13, %rdi
callq 0x1e5d4
movq (%r14), %rdi
leaq 0xe9fa(%rip), %rdx      # 0x37e4a
movq (%rsp), %rsi
movq %rax, %rcx
callq 0x29eda
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 0x1d832
movq %rax, %r15
movq (%r14), %rdi
movl $0x1, %esi
callq 0x22d38
movq %rax, 0x20(%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2970a
movq %rbx, %rdi
movq 0x28(%rsp), %rsi
callq 0x28f37
movq %r13, %rdi
callq 0x1e5d4
movq (%r14), %rdi
leaq 0xe97a(%rip), %rdx      # 0x37e39
movq (%rsp), %rsi
movq %rax, %rcx
callq 0x29eda
movq (%r14), %rdi
movl $0x2d, %esi
movq %rax, %rdx
movq %rbp, %rcx
movq %r12, %r8
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x1d832
movq %rax, %r15
movq (%r14), %rdi
movl $0x2, %esi
callq 0x22d38
movq (%r14), %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x1e345
movq %rax, %r12
movq %rax, %rdi
callq 0x1e5d4
movq %rax, 0x20(%r15)
movq %r12, %rdi
movq %r15, %rsi
callq 0x2a2d9
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2970a
movq %rbx, %rdi
movq %r12, %rsi
movq 0x58(%rsp), %r12
movq %r12, %rdx
movq 0x50(%rsp), %r15
movq %r15, %rcx
callq 0x2a067
movq %rbx, %rdi
movq %r12, %rsi
callq 0x28f37
movq 0x18(%r14), %rsi
movq %rbx, %rdi
movq 0x8(%rsp), %rdx
movq 0x48(%rsp), %r14
movq %r14, %rcx
movq 0x38(%rsp), %r8
callq 0x2a406
movq %rbx, %rdi
movq %r14, %rsi
callq 0x29e99
movq %rbx, %rdi
movq %r15, %rsi
callq 0x28f37
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 0x1aa43(%rip), %rax     # 0x43ff0
movq (%rax), %rsi
movq %r14, %rdi
callq 0x139c1
leaq 0xf431(%rip), %rdi      # 0x389f0
xorl %eax, %eax
callq 0x13a00
leaq 0xf441(%rip), %rdi      # 0x38a0e
leaq 0xf455(%rip), %rsi      # 0x38a29
leaq 0xf458(%rip), %rcx      # 0x38a33
movl $0x2ce, %edx            # imm = 0x2CE
callq 0x4180