// File: /workspace/github_c_makefile_star2_O2/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_type_StackType_topzenamespaces
static struct std_list_List_1 mw_mirth_type_StackType_topzenamespaces (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_type_StackType in_StackType_2, struct mirth_mirth_zaMirth* *out_zaMirth_3) {
	struct std_list_List_1 v5 = { .tag=std_list_List_1_Nil };
	struct std_list_List_1 v6;
	mw_std_list_List_1_buildzx(v5, &v6);
	incref(MK_mirth_type_StackType(in_StackType_2));
	struct mirth_mirth_zaMirth* v7;
	struct std_maybe_Maybe_1 v8 = mw_mirth_type_StackType_topzetyconzy(in_zaMirth_1, in_StackType_2, &v7);
	struct std_list_List_1 branch_zaLister_9;
	switch ((v8).tag) {
		case std_maybe_Maybe_1_Some: {
			VAL v10 = mtp_std_maybe_Maybe_1_Some(v8);
			struct mirth_name_Namespace v11 = mtw_mirth_name_Namespace_Tycon(V_mirth_tycon_Tycon(v10));
			struct std_list_List_1 v12;
			mw_std_list_zaLister_1_pushzx(MK_mirth_name_Namespace(v11), v6, &v12);
			branch_zaLister_9 = v12;
		} break;
		case std_maybe_Maybe_1_None: {
			branch_zaLister_9 = v6;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	struct mirth_mirth_zaMirth* v13;
	struct std_list_List_1 v14 = mw_mirth_type_StackType_topzeresourcezetycons(v7, in_StackType_2, &v13);
	bool v15 = true;
	struct std_list_List_1 r16 = branch_zaLister_9;
	struct std_list_List_1 v17 = v14;
	bool v18 = v15;
	bool v19 = v15;
	while (v19) {
		struct std_list_List_1 r20 = r16;
		struct std_list_List_1 v21 = v17;
		bool v22 = v18;
		struct std_list_List_1 branch_zaLister_23;
		struct std_list_List_1 branch_List_24;
		bool branch_Bool_25;
		switch ((v21).tag) {
			case std_list_List_1_Cons: {
				struct std_list_List_1 v26;
				VAL v27 = mtp_std_list_List_1_Cons(v21, &v26);
				struct mirth_name_Namespace v28 = mtw_mirth_name_Namespace_Tycon(V_mirth_tycon_Tycon(v27));
				struct std_list_List_1 v29;
				mw_std_list_zaLister_1_pushzx(MK_mirth_name_Namespace(v28), r20, &v29);
				bool v30 = true;
				branch_Bool_25 = v30;
				branch_List_24 = v26;
				branch_zaLister_23 = v29;
			} break;
			case std_list_List_1_Nil: {
				struct std_list_List_1 v31 = { .tag=std_list_List_1_Nil };
				bool v32 = false;
				branch_Bool_25 = v32;
				branch_List_24 = v31;
				branch_zaLister_23 = r20;
			} break;
			default: {
				do_panic(str_make("unexpected fallthrough in match\n", 32));
			}
		}
		v19 = branch_Bool_25;
		v18 = branch_Bool_25;
		v17 = branch_List_24;
		r16 = branch_zaLister_23;
	}
	decref(MK_std_list_List_1(v17));
	struct std_list_List_1 v33 = mw_std_list_zaLister_1_donezx(r16);
	*out_zaMirth_3 = v13;
	return v33;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, -0x48(%rbp)
movq %rdx, %r12
movl %esi, %r13d
movq %rdi, %rbx
movabsq $0xfffffffffffc, %r14   # imm = 0xFFFFFFFFFFFC
xorl %edi, %edi
xorl %esi, %esi
callq 0xcd32
movl %eax, -0x2c(%rbp)
movq %rdx, %r15
movq %r12, %rax
andq %r14, %rax
sete %cl
testb $0x3, %r12b
setne %dl
orb %cl, %dl
jne 0x4a13b
incl (%rax)
leaq -0x40(%rbp), %rcx
movq %rbx, %rdi
movl %r13d, %esi
movq %r12, %rdx
callq 0x4b141
cmpl $0x1, %eax
jne 0x4a1da
movq %rdx, %rdi
callq 0xd491
movq -0x40(%rbp), %rdi
movq %rax, %rsi
shrq $0x30, %rsi
andq %r14, %rax
leaq -0x58(%rbp), %rbx
movq %rax, %rdx
movq %rbx, %rcx
callq 0x2a670
movq (%rbx), %rbx
testl %eax, %eax
je 0x4a1de
cmpl $0x1, %eax
jne 0x4a2bc
movq %rdx, %rdi
callq 0xd491
movq %rax, %rdi
shrq $0x30, %rdi
andq %r14, %rax
movq %rax, %rsi
callq 0x17351
movabsq $0x3000000000000, %rcx  # imm = 0x3000000000000
orq %rcx, %rax
leaq 0xbe780(%rip), %rsi     # 0x108939
leaq -0x40(%rbp), %r8
movq %rax, %rdi
movl -0x2c(%rbp), %edx
movq %r15, %rcx
movq %r8, %r15
callq 0x8e35
movl (%r15), %eax
movl %eax, -0x2c(%rbp)
movq 0x8(%r15), %r15
jmp 0x4a1de
movq -0x40(%rbp), %rbx
leaq -0x60(%rbp), %rcx
movq %rbx, %rdi
movl %r13d, %esi
movq %r12, %rdx
callq 0x4af7b
leaq 0xbe742(%rip), %r12     # 0x108939
leaq -0x40(%rbp), %r13
leaq -0x58(%rbp), %rbx
movb $0x1, %cl
movq %rdx, %rdi
testb $0x1, %cl
je 0x4a26b
xorl %ecx, %ecx
movl $0x0, %edx
testl %eax, %eax
je 0x4a201
cmpl $0x1, %eax
jne 0x4a2bc
movq %r13, %rsi
callq 0xce01
movq %rax, %rdi
shrq $0x30, %rdi
andq %r14, %rax
movq %rax, %rsi
callq 0x17351
movabsq $0x3000000000000, %rcx  # imm = 0x3000000000000
orq %rcx, %rax
movq %rax, %rdi
movq %r12, %rsi
movl -0x2c(%rbp), %edx
movq %r15, %rcx
movq %rbx, %r8
callq 0x8e35
movl -0x40(%rbp), %eax
movq -0x38(%rbp), %rdx
movl -0x58(%rbp), %ecx
movl %ecx, -0x2c(%rbp)
movq -0x50(%rbp), %r15
jmp 0x4a1ff
andq %rdi, %r14
sete %cl
testb $0x3, %dil
setne %dl
orb %cl, %dl
jne 0x4a297
decl (%r14)
jne 0x4a297
shlq $0x30, %rax
orq %rdi, %rax
leaq 0xbdfea(%rip), %rsi     # 0x108279
movq %rax, %rdi
callq 0xce94
movl -0x2c(%rbp), %edi
movq %r15, %rsi
callq 0xcd32
movq -0x60(%rbp), %rcx
movq -0x48(%rbp), %rsi
movq %rcx, (%rsi)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8a54a(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6