	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function calc_hex
_calc_hex:                              ## @calc_hex
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r13
	xorl	%ebx, %ebx
	movl	$-1, %r14d
	testq	%r13, %r13
	je	LBB0_21
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rdi, 48(%r13)
	je	LBB0_3
## %bb.22:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	40(%r13), %r13
	testq	%r13, %r13
	jne	LBB0_2
LBB0_21:
	movq	_data_buffer@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %rcx
	movb	$0, (%rax,%rcx)
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	$-1, %r14d
	xorl	%ebx, %ebx
	movq	_MAX_BYTES@GOTPCREL(%rip), %r15
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	40(%r13), %r13
	testq	%r13, %r13
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	_MAX_BYTES@GOTPCREL(%rip), %r15
	je	LBB0_21
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
                                        ##     Child Loop BB0_16 Depth 2
	cmpq	%rdi, 48(%r13)
	jne	LBB0_21
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r13), %rcx
	movl	(%r15), %eax
	xorl	%r12d, %r12d
	testq	%rcx, %rcx
	jle	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	leal	-3(%rax), %edx
	cmpl	%edx, %ebx
	jge	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movslq	%ebx, %rbx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	$-1, %r14d
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	movl	8(%r13), %eax
	xorl	%edx, %edx
	movq	_OCTETS_PER_BYTE@GOTPCREL(%rip), %rcx
	divl	(%rcx)
	movl	%eax, %r14d
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=2
	movq	_data_buffer@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	%rbx, %rdi
	movq	16(%r13), %rax
	movzbl	(%rax,%r12,4), %edx
	leaq	L_.str(%rip), %rsi
	callq	_sprintf
	addq	$2, %rbx
	incl	%r12d
	movq	(%r13), %rcx
	movslq	(%r15), %rax
	cmpq	%r12, %rcx
	jle	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=2
	movq	%rax, %rdx
	addq	$-3, %rdx
	cmpq	%rdx, %rbx
	jl	LBB0_8
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	24(%r13), %rdx
	movq	_rs_fill@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	jne	LBB0_20
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	%r12d, %edx
	movslq	32(%r13), %rsi
	movslq	36(%r13), %rdi
	imulq	%rsi, %rdi
	addq	%rdi, %rcx
	cmpq	%rdx, %rcx
	jle	LBB0_20
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=1
	addl	$-3, %eax
	cmpl	%eax, %ebx
	jge	LBB0_20
## %bb.15:                              ##   in Loop: Header=BB0_4 Depth=1
	movslq	%ebx, %rbx
	leal	1(%r12), %r14d
	movl	%r12d, %r15d
	.p2align	4, 0x90
LBB0_16:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	$-1, -44(%rbp)                  ## 4-byte Folded Reload
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=2
	movl	8(%r13), %eax
	xorl	%edx, %edx
	movq	_OCTETS_PER_BYTE@GOTPCREL(%rip), %rcx
	divl	(%rcx)
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_18:                                ##   in Loop: Header=BB0_16 Depth=2
	movq	_data_buffer@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	%rbx, %rdi
	movq	16(%r13), %rax
	movl	%r15d, %ecx
	movzbl	(%rax,%rcx,4), %edx
	leaq	L_.str(%rip), %rsi
	callq	_sprintf
	addq	$2, %rbx
	incl	%r15d
	movq	(%r13), %rax
	movslq	32(%r13), %rcx
	leaq	(%rax,%rcx), %rdx
	cmpq	%r15, %rdx
	cmovlel	%r12d, %r15d
	movl	%r14d, %edx
	movslq	36(%r13), %rsi
	imulq	%rcx, %rsi
	addq	%rax, %rsi
	cmpq	%rdx, %rsi
	jle	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_16 Depth=2
	movq	_MAX_BYTES@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$-3, %rax
	incl	%r14d
	cmpq	%rax, %rbx
	jl	LBB0_16
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_BYTES,4,2                  ## @MAX_BYTES
	.comm	_OCTETS_PER_BYTE,4,2            ## @OCTETS_PER_BYTE
	.comm	_data_buffer,8,3                ## @data_buffer
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%02X"

	.comm	_rs_fill,8,3                    ## @rs_fill
	.no_dead_strip	_calc_hex
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calc_hex
_calc_hex:                              ; @calc_hex
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x23, [x0]
Lloh0:
	adrp	x22, _data_buffer@GOTPAGE
Lloh1:
	ldr	x22, [x22, _data_buffer@GOTPAGEOFF]
	cbz	x23, LBB0_4
