// File: /workspace/github_c_makefile_star2_O3/hsjoihs[P]c-compiler/parse_analyze_toplevel.c
// Function: record_if_global_struct_or_enum_declaration
static void
record_if_global_struct_or_enum_declaration(struct AnalyzerState *ptr_ps,
                                            const struct Type *ref_type)
{
	switch (ref_type->type_category) {
	case ARRAY:
	case FN:
	case PTR_:
		record_if_global_struct_or_enum_declaration(ptr_ps,
		                                            ref_type->derived_from);
		return;
	case VOID_:
	case INT_:
	case CHAR_:
		return;
	case STRUCT_NOT_UNION:
	case UNION:
		record_global_struct_or_union_declaration(ptr_ps, ref_type);
		return;
	case ENUM_:
		record_global_enum_declaration(ptr_ps, ref_type);
		return;
	}

	fprintf(stderr,
	        "****************************\n"
	        "* INTERNAL COMPILER ERROR @ %s\n"
	        "* Unexpected value of TypeCategory: `ref_type->type_category` is "
	        "`%d`\n"
	        "****************************\n",
	        __func__, ref_type->type_category);
	exit(EXIT_FAILURE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %r12
movl (%rsi), %edi
leal -0x1(%rdi), %eax
cmpl $0x3, %eax
jae 0x36ab
movq 0x8(%rsi), %rsi
jmp 0x369b
cmpl $0x8, %edi
ja 0x388b
movl $0x91, %eax
btl %edi, %eax
jb 0x387c
movl $0x60, %eax
btl %edi, %eax
jae 0x378a
leaq -0x98(%rbp), %r14
movl $0xa, %ecx
movq %r14, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq %r14, %rdi
callq 0x95ca
xorl %r15d, %r15d
movl %eax, %edi
xorl %eax, %eax
callq 0x243c
movq 0x38(%r14), %r13
testq %r13, %r13
je 0x387c
movq %r12, -0x30(%rbp)
movslq (%r13), %rbx
movq 0x8(%r13), %r14
movl $0x8, %esi
movq %rbx, %rdi
callq 0x10d0
movq %rax, %r12
testq %rbx, %rbx
jle 0x3771
movq %rbx, %rcx
movq %r13, -0x40(%rbp)
movq %r14, -0x38(%rbp)
xorl %ebx, %ebx
movq -0x30(%rbp), %r13
movq -0x38(%rbp), %rax
movq (%rax,%rbx,8), %r15
movq %rcx, %r14
movq %r13, %rdi
movq %r15, %rsi
callq 0x2ffc
movl %eax, (%r12,%rbx,8)
movq %r13, %rdi
movq %r15, %rsi
callq 0x308c
movq %r14, %rcx
movl %eax, 0x4(%r12,%rbx,8)
incq %rbx
cmpq %rbx, %r14
jne 0x3735
movl %ecx, %r15d
movq -0x40(%rbp), %r13
cmpl $0x5, -0x98(%rbp)
jne 0x3831
leaq -0x84b(%rip), %rax      # 0x2f3a
jmp 0x3838
cmpl $0x8, %edi
jne 0x388b
movq 0x40(%rsi), %r14
movq 0x48(%rsi), %rbx
movl $0x1, %edi
xorl %eax, %eax
callq 0x243c
testq %rbx, %rbx
je 0x387c
movq %r14, -0x38(%rbp)
movq %r12, -0x30(%rbp)
movslq (%rbx), %r12
movq 0x8(%rbx), %r13
callq 0x5d33
movq %rax, %r15
testq %r12, %r12
jle 0x37fd
xorl %r14d, %r14d
movq (%r13,%r14,8), %rbx
movl $0x1, %edi
movl $0x10, %esi
callq 0x10d0
movq %rbx, (%rax)
movl %r14d, 0x8(%rax)
movq %r15, %rdi
movq %rax, %rsi
callq 0x5d9b
incq %r14
cmpq %r14, %r12
jne 0x37cf
movq -0x30(%rbp), %rbx
leaq 0x88(%rbx), %rdi
movq %r15, %rsi
callq 0x5df4
movq 0x80(%rbx), %rdi
movq -0x38(%rbp), %rsi
movq %r15, %rdx
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa344
leaq -0x994(%rip), %rax      # 0x2ea4
movq -0x30(%rbp), %rbx
leaq -0x48(%rbp), %rsi
movq %r12, %rdi
movq %rsi, %r12
movl %r15d, %edx
callq *%rax
movq %rax, %r14
movl $0x1, %edi
movl $0x18, %esi
callq 0x10d0
movq %r13, (%rax)
movq (%r12), %rcx
movq %rcx, 0x8(%rax)
movq %r14, 0x10(%rax)
movq 0x78(%rbx), %rdi
movq -0x68(%rbp), %rsi
movq %rax, %rdx
callq 0xa344
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x14bb