// File: /workspace/github_c_makefile_star2_O0/lh3[P]fermi-lite/mrope.c
// Function: mr_insert_multi
void mr_insert_multi(mrope_t *mr, int64_t len, const uint8_t *s, int is_thr)
{
	int64_t k, m, n0;
	int b, is_srt = (mr->so != MR_SO_IO), is_comp = (mr->so == MR_SO_RCLO), stop_thr = 0;
	volatile int n_fin_workers = 0;
	triple64_t *a[2], *curr, *prev, *swap;
	pthread_t *tid = 0;
	worker_t *w = 0;

	if (mr->thr_min < 0) mr->thr_min = 0;
	assert(len > 0 && s[len-1] == 0);
	{ // split into short strings
		cstr_t p, q, end = s + len;
		for (p = s, m = 0; p != end; ++p) // count #sentinels
			if (*p == 0) ++m;
		curr = a[0] = malloc(m * sizeof(triple64_t));
		prev = a[1] = malloc(m * sizeof(triple64_t));
		for (p = q = s, k = 0; p != end; ++p) // find the start of each string
			if (*p == 0) prev[k++].p = q, q = p + 1;
	}

	for (k = n0 = 0; k < 6; ++k) n0 += mr->r[k]->c[0];
	for (k = 0; k != m; ++k) {
		if (is_srt) prev[k].l = 0, prev[k].u = n0;
		else prev[k].l = prev[k].u = n0 + k;
		prev[k].c = 0;
	}
	mr_insert_multi_aux(mr->r[0], m, prev, is_comp); // insert the first (actually the last) column

	if (is_thr) {
		tid = alloca(4 * sizeof(pthread_t));
		w = alloca(4 * sizeof(worker_t));
		memset(w, 0, 4 * sizeof(worker_t));
		for (b = 0; b < 4; ++b) {
			w[b].mr = mr, w[b].b = b + 1, w[b].is_comp = is_comp;
			w[b].n_fin_workers = &n_fin_workers;
		}
		for (b = 0; b < 4; ++b) pthread_create(&tid[b], 0, worker, &w[b]);
	}

	n0 = 0; // the number of inserted strings
	while (m) {
		int64_t c[6], ac[6];
		triple64_t *q[6];

		memset(c, 0, 48);
		for (k = n0; k != m; ++k) ++c[prev[k].c]; // counting
		for (q[0] = curr + n0, b = 1; b < 6; ++b) q[b] = q[b-1] + c[b-1];
		if (n0 + c[0] < m) {
			for (k = n0; k != m; ++k) *q[prev[k].c]++ = prev[k]; // sort
			for (b = 0; b < 6; ++b) q[b] -= c[b];
		}
		n0 += c[0];

		if (is_thr && !stop_thr) {
			struct timespec req, rem;
			req.tv_sec = 0; req.tv_nsec = 1000000;
			stop_thr = (m - n0 <= mr->thr_min);
			for (b = 0; b < 4; ++b) {
				w[b].a = q[b+1], w[b].m = c[b+1];
				if (stop_thr) w[b].to_exit = 1; // signal the workers to exit
				while (!__sync_bool_compare_and_swap(&w[b].to_run, 0, 1)); // signal the workers to start
			}
			if (c[5]) mr_insert_multi_aux(mr->r[5], c[5], q[5], is_comp); // the master thread processes the "N" bucket
			while (!__sync_bool_compare_and_swap(&n_fin_workers, 4, 0)) // wait until all 4 workers finish
				nanosleep(&req, &rem);
			if (stop_thr && n0 < m)
				fprintf(stderr, "[M::%s] Turn off parallelization for this batch as too few strings are left.\n", __func__);
		} else {
			for (b = 1; b < 6; ++b)
				if (c[b]) mr_insert_multi_aux(mr->r[b], c[b], q[b], is_comp);
		}
		if (n0 == m) break;

		memset(ac, 0, 48);
		for (b = 1; b < 6; ++b) { // update the intervals to account for buckets ahead
			int a;
			for (a = 0; a < 6; ++a) ac[a] += mr->r[b-1]->c[a];
			for (k = 0; k < c[b]; ++k) {
				triple64_t *p = &q[b][k];
				p->l += ac[p->c]; p->u += ac[p->c];
			}
		}
		swap = curr, curr = prev, prev = swap;
	}
	if (is_thr) for (b = 0; b < 4; ++b) pthread_join(tid[b], 0);
	free(a[0]); free(a[1]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x2, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x44(%rbp)
movl $0x0, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
movq $0x0, -0x80(%rbp)
movq $0x0, -0x88(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jge 0xa5ea
movq -0x8(%rbp), %rax
movl $0x0, 0x4(%rax)
cmpq $0x0, -0x10(%rbp)
jle 0xa608
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq $0x1, %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0xa608
jmp 0xa627
leaq 0x1afca(%rip), %rdi     # 0x255d9
leaq 0x1af4c(%rip), %rsi     # 0x25562
movl $0xe6, %edx
leaq 0x1afd0(%rip), %rcx     # 0x255f2
callq 0x20f0
movq -0x18(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x90(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x90(%rbp), %rax
cmpq -0xa0(%rbp), %rax
je 0xa68a
movq -0x90(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0xa674
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0xa676
movq -0x90(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x90(%rbp)
jmp 0xa649
imulq $0x18, -0x30(%rbp), %rdi
callq 0x21c0
movq %rax, -0x60(%rbp)
movq %rax, -0x68(%rbp)
imulq $0x18, -0x30(%rbp), %rdi
callq 0x21c0
movq %rax, -0x58(%rbp)
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x98(%rbp)
movq %rax, -0x90(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x90(%rbp), %rax
cmpq -0xa0(%rbp), %rax
je 0xa734
movq -0x90(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0xa71e
movq -0x98(%rbp), %rcx
movq -0x70(%rbp), %rax
movq -0x28(%rbp), %rdx
movq %rdx, %rsi
addq $0x1, %rsi
movq %rsi, -0x28(%rbp)
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movq -0x90(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x98(%rbp)
jmp 0xa720
movq -0x90(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x90(%rbp)
jmp 0xa6c8
movq $0x0, -0x38(%rbp)
movq $0x0, -0x28(%rbp)
cmpq $0x6, -0x28(%rbp)
jge 0xa772
movq -0x8(%rbp), %rax
movq -0x28(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rax
movq 0x8(%rax), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xa744
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0xa853
cmpl $0x0, -0x40(%rbp)
je 0xa7d8
movq -0x70(%rbp), %rax
imulq $0x18, -0x28(%rbp), %rcx
addq %rcx, %rax
movq $0x0, (%rax)
movq -0x38(%rbp), %rdx
movq -0x70(%rbp), %rax
imulq $0x18, -0x28(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
movabsq $0x1fffffffffffffff, %rsi # imm = 0x1FFFFFFFFFFFFFFF
andq %rsi, %rdx
movabsq $-0x2000000000000000, %rsi # imm = 0xE000000000000000
andq %rsi, %rcx
orq %rdx, %rcx
movq %rcx, 0x8(%rax)
jmp 0xa820
movq -0x38(%rbp), %rcx
addq -0x28(%rbp), %rcx
movq -0x70(%rbp), %rax
imulq $0x18, -0x28(%rbp), %rdx
addq %rdx, %rax
movq 0x8(%rax), %rdx
movabsq $0x1fffffffffffffff, %rsi # imm = 0x1FFFFFFFFFFFFFFF
andq %rsi, %rcx
movabsq $-0x2000000000000000, %rsi # imm = 0xE000000000000000
andq %rsi, %rdx
orq %rcx, %rdx
movq %rdx, 0x8(%rax)
movq -0x70(%rbp), %rax
imulq $0x18, -0x28(%rbp), %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x70(%rbp), %rax
imulq $0x18, -0x28(%rbp), %rcx
addq %rcx, %rax
movabsq $0x1fffffffffffffff, %rcx # imm = 0x1FFFFFFFFFFFFFFF
andq 0x8(%rax), %rcx
orq $0x0, %rcx
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xa77a
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x30(%rbp), %rsi
movq -0x70(%rbp), %rdx
movl -0x44(%rbp), %ecx
callq 0xaec0
cmpl $0x0, -0x1c(%rbp)
je 0xa972
movq %rsp, %rax
addq $-0x20, %rax
movq %rax, %rsp
movq %rax, -0x80(%rbp)
movq %rsp, %rax
addq $-0xc0, %rax
movq %rax, %rsp
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
xorl %esi, %esi
movl $0xc0, %edx
callq 0x2110
movl $0x0, -0x3c(%rbp)
cmpl $0x4, -0x3c(%rbp)
jge 0xa927
movq -0x8(%rbp), %rcx
movq -0x88(%rbp), %rax
movslq -0x3c(%rbp), %rdx
imulq $0x30, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movl -0x3c(%rbp), %ecx
addl $0x1, %ecx
movq -0x88(%rbp), %rax
movslq -0x3c(%rbp), %rdx
imulq $0x30, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movl -0x44(%rbp), %ecx
movq -0x88(%rbp), %rax
movslq -0x3c(%rbp), %rdx
imulq $0x30, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x1c(%rax)
movq -0x88(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
leaq -0x4c(%rbp), %rcx
movq %rcx, (%rax)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xa8b0
movl $0x0, -0x3c(%rbp)
cmpl $0x4, -0x3c(%rbp)
jge 0xa970
movq -0x80(%rbp), %rdi
movslq -0x3c(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x88(%rbp), %rcx
movslq -0x3c(%rbp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rcx
xorl %eax, %eax
movl %eax, %esi
leaq 0xa90(%rip), %rdx       # 0xb3f0
callq 0x2210
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xa92e
jmp 0xa972
movq $0x0, -0x38(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0xae73
leaq -0xd0(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x2110
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0xa9e0
movq -0x70(%rbp), %rax
imulq $0x18, -0x28(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
shrq $0x3d, %rax
movq -0xd0(%rbp,%rax,8), %rcx
addq $0x1, %rcx
movq %rcx, -0xd0(%rbp,%rax,8)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xa9a0
movq -0x68(%rbp), %rax
imulq $0x18, -0x38(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x130(%rbp)
movl $0x1, -0x3c(%rbp)
cmpl $0x6, -0x3c(%rbp)
jge 0xaa3b
movl -0x3c(%rbp), %eax
subl $0x1, %eax
cltq
movq -0x130(%rbp,%rax,8), %rcx
movl -0x3c(%rbp), %eax
subl $0x1, %eax
cltq
imulq $0x18, -0xd0(%rbp,%rax,8), %rax
addq %rax, %rcx
movslq -0x3c(%rbp), %rax
movq %rcx, -0x130(%rbp,%rax,8)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xa9fa
movq -0x38(%rbp), %rax
addq -0xd0(%rbp), %rax
cmpq -0x30(%rbp), %rax
jge 0xab03
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0xaabd
movq -0x70(%rbp), %rax
imulq $0x18, -0x28(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
shrq $0x3d, %rcx
movq -0x130(%rbp,%rcx,8), %rax
movq %rax, %rdx
addq $0x18, %rdx
movq %rdx, -0x130(%rbp,%rcx,8)
movq -0x70(%rbp), %rcx
imulq $0x18, -0x28(%rbp), %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xaa58
movl $0x0, -0x3c(%rbp)
cmpl $0x6, -0x3c(%rbp)
jge 0xab01
movslq -0x3c(%rbp), %rax
movq -0xd0(%rbp,%rax,8), %rsi
movslq -0x3c(%rbp), %rax
movq -0x130(%rbp,%rax,8), %rcx
xorl %edx, %edx
subq %rsi, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movq %rcx, -0x130(%rbp,%rax,8)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xaac4
jmp 0xab03
movq -0xd0(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0xaca0
cmpl $0x0, -0x48(%rbp)
jne 0xaca0
movq $0x0, -0x140(%rbp)
movq $0xf4240, -0x138(%rbp) # imm = 0xF4240
movq -0x30(%rbp), %rax
subq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
movslq 0x4(%rcx), %rcx
cmpq %rcx, %rax
setle %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x48(%rbp)
movl $0x0, -0x3c(%rbp)
cmpl $0x4, -0x3c(%rbp)
jge 0xac17
movl -0x3c(%rbp), %eax
addl $0x1, %eax
cltq
movq -0x130(%rbp,%rax,8), %rcx
movq -0x88(%rbp), %rax
movslq -0x3c(%rbp), %rdx
imulq $0x30, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x28(%rax)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
cltq
movq -0xd0(%rbp,%rax,8), %rcx
movq -0x88(%rbp), %rax
movslq -0x3c(%rbp), %rdx
imulq $0x30, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x20(%rax)
cmpl $0x0, -0x48(%rbp)
je 0xabd6
movq -0x88(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl $0x1, 0xc(%rax)
jmp 0xabd8
movq -0x88(%rbp), %rcx
movslq -0x3c(%rbp), %rax
leaq (%rax,%rax,2), %rdx
shlq $0x4, %rdx
xorl %eax, %eax
movl $0x1, %esi
lock
cmpxchgl %esi, 0x8(%rcx,%rdx)
movl %eax, %ecx
sete %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xac05
jmp 0xac07
jmp 0xabd8
jmp 0xac09
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xab61
cmpq $0x0, -0xa8(%rbp)
je 0xac3f
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0xa8(%rbp), %rsi
movq -0x108(%rbp), %rdx
movl -0x44(%rbp), %ecx
callq 0xaec0
jmp 0xac41
movl $0x4, %eax
xorl %ecx, %ecx
lock
cmpxchgl %ecx, -0x4c(%rbp)
movl %eax, %ecx
sete %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xac5a
jmp 0xac6f
leaq -0x140(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x20e0
jmp 0xac41
cmpl $0x0, -0x48(%rbp)
je 0xac9e
movq -0x38(%rbp), %rax
cmpq -0x30(%rbp), %rax
jge 0xac9e
movq 0x1f372(%rip), %rax     # 0x29ff8
movq (%rax), %rdi
leaq 0x1a9a1(%rip), %rsi     # 0x25631
leaq 0x1a9e8(%rip), %rdx     # 0x2567f
movb $0x0, %al
callq 0x2170
jmp 0xacf8
movl $0x1, -0x3c(%rbp)
cmpl $0x6, -0x3c(%rbp)
jge 0xacf6
movslq -0x3c(%rbp), %rax
cmpq $0x0, -0xd0(%rbp,%rax,8)
je 0xace9
movq -0x8(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rdi
movslq -0x3c(%rbp), %rax
movq -0xd0(%rbp,%rax,8), %rsi
movslq -0x3c(%rbp), %rax
movq -0x130(%rbp,%rax,8), %rdx
movl -0x44(%rbp), %ecx
callq 0xaec0
jmp 0xaceb
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xaca7
jmp 0xacf8
movq -0x38(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0xad07
jmp 0xae73
leaq -0x100(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x2110
movl $0x1, -0x3c(%rbp)
cmpl $0x6, -0x3c(%rbp)
jge 0xae56
movl $0x0, -0x154(%rbp)
cmpl $0x6, -0x154(%rbp)
jge 0xad84
movq -0x8(%rbp), %rax
movl -0x3c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq 0x8(%rax,%rcx,8), %rax
movslq -0x154(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rcx
movslq -0x154(%rbp), %rax
addq -0x100(%rbp,%rax,8), %rcx
movq %rcx, -0x100(%rbp,%rax,8)
movl -0x154(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x154(%rbp)
jmp 0xad35
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movslq -0x3c(%rbp), %rcx
cmpq -0xd0(%rbp,%rcx,8), %rax
jge 0xae46
movslq -0x3c(%rbp), %rax
movq -0x130(%rbp,%rax,8), %rax
imulq $0x18, -0x28(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rax
movq 0x8(%rax), %rax
shrq $0x3d, %rax
movq -0x100(%rbp,%rax,8), %rcx
movq -0x160(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x160(%rbp), %rax
movq 0x8(%rax), %rax
shrq $0x3d, %rax
movq -0x100(%rbp,%rax,8), %rcx
movq -0x160(%rbp), %rax
movabsq $0x1fffffffffffffff, %rdx # imm = 0x1FFFFFFFFFFFFFFF
andq 0x8(%rax), %rdx
addq %rcx, %rdx
movq 0x8(%rax), %rcx
movabsq $0x1fffffffffffffff, %rsi # imm = 0x1FFFFFFFFFFFFFFF
andq %rsi, %rdx
movabsq $-0x2000000000000000, %rsi # imm = 0xE000000000000000
andq %rsi, %rcx
orq %rdx, %rcx
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xad8c
jmp 0xae48
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xad21
movq -0x68(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0xa97a
cmpl $0x0, -0x1c(%rbp)
je 0xaea8
movl $0x0, -0x3c(%rbp)
cmpl $0x4, -0x3c(%rbp)
jge 0xaea6
movq -0x80(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2290
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xae80
jmp 0xaea8
movq -0x60(%rbp), %rdi
callq 0x2040
movq -0x58(%rbp), %rdi
callq 0x2040
movq %rbp, %rsp
popq %rbp
retq
nop