// File: /workspace/github_c_makefile_star2_O0/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
subq $0x140, %rsp            # imm = 0x140
movq 0x10(%rbp), %rax
movl %esi, -0x20(%rbp)
movq %rdx, -0x18(%rbp)
movq %rdi, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq %r8, -0x38(%rbp)
movq %r9, -0x40(%rbp)
movq -0x28(%rbp), %rdi
movl -0x20(%rbp), %esi
movq -0x18(%rbp), %rdx
leaq -0x48(%rbp), %rcx
callq 0xc7790
movl %eax, -0x58(%rbp)
movq %rdx, -0x50(%rbp)
movl -0x58(%rbp), %eax
movl %eax, -0x13c(%rbp)
testl %eax, %eax
je 0xdf42b
jmp 0xdf304
movl -0x13c(%rbp), %eax
subl $0x1, %eax
jne 0xdf5b6
jmp 0xdf315
movl -0x58(%rbp), %edi
movq -0x50(%rbp), %rsi
callq 0x174a0
movq %rax, -0x88(%rbp)
movq %rdx, -0x80(%rbp)
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0xb770
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x98(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0xb770
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
movq 0x18(%rax), %rcx
movq %rcx, -0xa8(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0xa0(%rbp)
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0xb770
movq %rax, %rdi
callq 0xb7e0
movq -0x30(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0xa8(%rbp), %rdi
movq -0xa0(%rbp), %rsi
callq 0x6f100
movl %eax, -0xb8(%rbp)
movq %rdx, -0xb0(%rbp)
movq -0xb8(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x98(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0x6fd00
movl %eax, -0xc8(%rbp)
movq %rdx, -0xc0(%rbp)
movq -0xc8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0xc0(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0xdf5cf
leaq -0xd8(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x5080
leaq -0xe8(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x5080
cmpq $0x0, 0x12b66df(%rip)   # 0x1395b38
jne 0xdf473
leaq 0x279c96(%rip), %rdi    # 0x3590f8
movl $0x13, %esi
callq 0xb6c0
movq %rax, 0x12b66c5(%rip)   # 0x1395b38
jmp 0xdf475
movq 0x12b66bc(%rip), %rax   # 0x1395b38
movq %rax, -0x100(%rbp)
leaq 0x2b1cce(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0xdf54a
movq 0x12b6687(%rip), %rax   # 0x1395b38
movq %rax, -0x110(%rbp)
leaq 0x2b1c99(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x108(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x110(%rbp), %rax
cmpq $0x0, %rax
je 0xdf54a
movq 0x12b6650(%rip), %rax   # 0x1395b38
movq %rax, -0x120(%rbp)
leaq 0x2b1c62(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x118(%rbp)
movq -0x120(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0xdf54a
movq 0x12b661f(%rip), %rax   # 0x1395b38
movq %rax, -0x130(%rbp)
leaq 0x2b1c31(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x128(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x130(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0xdf54c
movq 0x12b65e5(%rip), %rax   # 0x1395b38
movq %rax, -0xf0(%rbp)
movq -0x48(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0xf0(%rbp), %rdx
leaq -0x138(%rbp), %rcx
callq 0x98c50
movq -0x30(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0xe8(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x138(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0xdf5cf
leaq 0x2748c4(%rip), %rdi    # 0x353e81
movl $0x20, %esi
callq 0xb6c0
movq %rax, %rdi
callq 0xc620
movq -0x78(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rax
movups -0x70(%rbp), %xmm0
movups %xmm0, (%rax)
movq -0x60(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rdx
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq