// File: /workspace/github_c_makefile_star2_O0/lh3[P]miniprot/nasw-tab.c
// Function: ns_make_tables
int ns_make_tables(int codon_type)
{
	const char *trans_tab;
	char *p;
	int i;
	if (codon_type < 0 || codon_type > NS_MAX_TRANS_CODE) return -1; // out of range
	trans_tab = ns_tab_codon_all[codon_type];
	if (trans_tab == 0) return -2; // not defined
	memset(ns_tab_nt4, 4, 256);
	for (p = ns_tab_nt_i2c; *p; ++p)
		ns_tab_nt4[p - ns_tab_nt_i2c] = ns_tab_nt4[(uint8_t)toupper(*p)] = ns_tab_nt4[(uint8_t)tolower(*p)] = p - ns_tab_nt_i2c;
	memset(ns_tab_aa20, 21, 256);
	for (p = ns_tab_aa_i2c; *p; ++p)
		ns_tab_aa20[p - ns_tab_aa_i2c] = ns_tab_aa20[(uint8_t)toupper(*p)] = ns_tab_aa20[(uint8_t)tolower(*p)] = p - ns_tab_aa_i2c;
	memset(ns_tab_aa13, 15, 256);
	for (p = ns_tab_aa_i2c; *p; ++p)
		ns_tab_aa13[p - ns_tab_aa_i2c] = ns_tab_aa13[(uint8_t)toupper(*p)] = ns_tab_aa13[(uint8_t)tolower(*p)] = ns_tab_a2r[p - ns_tab_aa_i2c];
	for (i = 0; i < 64; ++i) {
		ns_tab_codon[i] = ns_tab_aa20[(uint8_t)trans_tab[i]];
		ns_tab_codon13[i] = ns_tab_a2r[ns_tab_codon[i]];
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jl 0x3c07
cmpl $0x21, -0x8(%rbp)
jle 0x3c13
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3e8f
movslq -0x8(%rbp), %rcx
leaq 0x229a2(%rip), %rax     # 0x265c0
movq (%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x3c39
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x3e8f
leaq 0x22ab0(%rip), %rdi     # 0x266f0
movl $0x4, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x2190
movq 0x2274a(%rip), %rax     # 0x263a0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0x3cd6
movq -0x18(%rbp), %rax
movq 0x22732(%rip), %rcx     # 0x263a0
subq %rcx, %rax
movb %al, -0x1d(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %edi
callq 0x2220
movb -0x1d(%rbp), %dl
movzbl %al, %eax
movl %eax, %ecx
leaq 0x22a61(%rip), %rax     # 0x266f0
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rax
movsbl (%rax), %edi
callq 0x2090
movb -0x1d(%rbp), %dl
movzbl %al, %eax
movl %eax, %ecx
leaq 0x22a43(%rip), %rax     # 0x266f0
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rcx
movq 0x226e5(%rip), %rax     # 0x263a0
subq %rax, %rcx
leaq 0x22a2b(%rip), %rax     # 0x266f0
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x3c5a
leaq 0x22b13(%rip), %rdi     # 0x267f0
movl $0x15, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x2190
movq 0x226b5(%rip), %rax     # 0x263a8
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0x3d73
movq -0x18(%rbp), %rax
movq 0x2269d(%rip), %rcx     # 0x263a8
subq %rcx, %rax
movb %al, -0x1e(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %edi
callq 0x2220
movb -0x1e(%rbp), %dl
movzbl %al, %eax
movl %eax, %ecx
leaq 0x22ac4(%rip), %rax     # 0x267f0
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rax
movsbl (%rax), %edi
callq 0x2090
movb -0x1e(%rbp), %dl
movzbl %al, %eax
movl %eax, %ecx
leaq 0x22aa6(%rip), %rax     # 0x267f0
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rcx
movq 0x22650(%rip), %rax     # 0x263a8
subq %rax, %rcx
leaq 0x22a8e(%rip), %rax     # 0x267f0
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x3cf7
leaq 0x22b76(%rip), %rdi     # 0x268f0
movl $0xf, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x2190
movq 0x22618(%rip), %rax     # 0x263a8
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0x3e21
movq -0x18(%rbp), %rcx
movq 0x225fc(%rip), %rax     # 0x263a8
subq %rax, %rcx
leaq 0x225fa(%rip), %rax     # 0x263b0
movb (%rax,%rcx), %al
movb %al, -0x1f(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %edi
callq 0x2220
movb -0x1f(%rbp), %dl
movzbl %al, %eax
movl %eax, %ecx
leaq 0x22b19(%rip), %rax     # 0x268f0
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rax
movsbl (%rax), %edi
callq 0x2090
movb -0x1f(%rbp), %dl
movzbl %al, %eax
movl %eax, %ecx
leaq 0x22afb(%rip), %rax     # 0x268f0
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rcx
movq 0x225a5(%rip), %rax     # 0x263a8
subq %rax, %rcx
leaq 0x22ae3(%rip), %rax     # 0x268f0
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x3d94
movl $0x0, -0x1c(%rbp)
cmpl $0x40, -0x1c(%rbp)
jge 0x3e88
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq 0x229ad(%rip), %rax     # 0x267f0
movb (%rax,%rcx), %dl
movslq -0x1c(%rbp), %rcx
leaq 0x22b9f(%rip), %rax     # 0x269f0
movb %dl, (%rax,%rcx)
movslq -0x1c(%rbp), %rcx
leaq 0x22b91(%rip), %rax     # 0x269f0
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq 0x22544(%rip), %rax     # 0x263b0
movb (%rax,%rcx), %dl
movslq -0x1c(%rbp), %rcx
leaq 0x22bb6(%rip), %rax     # 0x26a30
movb %dl, (%rax,%rcx)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x3e28
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)