// File: /workspace/github_c_makefile_star2_O3/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 0x1bd10
movabsq $0xfffffffffffc, %rbx   # imm = 0xFFFFFFFFFFFC
cmpl $0x2, %r15d
jne 0x1bcbd
movq (%r14), %rdi
movq %rdi, %rax
andq %rbx, %rax
sete %cl
testb $0x3, %dil
setne %dl
orb %cl, %dl
jne 0x1bc84
incl (%rax)
movl $0x3, %esi
callq 0xe50f
movq (%r14), %rdi
andq %rdi, %rbx
sete %dl
testb $0x3, %dil
setne %cl
orb %dl, %cl
jne 0x1bcb8
decl (%rbx)
jne 0x1bcb8
leaq 0xf5464(%rip), %rsi     # 0x111111
movq %rax, %rbx
callq 0xd13d
movq %rbx, %rax
movq %rax, (%r14)
jmp 0x1bd10
movq 0x8(%r14), %rdi
movq %rdi, %rax
andq %rbx, %rax
sete %cl
testb $0x3, %dil
setne %dl
orb %cl, %dl
jne 0x1bcd7
incl (%rax)
movl $0x3, %esi
callq 0xe50f
movq 0x8(%r14), %rdi
andq %rdi, %rbx
sete %dl
testb $0x3, %dil
setne %cl
orb %dl, %cl
jne 0x1bd0c
decl (%rbx)
jne 0x1bd0c
leaq 0xf5410(%rip), %rsi     # 0x111111
movq %rax, %rbx
callq 0xd13d
movq %rbx, %rax
movq %rax, 0x8(%r14)
movl $0x1, %edi
movl $0x18, %esi
callq 0x50c0
testq %rax, %rax
je 0x1bd72
movl $0x1, (%rax)
movq %r13, 0x10(%rax)
movq %r12, 0x8(%rax)
movl %r15d, 0x4(%rax)
movl 0x58(%r14), %edx
movq 0x60(%r14), %rcx
leaq 0xf5c84(%rip), %rsi     # 0x1119c9
leaq -0x40(%rbp), %rbx
movq %rax, %rdi
movq %rbx, %r8
callq 0x949e
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 0xc775a(%rip), %rsi     # 0xe34d3
movl $0x31, %edx
movl $0x2, %edi
callq 0x5060
callq 0x52b6
movl $0x1, %edi
callq 0x5130