; %bb.1:
	mov	x19, x0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23, #48]
	cmp	x8, x19
	b.eq	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x23, [x23, #40]
	cbnz	x23, LBB0_2
LBB0_4:
	mov	w8, #0
	mov	w20, #-1
LBB0_5:
	ldr	x9, [x22]
	strb	wzr, [x9, w8, sxtw]
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_6:
	mov	w8, #0
	mov	w20, #-1
Lloh2:
	adrp	x24, _MAX_BYTES@GOTPAGE
Lloh3:
	ldr	x24, [x24, _MAX_BYTES@GOTPAGEOFF]
Lloh4:
	adrp	x28, _rs_fill@GOTPAGE
Lloh5:
	ldr	x28, [x28, _rs_fill@GOTPAGEOFF]
Lloh6:
	adrp	x26, _OCTETS_PER_BYTE@GOTPAGE
Lloh7:
	ldr	x26, [x26, _OCTETS_PER_BYTE@GOTPAGEOFF]
Lloh8:
	adrp	x21, l_.str@PAGE
Lloh9:
	add	x21, x21, l_.str@PAGEOFF
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	mov	x8, x28
	ldr	x19, [sp, #8]                   ; 8-byte Folded Reload
Lloh10:
	adrp	x28, _rs_fill@GOTPAGE
Lloh11:
	ldr	x28, [x28, _rs_fill@GOTPAGEOFF]
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	x23, [x23, #40]
	cbz	x23, LBB0_5
LBB0_9:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
                                        ;     Child Loop BB0_21 Depth 2
	ldr	x9, [x23, #48]
	cmp	x9, x19
	b.ne	LBB0_5
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x9, [x23]
	ldr	w10, [x24]
	sub	w11, w10, #3
	cmp	x9, #1
	ccmp	w8, w11, #0, ge
	b.lt	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	w27, #0
	b	LBB0_17
LBB0_12:                                ;   in Loop: Header=BB0_9 Depth=1
	mov	x27, #0
	sxtw	x25, w8
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=2
	ldr	x8, [x22]
	add	x0, x8, x25
	ldr	x8, [x23, #16]
	lsl	x9, x27, #2
	ldrb	w2, [x8, x9]
	mov	x1, x21
	bl	_sprintf
	add	x25, x25, #2
	add	w27, w27, #1
	ldr	x9, [x23]
	ldrsw	x10, [x24]
	sub	x8, x10, #3
	cmp	x9, x27
	ccmp	x25, x8, #0, gt
	b.ge	LBB0_16
LBB0_14:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmn	w20, #1
	b.ne	LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=2
	ldr	w8, [x23, #8]
	ldr	w9, [x26]
	udiv	w20, w8, w9
	b	LBB0_13
LBB0_16:                                ;   in Loop: Header=BB0_9 Depth=1
	mov	x8, x25
LBB0_17:                                ;   in Loop: Header=BB0_9 Depth=1
	ldr	x11, [x23, #24]
	ldr	x12, [x28]
	cmp	x11, x12
	b.ne	LBB0_8
; %bb.18:                               ;   in Loop: Header=BB0_9 Depth=1
	ldpsw	x11, x12, [x23, #32]
	madd	x9, x12, x11, x9
	sub	w10, w10, #3
	cmp	x9, w27, uxtw
	ccmp	w8, w10, #0, gt
	b.ge	LBB0_8
; %bb.19:                               ;   in Loop: Header=BB0_9 Depth=1
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	sxtw	x28, w8
	add	w25, w27, #1
	mov	x19, x27
	b	LBB0_21
LBB0_20:                                ;   in Loop: Header=BB0_21 Depth=2
	ldr	x8, [x22]
	add	x0, x8, x28
	ldr	x8, [x23, #16]
	mov	w9, w19
	lsl	x9, x9, #2
	ldrb	w2, [x8, x9]
	mov	x1, x21
	bl	_sprintf
	add	w8, w19, #1
	ldr	x9, [x23]
	ldpsw	x10, x11, [x23, #32]
	add	x12, x9, x10
	cmp	x12, x8
	add	x28, x28, #2
	csinc	w19, w27, w19, le
	madd	x8, x11, x10, x9
	ldrsw	x9, [x24]
	sub	x9, x9, #3
	cmp	x8, w25, uxtw
	add	w25, w25, #1
	ccmp	x28, x9, #0, gt
	b.ge	LBB0_7
LBB0_21:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmn	w20, #1
	b.ne	LBB0_20
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=2
	ldr	w8, [x23, #8]
	ldr	w9, [x26]
	udiv	w20, w8, w9
	b	LBB0_20
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_BYTES,4,2                  ; @MAX_BYTES
	.comm	_OCTETS_PER_BYTE,4,2            ; @OCTETS_PER_BYTE
	.comm	_data_buffer,8,3                ; @data_buffer
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%02X"

	.comm	_rs_fill,8,3                    ; @rs_fill
	.no_dead_strip	_calc_hex
.subsections_via_symbols
