// File: /workspace/github_c_makefile_star2_O2/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
leaq 0xe8b5(%rip), %r13      # 0x34280
pushq $0x33
popq %rbp
pushq $0x1d
popq %r15
testq %r14, %r14
je 0x25ff1
movl 0x8(%r14), %eax
decl %eax
cmpl $0xa, %eax
ja 0x26000
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
movq %rbx, %rdi
movq %r14, %rsi
callq 0x26164
movq (%r14), %rdi
movq 0x20(%r14), %rdx
movl %ebp, %esi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x1b718
movq 0x30(%r14), %rsi
testq %rsi, %rsi
je 0x25ff1
movq %rax, %r12
movq %rbx, %rdi
callq 0x261a7
movq (%r14), %rdi
movl %r15d, %esi
movq %r12, %rdx
movq %rax, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x1b718
movq 0x28(%r14), %rcx
movq %rcx, 0x20(%rax)
movq %rcx, 0x20(%r12)
movq 0x18(%r14), %rcx
movq %rcx, 0x38(%r12)
movq %rax, %r14
jmp 0x259d2
movq 0x20(%r14), %rdi
callq 0x1bf90
movq %rax, %rdi
callq 0x1fcd8
movl (%rax), %eax
cmpl $0x14, %eax
je 0x25a7e
cmpl $0x15, %eax
jne 0x25d4b
movq %rbx, %rdi
movq %r14, %rsi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x26ad2
movq %r14, %rdi
callq 0x1b5e6
cmpl $0x35, %eax
jne 0x25d07
movq 0x50(%r14), %rax
movq (%rax), %rax
cmpl $0x9, 0x8(%rax)
jne 0x25d07
cmpl $0x6, 0x18(%rax)
jne 0x25d07
movq %rbx, %rdi
movq %r14, %rsi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x26164
movq 0x50(%rbx), %r15
movq 0x18(%r14), %rax
movq %rax, 0x50(%rbx)
xorl %r12d, %r12d
cmpq 0x20(%r14), %r12
jae 0x25b1d
movq 0x28(%r14), %rax
movq (%rax,%r12,8), %rdi
xorl %esi, %esi
callq 0x12bd3
movq 0x28(%r14), %rcx
movq %rax, (%rcx,%r12,8)
movq 0x28(%r14), %rax
movq (%rax,%r12,8), %rsi
movq %rbx, %rdi
callq 0x259b0
incq %r12
jmp 0x25aeb
movq 0x50(%rbx), %rsi
cmpq 0x18(%r14), %rsi
jne 0x26020
cmpb $0x0, 0x10(%r15)
je 0x25d38
pushq $0x2
popq %rcx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rbx, %rdi
xorl %esi, %esi
callq 0x26795
jmp 0x25d42
movq %rbx, %rdi
movq %r14, %rsi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2603f
movq (%r14), %rdi
callq 0x1bc4f
movq %rax, %r12
movq (%r14), %rdi
callq 0x1bc4f
movq %rax, 0x8(%rsp)
movq (%r14), %rdi
callq 0x1bc4f
movq %rax, %rbp
movq (%r14), %rdi
callq 0x1bc4f
movq %rax, %r15
movq (%r14), %rdi
callq 0x1bc4f
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 0x259b0
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x268cb
movq %rbx, %rdi
movq %r12, %rsi
callq 0x259b0
movq 0x30(%r14), %rsi
movq %rbx, %rdi
callq 0x259b0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x259b0
movq 0x28(%r14), %rsi
movq %rbx, %rdi
callq 0x259b0
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x259b0
movq 0x20(%r14), %rsi
movq %rbx, %rdi
movq 0x8(%rsp), %r14
movq %r14, %rdx
movq %r13, %rcx
callq 0x2699d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x259b0
movq %rbx, %rdi
callq 0x26a46
movq %rbx, %rdi
movq %r12, %rsi
callq 0x268cb
movq %rbx, %rdi
movq %r13, %rsi
callq 0x259b0
movq %rbx, %rdi
callq 0x26a46
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 0x25ff1
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x261a7
movq %rax, %r15
movq %rax, %rdi
callq 0x26edc
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0x26cf2
movq %rbx, %rdi
movq %rax, %rsi
callq 0x259b0
movq %rbx, %rdi
callq 0x26a46
leaq 0x10(%rsp), %rdx
andq $0x0, (%rdx)
leaq 0x60(%rsp), %rcx
andq $0x0, (%rcx)
movq %r14, %rdi
movq %r12, %rsi
callq 0x28a03
xorl %r14d, %r14d
cmpq 0x60(%rsp), %r14
jae 0x25ff1
movq 0x10(%rsp), %rax
movq (%rax,%r14,8), %rsi
movq %rbx, %rdi
callq 0x259b0
incq %r14
jmp 0x25ce6
movq %rbx, %rdi
movq %r14, %rsi
callq 0x261a7
testq %rax, %rax
je 0x25d22
movq %rbx, %rdi
movq %rax, %rsi
callq 0x26164
movq %rbx, %rdi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x26a46
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2682d
movq %r15, 0x50(%rbx)
jmp 0x25ff1
movq 0x18(%r14), %rdi
callq 0x26edc
movq %rax, %r15
movq (%rax), %rdi
pushq $0x12
popq %rbp
movl %ebp, %esi
movq %rax, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x1b718
movq %rax, %r12
movq %rax, 0x40(%rsp)
movq %r15, %rdi
movq %r15, 0x8(%rsp)
callq 0x1bf90
movq (%r14), %rdi
movq %rax, %rsi
callq 0x2020c
movq %rax, 0x20(%r12)
movq 0x20(%r14), %rdi
callq 0x26edc
movq %rax, %r13
movq (%r15), %rdi
movl %ebp, %esi
movq %rax, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x1b718
movq %rax, %r15
movq %rax, 0x30(%rsp)
movq %r13, %rdi
callq 0x1bf90
movq (%r14), %rdi
movq %rax, %rsi
callq 0x2020c
movq %rax, 0x20(%r15)
leaq 0x39425(%rip), %rax     # 0x5f1f8
movq (%rax), %rax
movq 0x30(%rax), %rax
movq %rax, (%rsp)
movq (%r14), %rdi
callq 0x1bc4f
movq %rax, %r15
movq %rax, 0x48(%rsp)
movq (%r14), %rdi
callq 0x1bc4f
movq %rax, %r12
movq %rax, 0x38(%rsp)
movq (%r14), %rdi
callq 0x1bc4f
movq %rax, %rbp
movq (%r14), %rdi
callq 0x1bc4f
movq %rax, 0x58(%rsp)
movq (%r14), %rdi
callq 0x1bc4f
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 0x261a7
movq %r13, %rdi
movq %rax, %rsi
callq 0x26cf2
movq %rbx, %rdi
movq %rax, %rsi
callq 0x26164
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x268cb
movq %rbx, %rdi
movq %r15, %rsi
callq 0x259b0
movq 0x28(%r14), %rsi
movq %rbx, %rdi
callq 0x259b0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x259b0
movq %r13, %rdi
callq 0x1bf90
movq (%r14), %rdi
leaq 0xdf78(%rip), %rdx      # 0x33e2a
movq (%rsp), %rsi
movq %rax, %rcx
callq 0x26908
movq (%r14), %rdi
pushq $0x2d
popq %rsi
movq %rax, %rdx
movq 0x30(%rsp), %rbp
movq %rbp, %rcx
movq 0x40(%rsp), %r12
movq %r12, %r8
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x1b718
movq %rax, %r15
movq (%r14), %rdi
pushq $0x1
popq %rsi
callq 0x1fdc2
movq %rax, 0x20(%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x26164
movq %rbx, %rdi
movq 0x28(%rsp), %rsi
callq 0x259b0
movq %r13, %rdi
callq 0x1bf90
movq (%r14), %rdi
leaq 0xdefc(%rip), %rdx      # 0x33e19
movq (%rsp), %rsi
movq %rax, %rcx
callq 0x26908
movq (%r14), %rdi
pushq $0x2d
popq %rsi
movq %rax, %rdx
movq %rbp, %rcx
movq %r12, %r8
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x1b718
movq %rax, %r15
movq (%r14), %rdi
pushq $0x2
popq %rsi
callq 0x1fdc2
movq (%r14), %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x1bdcc
movq %rax, %r12
movq %rax, %rdi
callq 0x1bf90
movq %rax, 0x20(%r15)
movq %r12, %rdi
movq %r15, %rsi
callq 0x26cf2
movq %rbx, %rdi
movq %rax, %rsi
callq 0x26164
movq %rbx, %rdi
movq %r12, %rsi
movq 0x58(%rsp), %r12
movq %r12, %rdx
movq 0x50(%rsp), %r15
movq %r15, %rcx
callq 0x26a8c
movq %rbx, %rdi
movq %r12, %rsi
callq 0x259b0
movq 0x18(%r14), %rsi
movq %rbx, %rdi
movq 0x8(%rsp), %rdx
movq 0x48(%rsp), %r14
movq %r14, %rcx
movq 0x38(%rsp), %r8
callq 0x26e15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x268cb
movq %rbx, %rdi
movq %r15, %rsi
callq 0x259b0
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 0x1afe9(%rip), %rax     # 0x40ff0
movq (%rax), %rsi
movq %r14, %rdi
callq 0x1201b
leaq 0xe9c7(%rip), %rdi      # 0x349e0
xorl %eax, %eax
callq 0x1205c
leaq 0xe9d7(%rip), %rdi      # 0x349fe
leaq 0xe9eb(%rip), %rsi      # 0x34a19
leaq 0xe9ee(%rip), %rcx      # 0x34a23
movl $0x2ce, %edx            # imm = 0x2CE
callq 0x4180