// File: /workspace/github_c_makefile_star2_O2/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_mirth_zaMirth_emitzediagnosticzeatzx
static void mw_mirth_mirth_zaMirth_emitzediagnosticzeatzx (struct mirth_mirth_zaMirth* in_zaMirth_1, struct mirth_location_Location* in_Location_2, STR* in_Str_3, enum mirth_mirth_Severity in_Severity_4, struct mirth_mirth_zaMirth* *out_zaMirth_5) {
	struct mirth_mirth_zaMirth* branch_zaMirth_6;
	STR* branch_Str_7;
	struct mirth_location_Location* branch_Location_8;
	enum mirth_mirth_Severity branch_Severity_9;
	switch (in_Severity_4) {
		case mirth_mirth_Severity_Info: {
			branch_Severity_9 = in_Severity_4;
			branch_Location_8 = in_Location_2;
			branch_Str_7 = in_Str_3;
			branch_zaMirth_6 = in_zaMirth_1;
		} break;
		case mirth_mirth_Severity_Warning: {
			INT v10 = in_zaMirth_1->mnumzewarnings;
			incref(MKNAT(v10));
			INT v11 = WRAP_I63(1LL);
			INT v12 = v10;
			INT v13 = v11;
			INT v14 = int_add(v12, v13);
			INT v15 = v14;
			INT v16 = in_zaMirth_1->mnumzewarnings;
			decref(MKNAT(v16));
			in_zaMirth_1->mnumzewarnings = v15;
			branch_Severity_9 = in_Severity_4;
			branch_Location_8 = in_Location_2;
			branch_Str_7 = in_Str_3;
			branch_zaMirth_6 = in_zaMirth_1;
		} break;
		case mirth_mirth_Severity_Error: {
			INT v17 = in_zaMirth_1->mnumzeerrors;
			incref(MKNAT(v17));
			INT v18 = WRAP_I63(1LL);
			INT v19 = v17;
			INT v20 = v18;
			INT v21 = int_add(v19, v20);
			INT v22 = v21;
			INT v23 = in_zaMirth_1->mnumzeerrors;
			decref(MKNAT(v23));
			in_zaMirth_1->mnumzeerrors = v22;
			branch_Severity_9 = in_Severity_4;
			branch_Location_8 = in_Location_2;
			branch_Str_7 = in_Str_3;
			branch_zaMirth_6 = in_zaMirth_1;
		} break;
		default: {
			do_panic(str_make("unexpected fallthrough in match\n", 32));
		}
	}
	struct mirth_mirth_Diagnostic* v24 = mtw_mirth_mirth_Diagnostic_Diagnostic(branch_Severity_9, branch_Location_8, branch_Str_7);
	struct std_list_List_1 r25 = branch_zaMirth_6->mzadiagnostics;
	struct std_list_List_1 v26;
	mw_std_list_zaLister_1_pushzx(MK_mirth_mirth_Diagnostic(v24), r25, &v26);
	branch_zaMirth_6->mzadiagnostics = v26;
	*out_zaMirth_5 = branch_zaMirth_6;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, -0x30(%rbp)
movl %ecx, %r15d
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %r14
testl %ecx, %ecx
je 0x19ac0
movabsq $0xfffffffffffc, %rbx   # imm = 0xFFFFFFFFFFFC
cmpl $0x2, %r15d
jne 0x19a6f
movq (%r14), %rdi
movq %rdi, %rax
andq %rbx, %rax
sete %cl
testb $0x3, %dil
setne %dl
orb %cl, %dl
jne 0x19a38
incl (%rax)
pushq $0x3
popq %rsi
callq 0xdd03
movq (%r14), %rdi
andq %rdi, %rbx
sete %dl
testb $0x3, %dil
setne %cl
orb %dl, %cl
jne 0x19a6a
decl (%rbx)
jne 0x19a6a
leaq 0xee6b2(%rip), %rsi     # 0x108111
movq %rax, %rbx
callq 0xce94
movq %rbx, %rax
movq %rax, (%r14)
jmp 0x19ac0
movq 0x8(%r14), %rdi
movq %rdi, %rax
andq %rbx, %rax
sete %cl
testb $0x3, %dil
setne %dl
orb %cl, %dl
jne 0x19a89
incl (%rax)
pushq $0x3
popq %rsi
callq 0xdd03
movq 0x8(%r14), %rdi
andq %rdi, %rbx
sete %dl
testb $0x3, %dil
setne %cl
orb %dl, %cl
jne 0x19abc
decl (%rbx)
jne 0x19abc
leaq 0xee660(%rip), %rsi     # 0x108111
movq %rax, %rbx
callq 0xce94
movq %rbx, %rax
movq %rax, 0x8(%r14)
pushq $0x1
popq %rdi
pushq $0x18
popq %rsi
callq 0x50c0
testq %rax, %rax
je 0x19b1e
movl $0x1, (%rax)
movq %r13, 0x10(%rax)
movq %r12, 0x8(%rax)
movl %r15d, 0x4(%rax)
movl 0x58(%r14), %edx
movq 0x60(%r14), %rcx
leaq 0xeeed8(%rip), %rsi     # 0x1089c9
leaq -0x40(%rbp), %rbx
movq %rax, %rdi
movq %rbx, %r8
callq 0x8e35
movups (%rbx), %xmm0
movups %xmm0, 0x58(%r14)
movq -0x30(%rbp), %rax
movq %r14, (%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xbdb12(%rip), %rsi     # 0xd7637
pushq $0x2
popq %rdi
pushq $0x31
popq %rdx
callq 0x5060
callq 0x52ae
pushq $0x1
popq %rdi
callq 0x5130