// File: /workspace/github_c_makefile_star2_O3/vtereshkov[P]umka-lang/src/umka_expr.c
// Function: doExprListToExprListConv
static void doExprListToExprListConv(Compiler *comp, const Type *dest, const Type **src, Const *constant)
{
    if (constant)
        comp->error.handler(comp->error.context, "Conversion to expression list is not allowed in constant expressions");

    const Ident *destList = identAllocTempVar(&comp->idents, &comp->types, &comp->modules, &comp->blocks, dest, false);
    doZeroVar(comp, destList);

    // Assign to fields
    for (int i = 0; i < dest->numItems; i++)
    {
        genDup(&comp->gen);                                                     // Duplicate src pointer
        genGetFieldPtr(&comp->gen, (*src)->field[i]->offset);                   // Get src.item pointer
        genDeref(&comp->gen, (*src)->field[i]->type->kind);                     // Get src.item value

        const Type *srcFieldType = (*src)->field[i]->type;
        doAssertImplicitTypeConv(comp, dest->field[i]->type, &srcFieldType, constant);

        genPushLocalPtr(&comp->gen, destList->offset + dest->field[i]->offset); // Push dest.item pointer
        genSwapChangeRefCntAssign(&comp->gen, dest->field[i]->type);            // Assign to dest.item
    }

    genPop(&comp->gen);                                                         // Remove src pointer
    doPushVarPtr(comp, destList);
    *src = dest;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, 0x8(%rsp)
movq %rcx, %r12
testq %rcx, %rcx
je 0x11fc1
movq 0x8(%rsp), %rcx
movq 0x5118(%rcx), %rdi
leaq 0x64a7d(%rip), %rsi     # 0x76a36
xorl %eax, %eax
callq *0x50f8(%rcx)
movq 0x8(%rsp), %r15
leaq 0x4e38(%r15), %rdi
leaq 0x4e18(%r15), %rsi
leaq 0x100(%r15), %rdx
leaq 0x4220(%r15), %rcx
movq %rsi, 0x20(%rsp)
movq %r14, %r8
xorl %r9d, %r9d
callq 0x153ba
movq %rax, %r13
movq %r15, %rdi
movq %rax, %rsi
callq 0x17011
cmpl $0x0, 0x10(%r14)
movq %r12, 0x18(%rsp)
jle 0x120fa
movq 0x8(%rsp), %rax
leaq 0x4e70(%rax), %r12
xorl %ebp, %ebp
movq %r12, %rdi
callq 0x13273
movq (%rbx), %rax
movq 0x28(%rax), %rax
movq (%rax,%rbp,8), %rax
movl 0x110(%rax), %esi
movq %r12, %rdi
callq 0x13a27
movq (%rbx), %rax
movq 0x28(%rax), %rax
movq (%rax,%rbp,8), %rax
movq 0x108(%rax), %rax
movl (%rax), %esi
movq %r12, %rdi
callq 0x132bc
movq (%rbx), %rax
movq 0x28(%rax), %rax
movq (%rax,%rbp,8), %rax
movq 0x108(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x28(%r14), %rax
movq (%rax,%rbp,8), %rax
movq %r13, %r15
movq 0x108(%rax), %r13
movq 0x8(%rsp), %rdi
movq %r13, %rsi
leaq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xcabc
movq 0x10(%rsp), %rdx
movq 0x20(%rsp), %rdi
movq %r13, %rsi
movq %r15, %r13
callq 0x1a277
movq 0x28(%r14), %rax
movq (%rax,%rbp,8), %rax
movl 0x110(%rax), %esi
addl 0x120(%r15), %esi
movq %r12, %rdi
callq 0x12f97
movq 0x28(%r14), %rax
movq (%rax,%rbp,8), %rax
movq 0x108(%rax), %rsi
movq %r12, %rdi
callq 0x1362e
incq %rbp
movslq 0x10(%r14), %rax
cmpq %rax, %rbp
jl 0x1201e
movq 0x8(%rsp), %r15
leaq 0x4e70(%r15), %rdi
callq 0x131c1
movq %r15, %rdi
movq %r13, %rsi
callq 0xc9da
movq %r14, (%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq