	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tohex                          ## -- Begin function tohex
	.p2align	4, 0x90
_tohex:                                 ## @tohex
	.cfi_startproc
## %bb.0:
	cmpq	$65537, %rsi                    ## imm = 0x10001
	jb	LBB0_1
## %bb.5:
	leaq	L_.str(%rip), %rdi
	jmp	_xstrdup                        ## TAILCALL
LBB0_1:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	leaq	1(%rsi,%rsi), %r15
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	$1, %edi
	movq	%r15, %rsi
	callq	_xcalloc
	movq	%rax, %rbx
	testq	%r12, %r12
	je	LBB0_4
## %bb.2:
	xorl	%r14d, %r14d
	leaq	-43(%rbp), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%r14,4), %ecx
	movq	%r13, %rdi
	movl	$3, %esi
	leaq	L_.str.1(%rip), %rdx
	callq	_snprintf
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	callq	_strlcat
	incq	%r14
	cmpq	%r14, %r12
	jne	LBB0_3
LBB0_4:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tohex: length > 65536"

L_.str.1:                               ## @.str.1
	.asciz	"%02x"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tohex                          ; -- Begin function tohex
	.p2align	2
_tohex:                                 ; @tohex
	.cfi_startproc
; %bb.0:
	cmp	x1, #16, lsl #12                ; =65536
	b.ls	LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	_xstrdup
LBB0_2:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
	mov	w21, #1
	bfi	x21, x1, #1, #63
	mov	w0, #1
	mov	x1, x21
	bl	_xcalloc
	mov	x22, x0
	cbz	x19, LBB0_5
; %bb.3:
Lloh2:
	adrp	x23, l_.str.1@PAGE
Lloh3:
	add	x23, x23, l_.str.1@PAGEOFF
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w3, [x20], #4
	add	x0, sp, #13
	mov	w1, #3
	mov	x2, x23
	bl	_snprintf
	add	x1, sp, #13
	mov	x0, x22
	mov	x2, x21
	bl	_strlcat
	subs	x19, x19, #1
	b.ne	LBB0_4
LBB0_5:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tohex: length > 65536"

l_.str.1:                               ; @.str.1
	.asciz	"%02x"

.subsections_via_symbols
