// File: /workspace/github_c_makefile_star2_O3/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, -0x2c(%rbp)
movq %rdi, %rbx
movabsq $0xfffffffffffc, %r13   # imm = 0xFFFFFFFFFFFC
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xd01b
movl %eax, %r15d
movq %rdx, %r14
movq %r12, %rax
andq %r13, %rax
sete %cl
movq %r12, %r8
testb $0x3, %r12b
setne %dl
orb %cl, %dl
jne 0x4e83a
incl (%rax)
leaq -0x40(%rbp), %rcx
movq %rbx, %rdi
movl -0x2c(%rbp), %r13d
movl %r13d, %esi
movq %r8, %r12
movq %r8, %rdx
callq 0x4f872
cmpl $0x1, %eax
jne 0x4e8f1
movq %rdx, %rdi
callq 0xd745
movq -0x40(%rbp), %rdi
movq %rax, %rsi
shrq $0x30, %rsi
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
leaq -0x58(%rbp), %rbx
movq %rax, %rdx
movq %rbx, %rcx
callq 0x2cfb8
movq (%rbx), %rbx
testl %eax, %eax
je 0x4e8f5
cmpl $0x1, %eax
jne 0x4e9a1
movq %rdx, %rdi
callq 0xd745
movq %rax, %rdi
shrq $0x30, %rdi
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
movq %rax, %rsi
callq 0x1947e
movabsq $0x3000000000000, %rcx  # imm = 0x3000000000000
orq %rcx, %rax
leaq 0xc3066(%rip), %rsi     # 0x111939
leaq -0x40(%rbp), %r8
movq %rax, %rdi
movl %r15d, %edx
movq %r14, %rcx
movq %r8, %r14
callq 0x949e
movl (%r14), %r15d
movq 0x8(%r14), %r14
jmp 0x4e8f5
movq -0x40(%rbp), %rbx
leaq -0x60(%rbp), %rcx
movq %rbx, %rdi
movl %r13d, %esi
movq %r12, %rdx
callq 0x4f6b9
movq %rdx, %rdi
leaq 0xc3028(%rip), %rbx     # 0x111939
leaq -0x40(%rbp), %r12
leaq -0x58(%rbp), %r13
cmpl $0x1, %eax
jne 0x4e974
movq %r12, %rsi
callq 0xd0aa
movq %rax, %rdi
shrq $0x30, %rdi
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
movq %rax, %rsi
callq 0x1947e
movabsq $0x3000000000000, %rcx  # imm = 0x3000000000000
orq %rcx, %rax
movq %rax, %rdi
movq %rbx, %rsi
movl %r15d, %edx
movq %r14, %rcx
movq %r13, %r8
callq 0x949e
movl -0x40(%rbp), %eax
movq -0x38(%rbp), %rdi
movl -0x58(%rbp), %r15d
movq -0x50(%rbp), %r14
jmp 0x4e919
testl %eax, %eax
jne 0x4e9a1
xorl %edi, %edi
xorl %esi, %esi
movl %r15d, %edx
movq %r14, %rcx
callq 0xd01b
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
movl $0x20, %edi
callq 0xf5e4
movq $0x20, 0x10(%rax)
movups 0x91d13(%rip), %xmm0    # 0xe06cd
movups %xmm0, 0x18(%rax)
movups 0x91d18(%rip), %xmm0    # 0xe06dd
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x9302