// File: /workspace/github_c_makefile_star2_O0/been-jamming[P]MinimalCC/types.c
// Function: parse_type_recursive
static void parse_type_recursive(type *t, char **c, char *identifier_name, char *argument_names, unsigned int identifier_length, unsigned int num_arguments){
	type inner_type = EMPTY_TYPE;
	type list_type = EMPTY_TYPE;

	skip_whitespace(c);
	while(**c == '*'){
		add_type_entry(t, type_pointer);
		++*c;
		skip_whitespace(c);
	}

	if(!parse_identifier(c, identifier_name, identifier_length) && **c == '('){
		++*c;
		skip_whitespace(c);
		parse_type_recursive(&inner_type, c, identifier_name, argument_names, identifier_length, num_arguments);
		if(**c != ')'){
			snprintf(error_message, sizeof(error_message), "Expected ')'");
			do_error(1);
		}
		++*c;
	}

	skip_whitespace(c);

	if(**c == '('){
		add_type_entry(t, type_returns);
		++*c;
		skip_whitespace(c);
		parse_type_arguments(t, c, argument_names, identifier_length, num_arguments);
		++*c;
		add_type_entry(t, type_function);
		if(**c == '(' || **c == '['){
			snprintf(error_message, sizeof(error_message), "Invalid type");
			do_error(1);
		}
	} else if(**c == '['){
		while(**c == '['){
			add_type_entry(&list_type, type_list);
			++*c;
			list_type.list_indicies[list_type.current_index] = strtol(*c, c, 10);
			list_type.current_index++;
			skip_whitespace(c);
			if(**c != ']'){
				snprintf(error_message, sizeof(error_message), "Expected ']'");
				do_error(1);
			}
			++*c;
		}
	}


	append_type(t, list_type);
	append_type(t, inner_type);
}

// Assembly:
subq $0xe8, %rsp
movq %rdi, 0xe0(%rsp)
movq %rsi, 0xd8(%rsp)
movq %rdx, 0xd0(%rsp)
movq %rcx, 0xc8(%rsp)
movl %r8d, 0xc4(%rsp)
movl %r9d, 0xc0(%rsp)
leaq 0x80(%rsp), %rdi
leaq 0x5352(%rip), %rsi      # 0x117a8
movl $0x40, %edx
callq 0x1120
leaq 0x40(%rsp), %rdi
leaq 0x533c(%rip), %rsi      # 0x117a8
movl $0x40, %edx
callq 0x1120
movq 0xd8(%rsp), %rdi
callq 0xbb70
movq 0xd8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x2a, %eax
jne 0xc4c9
movq 0xe0(%rsp), %rdi
movl $0x4, %esi
callq 0xb510
movq 0xd8(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0xd8(%rsp), %rdi
callq 0xbb70
jmp 0xc483
movq 0xd8(%rsp), %rdi
movq 0xd0(%rsp), %rsi
movl 0xc4(%rsp), %edx
callq 0xb800
cmpb $0x0, %al
jne 0xc5a1
movq 0xd8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x28, %eax
jne 0xc5a1
movq 0xd8(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0xd8(%rsp), %rdi
callq 0xbb70
movq 0xd8(%rsp), %rsi
movq 0xd0(%rsp), %rdx
movq 0xc8(%rsp), %rcx
movl 0xc4(%rsp), %r8d
movl 0xc0(%rsp), %r9d
leaq 0x80(%rsp), %rdi
callq 0xc410
movq 0xd8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x29, %eax
je 0xc58f
leaq 0x4fbe(%rip), %rdi      # 0x11530
movl $0x100, %esi            # imm = 0x100
leaq 0x1450(%rip), %rdx      # 0xd9ce
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x87b0
movq 0xd8(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0xd8(%rsp), %rdi
callq 0xbb70
movq 0xd8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x28, %eax
jne 0xc695
movq 0xe0(%rsp), %rdi
movl $0x6, %esi
callq 0xb510
movq 0xd8(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0xd8(%rsp), %rdi
callq 0xbb70
movq 0xe0(%rsp), %rdi
movq 0xd8(%rsp), %rsi
movq 0xc8(%rsp), %rdx
movl 0xc4(%rsp), %ecx
movl 0xc0(%rsp), %r8d
callq 0xc800
movq 0xd8(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0xe0(%rsp), %rdi
movl $0x5, %esi
callq 0xb510
movq 0xd8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x28, %eax
je 0xc66c
movq 0xd8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x5b, %eax
jne 0xc690
leaq 0x4ebd(%rip), %rdi      # 0x11530
movl $0x100, %esi            # imm = 0x100
leaq 0x1c5a(%rip), %rdx      # 0xe2d9
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x87b0
jmp 0xc777
movq 0xd8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x5b, %eax
jne 0xc775
jmp 0xc6ae
movq 0xd8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x5b, %eax
jne 0xc773
leaq 0x40(%rsp), %rdi
movl $0x7, %esi
callq 0xb510
movq 0xd8(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0xd8(%rsp), %rax
movq (%rax), %rdi
movq 0xd8(%rsp), %rsi
movl $0xa, %edx
callq 0x1110
movl %eax, %ecx
movl 0x78(%rsp), %eax
movl %ecx, 0x58(%rsp,%rax,4)
movl 0x78(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x78(%rsp)
movq 0xd8(%rsp), %rdi
callq 0xbb70
movq 0xd8(%rsp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x5d, %eax
je 0xc75c
leaq 0x4df1(%rip), %rdi      # 0x11530
movl $0x100, %esi            # imm = 0x100
leaq 0x13e3(%rip), %rdx      # 0xdb2e
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x87b0
movq 0xd8(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0xc6ae
jmp 0xc775
jmp 0xc777
movq 0xe0(%rsp), %rdi
movups 0x40(%rsp), %xmm0
movups 0x50(%rsp), %xmm1
movups 0x60(%rsp), %xmm2
movups 0x70(%rsp), %xmm3
movq %rsp, %rax
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xb630
movq 0xe0(%rsp), %rdi
movups 0x80(%rsp), %xmm0
movups 0x90(%rsp), %xmm1
movups 0xa0(%rsp), %xmm2
movups 0xb0(%rsp), %xmm3
movq %rsp, %rax
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xb630
addq $0xe8, %rsp
retq
nopw %cs:(%rax,%rax)