// File: DoubleString[P]RtConverter/src/Rnxobs/Com.cpp
// Function: bamboo::split_string(bool, char*, char, char, char, int*, char*, int)
void split_string(bool lnoempty, char* string, char c_start, char c_end,
		char seperator, int* nword, char* keys, int len) {
	int i0 = 0, i1, ilast, i;
	char varword[1024];
	char* word = (char*)keys;
	i1 = len_trim(string) - 1;
	if (c_start != ' ')
		i0 = index_string(string, c_start);
	if (c_end != ' ')
		i1 = index_string(string, c_end);
	*nword = 0;
	if (i1 == -1 || i0 > i1)
		return;

	ilast = i0;
	if(string[i1] != seperator)
		string[i1 + 1] = seperator;
	string[i1 + 2] = '\0';

	for (i = i0; i < i1 + 2; i++) {
		if (string[i] == seperator) {
			if (i - 1 >= ilast) {
				substringEx(varword, string, ilast, i - ilast);
				strcpy(word+(*nword)*len, varword);
				(*nword)++;
			} else {
				if (!lnoempty) {
					strcpy(word+(*nword)*len, "  ");
					(*nword)++;
				}
			}
			ilast = i + 1;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x440, %rsp            # imm = 0x440
movb %r8b, %al
movl 0x18(%rbp), %r8d
movq 0x10(%rbp), %r8
andb $0x1, %dil
movb %dil, -0x1(%rbp)
movq %rsi, -0x10(%rbp)
movb %dl, -0x11(%rbp)
movb %cl, -0x12(%rbp)
movb %al, -0x13(%rbp)
movq %r9, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq 0x10(%rbp), %rax
movq %rax, -0x438(%rbp)
movq -0x10(%rbp), %rdi
callq 0x33d80
subl $0x1, %eax
movl %eax, -0x28(%rbp)
movsbl -0x11(%rbp), %eax
cmpl $0x20, %eax
je 0x34969
movq -0x10(%rbp), %rdi
movsbl -0x11(%rbp), %esi
callq 0x340b0
movl %eax, -0x24(%rbp)
movsbl -0x12(%rbp), %eax
cmpl $0x20, %eax
je 0x34982
movq -0x10(%rbp), %rdi
movsbl -0x12(%rbp), %esi
callq 0x340b0
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
cmpl $-0x1, -0x28(%rbp)
je 0x3499a
movl -0x24(%rbp), %eax
cmpl -0x28(%rbp), %eax
jle 0x3499f
jmp 0x34aad
movl -0x24(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movsbl -0x13(%rbp), %ecx
cmpl %ecx, %eax
je 0x349cc
movb -0x13(%rbp), %dl
movq -0x10(%rbp), %rax
movl -0x28(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x28(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
movl -0x24(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl -0x28(%rbp), %ecx
addl $0x2, %ecx
cmpl %ecx, %eax
jge 0x34aad
movq -0x10(%rbp), %rax
movslq -0x30(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movsbl -0x13(%rbp), %ecx
cmpl %ecx, %eax
jne 0x34a9d
movl -0x30(%rbp), %eax
subl $0x1, %eax
cmpl -0x2c(%rbp), %eax
jl 0x34a5f
leaq -0x430(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x2c(%rbp), %edx
movl -0x30(%rbp), %ecx
subl -0x2c(%rbp), %ecx
callq 0x33e20
movq -0x438(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %eax
imull 0x18(%rbp), %eax
cltq
addq %rax, %rdi
leaq -0x430(%rbp), %rsi
callq 0x96f0
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x34a94
testb $0x1, -0x1(%rbp)
jne 0x34a92
movq -0x438(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %eax
imull 0x18(%rbp), %eax
cltq
addq %rax, %rdi
leaq 0x93700(%rip), %rsi     # 0xc8182
callq 0x96f0
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x34a94
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x34a9f
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x349e3
addq $0x440, %rsp            # imm = 0x440
popq %rbp
retq
nopw %cs:(%rax,%rax)