// File: /workspace/github_c_makefile_star2_O2/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_external_parsezeexternalzedeclzeword
static uint64_t mw_mirth_external_parsezeexternalzedeclzeword (struct mirth_mirth_zaMirth* in_zaMirth_1, uint64_t in_Token_2, struct std_maybe_Maybe_1 in_Maybe_3, struct mirth_mirth_zaMirth* *out_zaMirth_4, struct mirth_external_ExternalDeclPart *out_ExternalDeclPart_6) {
	struct mirth_mirth_zaMirth* v7;
	struct std_maybe_Maybe_1 v8 = mw_mirth_token_Token_namezfdnamezy(in_zaMirth_1, in_Token_2, &v7);
	int64_t v9 = (v8).tag;
	decref(MK_std_maybe_Maybe_1(v8));
	INT v10 = WRAP_I63(0LL);
	INT v11 = v10;
	INT v12 = i64_to_int(v9);
	bool v13 = int_eq(v12, v11);
	bool v14 = !v13;
	struct mirth_mirth_zaMirth* branch_zaMirth_15;
	uint64_t branch_Token_16;
	if (v14) {
		branch_Token_16 = in_Token_2;
		branch_zaMirth_15 = v7;
	} else {
		STR* v17;
		STRLIT(v17, "expected external word name", 27);
		mw_mirth_mirth_zaMirth_emitzefatalzeerrorzx(v7, in_Token_2, v17);
	}
	struct mirth_mirth_zaMirth* v20;
	uint64_t v21 = mw_mirth_token_Token_succ(branch_zaMirth_15, branch_Token_16, &v20);
	struct mirth_mirth_zaMirth* v22;
	bool v23 = mw_mirth_token_Token_arrowzy(v20, v21, &v22);
	struct std_maybe_Maybe_1 branch_Maybe_24;
	uint64_t branch_Token_25;
	struct std_maybe_Maybe_1 branch_Maybe_26;
	struct mirth_mirth_zaMirth* branch_zaMirth_27;
	uint64_t branch_Token_28;
	if (v23) {
		struct mirth_mirth_zaMirth* v29;
		uint64_t v30 = mw_mirth_token_Token_succ(v22, v21, &v29);
		struct mirth_mirth_zaMirth* v31;
		struct std_maybe_Maybe_1 v32 = mw_mirth_token_Token_namezy(v29, v30, &v31);
		int64_t v33 = (v32).tag;
		decref(MK_std_maybe_Maybe_1(v32));
		INT v34 = WRAP_I63(0LL);
		INT v35 = v34;
		INT v36 = i64_to_int(v33);
		bool v37 = int_eq(v36, v35);
		bool v38 = !v37;
		struct mirth_mirth_zaMirth* branch_zaMirth_39;
		uint64_t branch_Token_40;
		if (v38) {
			branch_Token_40 = v30;
			branch_zaMirth_39 = v31;
		} else {
			STR* v41;
			STRLIT(v41, "expected external symbol name", 29);
			mw_mirth_mirth_zaMirth_emitzefatalzeerrorzx(v31, v30, v41);
		}
		struct std_maybe_Maybe_1 v44 = mtw_std_maybe_Maybe_1_Some(MK_mirth_token_Token(branch_Token_40));
		struct mirth_mirth_zaMirth* v45;
		uint64_t v46 = mw_mirth_token_Token_succ(branch_zaMirth_39, branch_Token_40, &v45);
		branch_Token_28 = v46;
		branch_zaMirth_27 = v45;
		branch_Maybe_26 = v44;
		branch_Token_25 = in_Token_2;
		branch_Maybe_24 = in_Maybe_3;
	} else {
		struct std_maybe_Maybe_1 v47 = { .tag=std_maybe_Maybe_1_None };
		branch_Token_28 = v21;
		branch_zaMirth_27 = v22;
		branch_Maybe_26 = v47;
		branch_Token_25 = in_Token_2;
		branch_Maybe_24 = in_Maybe_3;
	}
	struct mirth_mirth_zaMirth* v48;
	struct std_maybe_Maybe_1 v49 = mw_mirth_token_Token_lsquarezy(branch_zaMirth_27, branch_Token_28, &v48);
	int64_t v50 = (v49).tag;
	decref(MK_std_maybe_Maybe_1(v49));
	INT v51 = WRAP_I63(0LL);
	INT v52 = v51;
	INT v53 = i64_to_int(v50);
	bool v54 = int_eq(v53, v52);
	bool v55 = !v54;
	uint64_t branch_Token_56;
	struct mirth_mirth_zaMirth* branch_zaMirth_57;
	uint64_t branch_Token_58;
	if (v55) {
		struct mirth_mirth_zaMirth* v59;
		uint64_t v60 = mw_mirth_token_Token_argsze1(v48, branch_Token_28, &v59);
		struct mirth_mirth_zaMirth* v61;
		uint64_t v62 = mw_mirth_token_Token_next(v59, branch_Token_28, &v61);
		branch_Token_58 = v62;
		branch_zaMirth_57 = v61;
		branch_Token_56 = v60;
	} else {
		struct mirth_mirth_zaMirth* v63;
		bool v64 = mw_mirth_token_Token_commazy(v48, branch_Token_28, &v63);
		struct mirth_mirth_zaMirth* branch_zaMirth_65;
		uint64_t branch_Token_66;
		if (v64) {
			branch_Token_66 = branch_Token_28;
			branch_zaMirth_65 = v63;
		} else {
			STR* v67;
			STRLIT(v67, "expected type signature", 23);
			mw_mirth_mirth_zaMirth_emitzefatalzeerrorzx(v63, branch_Token_28, v67);
		}
		struct mirth_mirth_zaMirth* v70;
		uint64_t v71 = mw_mirth_token_Token_succ(branch_zaMirth_65, branch_Token_66, &v70);
		struct mirth_mirth_zaMirth* v72;
		bool v73 = mw_mirth_token_Token_argzeendzy(v70, v71, &v72);
		struct mirth_mirth_zaMirth* branch_zaMirth_74;
		uint64_t branch_Token_75;
		if (v73) {
			STR* v76;
			STRLIT(v76, "expected type signature", 23);
			mw_mirth_mirth_zaMirth_emitzefatalzeerrorzx(v72, v71, v76);
		} else {
			branch_Token_75 = v71;
			branch_zaMirth_74 = v72;
		}
		struct mirth_mirth_zaMirth* v79;
		uint64_t v80 = mw_mirth_token_Token_nextzeargzeend(branch_zaMirth_74, branch_Token_75, &v79);
		branch_Token_58 = v80;
		branch_zaMirth_57 = v79;
		branch_Token_56 = branch_Token_75;
	}
	struct mirth_external_ExternalDeclPart v81 = mtw_mirth_external_ExternalDeclPart_EDPDef(branch_Maybe_24, branch_Token_25, branch_Maybe_26, branch_Token_56);
	*out_ExternalDeclPart_6 = v81;
	*out_zaMirth_4 = branch_zaMirth_57;
	return branch_Token_58;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r9, -0x78(%rbp)
movq %r8, -0x80(%rbp)
movq %rcx, -0x70(%rbp)
movl %edx, -0x44(%rbp)
movq %rsi, %r15
movabsq $0xfffffffffffc, %r13   # imm = 0xFFFFFFFFFFFC
leaq -0x60(%rbp), %rdx
callq 0x24b09
movl %eax, %r14d
leaq 0xac830(%rip), %rsi     # 0x1082c1
movq %rdx, %rax
andq %r13, %rax
sete %cl
testb $0x3, %dl
setne %dil
orb %cl, %dil
jne 0x5bab9
decl (%rax)
jne 0x5bab9
movq %r14, %rdi
shlq $0x30, %rdi
orq %rdx, %rdi
callq 0xce94
movq %r14, %rdi
callq 0xd86d
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0xd759
testb %al, %al
jne 0x5bd07
movq -0x60(%rbp), %rdi
xorl %ebx, %ebx
cmpq %r15, 0x10b0917(%rip)   # 0x110c3f8
movq %r15, -0x68(%rbp)
leaq 0x1(%r15), %r12
cmovbeq %rbx, %r12
leaq -0x90(%rbp), %r14
movq %r12, %rsi
movq %r14, %rdx
callq 0x31601
movq (%r14), %r15
testb %al, %al
je 0x5bbba
movq %r13, %rbx
xorl %r13d, %r13d
cmpq %r12, 0x10b08e1(%rip)   # 0x110c3f8
leaq 0x1(%r12), %rax
cmovaq %rax, %r13
leaq -0x30(%rbp), %rdx
movq %r15, %rdi
movq %r13, %rsi
callq 0x2df97
movl %eax, %r14d
movq %rdx, %rax
movq %rbx, -0x50(%rbp)
andq %rbx, %rax
sete %cl
testb $0x3, %dl
setne %sil
orb %cl, %sil
jne 0x5bb65
decl (%rax)
jne 0x5bb65
movq %r14, %rdi
shlq $0x30, %rdi
orq %rdx, %rdi
leaq 0xac761(%rip), %rsi     # 0x1082c1
callq 0xce94
movq %r14, %rdi
callq 0xd86d
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0xd759
testb %al, %al
jne 0x5bd6b
movq -0x30(%rbp), %r15
leaq 0xad22d(%rip), %rsi     # 0x108db8
movq %r13, %rdi
callq 0x8d0c
movq %rdx, -0x58(%rbp)
leaq 0x1(%r13), %rax
xorl %r12d, %r12d
cmpq %r13, 0x10b0853(%rip)   # 0x110c3f8
cmovaq %rax, %r12
pushq $0x1
popq %rax
movl %eax, %ebx
movabsq $0xfffffffffffc, %r13   # imm = 0xFFFFFFFFFFFC
jmp 0x5bbc2
movq $0x0, -0x58(%rbp)
leaq -0x30(%rbp), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3121d
movl %eax, %r15d
movq %rdx, %rax
andq %r13, %rax
sete %cl
testb $0x3, %dl
setne %sil
orb %cl, %sil
jne 0x5bc03
decl (%rax)
jne 0x5bc03
movq %r15, %rdi
shlq $0x30, %rdi
orq %rdx, %rdi
leaq 0xac6c3(%rip), %rsi     # 0x1082c1
callq 0xce94
movq %r15, %rdi
callq 0xd86d
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0xd759
testb %al, %al
je 0x5bc78
movq %r13, %r14
movq -0x30(%rbp), %rdi
leaq -0x40(%rbp), %rdx
movq %r12, %rsi
callq 0x25802
testb %al, %al
je 0x5bdb0
movq -0x40(%rbp), %rdi
xorl %r13d, %r13d
cmpq %r12, 0x10b07b5(%rip)   # 0x110c3f8
leaq 0x1(%r12), %rax
cmovaq %rax, %r13
leaq -0x38(%rbp), %rdx
movq %r13, %rsi
callq 0x258e2
testb %al, %al
jne 0x5bdf4
movq -0x38(%rbp), %rdi
leaq -0x88(%rbp), %r14
movq %r13, %rsi
movq %r14, %rdx
callq 0x251cf
jmp 0x5bca0
movq -0x30(%rbp), %rdi
leaq -0x40(%rbp), %r15
movq %r12, %rsi
movq %r15, %rdx
callq 0x2fb57
movq %rax, %r13
movq (%r15), %rdi
leaq -0x38(%rbp), %r14
movq %r12, %rsi
movq %r14, %rdx
callq 0x2598b
movq %rax, %r15
movq (%r14), %r14
pushq $0x1
popq %rdi
pushq $0x38
popq %rsi
callq 0x50c0
testq %rax, %rax
je 0x5bd4c
pushq $0x1
popq %rdx
movl %edx, (%rax)
movq %r13, 0x30(%rax)
movl %ebx, 0x20(%rax)
movq -0x58(%rbp), %rcx
movq %rcx, 0x28(%rax)
movq -0x68(%rbp), %rcx
movq %rcx, 0x18(%rax)
movl -0x44(%rbp), %ecx
movl %ecx, 0x8(%rax)
movq -0x70(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x78(%rbp), %rcx
movl %edx, (%rcx)
movq %rax, 0x8(%rcx)
movq -0x80(%rbp), %rax
movq %r14, (%rax)
movq %r15, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10b10ea(%rip), %rdx   # 0x110cdf8
testq %rdx, %rdx
jne 0x5bd2c
leaq 0x7efdf(%rip), %rdi     # 0xdacf9
pushq $0x1b
popq %rsi
callq 0x8a21
movq %rax, %rdx
movq %rax, 0x10b10cc(%rip)   # 0x110cdf8
andq %rdx, %r13
sete %al
testb $0x3, %dl
setne %cl
orb %al, %cl
jne 0x5bd40
incl (%r13)
movq -0x60(%rbp), %rdi
movq %r15, %rsi
callq 0x246fe
leaq 0x7efe0(%rip), %rsi     # 0xdad33
pushq $0x2
popq %rdi
pushq $0x31
popq %rdx
callq 0x5060
callq 0x52ae
pushq $0x1
popq %rdi
callq 0x5130
movq 0x10b108e(%rip), %rdx   # 0x110ce00
testq %rdx, %rdx
jne 0x5bd90
leaq 0x7ef97(%rip), %rdi     # 0xdad15
pushq $0x1d
popq %rsi
callq 0x8a21
movq %rax, %rdx
movq %rax, 0x10b1070(%rip)   # 0x110ce00
andq %rdx, -0x50(%rbp)
sete %al
testb $0x3, %dl
setne %cl
orb %al, %cl
jne 0x5bda7
movq -0x50(%rbp), %rax
incl (%rax)
movq -0x30(%rbp), %rdi
jmp 0x5be30
movq 0x10b1051(%rip), %rdx   # 0x110ce08
testq %rdx, %rdx
jne 0x5bdd5
leaq 0x7cfa4(%rip), %rdi     # 0xd8d67
pushq $0x17
popq %rsi
callq 0x8a21
movq %rax, %rdx
movq %rax, 0x10b1033(%rip)   # 0x110ce08
andq %rdx, %r14
sete %al
testb $0x3, %dl
setne %cl
orb %al, %cl
jne 0x5bde8
incl (%r14)
movq -0x40(%rbp), %rdi
movq %r12, %rsi
callq 0x246fe
movq 0x10b1015(%rip), %rdx   # 0x110ce10
testq %rdx, %rdx
jne 0x5be19
leaq 0x7cf60(%rip), %rdi     # 0xd8d67
pushq $0x17
popq %rsi
callq 0x8a21
movq %rax, %rdx
movq %rax, 0x10b0ff7(%rip)   # 0x110ce10
andq %rdx, %r14
sete %al
testb $0x3, %dl
setne %cl
orb %al, %cl
jne 0x5be2c
incl (%r14)
movq -0x38(%rbp), %rdi
movq %r13, %rsi
callq 0x246fe