// File: /workspace/github_c_makefile_star2_O0/hsjoihs[P]c-compiler/parse_analyze_toplevel.c
// Function: record_global_struct_or_union_declaration
static void record_global_struct_or_union_declaration(
    struct AnalyzerState *ptr_ps, const struct Type *ref_struct_or_union_type)
{
	const struct Type struct_or_union_type = *ref_struct_or_union_type;
	assert(is_struct_or_union(&struct_or_union_type));
	struct StructInternalInfo info =
	    struct_or_union_type.s.struct_or_union_info;
	if (!info.ptr_types_and_idents) { /* null; incomplete type */
		return;
	}
	struct Vector /* <TypeAndIdent> */ types_and_idents =
	    *info.ptr_types_and_idents;

	struct SizeAndAlignment *inner_type_vec =
	    calloc(types_and_idents.length, sizeof(struct SizeAndAlignment));

	int i = 0;
	for (; i < types_and_idents.length; i++) {
		const struct TypeAndIdent *ptr_vec_i = types_and_idents.vector[i];
		inner_type_vec[i].size = size_of(ptr_ps, &ptr_vec_i->type);
		inner_type_vec[i].alignment = align_of(ptr_ps, &ptr_vec_i->type);
	}

	int *offset_vec;

	struct SizeAndAlignment (*f)(const struct SizeAndAlignment *inner_type_vec,
	                             int **ptr_offset_vec, int length) =
	    struct_or_union_type.type_category == STRUCT_NOT_UNION
	        ? get_size_alignment_offsets_for_struct_not_union
	        : get_size_alignment_offsets_for_union;

	struct SizeAndAlignment outer_s_and_a = f(inner_type_vec, &offset_vec, i);

	struct StructOrUnionInternalCompleteInfo *ptr_complete =
	    calloc(1, sizeof(struct StructOrUnionInternalCompleteInfo));
	ptr_complete->info = info;
	ptr_complete->offset_vec = offset_vec;
	ptr_complete->s_and_a = outer_s_and_a;

	insert(ptr_ps->global_struct_or_union_tag_map,
	       struct_or_union_type.s.struct_or_union_tag, ptr_complete);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x60(%rbp), %rdi
movl $0x50, %edx
callq 0x10e0
leaq -0x60(%rbp), %rdi
callq 0xb250
movl %eax, %edi
movb $0x0, %al
callq 0x1260
movq -0x28(%rbp), %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
jne 0x32cb
jmp 0x340d
movq -0x68(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x78(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x70(%rbp)
movslq -0x78(%rbp), %rdi
movl $0x8, %esi
callq 0x10b0
movq %rax, -0x80(%rbp)
movl $0x0, -0x84(%rbp)
movl -0x84(%rbp), %eax
cmpl -0x78(%rbp), %eax
jge 0x336d
movq -0x70(%rbp), %rax
movslq -0x84(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x90(%rbp)
movq -0x8(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0x2570
movl %eax, %edx
movq -0x80(%rbp), %rax
movslq -0x84(%rbp), %rcx
movl %edx, (%rax,%rcx,8)
movq -0x8(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0x2720
movl %eax, %edx
movq -0x80(%rbp), %rax
movslq -0x84(%rbp), %rcx
movl %edx, 0x4(%rax,%rcx,8)
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0x32fa
movl -0x60(%rbp), %edx
leaq -0x1027(%rip), %rax     # 0x2350
leaq -0xf3e(%rip), %rcx      # 0x2440
cmpl $0x5, %edx
cmoveq %rcx, %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movq -0x80(%rbp), %rdi
movl -0x84(%rbp), %edx
leaq -0x98(%rbp), %rsi
callq *%rax
movq %rax, -0xa8(%rbp)
movl $0x1, %edi
movl $0x18, %esi
callq 0x10b0
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movq -0x68(%rbp), %rcx
movq %rcx, (%rax)
movq -0x98(%rbp), %rcx
movq -0xb0(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0xb0(%rbp), %rax
movq -0xa8(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rdi
movq -0x30(%rbp), %rsi
movq -0xb0(%rbp), %rdx
callq 0xcb50
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)