Function at 0x14001d820
Capabilities:
Get thread local storage value

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov rdi, qword [0x140093d50]
mov rsi, rcx
mov ecx, dword [rdi]
call sym.threadVarGetValue__system_2249
cmp byte [rax + 0x2c58], 0
mov rbx, rax
jne 0x14001d878
mov rax, qword [str.PI_v_]
call qword [rax]
mov rcx, rax
call sym.dollar___systemZwidestrs_324
mov rcx, rax
call sym.nosparseCmdLine
lea rcx, [rbx + 0x2c50]
mov rdx, rax
call sym.unsureAsgnRef
mov byte [rbx + 0x2c58], 1
mov rax, qword [rbx + 0x2c50]
test rax, rax
je 0x14001d8a8
cmp qword [rax], rsi
jle 0x14001d8a8
test rsi, rsi
js 0x14001d8a8
mov rcx, qword [rax + rsi*8 + 0x10]
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
jmp sym.copyString
mov rcx, qword [0x140093940]
mov edx, 0x30
lea r12, str.IndexDefect
call sym.newObj
mov rbp, rax
mov rax, qword [0x1400937a0]
mov qword [rbp + 0x10], r12
mov qword [rbp], rax
mov rax, qword [rbx + 0x2c50]
test rax, rax
je 0x14001d8e1
mov rax, qword [rax]
sub rax, 1
jo 0x14001db97
test rax, rax
js 0x14001da68
mov rcx, rsi
call sym.dollar___systemZdollars_3
xor ecx, ecx
mov r13, rax
mov rax, qword [rbx + 0x2c50]
test rax, rax
je 0x14001d910
mov rcx, qword [rax]
sub rcx, 1
jo 0x14001dbab
call sym.dollar___systemZdollars_3
mov rsi, rax
test r13, r13
je 0x14001dae0
mov rcx, qword [r13]
test rax, rax
je 0x14001d937
add rcx, qword [rax]
add rcx, 0x13
call sym.rawNewString
lea rdx, [r13 + 0x10]
mov rbx, rax
mov rax, qword [rax]
lea rax, [rbx + rax + 0x10]
mov dword [rax], 0x65646e69
mov dword [rax + 3], 0x207865
mov rax, qword [rbx]
add rax, 6
mov qword [rbx], rax
lea rcx, [rbx + rax + 0x10]
mov rax, qword [r13]
lea r8, [rax + 1]
call sym.memcpy
mov rax, qword [r13]
add rax, qword [rbx]
movabs rdx, 0x206e6920746f6e20
mov qword [rbx], rax
lea rax, [rbx + rax + 0x10]
mov qword [rax], rdx
movabs rdx, 0x202e2e2030206e
mov qword [rax + 6], rdx
mov rax, qword [rbx]
add rax, 0xd
mov qword [rbx], rax
test rsi, rsi
je 0x14001d9cc
lea rcx, [rbx + rax + 0x10]
mov rax, qword [rsi]
lea rdx, [rsi + 0x10]
lea r8, [rax + 1]
call sym.memcpy
mov rax, qword [rsi]
add qword [rbx], rax
add qword [rbx - 0x10], 8
mov rax, qword [rbp + 0x18]
test rax, rax
je 0x14001d9f4
mov rdx, qword [rax - 0x10]
lea rsi, [rax - 0x10]
sub rdx, 8
mov qword [rax - 0x10], rdx
cmp rdx, 7
jbe 0x14001dac0
mov qword [rbp + 0x18], rbx
mov rax, qword [rbp + 8]
test rax, rax
je 0x14001da2a
mov rdx, qword [rax - 0x10]
lea rbx, [rax - 0x10]
sub rdx, 8
mov qword [rax - 0x10], rdx
cmp rdx, 7
ja 0x14001da2a
mov ecx, dword [rdi]
call sym.threadVarGetValue__system_2249
mov rdx, rbx
lea rcx, [rax + 0x50]
call sym.addZCT__system_5813
mov qword [rbp + 8], 0
lea r9, str.os.nim
mov rdx, r12
mov rcx, rbp
mov qword [rsp + 0x20], 0xb7b
lea r8, str.paramStr
call sym.raiseExceptionEx
xor eax, eax
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov rbx, qword [rbp + 0x18]
lea rcx, [0x14006f800]
call sym.copyStringRC1
mov qword [rbp + 0x18], rax
test rbx, rbx
je 0x14001d9f8
mov rax, qword [rbx - 0x10]
lea rsi, [rbx - 0x10]
sub rax, 8
mov qword [rbx - 0x10], rax
cmp rax, 7
ja 0x14001d9f8
mov ecx, dword [rdi]
call sym.threadVarGetValue__system_2249
mov rdx, rsi
lea rcx, [rax + 0x50]
call sym.addZCT__system_5813
jmp 0x14001d9f8
mov ecx, dword [rdi]
call sym.threadVarGetValue__system_2249
mov rdx, rsi
lea rcx, [rax + 0x50]
call sym.addZCT__system_5813
jmp 0x14001d9f4
test rax, rax
je 0x14001db42
mov rax, qword [rax]
lea rcx, [rax + 0x13]
call sym.rawNewString
mov rbx, rax
mov rax, qword [rax]
lea rax, [rbx + rax + 0x10]
mov dword [rax], 0x65646e69
mov dword [rax + 3], 0x207865
mov rax, qword [rbx]
lea rdx, [rax + 6]
lea rax, [rbx + rax + 0x16]
mov qword [rbx], rdx
movabs rdx, 0x206e6920746f6e20
mov qword [rax], rdx
movabs rdx, 0x202e2e2030206e
mov qword [rax + 6], rdx
mov rax, qword [rbx]
add rax, 0xd
mov qword [rbx], rax
jmp 0x14001d9b1
movabs rsi, 0x206e6920746f6e20
mov ecx, 0x13
call sym.rawNewString
mov rbx, rax
mov rax, qword [rax]
lea rax, [rbx + rax + 0x10]
mov dword [rax], 0x65646e69
mov dword [rax + 3], 0x207865
mov rax, qword [rbx]
lea rdx, [rax + 6]
lea rax, [rbx + rax + 0x16]
mov qword [rbx], rdx
mov qword [rax], rsi
movabs rsi, 0x202e2e2030206e
mov qword [rax + 6], rsi
add qword [rbx], 0xd
jmp 0x14001d9cc
mov qword [rsp + 0x38], rax
call sym.raiseOverflow
mov rax, qword [rsp + 0x38]
jmp 0x14001d8eb
mov qword [rsp + 0x38], rcx
call sym.raiseOverflow
mov rcx, qword [rsp + 0x38]
jmp 0x14001d91a