	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function chap_bin2hex
_chap_bin2hex:                          ## @chap_bin2hex
	.cfi_startproc
## %bb.0:
	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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	leaq	(%rsi,%rsi), %rdi
	addq	$3, %rdi
	callq	_malloc
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_log_err
LBB0_2:
	movb	$0, 2(%rbx)
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movw	$30768, (%rbx)                  ## imm = 0x7830
	testq	%r12, %r12
	je	LBB0_5
## %bb.3:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	addq	$2, %rbx
	leaq	L_.str.2(%rip), %r13
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%r14,%r15), %edx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	xorl	%eax, %eax
	callq	_sprintf
	cltq
	addq	%rax, %rbx
	incq	%r15
	cmpq	%r15, %r12
	jne	LBB0_4
LBB0_5:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	$8, %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	"malloc"

L_.str.1:                               ## @.str.1
	.asciz	"0x"

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

	.no_dead_strip	_chap_bin2hex
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function chap_bin2hex
_chap_bin2hex:                          ; @chap_bin2hex
	.cfi_startproc
; %bb.0:
	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
	lsl	x8, x1, #1
	add	x0, x8, #3
	bl	_malloc
	mov	x21, x0
	cbnz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_log_err
LBB0_2:
	strb	wzr, [x21, #2]
	mov	w8, #30768
	strh	w8, [x21]
	cbz	x19, LBB0_5
; %bb.3:
	add	x22, x21, #2
Lloh2:
	adrp	x23, l_.str.2@PAGE
Lloh3:
	add	x23, x23, l_.str.2@PAGEOFF
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w8, [x20], #1
	str	x8, [sp]
	mov	x0, x22
	mov	x1, x23
	bl	_sprintf
	add	x22, x22, w0, sxtw
	subs	x19, x19, #1
	b.ne	LBB0_4
LBB0_5:
	mov	x0, x21
	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	"malloc"

l_.str.1:                               ; @.str.1
	.asciz	"0x"

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

	.no_dead_strip	_chap_bin2hex
.subsections_via_symbols
