// File: /workspace/github_c_makefile_star2_O2/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_std_list_List_1_unique_sp1
static struct std_list_List_1 mw_std_list_List_1_unique_sp1 (struct std_list_List_1 in_List_1) {
	struct std_list_List_1 v3 = { .tag=std_list_List_1_Nil };
	struct std_list_List_1 v4;
	mw_std_list_List_1_buildzx(v3, &v4);
	bool v5 = true;
	struct std_list_List_1 r6 = v4;
	struct std_list_List_1 v7 = in_List_1;
	bool v8 = v5;
	bool v9 = v5;
	while (v9) {
		struct std_list_List_1 r10 = r6;
		struct std_list_List_1 v11 = v7;
		bool v12 = v8;
		struct std_list_List_1 branch_zaLister_13;
		struct std_list_List_1 branch_List_14;
		bool branch_Bool_15;
		switch ((v11).tag) {
			case std_list_List_1_Cons: {
				struct std_list_List_1 v16;
				VAL v17 = mtp_std_list_List_1_Cons(v11, &v16);
				incref(v17);
				incref(MK_std_list_List_1(r10));
				struct std_maybe_Maybe_1 v18 = { .tag=std_maybe_Maybe_1_None };
				bool v19 = true;
				struct std_list_List_1 r20 = r10;
				VAL v21 = v17;
				VAL v22 = v17;
				struct std_maybe_Maybe_1 v23 = v18;
				struct std_list_List_1 v24 = r10;
				bool v25 = v19;
				bool v26 = v19;
				while (v26) {
					struct std_list_List_1 r27 = r20;
					VAL v28 = v21;
					VAL v29 = v22;
					struct std_maybe_Maybe_1 v30 = v23;
					struct std_list_List_1 v31 = v24;
					bool v32 = v25;
					struct std_list_List_1 v33;
					struct std_maybe_Maybe_1 v34 = mw_std_list_List_1_uncons(v31, &v33);
					VAL branch_zux1_35;
					VAL branch_zux2_36;
					uint64_t branch_Label_37;
					struct std_maybe_Maybe_1 branch_Maybe_38;
					struct std_list_List_1 branch_List_39;
					bool branch_Bool_40;
					switch ((v34).tag) {
						case std_maybe_Maybe_1_Some: {
							VAL v41 = mtp_std_maybe_Maybe_1_Some(v34);
							incref(v41);
							incref(v29);
							uint64_t v42 = V_mirth_label_Label(v41);
							uint64_t v43 = V_mirth_label_Label(v29);
							bool v44 = (v42 == v43);
							VAL branch_zux1_45;
							VAL branch_zux2_46;
							uint64_t branch_Label_47;
							struct std_maybe_Maybe_1 branch_Maybe_48;
							if (v44) {
								struct std_maybe_Maybe_1 v49 = mtw_std_maybe_Maybe_1_Some(v41);
								branch_Maybe_48 = v49;
								branch_Label_47 = V_mirth_label_Label(v29);
								branch_zux2_46 = v28;
								branch_zux1_45 = MK_std_list_List_1(r27);
							} else {
								decref(v41);
								struct std_maybe_Maybe_1 v50 = { .tag=std_maybe_Maybe_1_None };
								branch_Maybe_48 = v50;
								branch_Label_47 = V_mirth_label_Label(v29);
								branch_zux2_46 = v28;
								branch_zux1_45 = MK_std_list_List_1(r27);
							}
							VAL branch_zux1_51;
							VAL branch_zux2_52;
							uint64_t branch_Label_53;
							struct std_maybe_Maybe_1 branch_Maybe_54;
							struct std_list_List_1 branch_List_55;
							switch ((branch_Maybe_48).tag) {
								case std_maybe_Maybe_1_None: {
									branch_List_55 = v33;
									branch_Maybe_54 = v30;
									branch_Label_53 = branch_Label_47;
									branch_zux2_52 = branch_zux2_46;
									branch_zux1_51 = branch_zux1_45;
								} break;
								default: {
									decref(MK_std_list_List_1(v33));
									decref(MK_std_maybe_Maybe_1(v30));
									struct std_list_List_1 v56 = { .tag=std_list_List_1_Nil };
									branch_List_55 = v56;
									branch_Maybe_54 = branch_Maybe_48;
									branch_Label_53 = branch_Label_47;
									branch_zux2_52 = branch_zux2_46;
									branch_zux1_51 = branch_zux1_45;
								} break;
							}
							bool v57 = true;
							branch_Bool_40 = v57;
							branch_List_39 = branch_List_55;
							branch_Maybe_38 = branch_Maybe_54;
							branch_Label_37 = branch_Label_53;
							branch_zux2_36 = branch_zux2_52;
							branch_zux1_35 = branch_zux1_51;
						} break;
						case std_maybe_Maybe_1_None: {
							bool v58 = false;
							branch_Bool_40 = v58;
							branch_List_39 = v33;
							branch_Maybe_38 = v30;
							branch_Label_37 = V_mirth_label_Label(v29);
							branch_zux2_36 = v28;
							branch_zux1_35 = MK_std_list_List_1(r27);
						} break;
						default: {
							do_panic(str_make("unexpected fallthrough in match\n", 32));
						}
					}
					v26 = branch_Bool_40;
					v25 = branch_Bool_40;
					v24 = branch_List_39;
					v23 = branch_Maybe_38;
					v22 = MK_mirth_label_Label(branch_Label_37);
					v21 = branch_zux2_36;
					r20 = V_std_list_List_1(branch_zux1_35);
				}
				decref(MK_std_list_List_1(v24));
				decref(v22);
				int64_t v59 = (v23).tag;
				decref(MK_std_maybe_Maybe_1(v23));
				INT v60 = WRAP_I63(0LL);
				INT v61 = v60;
				INT v62 = i64_to_int(v59);
				bool v63 = int_eq(v62, v61);
				bool v64 = !v63;
				struct std_list_List_1 branch_zaLister_65;
				if (v64) {
					decref(v21);
					branch_zaLister_65 = r20;
				} else {
					struct std_list_List_1 v66;
					mw_std_list_zaLister_1_pushzx(v21, r20, &v66);
					branch_zaLister_65 = v66;
				}
				bool v67 = true;
				branch_Bool_15 = v67;
				branch_List_14 = v16;
				branch_zaLister_13 = branch_zaLister_65;
			} break;
			case std_list_List_1_Nil: {
				struct std_list_List_1 v68 = { .tag=std_list_List_1_Nil };
				bool v69 = false;
				branch_Bool_15 = v69;
				branch_List_14 = v68;
				branch_zaLister_13 = r10;
			} break;
			default: {
				do_panic(str_make("unexpected fallthrough in match\n", 32));
			}
		}
		v9 = branch_Bool_15;
		v8 = branch_Bool_15;
		v7 = branch_List_14;
		r6 = branch_zaLister_13;
	}
	decref(MK_std_list_List_1(v7));
	struct std_list_List_1 v70 = mw_std_list_zaLister_1_donezx(r6);
	return v70;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r15
movl %edi, %r13d
xorl %edi, %edi
xorl %esi, %esi
callq 0xcd32
movl %eax, %r12d
movq %rdx, %rbx
leaq -0x78(%rbp), %rsi
movb $0x1, %al
movq %r15, %rdi
testb $0x1, %al
je 0x73a6e
xorl %eax, %eax
movl $0x0, %r15d
testl %r13d, %r13d
je 0x73731
cmpl $0x1, %r13d
jne 0x73abc
callq 0xce01
movq %rdx, %r13
testb $0x1, %r13b
movabsq $0xfffffffffffc, %rsi   # imm = 0xFFFFFFFFFFFC
je 0x73782
movq %rax, %r8
andq %rsi, %r8
sete %cl
testb $0x3, %al
setne %dil
orb %cl, %dil
jne 0x73782
incl (%r8)
movq %rbx, %r8
andq %rsi, %r8
sete %cl
testb $0x3, %bl
setne %dil
orb %cl, %dil
jne 0x7379a
incl (%r8)
movq %rax, %rcx
andq %rsi, %rcx
movq %rcx, -0x48(%rbp)
sete %cl
movq %rax, -0x60(%rbp)
testb $0x3, %al
setne %al
orb %cl, %al
movb %al, -0x29(%rbp)
movq $0x0, -0x40(%rbp)
movb $0x1, %r15b
movq $0x0, -0x38(%rbp)
movq %r13, -0x68(%rbp)
movq %r12, %rdi
movq %rbx, %r14
testb $0x1, %r15b
je 0x7395a
movq %rbx, %rsi
leaq -0x58(%rbp), %rdx
callq 0x1075d
testl %eax, %eax
je 0x738e7
cmpl $0x1, %eax
movq -0x60(%rbp), %rbx
jne 0x73abc
movq %rdx, %rdi
callq 0xd491
testb $0x1, %dl
je 0x7382b
movq %rax, %rcx
movabsq $0xfffffffffffc, %rsi   # imm = 0xFFFFFFFFFFFC
andq %rsi, %rcx
sete %sil
testb $0x3, %al
setne %dil
orb %sil, %dil
jne 0x7382b
incl (%rcx)
testb $0x1, %r13b
sete %cl
orb -0x29(%rbp), %cl
testb $0x1, %cl
jne 0x73840
movq -0x48(%rbp), %rcx
incl (%rcx)
cmpq %rbx, %rax
movabsq $0xfffffffffffc, %r13   # imm = 0xFFFFFFFFFFFC
jne 0x73907
movq %r14, %r15
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x8d0c
movq %rdx, %rbx
movq -0x50(%rbp), %rax
movq %rax, %rcx
andq %r13, %rcx
sete %dl
testb $0x3, %al
setne %sil
orb %dl, %sil
jne 0x73896
movl -0x58(%rbp), %edi
decl (%rcx)
jne 0x73896
shlq $0x30, %rdi
orq %rax, %rdi
leaq 0x949e8(%rip), %rsi     # 0x108279
callq 0xce94
shlq $0x30, %r12
movq %r12, %r14
orq %r15, %r14
movq -0x38(%rbp), %rsi
movq %rsi, %rax
andq %r13, %rax
sete %cl
testb $0x3, %sil
setne %dl
movb $0x1, %r15b
orb %cl, %dl
jne 0x738d6
decl (%rax)
jne 0x738d6
movq -0x40(%rbp), %rdi
shlq $0x30, %rdi
orq %rsi, %rdi
leaq 0x949f0(%rip), %rsi     # 0x1082c1
callq 0xce94
xorl %edi, %edi
pushq $0x1
popq %rax
movq %rax, -0x40(%rbp)
movq %rbx, -0x38(%rbp)
xorl %ebx, %ebx
jmp 0x73944
movl -0x58(%rbp), %edi
movq -0x50(%rbp), %rbx
shlq $0x30, %r12
orq %r14, %r12
xorl %r15d, %r15d
movq %r12, %r14
movabsq $0xfffffffffffc, %r13   # imm = 0xFFFFFFFFFFFC
jmp 0x73944
testb $0x1, %dl
je 0x73930
movq %rax, %rcx
andq %r13, %rcx
sete %sil
testb $0x3, %al
setne %dil
orb %sil, %dil
jne 0x73930
decl (%rcx)
jne 0x73930
movq %rax, %rdi
movq %rdx, %rsi
callq 0xce94
shlq $0x30, %r12
orq %r14, %r12
movl -0x58(%rbp), %edi
movb $0x1, %r15b
movq -0x50(%rbp), %rbx
movq %r12, %r14
movq %r14, %r12
shrq $0x30, %r12
andq %r13, %r14
leaq 0x95973(%rip), %r13     # 0x1092c8
jmp 0x737d2
movq %r14, %r15
movq %rbx, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %bl
setne %dl
orb %cl, %dl
movq -0x60(%rbp), %r14
jne 0x73995
decl (%rax)
jne 0x73995
shlq $0x30, %rdi
orq %rbx, %rdi
leaq 0x948e9(%rip), %rsi     # 0x108279
callq 0xce94
testb $0x1, %r13b
je 0x739c1
cmpq $0x0, -0x48(%rbp)
sete %al
testb $0x3, %r14b
setne %cl
orb %al, %cl
jne 0x739c1
movq -0x48(%rbp), %rax
decl (%rax)
jne 0x739c1
movq %r14, %rdi
movq %r13, %rsi
callq 0xce94
movl -0x40(%rbp), %ebx
movq -0x38(%rbp), %rdx
movq %rdx, %rax
movabsq $0xfffffffffffc, %rcx   # imm = 0xFFFFFFFFFFFC
andq %rcx, %rax
sete %cl
testb $0x3, %dl
setne %dl
orb %cl, %dl
jne 0x73a00
decl (%rax)
jne 0x73a00
movq %rbx, %rdi
shlq $0x30, %rdi
orq -0x38(%rbp), %rdi
leaq 0x948c6(%rip), %rsi     # 0x1082c1
callq 0xce94
movq %rbx, %rdi
callq 0xd86d
movq %rax, %rdi
pushq $0x1
popq %rsi
callq 0xd759
testb %al, %al
movq -0x68(%rbp), %rsi
je 0x73a37
movq %r14, %rdi
movl %r12d, %edx
movq %r15, %rcx
leaq -0x58(%rbp), %r8
callq 0x8e35
movl -0x58(%rbp), %r12d
movq -0x50(%rbp), %rbx
jmp 0x73a61
testb $0x1, %sil
je 0x73a5e
movq -0x48(%rbp), %rdx
testq %rdx, %rdx
sete %al
testb $0x3, %r14b
setne %cl
orb %al, %cl
jne 0x73a5e
decl (%rdx)
jne 0x73a5e
movq %r14, %rdi
callq 0xce94
movq %r15, %rbx
movl -0x78(%rbp), %r13d
movq -0x70(%rbp), %r15
jmp 0x7372b
movabsq $0xfffffffffffc, %rdx   # imm = 0xFFFFFFFFFFFC
andq %rdi, %rdx
sete %al
testb $0x3, %dil
setne %cl
orb %al, %cl
jne 0x73aa3
decl (%rdx)
jne 0x73aa3
shlq $0x30, %r13
orq %rdi, %r13
movq %r13, %rdi
leaq 0x947db(%rip), %rsi     # 0x108279
callq 0xce94
movl %r12d, %edi
movq %rbx, %rsi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xcd32
leaq 0x60d4a(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6