// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/table.c
// Function: janet_table_put
void janet_table_put(JanetTable *t, Janet key, Janet value) {
    if (janet_checktype(key, JANET_NIL)) return;
    if (janet_checktype(key, JANET_NUMBER) && isnan(janet_unwrap_number(key))) return;
    if (janet_checktype(value, JANET_NIL)) {
        janet_table_remove(t, key);
    } else {
        JanetKV *bucket = janet_table_find(t, key);
        if (NULL != bucket && !janet_checktype(bucket->key, JANET_NIL)) {
            bucket->value = value;
        } else {
            if (NULL == bucket || 2 * (t->count + t->deleted + 1) > t->capacity) {
                janet_table_rehash(t, janet_tablen(2 * t->count + 2));
            }
            bucket = janet_table_find(t, key);
            if (janet_checktype(bucket->value, JANET_BOOLEAN))
                --t->deleted;
            bucket->key = key;
            bucket->value = value;
            ++t->count;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
xorl %eax, %eax
testb $0x1, %al
jne 0x697fc
jmp 0x69822
movsd -0x8(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x6980e
jmp 0x6983f
movq -0x8(%rbp), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x6983f
jmp 0x69844
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq -0x8(%rbp), %rax
movabsq $-0x7800000000000, %rcx # imm = 0xFFF8800000000000
cmpq %rcx, %rax
jne 0x69844
jmp 0x69a68
movb $0x1, %al
testb $0x1, %al
jne 0x6984c
jmp 0x69872
movsd -0x8(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x6985e
jmp 0x6988f
movq -0x8(%rbp), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x6988f
jmp 0x698a6
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq -0x8(%rbp), %rax
movabsq $-0x8000000000000, %rcx # imm = 0xFFF8000000000000
cmpq %rcx, %rax
jne 0x698a6
movsd -0x8(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x698a1
jmp 0x698a6
jmp 0x69a68
xorl %eax, %eax
testb $0x1, %al
jne 0x698ae
jmp 0x698d4
movsd -0x10(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x698c0
jmp 0x698f1
movq -0x10(%rbp), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x698f1
jmp 0x69907
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq -0x10(%rbp), %rax
movabsq $-0x7800000000000, %rcx # imm = 0xFFF8800000000000
cmpq %rcx, %rax
jne 0x69907
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x696c0
movq %rax, -0x20(%rbp)
jmp 0x69a68
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x693f0
movq %rax, -0x28(%rbp)
xorl %eax, %eax
cmpq -0x28(%rbp), %rax
je 0x69985
xorl %eax, %eax
testb $0x1, %al
jne 0x69928
jmp 0x69954
movq -0x28(%rbp), %rax
movsd (%rax), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x6993d
jmp 0x69985
movq -0x28(%rbp), %rax
movq (%rax), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x69985
jmp 0x69974
movq -0x28(%rbp), %rcx
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq (%rcx), %rax
movabsq $-0x7800000000000, %rcx # imm = 0xFFF8800000000000
cmpq %rcx, %rax
je 0x69985
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x69a66
xorl %eax, %eax
cmpq -0x28(%rbp), %rax
je 0x699a9
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x18(%rbp), %rcx
addl 0x18(%rcx), %eax
addl $0x1, %eax
shll %eax
movq -0x18(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jle 0x699cd
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movl 0x10(%rax), %edi
shll %edi
addl $0x2, %edi
callq 0x6ade0
movq -0x30(%rbp), %rdi
movl %eax, %esi
callq 0x69a70
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x693f0
movq %rax, -0x28(%rbp)
xorl %eax, %eax
testb $0x1, %al
jne 0x699e6
jmp 0x69a14
movq -0x28(%rbp), %rax
movsd 0x8(%rax), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x699fc
jmp 0x69a35
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
shrq $0x2f, %rax
andq $0xf, %rax
cmpq $0x0, %rax
je 0x69a35
jmp 0x69a42
movq -0x28(%rbp), %rcx
movabsq $-0x800000000000, %rax  # imm = 0xFFFF800000000000
andq 0x8(%rcx), %rax
movabsq $-0x7000000000000, %rcx # imm = 0xFFF9000000000000
cmpq %rcx, %rax
jne 0x69a42
movq -0x18(%rbp), %rax
movl 0x18(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x18(%rax)
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
jmp 0x69a68
addq $0x30, %rsp
popq %rbp
retq
nop