// File: /workspace/github_c_makefile_star2_O0/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
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl 0xcc6a(%rip), %eax      # 0x1a5b0
addl $-0x17, %eax
movl %eax, %ecx
movq %rcx, -0x50(%rbp)
subl $0x9, %eax
ja 0xdbd5
movq -0x50(%rbp), %rax
leaq 0x5ba5(%rip), %rcx      # 0x13508
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x4, %edi
callq 0xa1b0
movq %rax, -0x20(%rbp)
callq 0xd640
cmpl $0x16, 0xcc2a(%rip)     # 0x1a5b0
je 0xd9a8
movslq 0xcc21(%rip), %rcx      # 0x1a5b0
leaq 0xc88a(%rip), %rax      # 0x1a220
movq (%rax,%rcx,8), %rsi
leaq 0x7590(%rip), %rdi      # 0x14f31
movb $0x0, %al
callq 0xa0e0
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x38(%rax)
leaq 0xcc05(%rip), %rdi      # 0x1a5c0
callq 0x2500
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x40(%rax)
callq 0xd640
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xd930
movq %rax, -0x8(%rbp)
jmp 0xdbdd
movl $0x3, %edi
callq 0xa1b0
movq %rax, -0x28(%rbp)
callq 0xd640
cmpl $0x16, 0xcbb0(%rip)     # 0x1a5b0
je 0xda22
movslq 0xcba7(%rip), %rcx      # 0x1a5b0
leaq 0xc810(%rip), %rax      # 0x1a220
movq (%rax,%rcx,8), %rsi
leaq 0x7547(%rip), %rdi      # 0x14f62
movb $0x0, %al
callq 0xa0e0
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x38(%rax)
leaq 0xcb8b(%rip), %rdi      # 0x1a5c0
callq 0x2500
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x40(%rax)
callq 0xd640
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xd930
movq %rax, -0x8(%rbp)
jmp 0xdbdd
movl $0xf, %edi
callq 0xa1b0
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x30(%rbp), %rdi
addq $0x38, %rdi
addq $0x8, %rdi
movl $0x8, %esi
callq 0x114e0
movq -0x18(%rbp), %rax
cmpl $0x3, 0x28(%rax)
jne 0xdadc
movq -0x18(%rbp), %rax
movl 0x28(%rax), %edi
callq 0xa1b0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rsi
movl $0x60, %edx
callq 0x2180
movq -0x38(%rbp), %rax
movb $0x1, (%rax)
movq -0x30(%rbp), %rdi
addq $0x38, %rdi
addq $0x8, %rdi
leaq -0x38(%rbp), %rsi
callq 0x11960
callq 0xd640
cmpl $0x1a, 0xcac8(%rip)     # 0x1a5b0
je 0xdb49
movq -0x10(%rbp), %rdi
callq 0xd5a0
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rdi
addq $0x38, %rdi
addq $0x8, %rdi
leaq -0x40(%rbp), %rsi
callq 0x11960
cmpl $0x1f, 0xca9d(%rip)     # 0x1a5b0
jne 0xdb1c
callq 0xd640
jmp 0xdb47
cmpl $0x1a, 0xca8d(%rip)     # 0x1a5b0
je 0xdb45
movslq 0xca84(%rip), %rcx      # 0x1a5b0
leaq 0xc6ed(%rip), %rax      # 0x1a220
movq (%rax,%rcx,8), %rsi
leaq 0x7455(%rip), %rdi      # 0x14f93
movb $0x0, %al
callq 0xa0e0
jmp 0xdb47
jmp 0xdae1
callq 0xd640
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0xd930
movq %rax, -0x8(%rbp)
jmp 0xdbdd
movl $0x6, %edi
callq 0xa1b0
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x38(%rax)
callq 0xd640
movq -0x10(%rbp), %rdi
callq 0xd5a0
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x40(%rax)
cmpl $0x18, 0xca15(%rip)     # 0x1a5b0
je 0xdbbd
movslq 0xca0c(%rip), %rcx      # 0x1a5b0
leaq 0xc675(%rip), %rax      # 0x1a220
movq (%rax,%rcx,8), %rsi
leaq 0x7423(%rip), %rdi      # 0x14fd9
movb $0x0, %al
callq 0xa0e0
callq 0xd640
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0xd930
movq %rax, -0x8(%rbp)
jmp 0xdbdd
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)