// File: /workspace/github_c_makefile_star2_O0/j-hoppe[P]tu58fs/utils.c
// Function: strprintable
char *strprintable(char *s, int size) {
	static char buffer[1024] ;
	char buf[10] ;
	int i ;
	char c ;
	char *wp = buffer ;
	*wp = 0 ;
	for (i= 0 ;  i < size ; i++) {
		c = s[i] ;
		// must be room for one more char expr
		assert(wp-buffer < (int)sizeof(buffer)-5) ;
		if (c == 0) {
			strcat(wp, "<NUL>") ;
			wp += 5 ;
		} else if (c == 0x07) {
			strcat(wp, "<BEL>") ;
			wp += 5 ;
		} else if (c == 0x0a) {
			strcat(wp, "<LF>") ;
			wp += 4 ;
		} else if (c == 0x0d) {
			strcat(wp, "<CR>") ;
			wp += 4 ;
		} else if (c == 0x20) {
				strcat(wp, "<SPC>") ;
				wp += 5 ;
		} else if (c <= 0x1f || c >= 0x7f) {
			sprintf(buf, "\\x%.2x", (int)c) ;
			strcat(wp, buf) ;
			wp += strlen(buf) ;
		} else
			*wp++ = c ;
		*wp=0 ;
	}
	return buffer ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq 0x189ba(%rip), %rax     # 0x26180
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0xd973
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x1d(%rbp)
movq -0x28(%rbp), %rax
leaq 0x18983(%rip), %rcx     # 0x26180
subq %rcx, %rax
cmpq $0x3fb, %rax            # imm = 0x3FB
jge 0xd80a
jmp 0xd829
leaq 0xeeed(%rip), %rdi      # 0x1c6fe
leaq 0xeec8(%rip), %rsi      # 0x1c6e0
movl $0xe0, %edx
leaq 0xeefc(%rip), %rcx      # 0x1c720
callq 0x3200
movsbl -0x1d(%rbp), %eax
cmpl $0x0, %eax
jne 0xd853
movq -0x28(%rbp), %rdi
leaq 0xef03(%rip), %rsi      # 0x1c740
callq 0x3500
movq -0x28(%rbp), %rax
addq $0x5, %rax
movq %rax, -0x28(%rbp)
jmp 0xd95e
movsbl -0x1d(%rbp), %eax
cmpl $0x7, %eax
jne 0xd87d
movq -0x28(%rbp), %rdi
leaq 0xeedf(%rip), %rsi      # 0x1c746
callq 0x3500
movq -0x28(%rbp), %rax
addq $0x5, %rax
movq %rax, -0x28(%rbp)
jmp 0xd95c
movsbl -0x1d(%rbp), %eax
cmpl $0xa, %eax
jne 0xd8a7
movq -0x28(%rbp), %rdi
leaq 0xeebb(%rip), %rsi      # 0x1c74c
callq 0x3500
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
jmp 0xd95a
movsbl -0x1d(%rbp), %eax
cmpl $0xd, %eax
jne 0xd8d1
movq -0x28(%rbp), %rdi
leaq 0xee96(%rip), %rsi      # 0x1c751
callq 0x3500
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
jmp 0xd958
movsbl -0x1d(%rbp), %eax
cmpl $0x20, %eax
jne 0xd8f8
movq -0x28(%rbp), %rdi
leaq 0xee71(%rip), %rsi      # 0x1c756
callq 0x3500
movq -0x28(%rbp), %rax
addq $0x5, %rax
movq %rax, -0x28(%rbp)
jmp 0xd956
movsbl -0x1d(%rbp), %eax
cmpl $0x1f, %eax
jle 0xd90a
movsbl -0x1d(%rbp), %eax
cmpl $0x7f, %eax
jl 0xd940
leaq -0x16(%rbp), %rdi
movsbl -0x1d(%rbp), %edx
leaq 0xee43(%rip), %rsi      # 0x1c75c
movb $0x0, %al
callq 0x3520
movq -0x28(%rbp), %rdi
leaq -0x16(%rbp), %rsi
callq 0x3500
leaq -0x16(%rbp), %rdi
callq 0x3190
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0xd954
movb -0x1d(%rbp), %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
jmp 0xd956
jmp 0xd958
jmp 0xd95a
jmp 0xd95c
jmp 0xd95e
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xd7d8
leaq 0x18806(%rip), %rax     # 0x26180
addq $0x30, %rsp
popq %rbp
retq