// File: /workspace/github_c_makefile_star2_O2/goodpaul6[P]generic/script.c
// Function: parse_post
static expr_t* parse_post(script_t* script, expr_t* pre)
{
	switch(g_cur_tok)
	{
		case TOK_DOT:
		{
			expr_t* exp = create_expr(EXP_DOT);
			get_next_token();
			
			if(g_cur_tok != TOK_IDENT) error_exit_p("Expected identifier after '.' but received '%s'\n", g_token_names[g_cur_tok]);
			
			exp->dotx.value = pre;
			exp->dotx.name = estrdup(g_lexeme);
			
			get_next_token();
			
			return parse_post(script, exp);
		} break;
		
		case TOK_COLON:
		{
			expr_t* exp = create_expr(EXP_COLON);
			get_next_token();
			
			if(g_cur_tok != TOK_IDENT) error_exit_p("Expected identifier after ':' but received '%s'\n", g_token_names[g_cur_tok]);
			
			exp->dotx.value = pre;
			exp->dotx.name = estrdup(g_lexeme);
			
			get_next_token();
			
			return parse_post(script, exp);
		} break;
		
		case TOK_OPENPAREN:
		{
			expr_t* exp = create_expr(EXP_CALL);
			exp->callx.func = pre;
			vec_init(&exp->callx.args, sizeof(expr_t*));
			
			if(pre->type == EXP_COLON)
			{
				expr_t* cpy = create_expr(pre->type);
				
				memcpy(cpy, pre->dotx.value, sizeof(expr_t));
				cpy->is_shallow_copy = 1;
				
				vec_push_back(&exp->callx.args, &cpy);
			}
			
			get_next_token();
			
			while(g_cur_tok != TOK_CLOSEPAREN)
			{
				expr_t* arg = parse_expr(script);
				vec_push_back(&exp->callx.args, &arg);
				
				if(g_cur_tok == TOK_COMMA) get_next_token();
				else if(g_cur_tok != TOK_CLOSEPAREN) error_exit_p("Expected ')' after '(' in function call expression but received '%s'\n", g_token_names[g_cur_tok]);
			}
			get_next_token();
			
			return parse_post(script, exp);
		} break;
		
		case TOK_OPENSQUARE:
		{
			expr_t* exp = create_expr(EXP_ARRAY_INDEX);
			exp->array_index.array = pre;
			get_next_token();
			
			exp->array_index.index = parse_expr(script);
			if(g_cur_tok != TOK_CLOSESQUARE) error_exit_p("Expected ']' after '[' in array index expression but received '%s'\n", g_token_names[g_cur_tok]);
			get_next_token();
			
			return parse_post(script, exp);
		} break;
		
		default:
			return pre;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x2dbd(%rip), %r12      # 0xd4a4
leaq 0x9c82(%rip), %r13      # 0x14370
movl 0x9c6c(%rip), %eax      # 0x14360
addl $-0x17, %eax
cmpl $0x9, %eax
ja 0xa843
movslq (%r12,%rax,4), %rax
addq %r12, %rax
jmpq *%rax
pushq $0x6
popq %rdi
callq 0x7994
movq %rax, %r14
movq %r15, 0x38(%rax)
callq 0x9824
movq %rbx, %rdi
callq 0x97cd
movq %rax, 0x40(%r14)
movl 0x9c31(%rip), %eax      # 0x14360
cmpq $0x18, %rax
je 0xa78b
jmp 0xa855
pushq $0x3
popq %rdi
callq 0x7994
movq %rax, %r14
callq 0x9824
movl 0x9c10(%rip), %eax      # 0x14360
cmpq $0x16, %rax
je 0xa77b
jmp 0xa87d
pushq $0x4
popq %rdi
callq 0x7994
movq %rax, %r14
callq 0x9824
movl 0x9bef(%rip), %eax      # 0x14360
cmpq $0x16, %rax
jne 0xa869
movq %r15, 0x38(%r14)
movq %r13, %rdi
callq 0x24df
movq %rax, 0x40(%r14)
callq 0x9824
movq %r14, %r15
jmp 0xa6ee
pushq $0xf
popq %rdi
callq 0x7994
movq %rax, %r14
movq %r15, 0x38(%rax)
leaq 0x40(%rax), %r12
pushq $0x8
popq %rsi
movq %r12, %rdi
callq 0xbf0c
cmpl $0x3, 0x28(%r15)
jne 0xa7e7
pushq $0x3
popq %rdi
callq 0x7994
leaq -0x30(%rbp), %rdx
movq %rax, (%rdx)
movq 0x38(%r15), %rsi
pushq $0xc
popq %rcx
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
movb $0x1, (%rax)
movq %r12, %rdi
movq %rdx, %rsi
callq 0xc1b9
callq 0x9824
movl 0x9b6e(%rip), %eax      # 0x14360
leaq -0x30(%rbp), %r15
cmpl $0x1a, %eax
je 0xa830
movq %rbx, %rdi
callq 0x97cd
movq %rax, -0x30(%rbp)
movq %r12, %rdi
movq %r15, %rsi
callq 0xc1b9
movl 0x9b48(%rip), %eax      # 0x14360
cmpq $0x1a, %rax
je 0xa7f6
cmpl $0x1f, %eax
jne 0xa891
callq 0x9824
movl 0x9b32(%rip), %eax      # 0x14360
jmp 0xa7f6
callq 0x9824
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa6cc
movq %rax, %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x93e4(%rip), %rcx      # 0x13c40
movq (%rcx,%rax,8), %rsi
leaq 0x46ad(%rip), %rdi      # 0xef14
jmp 0xa8a3
leaq 0x93d0(%rip), %rcx      # 0x13c40
movq (%rcx,%rax,8), %rsi
leaq 0x45f1(%rip), %rdi      # 0xee6c
jmp 0xa8a3
leaq 0x93bc(%rip), %rcx      # 0x13c40
movq (%rcx,%rax,8), %rsi
leaq 0x460e(%rip), %rdi      # 0xee9d
jmp 0xa8a3
leaq 0x93a8(%rip), %rcx      # 0x13c40
movq (%rcx,%rax,8), %rsi
leaq 0x462b(%rip), %rdi      # 0xeece
xorl %eax, %eax
callq 0x78e4