// File: /workspace/github_c_makefile_star2_O3/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_elab_elabzeexpandzetensorzx
static struct mirth_type_StackType mw_mirth_elab_elabzeexpandzetensorzx (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_type_StackType in_StackType_2, uint64_t in_Token_3, struct mirth_mirth_zaMirth* *out_zaMirth_4, struct mirth_type_Type *out_Type_6, uint64_t *out_Token_7) {
	struct mirth_mirth_zaMirth* v8;
	struct std_maybe_Maybe_1 v9 = mw_mirth_type_StackType_forcezeconszyzx(in_zaMirth_1, in_StackType_2, &v8);
	struct mirth_mirth_zaMirth* branch_zaMirth_10;
	struct mirth_type_StackType branch_StackType_11;
	struct mirth_type_Type branch_Type_12;
	uint64_t branch_Token_13;
	switch ((v9).tag) {
		case std_maybe_Maybe_1_Some: {
			VAL v14 = mtp_std_maybe_Maybe_1_Some(v9);
			VAL v15 = ((TUP*)PTRPTR(value_tup(v14)))->cells[0];
			VAL v16 = ((TUP*)PTRPTR(value_tup(v14)))->cells[1];
			tup_decref_outer(value_tup(v14));
			branch_Token_13 = in_Token_3;
			branch_Type_12 = V_mirth_type_Type(v16);
			branch_StackType_11 = V_mirth_type_StackType(v15);
			branch_zaMirth_10 = v8;
		} break;
		case std_maybe_Maybe_1_None: {
			struct mirth_type_StackType v17 = { .tag=mirth_type_StackType_Error };
			struct mirth_type_Type v18 = { .tag=mirth_type_Type_Error };
			STR* v19;
			STRLIT(v19, "expected tuple type", 19);
			struct mirth_mirth_zaMirth* v20;
			mw_mirth_mirth_zaMirth_emitzeerrorzx(v8, in_Token_3, v19, &v20);
			branch_Token_13 = in_Token_3;
			branch_Type_12 = v18;
			branch_StackType_11 = v17;
			branch_zaMirth_10 = v20;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	*out_Token_7 = branch_Token_13;
	*out_Type_6 = branch_Type_12;
	*out_zaMirth_4 = branch_zaMirth_10;
	return branch_StackType_11;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r14
movq %r8, %r13
movq %rcx, %r15
leaq -0x30(%rbp), %rcx
callq 0x3bdab
testl %eax, %eax
je 0x42406
movq %r15, -0x38(%rbp)
movq %r13, -0x40(%rbp)
cmpl $0x1, %eax
jne 0x424c6
movq %rdx, %rdi
callq 0xd745
movq %rax, %r13
movq %rdx, %rbx
movq %rax, %rdi
movq %rdx, %rsi
callq 0x90ba
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
movq %r13, %r15
andq %rax, %r15
movq 0x8(%r15), %r12
movq %r13, %rdi
movq %rbx, %rsi
callq 0x90ba
movq 0x18(%r15), %r15
movq %r13, %rdi
movq %rbx, %rsi
callq 0x90ba
movq %r13, %rdi
callq 0x910b
movq %r15, %rcx
shrq $0x30, %rcx
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %rdx, %r15
movq %r12, %rax
shrq $0x30, %rax
andq %rdx, %r12
movq -0x30(%rbp), %rdx
movq -0x40(%rbp), %r13
movq -0x38(%rbp), %rdi
jmp 0x4249a
movq 0x10d35eb(%rip), %r12   # 0x11159f8
testq %r12, %r12
jne 0x42440
movl $0x13, %edi
callq 0xf5e4
movq %rax, %r12
movq $0x13, 0x10(%rax)
movups 0xa325f(%rip), %xmm0    # 0xe568d
movups %xmm0, 0x18(%rax)
movl $0x65707974, 0x27(%rax) # imm = 0x65707974
movq %rax, 0x10d35b8(%rip)   # 0x11159f8
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq %r12, %rax
sete %cl
testb $0x3, %r12b
setne %dl
orb %cl, %dl
jne 0x4245d
incl (%rax)
movq -0x30(%rbp), %rdi
leaq -0x48(%rbp), %rbx
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1b59d
movq (%rbx), %rdi
leaq -0x50(%rbp), %rbx
movq %rax, %rsi
movq %r12, %rdx
movl $0x2, %ecx
movq %rbx, %r8
callq 0x1bc32
movq (%rbx), %rdx
xorl %ecx, %ecx
movq %r15, %rdi
xorl %r15d, %r15d
xorl %eax, %eax
xorl %r12d, %r12d
movq 0x10(%rbp), %rsi
movq %rdi, (%rsi)
movl %ecx, (%r14)
movl $0x0, 0x4(%r14)
movq %r15, 0x8(%r14)
movq %rdx, (%r13)
movq %r12, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0xf5e4
movq $0x20, 0x10(%rax)
movups 0x9e1ee(%rip), %xmm0    # 0xe06cd
movups %xmm0, 0x18(%rax)
movups 0x9e1f3(%rip), %xmm0    # 0xe06dd
movups %xmm0, 0x28(%rax)
movq %rax, %rdi
callq 0x9302