// File: /workspace/github_c_makefile_star2_O2/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_type_StackType_ctype
static struct mirth_type_CTypeStack* mw_mirth_type_StackType_ctype (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_type_StackType in_StackType_2, struct mirth_mirth_zaMirth* *out_zaMirth_3) {
	struct mirth_mirth_zaMirth* v5;
	struct std_list_List_1 v6;
	struct mirth_type_StackTypeBase v7 = mw_mirth_type_StackType_splitzeparts(in_zaMirth_1, in_StackType_2, &v5, &v6);
	struct std_list_List_1 v8 = { .tag=std_list_List_1_Nil };
	struct std_list_List_1 v9;
	mw_std_list_List_1_buildzx(v8, &v9);
	bool v10 = true;
	struct mirth_mirth_zaMirth* r11 = v5;
	struct std_list_List_1 r12 = v9;
	struct std_list_List_1 v13 = v6;
	bool v14 = v10;
	bool v15 = v10;
	while (v15) {
		struct mirth_mirth_zaMirth* r16 = r11;
		struct std_list_List_1 r17 = r12;
		struct std_list_List_1 v18 = v13;
		bool v19 = v14;
		struct mirth_mirth_zaMirth* branch_zaMirth_20;
		struct std_list_List_1 branch_zaLister_21;
		struct std_list_List_1 branch_List_22;
		bool branch_Bool_23;
		switch ((v18).tag) {
			case std_list_List_1_Cons: {
				struct std_list_List_1 v24;
				VAL v25 = mtp_std_list_List_1_Cons(v18, &v24);
				struct mirth_mirth_zaMirth* v26;
				struct mirth_type_CTypeStackPart v27 = mw_mirth_type_StackTypePart_ctype(r16, V_mirth_type_StackTypePart(v25), &v26);
				struct std_list_List_1 v28;
				mw_std_list_zaLister_1_pushzx(MK_mirth_type_CTypeStackPart(v27), r17, &v28);
				bool v29 = true;
				branch_Bool_23 = v29;
				branch_List_22 = v24;
				branch_zaLister_21 = v28;
				branch_zaMirth_20 = v26;
			} break;
			case std_list_List_1_Nil: {
				struct std_list_List_1 v30 = { .tag=std_list_List_1_Nil };
				bool v31 = false;
				branch_Bool_23 = v31;
				branch_List_22 = v30;
				branch_zaLister_21 = r17;
				branch_zaMirth_20 = r16;
			} break;
			default: {
				do_panic(str_make("unexpected fallthrough in match\n", 32));
			}
		}
		v15 = branch_Bool_23;
		v14 = branch_Bool_23;
		v13 = branch_List_22;
		r12 = branch_zaLister_21;
		r11 = branch_zaMirth_20;
	}
	decref(MK_std_list_List_1(v13));
	struct std_list_List_1 v32 = mw_std_list_zaLister_1_donezx(r12);
	struct mirth_mirth_zaMirth* v33;
	struct std_maybe_Maybe_1 v34 = mw_mirth_type_StackTypeBase_ctypezy(r11, v7, &v33);
	struct mirth_type_CTypeStack* v35 = mtw_mirth_type_CTypeStack_CTypeStack(v34, v32);
	*out_zaMirth_3 = v33;
	return v35;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, -0x58(%rbp)
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
leaq -0x70(%rbp), %rbx
leaq -0x80(%rbp), %r15
movq %rbx, %rcx
movq %r15, %r8
callq 0x32573
movl %eax, -0x50(%rbp)
movq %rdx, %r13
xorl %edi, %edi
xorl %esi, %esi
callq 0xcd32
movq (%rbx), %r14
movl (%r15), %edi
movq 0x8(%r15), %rcx
leaq -0x68(%rbp), %rsi
leaq 0x763ac(%rip), %r15     # 0xd33b0
movb $0x1, %r8b
movq %rcx, %r9
testb $0x1, %r8b
je 0x5d19b
xorl %r8d, %r8d
movl $0x0, %ecx
testl %edi, %edi
je 0x5d007
movq %rdx, -0x40(%rbp)
movl %eax, -0x4c(%rbp)
cmpl $0x1, %edi
jne 0x5d25b
movq %r9, %rdi
callq 0xce01
movq %rax, %rbx
shrq $0x30, %rax
cmpw $0x3, %ax
ja 0x5d25b
movq %rbx, %rdi
andq %r12, %rdi
movslq (%r15,%rax,4), %rax
addq %r15, %rax
jmpq *%rax
callq 0x3aac9
movq %r14, %rdi
movl %eax, %esi
leaq -0x38(%rbp), %rcx
callq 0x5d2b5
movl %eax, %r14d
movq %rdx, %r15
pushq $0x1
popq %rdi
pushq $0x18
popq %rsi
callq 0x50c0
testq %rax, %rax
jne 0x5d0b3
jmp 0x5d2ac
callq 0x3ab5d
movq %r14, %rdi
movl %eax, %esi
leaq -0x38(%rbp), %rcx
callq 0x5d473
movl %eax, %r14d
movq %rdx, %r15
pushq $0x1
popq %rdi
pushq $0x18
popq %rsi
callq 0x50c0
testq %rax, %rax
je 0x5d2a3
movl $0x1, (%rax)
movl %r14d, 0x8(%rax)
movq %r15, 0x10(%rax)
movq -0x38(%rbp), %r14
jmp 0x5d15e
movq %r13, %r12
leaq -0x38(%rbp), %rsi
callq 0x3ab9d
movq %r14, %rdi
movl %eax, %esi
leaq -0x48(%rbp), %rcx
callq 0x5d473
movl %eax, %r14d
movq %rdx, %r15
movq -0x38(%rbp), %r13
pushq $0x1
popq %rdi
pushq $0x20
popq %rsi
callq 0x50c0
testq %rax, %rax
jne 0x5d13b
jmp 0x5d291
movq %r13, %r12
leaq -0x38(%rbp), %rsi
callq 0x3ab09
movq %r14, %rdi
movl %eax, %esi
leaq -0x48(%rbp), %rcx
callq 0x5d2b5
movl %eax, %r14d
movq %rdx, %r15
movq -0x38(%rbp), %r13
pushq $0x1
popq %rdi
pushq $0x20
popq %rsi
callq 0x50c0
testq %rax, %rax
je 0x5d29a
movl $0x1, (%rax)
movq %r13, 0x18(%rax)
movl %r14d, 0x8(%rax)
movq %r15, 0x10(%rax)
movq -0x48(%rbp), %r14
movq %r12, %r13
movabsq $0xfffffffffffc, %r12   # imm = 0xFFFFFFFFFFFC
movq -0x40(%rbp), %rcx
movabsq $-0x1000000000000, %rdx # imm = 0xFFFF000000000000
andq %rdx, %rbx
orq %rax, %rbx
movq %rbx, %rdi
leaq 0xac855(%rip), %rsi     # 0x1099d1
movl -0x4c(%rbp), %edx
leaq -0x38(%rbp), %r8
callq 0x8e35
movl -0x68(%rbp), %edi
movq -0x60(%rbp), %rcx
movl -0x38(%rbp), %eax
movq -0x30(%rbp), %rdx
jmp 0x5cff9
andq %r9, %r12
sete %cl
testb $0x3, %r9b
setne %r8b
orb %cl, %r8b
jne 0x5d1d1
decl (%r12)
jne 0x5d1d1
shlq $0x30, %rdi
orq %r9, %rdi
movl %eax, %ebx
leaq 0xab0b5(%rip), %rsi     # 0x108279
movq %rdx, %r15
callq 0xce94
movq %r15, %rdx
movl %ebx, %eax
movl %eax, %edi
movq %rdx, %rsi
callq 0xcd32
movl %eax, %ebx
movq %rdx, %r12
movl -0x50(%rbp), %eax
cmpl $0x3, %eax
jb 0x5d1fa
cmpl $0x3, %eax
je 0x5d23b
cmpl $0x4, %eax
jne 0x5d25b
movq %r13, %rdi
callq 0x36dc8
xorl %r13d, %r13d
xorl %r15d, %r15d
pushq $0x1
popq %rdi
pushq $0x28
popq %rsi
callq 0x50c0
testq %rax, %rax
je 0x5d272
movl $0x1, (%rax)
movl %ebx, 0x18(%rax)
movq %r12, 0x20(%rax)
movl %r13d, 0x8(%rax)
movq %r15, 0x10(%rax)
movq -0x58(%rbp), %rcx
movq %r14, (%rcx)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
callq 0x36de5
leaq 0xab856(%rip), %rsi     # 0x108aa0
movq %rax, %rdi
callq 0x8d0c
movq %rdx, %r15
pushq $0x1
popq %r13
jmp 0x5d200
leaq 0x775ab(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6
leaq 0x7de1e(%rip), %rsi     # 0xdb097
pushq $0x2
popq %rdi
pushq $0x31
popq %rdx
callq 0x5060
callq 0x52ae
pushq $0x1
popq %rdi
callq 0x5130
leaq 0x7ddad(%rip), %rsi     # 0xdb045
jmp 0x5d279
leaq 0x7dd40(%rip), %rsi     # 0xdafe1
jmp 0x5d279
leaq 0x7dd69(%rip), %rsi     # 0xdb013
jmp 0x5d279
leaq 0x7dcfc(%rip), %rsi     # 0xdafaf
jmp 0x5d279