// File: /workspace/github_c_makefile_star2_O2/mirth-lang[P]mirth/bin/mirth1.c
// Function: mw_mirth_mirth_zaMirth_paniczediagnosticszx
static void mw_mirth_mirth_zaMirth_paniczediagnosticszx (struct mirth_mirth_zaMirth* in_zaMirth_1) {
	struct mirth_mirth_zaMirth* v2;
	struct std_list_List_1 v3 = mw_mirth_mirth_zaMirth_popzediagnosticszx(in_zaMirth_1, &v2);
	STR* v4;
	STRLIT(v4, "", 0);
	bool v5 = true;
	struct mirth_mirth_zaMirth* r6 = v2;
	STR* r7 = v4;
	struct std_list_List_1 v8 = v3;
	bool v9 = v5;
	bool v10 = v5;
	while (v10) {
		struct mirth_mirth_zaMirth* r11 = r6;
		STR* r12 = r7;
		struct std_list_List_1 v13 = v8;
		bool v14 = v9;
		struct mirth_mirth_zaMirth* branch_zaMirth_15;
		STR* branch_zaStr_16;
		struct std_list_List_1 branch_List_17;
		bool branch_Bool_18;
		switch ((v13).tag) {
			case std_list_List_1_Cons: {
				struct std_list_List_1 v19;
				VAL v20 = mtp_std_list_List_1_Cons(v13, &v19);
				struct mirth_mirth_zaMirth* v21;
				STR* v22;
				mw_mirth_mirth_Diagnostic_diagnosticzj(r11, r12, V_mirth_mirth_Diagnostic(v20), &v21, &v22);
				STR* v23;
				STRLIT(v23, "\n", 1);
				STR* v24;
				mw_std_str_zaStr_pushzestrzx(v23, v22, &v24);
				bool v25 = true;
				branch_Bool_18 = v25;
				branch_List_17 = v19;
				branch_zaStr_16 = v24;
				branch_zaMirth_15 = v21;
			} break;
			case std_list_List_1_Nil: {
				struct std_list_List_1 v26 = { .tag=std_list_List_1_Nil };
				bool v27 = false;
				branch_Bool_18 = v27;
				branch_List_17 = v26;
				branch_zaStr_16 = r12;
				branch_zaMirth_15 = r11;
			} break;
			default: {
				do_panic(str_make("unexpected fallthrough in match\n", 32));
			}
		}
		v10 = branch_Bool_18;
		v9 = branch_Bool_18;
		v8 = branch_List_17;
		r7 = branch_zaStr_16;
		r6 = branch_zaMirth_15;
	}
	decref(MK_std_list_List_1(v8));
	struct std_terminal_Sgr v28 = { .tag=std_terminal_Sgr_FGRed };
	STR* v29;
	mw_std_terminal_Sgr_emitzj(v28, r7, &v29);
	STR* v30;
	STRLIT(v30, "Fatal error. Stopping early.", 28);
	STR* v31;
	mw_std_str_zaStr_pushzestrzx(v30, v29, &v31);
	struct std_terminal_Sgr v32 = { .tag=std_terminal_Sgr_Reset };
	STR* v33;
	mw_std_terminal_Sgr_emitzj(v32, v31, &v33);
	do_panic(v33);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq -0x50(%rbp), %rsi
callq 0x19d15
movl %eax, %r14d
movq %rdx, %r15
movq 0x10f266d(%rip), %rbx   # 0x110bec8
testq %rbx, %rbx
jne 0x19878
leaq 0xc2e8e(%rip), %rdi     # 0xdc6f5
xorl %esi, %esi
callq 0x8a21
movq %rax, %rbx
movq %rax, 0x10f2650(%rip)   # 0x110bec8
movabsq $0xfffffffffffc, %r13   # imm = 0xFFFFFFFFFFFC
movq %rbx, %rax
andq %r13, %rax
sete %cl
testb $0x3, %bl
setne %dl
orb %cl, %dl
jne 0x19897
incl (%rax)
movq -0x50(%rbp), %r12
movb $0x1, %al
movq %r15, %rdi
testb $0x1, %al
je 0x19936
xorl %eax, %eax
movl $0x0, %r15d
testl %r14d, %r14d
je 0x1989d
cmpl $0x1, %r14d
jne 0x199cf
leaq -0x40(%rbp), %rsi
callq 0xce01
movq %r12, %rdi
movq %rbx, %rsi
movq %rax, %rdx
leaq -0x30(%rbp), %rcx
leaq -0x48(%rbp), %r8
callq 0x19da1
movq 0x10f25eb(%rip), %rsi   # 0x110bed0
testq %rsi, %rsi
jne 0x19903
leaq 0xbc0f5(%rip), %rdi     # 0xd59e6
pushq $0x1
popq %rsi
callq 0x8a21
movq %rax, %rsi
movq %rax, 0x10f25cd(%rip)   # 0x110bed0
movq %rsi, %rax
andq %r13, %rax
sete %cl
testb $0x3, %sil
setne %dl
orb %cl, %dl
jne 0x19919
incl (%rax)
movq -0x48(%rbp), %rdi
callq 0xd8b0
movq %rax, %rbx
movl -0x40(%rbp), %r14d
movq -0x38(%rbp), %r15
movq -0x30(%rbp), %r12
jmp 0x1989b
movq %rdi, %rax
andq %r13, %rax
sete %cl
testb $0x3, %dil
setne %dl
orb %cl, %dl
jne 0x19964
decl (%rax)
jne 0x19964
shlq $0x30, %r14
orq %rdi, %r14
leaq 0xee91d(%rip), %rsi     # 0x108279
movq %r14, %rdi
callq 0xce94
pushq $0x1f
popq %rdi
leaq -0x40(%rbp), %rdx
movq %rbx, %rsi
callq 0x1090c
movq 0x10f255e(%rip), %rsi   # 0x110bed8
testq %rsi, %rsi
jne 0x19998
leaq 0xbddbe(%rip), %rdi     # 0xd7744
pushq $0x1c
popq %rsi
callq 0x8a21
movq %rax, %rsi
movq %rax, 0x10f2540(%rip)   # 0x110bed8
andq %rsi, %r13
sete %al
testb $0x3, %sil
setne %cl
orb %al, %cl
jne 0x199ad
incl (%r13)
movq -0x40(%rbp), %rdi
callq 0xd8b0
leaq -0x30(%rbp), %rbx
xorl %edi, %edi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x1090c
movq (%rbx), %rdi
callq 0x8cc6
leaq 0xbae37(%rip), %rdi     # 0xd480d
pushq $0x20
popq %rsi
callq 0x8a21
movq %rax, %rdi
callq 0x8cc6