// File: /workspace/github_c_makefile_star2_O0/hsjoihs[P]c-compiler/lexer.c
// Function: escape
char *escape(const char *str)
{
	char *ans =
	    calloc(strlen(str) * 4 /* length of "\\013" */ + 1, sizeof(char));
	int j = 0;
	for (int i = 0; str[i]; i++) {
		switch (str[i]) {
		case 92:
			ans[j] = 92;
			ans[j + 1] = 92;
			j += 2;
			break;
		case 9:
			ans[j] = 92;
			ans[j + 1] = 't';
			j += 2;
			break;
		case 10:
			ans[j] = 92;
			ans[j + 1] = 'n';
			j += 2;
			break;
		case 11: /* somehow \v fails */
			ans[j] = 92;
			ans[j + 1] = '0';
			ans[j + 2] = '1';
			ans[j + 3] = '3';
			j += 4;
			break;
		case 12:
			ans[j] = 92;
			ans[j + 1] = 'f';
			j += 2;
			break;
		case 13:
			ans[j] = 92;
			ans[j + 1] = 'r';
			j += 2;
			break;
		case '"':
			ans[j] = 92;
			ans[j + 1] = '"';
			j += 2;
			break;
		case 0x1b:
			ans[j] = 92;
			ans[j + 1] = '0';
			ans[j + 2] = '3';
			ans[j + 3] = '3';
			j += 4;
			break;
		/* single quote need not be re-escaped */
		default:
			ans[j] = str[i];
			j++;
			break;
		}
	}

	/* calloc means automatically null terminated */
	return ans;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1060
movq %rax, %rdi
shlq $0x2, %rdi
addq $0x1, %rdi
movl $0x1, %esi
callq 0x10b0
movq %rax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0xf4bf
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x1c(%rbp)
subl $0x9, %eax
je 0xf325
jmp 0xf298
movl -0x1c(%rbp), %eax
subl $0xa, %eax
je 0xf350
jmp 0xf2a6
movl -0x1c(%rbp), %eax
subl $0xb, %eax
je 0xf37b
jmp 0xf2b4
movl -0x1c(%rbp), %eax
subl $0xc, %eax
je 0xf3c8
jmp 0xf2c2
movl -0x1c(%rbp), %eax
subl $0xd, %eax
je 0xf3f3
jmp 0xf2d0
movl -0x1c(%rbp), %eax
subl $0x1b, %eax
je 0xf446
jmp 0xf2de
movl -0x1c(%rbp), %eax
subl $0x22, %eax
je 0xf41e
jmp 0xf2ec
movl -0x1c(%rbp), %eax
subl $0x5c, %eax
jne 0xf490
jmp 0xf2fa
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb $0x5c, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb $0x5c, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x14(%rbp)
jmp 0xf4af
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb $0x5c, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb $0x74, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x14(%rbp)
jmp 0xf4af
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb $0x5c, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb $0x6e, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x14(%rbp)
jmp 0xf4af
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb $0x5c, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb $0x30, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movb $0x31, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movb $0x33, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x14(%rbp)
jmp 0xf4af
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb $0x5c, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb $0x66, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x14(%rbp)
jmp 0xf4af
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb $0x5c, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb $0x72, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x14(%rbp)
jmp 0xf4af
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb $0x5c, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb $0x22, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x14(%rbp)
jmp 0xf4af
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb $0x5c, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb $0x30, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movb $0x33, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movb $0x33, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x14(%rbp)
jmp 0xf4af
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xf4b1
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xf26c
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)