// File: /workspace/github_c_makefile_star2_O0/Ihsoh[P]ilang/compiler/frontend/irgen_c.c
// Function: ir_expr_member_arridx_fncall
static bool _ir_expr_member_arridx_fncall(
	IRGeneratorCContext *ctx,
	ResizableString *rstr,
	ParserASTNode *node_expr
) {
	assert(ctx);
	assert(rstr);
	assert(node_expr);

	switch (node_expr->type) {
		case FE_NODE_EXPR_MEMBER: {
			assert(node_expr->nchilds == 2);

			rstr_append_with_cstr(rstr, "(");
			_ir_expr(ctx, rstr, node_expr->childs[0]);
			rstr_append_with_cstr(rstr, ".");
			_ir_expr_identifier(ctx, rstr, node_expr->childs[1]);
			rstr_append_with_cstr(rstr, ")");

			return true;
		}
		case FE_NODE_EXPR_PMEMBER: {
			assert(node_expr->nchilds == 2);

			rstr_append_with_cstr(rstr, "(");
			_ir_expr(ctx, rstr, node_expr->childs[0]);
			rstr_append_with_cstr(rstr, "->");
			_ir_expr_identifier(ctx, rstr, node_expr->childs[1]);
			rstr_append_with_cstr(rstr, ")");

			return true;
		}
		case FE_NODE_EXPR_ARRAY_INDEX: {
			assert(node_expr->nchilds == 2);

			rstr_append_with_cstr(rstr, "(");
			_ir_expr(ctx, rstr, node_expr->childs[0]);
			rstr_append_with_cstr(rstr, "[");
			_ir_expr(ctx, rstr, node_expr->childs[1]);
			rstr_append_with_cstr(rstr, "]");
			rstr_append_with_cstr(rstr, ")");

			return true;
		}
		case FE_NODE_EXPR_FUNC_CALL: {
			assert(node_expr->nchilds == 2);

			rstr_append_with_cstr(rstr, "(");
			_ir_expr(ctx, rstr, node_expr->childs[0]);
			rstr_append_with_cstr(rstr, "(");
			_ir_expr_func_call_params(ctx, rstr, node_expr->childs[1]);
			rstr_append_with_cstr(rstr, ")");
			rstr_append_with_cstr(rstr, ")");
			
			return true;
		}
		default: {
			return false;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x22d5d
jmp 0x22d7c
leaq 0x597f2(%rip), %rdi     # 0x7c556
leaq 0x5407d(%rip), %rsi     # 0x76de8
movl $0x1f3, %edx            # imm = 0x1F3
leaq 0x54542(%rip), %rcx     # 0x772b9
callq 0x30a0
cmpq $0x0, -0x18(%rbp)
je 0x22d85
jmp 0x22da4
leaq 0x4fd82(%rip), %rdi     # 0x72b0e
leaq 0x54055(%rip), %rsi     # 0x76de8
movl $0x1f4, %edx            # imm = 0x1F4
leaq 0x5451a(%rip), %rcx     # 0x772b9
callq 0x30a0
cmpq $0x0, -0x20(%rbp)
je 0x22dad
jmp 0x22dcc
leaq 0x54341(%rip), %rdi     # 0x770f5
leaq 0x5402d(%rip), %rsi     # 0x76de8
movl $0x1f5, %edx            # imm = 0x1F5
leaq 0x544f2(%rip), %rcx     # 0x772b9
callq 0x30a0
movq -0x20(%rbp), %rax
movl (%rax), %eax
addl $0xfffff130, %eax       # imm = 0xFFFFF130
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x3, %eax
ja 0x2306b
movq -0x28(%rbp), %rax
leaq 0x53f6f(%rip), %rcx     # 0x76d60
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x20(%rbp), %rax
cmpl $0x2, 0x44(%rax)
jne 0x22e06
jmp 0x22e25
leaq 0x5450b(%rip), %rdi     # 0x77318
leaq 0x53fd4(%rip), %rsi     # 0x76de8
movl $0x1f9, %edx            # imm = 0x1F9
leaq 0x54499(%rip), %rcx     # 0x772b9
callq 0x30a0
movq -0x18(%rbp), %rdi
leaq 0x54c2d(%rip), %rsi     # 0x77a5d
callq 0x8d70
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rdx
callq 0x227b0
movq -0x18(%rbp), %rdi
leaq 0x5f193(%rip), %rsi     # 0x81feb
callq 0x8d70
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rdx
callq 0x25950
movq -0x18(%rbp), %rdi
leaq 0x5411d(%rip), %rsi     # 0x76f9e
callq 0x8d70
movb $0x1, -0x1(%rbp)
jmp 0x2306f
movq -0x20(%rbp), %rax
cmpl $0x2, 0x44(%rax)
jne 0x22e9b
jmp 0x22eba
leaq 0x54476(%rip), %rdi     # 0x77318
leaq 0x53f3f(%rip), %rsi     # 0x76de8
movl $0x204, %edx            # imm = 0x204
leaq 0x54404(%rip), %rcx     # 0x772b9
callq 0x30a0
movq -0x18(%rbp), %rdi
leaq 0x54b98(%rip), %rsi     # 0x77a5d
callq 0x8d70
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rdx
callq 0x227b0
movq -0x18(%rbp), %rdi
leaq 0x54443(%rip), %rsi     # 0x77330
callq 0x8d70
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rdx
callq 0x25950
movq -0x18(%rbp), %rdi
leaq 0x54088(%rip), %rsi     # 0x76f9e
callq 0x8d70
movb $0x1, -0x1(%rbp)
jmp 0x2306f
movq -0x20(%rbp), %rax
cmpl $0x2, 0x44(%rax)
jne 0x22f30
jmp 0x22f4f
leaq 0x543e1(%rip), %rdi     # 0x77318
leaq 0x53eaa(%rip), %rsi     # 0x76de8
movl $0x20f, %edx            # imm = 0x20F
leaq 0x5436f(%rip), %rcx     # 0x772b9
callq 0x30a0
movq -0x18(%rbp), %rdi
leaq 0x54b03(%rip), %rsi     # 0x77a5d
callq 0x8d70
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rdx
callq 0x227b0
movq -0x18(%rbp), %rdi
leaq 0x518a9(%rip), %rsi     # 0x7482b
callq 0x8d70
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rdx
callq 0x227b0
movq -0x18(%rbp), %rdi
leaq 0x5c172(%rip), %rsi     # 0x7f11d
callq 0x8d70
movq -0x18(%rbp), %rdi
leaq 0x53fe3(%rip), %rsi     # 0x76f9e
callq 0x8d70
movb $0x1, -0x1(%rbp)
jmp 0x2306f
movq -0x20(%rbp), %rax
cmpl $0x2, 0x44(%rax)
jne 0x22fd5
jmp 0x22ff4
leaq 0x5433c(%rip), %rdi     # 0x77318
leaq 0x53e05(%rip), %rsi     # 0x76de8
movl $0x21b, %edx            # imm = 0x21B
leaq 0x542ca(%rip), %rcx     # 0x772b9
callq 0x30a0
movq -0x18(%rbp), %rdi
leaq 0x54a5e(%rip), %rsi     # 0x77a5d
callq 0x8d70
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rdx
callq 0x227b0
movq -0x18(%rbp), %rdi
leaq 0x54a36(%rip), %rsi     # 0x77a5d
callq 0x8d70
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rdx
callq 0x25a60
movq -0x18(%rbp), %rdi
leaq 0x53f4e(%rip), %rsi     # 0x76f9e
callq 0x8d70
movq -0x18(%rbp), %rdi
leaq 0x53f3e(%rip), %rsi     # 0x76f9e
callq 0x8d70
movb $0x1, -0x1(%rbp)
jmp 0x2306f
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)