// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/marsh.c
// Function: janet_env_lookup_into
void janet_env_lookup_into(JanetTable *renv, JanetTable *env, const char *prefix, int recurse) {
    while (env) {
        for (int32_t i = 0; i < env->capacity; i++) {
            if (janet_checktype(env->data[i].key, JANET_SYMBOL)) {
                if (prefix) {
                    int32_t prelen = (int32_t) strlen(prefix);
                    const uint8_t *oldsym = janet_unwrap_symbol(env->data[i].key);
                    int32_t oldlen = janet_string_length(oldsym);
                    uint8_t *symbuf = janet_smalloc(prelen + oldlen);
                    safe_memcpy(symbuf, prefix, prelen);
                    safe_memcpy(symbuf + prelen, oldsym, oldlen);
                    Janet s = janet_symbolv(symbuf, prelen + oldlen);
                    janet_sfree(symbuf);
                    janet_table_put(renv, s, entry_getval(env->data[i].value));
                } else {
                    janet_table_put(renv,
                                    env->data[i].key,
                                    entry_getval(env->data[i].value));
                }
            }
        }
        env = recurse ? env->proto : NULL;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x401d9
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jge 0x401b0
xorl %eax, %eax
testb $0x1, %al
jne 0x3ffe4
jmp 0x40031
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x40008
jmp 0x40064
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x40064
jmp 0x401a0
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
movslq -0x20(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq (%rcx), %rax
movabsq $-0x5800000000000, %rcx # imm = 0xFFFA800000000000
cmpq %rcx, %rax
jne 0x401a0
cmpq $0x0, -0x18(%rbp)
je 0x40148
movq -0x18(%rbp), %rdi
callq 0x12310
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
callq 0x7b260
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl -0x8(%rax), %eax
movl %eax, -0x34(%rbp)
movl -0x24(%rbp), %eax
addl -0x34(%rbp), %eax
movslq %eax, %rdi
callq 0x3a870
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rsi
movslq -0x24(%rbp), %rdx
callq 0x6ae40
movq -0x40(%rbp), %rdi
movslq -0x24(%rbp), %rax
addq %rax, %rdi
movq -0x30(%rbp), %rsi
movslq -0x34(%rbp), %rdx
callq 0x6ae40
movq -0x40(%rbp), %rdi
movl -0x24(%rbp), %esi
addl -0x34(%rbp), %esi
callq 0x68bf0
movq %rax, %rdi
movabsq $-0x5800000000000, %rsi # imm = 0xFFFA800000000000
callq 0x7b550
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
callq 0x3acb0
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0x401f0
movq -0x60(%rbp), %rdi
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0x697e0
jmp 0x4019e
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0x401f0
movq -0x70(%rbp), %rdi
movq %rax, %rcx
movq -0x68(%rbp), %rax
movq %rcx, -0x58(%rbp)
movq (%rax), %rsi
movq -0x58(%rbp), %rdx
callq 0x697e0
jmp 0x401a0
jmp 0x401a2
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x3ffcc
cmpl $0x0, -0x1c(%rbp)
je 0x401c4
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x78(%rbp)
jmp 0x401cc
xorl %eax, %eax
movq %rax, -0x78(%rbp)
jmp 0x401cc
movq -0x78(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x3ffba
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)