// File: /workspace/github_c_makefile_star2_O0/martincameron[P]towntalk/towntalk.c
// Function: unquote_string
static int unquote_string( char *string, char *output, char quote ) {
	int chr, offset = 0, length = 0;
	if( string ) {
		chr = string[ offset++ ];
		while( chr ) {
			if( chr == '\\' && string[ offset ] ) {
				chr = string[ offset++ ];
				if( chr >= '0' && chr <= '7' ) {
					chr = chr - '0';
					if( string[ offset ] >= '0' && string[ offset ] <= '7' ) {
						chr = ( chr << 3 ) | ( string[ offset++ ] - '0' );
						if( string[ offset ] >= '0' && string[ offset ] <= '7' ) {
							chr = ( chr << 3 ) | ( string[ offset++ ] - '0' );
						}
					}
				} else if( chr == 'n' ) {
					chr = '\n';
				} else if( chr == 'r' ) {
					chr = '\r';
				} else if( chr == 't' ) {
					chr = '\t';
				}
				if( output ) {
					output[ length++ ] = chr;
				} else {
					length++;
				}
			} else if( chr != quote ) {
				if( output ) {
					output[ length++ ] = chr;
				} else {
					length++;
				}
			}
			chr = string[ offset++ ];
		}
		if( output ) {
			output[ length ] = 0;
		}
	}
	return length;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xaa5f
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x1c(%rbp)
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0xaa4a
cmpl $0x5c, -0x18(%rbp)
jne 0xa9f1
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0xa9f1
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x1c(%rbp)
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x18(%rbp)
cmpl $0x30, -0x18(%rbp)
jl 0xa992
cmpl $0x37, -0x18(%rbp)
jg 0xa992
movl -0x18(%rbp), %eax
subl $0x30, %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x30, %eax
jl 0xa990
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x37, %eax
jg 0xa990
movl -0x18(%rbp), %eax
shll $0x3, %eax
movq -0x8(%rbp), %rcx
movl -0x1c(%rbp), %edx
movl %edx, %esi
addl $0x1, %esi
movl %esi, -0x1c(%rbp)
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
subl $0x30, %ecx
orl %ecx, %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x30, %eax
jl 0xa98e
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x37, %eax
jg 0xa98e
movl -0x18(%rbp), %eax
shll $0x3, %eax
movq -0x8(%rbp), %rcx
movl -0x1c(%rbp), %edx
movl %edx, %esi
addl $0x1, %esi
movl %esi, -0x1c(%rbp)
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
subl $0x30, %ecx
orl %ecx, %eax
movl %eax, -0x18(%rbp)
jmp 0xa990
jmp 0xa9c3
cmpl $0x6e, -0x18(%rbp)
jne 0xa9a1
movl $0xa, -0x18(%rbp)
jmp 0xa9c1
cmpl $0x72, -0x18(%rbp)
jne 0xa9b0
movl $0xd, -0x18(%rbp)
jmp 0xa9bf
cmpl $0x74, -0x18(%rbp)
jne 0xa9bd
movl $0x9, -0x18(%rbp)
jmp 0xa9bf
jmp 0xa9c1
jmp 0xa9c3
cmpq $0x0, -0x10(%rbp)
je 0xa9e6
movl -0x18(%rbp), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x20(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0xa9ef
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xaa2c
movl -0x18(%rbp), %eax
movsbl -0x11(%rbp), %ecx
cmpl %ecx, %eax
je 0xaa2a
cmpq $0x0, -0x10(%rbp)
je 0xaa1f
movl -0x18(%rbp), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x20(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0xaa28
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xaa2a
jmp 0xaa2c
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x1c(%rbp)
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x18(%rbp)
jmp 0xa8a3
cmpq $0x0, -0x10(%rbp)
je 0xaa5d
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movb $0x0, (%rax,%rcx)
jmp 0xaa5f
movl -0x20(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)