	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function convert_bn_memory
_convert_bn_memory:                     ## @convert_bn_memory
	.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	%r8, %r14
	movq	%rdx, %rbx
	movq	%rsi, %r13
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	leal	(%rsi,%rsi), %r15d
	testq	%r8, %r8
	je	LBB0_14
## %bb.1:
	movq	%rcx, %r12
	movq	%r14, %rdi
	callq	_BN_is_zero
	testl	%eax, %eax
	je	LBB0_2
LBB0_14:
	testl	%r15d, %r15d
	jle	LBB0_15
## %bb.16:
	leal	(%r13,%r13), %r9d
	negl	%r9d
	xorl	%ecx, %ecx
	movq	_BN_OUTPUT_SIZE@GOTPCREL(%rip), %r8
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_17 Depth=1
	incl	%ecx
	movl	%r9d, %eax
	movq	%r15, %rbx
	addl	%ecx, %eax
	je	LBB0_21
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	leaq	1(%rbx), %r15
	movb	$32, (%rbx)
	movl	(%r8), %edi
	leal	(%rdi,%rdi), %esi
	movl	%ecx, %eax
	cltd
	idivl	%esi
	leal	(%rdi,%rdi), %eax
	decl	%eax
	cmpl	%eax, %edx
	jne	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	leal	(%r9,%rcx), %eax
	cmpl	$-1, %eax
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=1
	movb	$32, 1(%rbx)
	addq	$2, %rbx
	movq	%rbx, %r15
	jmp	LBB0_20
LBB0_15:
	movq	%rbx, %r15
LBB0_21:
	movb	$0, (%r15)
	testq	%r14, %r14
	je	LBB0_22
## %bb.23:
	movq	%r14, %rdi
	callq	_BN_is_negative
	testq	%rax, %rax
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rbx
	cmoveq	%rax, %rbx
	jmp	LBB0_24
LBB0_22:
	leaq	L_.str(%rip), %rbx
LBB0_24:
	movq	%rbx, %rdi
	callq	_strlen
	cltq
	subq	%rax, %r15
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_strcpy
	xorl	%r15d, %r15d
LBB0_25:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_BN_OUTPUT_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_hex_convert_memory
	cmpl	$0, (%r12)
	je	LBB0_25
## %bb.3:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movb	$32, (%rbx)
	decl	%r15d
	movq	%rbx, %r12
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%rbx), %eax
	cmpb	$32, %al
	je	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpb	$48, %al
	je	LBB0_10
## %bb.6:
	testb	%al, %al
	jne	LBB0_12
## %bb.7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpb	$16, (%rax,%r13)
	jb	LBB0_25
## %bb.8:
	movq	%r14, %rdi
	callq	_BN_is_negative
	testq	%rax, %rax
	je	LBB0_25
## %bb.9:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax)
	jmp	LBB0_13
LBB0_12:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax)
	movq	%r14, %rdi
	callq	_BN_is_negative
	testq	%rax, %rax
	je	LBB0_25
LBB0_13:
	movb	$45, (%r12)
	incl	%r15d
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_BN_OUTPUT_SIZE,4,2             ## @BN_OUTPUT_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NULL"

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

L_.str.2:                               ## @.str.2
	.asciz	"0"

	.no_dead_strip	_convert_bn_memory
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function convert_bn_memory
_convert_bn_memory:                     ; @convert_bn_memory
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x4
	mov	x19, x2
	mov	x23, x1
	lsl	w21, w23, #1
	cbz	x4, LBB0_2
; %bb.1:
	mov	x22, x3
	mov	x24, x0
	mov	x0, x20
	bl	_BN_is_zero
	cbz	w0, LBB0_13
LBB0_2:
	cmp	w21, #1
	b.lt	LBB0_8
; %bb.3:
	mov	w8, #0
	mov	w9, #32
Lloh0:
	adrp	x10, _BN_OUTPUT_SIZE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _BN_OUTPUT_SIZE@GOTPAGEOFF]
	neg	w11, w23, lsl #1
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	strb	w9, [x19, #1]
	add	x19, x19, #2
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w8, w8, #1
	cmn	w11, w8
	b.eq	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	w13, w11, w8
	mov	x12, x19
	strb	w9, [x12], #1
	ldr	w14, [x10]
	lsl	w14, w14, #1
	sdiv	w15, w8, w14
	msub	w15, w15, w14, w8
	sub	w14, w14, #1
	cmp	w15, w14
	ccmn	w13, #1, #4, eq
	b.ne	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x19, x12
	b	LBB0_5
LBB0_8:
	strb	wzr, [x19]
	cbz	x20, LBB0_10
; %bb.9:
	mov	x0, x20
	bl	_BN_is_negative
Lloh2:
	adrp	x8, l_.str.1@PAGE
Lloh3:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh4:
	adrp	x9, l_.str.2@PAGE
Lloh5:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	x0, #0
	csel	x20, x9, x8, eq
	b	LBB0_11
LBB0_10:
Lloh6:
	adrp	x20, l_.str@PAGE
Lloh7:
	add	x20, x20, l_.str@PAGEOFF
LBB0_11:
	mov	x0, x20
	bl	_strlen
	sub	x0, x19, w0, sxtw
	mov	x1, x20
	bl	_strcpy
	mov	w21, #0
LBB0_12:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_13:
Lloh8:
	adrp	x8, _BN_OUTPUT_SIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BN_OUTPUT_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	mov	x0, x24
	mov	x1, x23
	mov	x2, x19
	bl	_hex_convert_memory
	ldr	w8, [x22]
	cbz	w8, LBB0_12
; %bb.14:
	mov	x25, #0
	mov	w8, #32
	b	LBB0_17
LBB0_15:                                ;   in Loop: Header=BB0_17 Depth=1
	strb	w8, [x19]
	sub	w21, w21, #1
	mov	x25, x19
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	add	x19, x19, #1
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w9, [x19]
	cmp	w9, #32
	b.eq	LBB0_16
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	cmp	w9, #48
	b.eq	LBB0_15
; %bb.19:
	cbnz	w9, LBB0_23
; %bb.20:
	ldrb	w8, [x24, x23]
	cmp	w8, #16
	b.lo	LBB0_12
; %bb.21:
	mov	x0, x20
	bl	_BN_is_negative
	cbz	x0, LBB0_12
; %bb.22:
	str	wzr, [x22]
	b	LBB0_24
LBB0_23:
	str	wzr, [x22]
	mov	x0, x20
	bl	_BN_is_negative
	cbz	x0, LBB0_12
LBB0_24:
	mov	w8, #45
	strb	w8, [x25]
	add	w21, w21, #1
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_BN_OUTPUT_SIZE,4,2             ; @BN_OUTPUT_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NULL"

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

l_.str.2:                               ; @.str.2
	.asciz	"0"

	.no_dead_strip	_convert_bn_memory
.subsections_via_symbols
