// File: /workspace/github_c_makefile_star2_O0/vdedios[P]minishell/srcs/parsing/quotes/quotes_utils_2.c
// Function: get_string_between_quotes
char	*get_string_between_quotes(char *str, int opening,
										int closing, char quote)
{
	char	*buff;
	int		i;
	int		j;

	j = 0;
	i = opening + 1;
	buff = alloc_in_quotes(str, quote, opening, closing);
	while (i < closing)
	{
		if (quote == '\'' && (is_special_char(str[i]) ||
			(str[i - 1] == '\\' && is_alpha(str[i]))))
			buff[j++] = '\\';
		else
		{
			if (is_space(str[i])
				|| str[i] == '|' || str[i] == ';' || str[i] == '\'')
				buff[j++] = '\\';
			if (str[i - 1] == '\\' && (str[i] == '|' || is_alpha(str[i])))
				buff[j++] = '\\';
		}
		buff[j++] = str[i++];
	}
	buff[j] = '\0';
	return (buff);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movb %al, -0x11(%rbp)
movl $0x0, -0x28(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movb -0x11(%rbp), %al
movl -0xc(%rbp), %edx
movl -0x10(%rbp), %ecx
movsbl %al, %esi
callq 0x5190
movq %rax, -0x20(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x5399
movsbl -0x11(%rbp), %eax
cmpl $0x27, %eax
jne 0x52b4
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq 0x5080
cwtl
cmpl $0x0, %eax
jne 0x5299
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x5c, %eax
jne 0x52b4
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq 0x5030
cwtl
cmpl $0x0, %eax
je 0x52b4
movq -0x20(%rbp), %rax
movl -0x28(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x28(%rbp)
movslq %ecx, %rcx
movb $0x5c, (%rax,%rcx)
jmp 0x536a
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq 0x50d0
cwtl
cmpl $0x0, %eax
jne 0x52fe
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x7c, %eax
je 0x52fe
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x3b, %eax
je 0x52fe
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x27, %eax
jne 0x5314
movq -0x20(%rbp), %rax
movl -0x28(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x28(%rbp)
movslq %ecx, %rcx
movb $0x5c, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x5c, %eax
jne 0x5368
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x7c, %eax
je 0x5352
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq 0x5030
cwtl
cmpl $0x0, %eax
je 0x5368
movq -0x20(%rbp), %rax
movl -0x28(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x28(%rbp)
movslq %ecx, %rcx
movb $0x5c, (%rax,%rcx)
jmp 0x536a
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x24(%rbp)
movslq %ecx, %rcx
movb (%rax,%rcx), %dl
movq -0x20(%rbp), %rax
movl -0x28(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x28(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0x5240
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop