	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mp_int_to_string               ## -- Begin function mp_int_to_string
	.p2align	4, 0x90
_mp_int_to_string:                      ## @mp_int_to_string
	.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
	movl	%ecx, %r14d
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movq	%rdi, %r12
	testq	%rdi, %rdi
	setne	%al
	testq	%rdx, %rdx
	setne	%cl
	andb	%al, %cl
	cmpl	$2, %r14d
	setge	%al
	andb	%cl, %al
	movzbl	%al, %edi
	callq	_assert
	movq	_MP_MIN_RADIX@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	setle	%al
	movq	_MP_MAX_RADIX@GOTPCREL(%rip), %rcx
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	cmpq	%rbx, (%rcx)
	setge	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movq	%r12, %rdi
	callq	_CMPZ
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	leaq	-44(%rbp), %rdi
	movq	%r12, %rsi
	callq	_mp_int_init_copy
	movq	_MP_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_17
## %bb.3:
	movq	%r12, %rdi
	callq	_MP_SIGN
	movq	_MP_NEG@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movb	$45, (%r13)
	incq	%r13
	decl	%r14d
LBB0_5:
	testl	%r14d, %r14d
	jle	LBB0_6
## %bb.7:
	incl	%r14d
	leaq	-44(%rbp), %r12
	movq	%r13, %rbx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_CMPZ
	testl	%eax, %eax
	sete	%r15b
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	%r12, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_s_ddiv
	movl	%eax, %edi
	movl	$1, %esi
	callq	_s_val2ch
	movb	%al, (%rbx)
	incq	%rbx
	decl	%r14d
	cmpl	$1, %r14d
	jg	LBB0_8
	jmp	LBB0_10
LBB0_1:
	xorl	%edi, %edi
	movl	$1, %esi
	callq	_s_val2ch
	movb	%al, (%r13)
	movb	$0, 1(%r13)
	movq	_MP_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_6:
	movb	$1, %r15b
	movq	%r13, %rbx
LBB0_10:
	leaq	-1(%rbx), %rax
	cmpq	%rax, %r13
	jae	LBB0_13
## %bb.11:
	incq	%r13
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movzbl	-1(%r13), %ecx
	movzbl	(%rax), %edx
	movb	%dl, -1(%r13)
	movb	%cl, (%rax)
	decq	%rax
	leaq	1(%r13), %rcx
	cmpq	%rax, %r13
	movq	%rcx, %r13
	jb	LBB0_12
LBB0_13:
	leaq	-44(%rbp), %rdi
	callq	_mp_int_clear
	movb	$0, (%rbx)
	testb	%r15b, %r15b
	je	LBB0_15
## %bb.14:
	movq	_MP_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_15:
	movq	_MP_TRUNC@GOTPCREL(%rip), %rax
LBB0_16:
	movl	(%rax), %eax
LBB0_17:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MP_MIN_RADIX,8,3               ## @MP_MIN_RADIX
	.comm	_MP_MAX_RADIX,8,3               ## @MP_MAX_RADIX
	.comm	_MP_OK,4,2                      ## @MP_OK
	.comm	_MP_NEG,8,3                     ## @MP_NEG
	.comm	_MP_TRUNC,4,2                   ## @MP_TRUNC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mp_int_to_string               ; -- Begin function mp_int_to_string
	.p2align	2
_mp_int_to_string:                      ; @mp_int_to_string
	.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	x21, x3
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
	cmp	x0, #0
	ccmp	x2, #0, #4, ne
	ccmp	w3, #1, #4, ne
	cset	w0, gt
	bl	_assert
Lloh0:
	adrp	x8, _MP_MIN_RADIX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MP_MIN_RADIX@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x20
Lloh3:
	adrp	x8, _MP_MAX_RADIX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MP_MAX_RADIX@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ccmp	x8, x20, #8, le
	cset	w0, ge
	bl	_assert
	mov	x0, x22
	bl	_CMPZ
Lloh6:
	adrp	x23, _MP_OK@GOTPAGE
Lloh7:
	ldr	x23, [x23, _MP_OK@GOTPAGEOFF]
	cbz	x0, LBB0_8
; %bb.1:
	add	x0, sp, #12
	mov	x1, x22
	bl	_mp_int_init_copy
	ldr	w8, [x23]
	cmp	w0, w8
	b.ne	LBB0_16
; %bb.2:
	mov	x0, x22
	bl	_MP_SIGN
Lloh8:
	adrp	x8, _MP_NEG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MP_NEG@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.3:
	mov	w8, #45
	strb	w8, [x19], #1
	sub	w21, w21, #1
LBB0_4:
	cmp	w21, #1
	b.lt	LBB0_9
; %bb.5:
	add	w24, w21, #1
	mov	x21, x19
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #12
	bl	_CMPZ
	cmp	w0, #0
	cset	w22, eq
	cbz	w0, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x0, sp, #12
	mov	x1, x20
	bl	_s_ddiv
	mov	w1, #1
	bl	_s_val2ch
	strb	w0, [x21], #1
	sub	w24, w24, #1
	cmp	w24, #1
	b.gt	LBB0_6
	b	LBB0_10
LBB0_8:
	mov	w1, #1
	bl	_s_val2ch
	strb	w0, [x19]
	strb	wzr, [x19, #1]
	ldr	w0, [x23]
	b	LBB0_16
LBB0_9:
	mov	w22, #1
	mov	x21, x19
LBB0_10:
	sub	x8, x21, #1
	cmp	x19, x8
	b.hs	LBB0_13
; %bb.11:
	add	x9, x19, #1
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldurb	w10, [x9, #-1]
	ldrb	w11, [x8]
	sturb	w11, [x9, #-1]
	strb	w10, [x8], #-1
	add	x10, x9, #1
	cmp	x9, x8
	mov	x9, x10
	b.lo	LBB0_12
LBB0_13:
	add	x0, sp, #12
	bl	_mp_int_clear
	strb	wzr, [x21]
	cbz	w22, LBB0_15
; %bb.14:
	ldr	w0, [x23]
	b	LBB0_16
LBB0_15:
Lloh11:
	adrp	x8, _MP_TRUNC@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MP_TRUNC@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
LBB0_16:
	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 AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_MP_MIN_RADIX,8,3               ; @MP_MIN_RADIX
	.comm	_MP_MAX_RADIX,8,3               ; @MP_MAX_RADIX
	.comm	_MP_OK,4,2                      ; @MP_OK
	.comm	_MP_NEG,8,3                     ; @MP_NEG
	.comm	_MP_TRUNC,4,2                   ; @MP_TRUNC
.subsections_via_symbols
