// File: /workspace/github_c_makefile_star2_O3/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, %r14
movabsq $0xfffffffffffc, %r13   # imm = 0xFFFFFFFFFFFC
leaq -0x60(%rbp), %rdx
callq 0x275cc
movl %eax, %ebx
leaq 0xb084b(%rip), %rsi     # 0x1112c1
movq %rdx, %rax
andq %r13, %rax
sete %cl
testb $0x3, %dl
setne %dil
orb %cl, %dil
jne 0x60a9e
decl (%rax)
jne 0x60a9e
movq %rbx, %rdi
shlq $0x30, %rdi
orq %rdx, %rdi
callq 0xd13d
leaq 0x1(,%rbx,2), %rdi
movl $0x1, %esi
callq 0xe83a
testl %eax, %eax
je 0x60cee
movq -0x60(%rbp), %rdi
xorl %ebx, %ebx
cmpq %r14, 0x10b4933(%rip)   # 0x11153f8
movq %r14, -0x68(%rbp)
leaq 0x1(%r14), %r12
cmovbeq %rbx, %r12
leaq -0x90(%rbp), %r14
movq %r12, %rsi
movq %r14, %rdx
callq 0x341df
movq (%r14), %r15
testb %al, %al
je 0x60b9c
movq %r13, %r14
xorl %r13d, %r13d
cmpq %r12, 0x10b48fd(%rip)   # 0x11153f8
leaq 0x1(%r12), %rax
cmovaq %rax, %r13
leaq -0x30(%rbp), %rdx
movq %r15, %rdi
movq %r13, %rsi
callq 0x30835
movl %eax, %ebx
movq %rdx, %rax
movq %r14, -0x50(%rbp)
andq %r14, %rax
sete %cl
testb $0x3, %dl
setne %sil
orb %cl, %sil
jne 0x60b48
decl (%rax)
jne 0x60b48
movq %rbx, %rdi
shlq $0x30, %rdi
orq %rdx, %rdi
leaq 0xb077e(%rip), %rsi     # 0x1112c1
callq 0xd13d
leaq 0x1(,%rbx,2), %rdi
movl $0x1, %esi
callq 0xe83a
testl %eax, %eax
je 0x60d71
movq -0x30(%rbp), %r15
leaq 0xb124b(%rip), %rsi     # 0x111db8
movq %r13, %rdi
callq 0x9353
movq %rdx, -0x58(%rbp)
leaq 0x1(%r13), %rax
xorl %r12d, %r12d
cmpq %r13, 0x10b4871(%rip)   # 0x11153f8
cmovaq %rax, %r12
movl $0x1, %ebx
movabsq $0xfffffffffffc, %r13   # imm = 0xFFFFFFFFFFFC
jmp 0x60ba4
movq $0x0, -0x58(%rbp)
leaq -0x30(%rbp), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x33d79
movl %eax, %r14d
movq %rdx, %rax
andq %r13, %rax
sete %cl
testb $0x3, %dl
setne %sil
orb %cl, %sil
jne 0x60be5
decl (%rax)
jne 0x60be5
movq %r14, %rdi
shlq $0x30, %rdi
orq %rdx, %rdi
leaq 0xb06e1(%rip), %rsi     # 0x1112c1
callq 0xd13d
leaq 0x1(,%r14,2), %rdi
movl $0x1, %esi
callq 0xe83a
testl %eax, %eax
je 0x60c25
movq -0x30(%rbp), %rdi
leaq -0x40(%rbp), %r15
movq %r12, %rsi
movq %r15, %rdx
callq 0x32512
movq %rax, %r13
movq (%r15), %rdi
leaq -0x38(%rbp), %r14
movq %r12, %rsi
movq %r14, %rdx
callq 0x28324
jmp 0x60c81
movq %r13, %r14
movq -0x30(%rbp), %rdi
leaq -0x40(%rbp), %rdx
movq %r12, %rsi
callq 0x28222
testb %al, %al
je 0x60dcf
movq -0x40(%rbp), %rdi
xorl %r13d, %r13d
cmpq %r12, 0x10b47aa(%rip)   # 0x11153f8
leaq 0x1(%r12), %rax
cmovaq %rax, %r13
leaq -0x38(%rbp), %rdx
movq %r13, %rsi
callq 0x28295
testb %al, %al
jne 0x60e2f
movq -0x38(%rbp), %rdi
leaq -0x88(%rbp), %r14
movq %r13, %rsi
movq %r14, %rdx
callq 0x27ce4
movq %rax, %r15
movq (%r14), %r14
movl $0x1, %edi
movl $0x38, %esi
callq 0x50c0
testq %rax, %rax
je 0x60d4c
movl $0x1, %ecx
movl %ecx, (%rax)
movq %r13, 0x30(%rax)
movl %ebx, 0x20(%rax)
movq -0x58(%rbp), %rdx
movq %rdx, 0x28(%rax)
movq -0x68(%rbp), %rdx
movq %rdx, 0x18(%rax)
movl -0x44(%rbp), %edx
movl %edx, 0x8(%rax)
movq -0x70(%rbp), %rdx
movq %rdx, 0x10(%rax)
movq -0x78(%rbp), %rdx
movl %ecx, (%rdx)
movq %rax, 0x8(%rdx)
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 0x10b5103(%rip), %rdx   # 0x1115df8
testq %rdx, %rdx
jne 0x60d2c
movl $0x1b, %edi
callq 0xf5e4
movq %rax, %rdx
movq $0x1b, 0x10(%rax)
movups 0x85e0f(%rip), %xmm0    # 0xe6b25
movups %xmm0, 0x18(%rax)
movups 0x85e0f(%rip), %xmm0    # 0xe6b30
movups %xmm0, 0x23(%rax)
movq %rax, 0x10b50cc(%rip)   # 0x1115df8
andq %rdx, %r13
sete %al
testb $0x3, %dl
setne %cl
orb %al, %cl
jne 0x60d40
incl (%r13)
movq -0x60(%rbp), %rdi
movq %r14, %rsi
callq 0x27183
leaq 0x85e0c(%rip), %rsi     # 0xe6b5f
movl $0x31, %edx
movl $0x2, %edi
callq 0x5060
callq 0x52b6
movl $0x1, %edi
callq 0x5130
movq 0x10b5088(%rip), %rdx   # 0x1115e00
testq %rdx, %rdx
jne 0x60daf
movl $0x1d, %edi
callq 0xf5e4
movq %rax, %rdx
movq $0x1d, 0x10(%rax)
movups 0x85da8(%rip), %xmm0    # 0xe6b41
movups %xmm0, 0x18(%rax)
movups 0x85daa(%rip), %xmm0    # 0xe6b4e
movups %xmm0, 0x25(%rax)
movq %rax, 0x10b5051(%rip)   # 0x1115e00
andq %rdx, -0x50(%rbp)
sete %al
testb $0x3, %dl
setne %cl
orb %al, %cl
jne 0x60dc6
movq -0x50(%rbp), %rax
incl (%rax)
movq -0x30(%rbp), %rdi
jmp 0x60e87
movq 0x10b5032(%rip), %rdx   # 0x1115e08
testq %rdx, %rdx
jne 0x60e10
movl $0x17, %edi
callq 0xf5e4
movq %rax, %rdx
movq $0x17, 0x10(%rax)
movabsq $0x65727574616e6769, %rax # imm = 0x65727574616E6769
movq %rax, 0x27(%rdx)
movups 0x83dbc(%rip), %xmm0    # 0xe4bc1
movups %xmm0, 0x18(%rdx)
movq %rdx, 0x10b4ff8(%rip)   # 0x1115e08
andq %rdx, %r14
sete %al
testb $0x3, %dl
setne %cl
orb %al, %cl
jne 0x60e23
incl (%r14)
movq -0x40(%rbp), %rdi
movq %r12, %rsi
callq 0x27183
movq 0x10b4fda(%rip), %rdx   # 0x1115e10
testq %rdx, %rdx
jne 0x60e70
movl $0x17, %edi
callq 0xf5e4
movq %rax, %rdx
movq $0x17, 0x10(%rax)
movabsq $0x65727574616e6769, %rax # imm = 0x65727574616E6769
movq %rax, 0x27(%rdx)
movups 0x83d5c(%rip), %xmm0    # 0xe4bc1
movups %xmm0, 0x18(%rdx)
movq %rdx, 0x10b4fa0(%rip)   # 0x1115e10
andq %rdx, %r14
sete %al
testb $0x3, %dl
setne %cl
orb %al, %cl
jne 0x60e83
incl (%r14)
movq -0x38(%rbp), %rdi
movq %r13, %rsi
callq 0x27183