	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mp_int_to_int                  ## -- Begin function mp_int_to_int
	.p2align	4, 0x90
_mp_int_to_int:                         ## @mp_int_to_int
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	xorl	%edi, %edi
	testq	%r12, %r12
	setne	%dil
	callq	_assert
	movq	%r12, %rdi
	callq	_MP_SIGN
	movq	%rax, %r15
	movq	_MP_ZPOS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	jne	LBB0_3
## %bb.1:
	movq	_MP_SMALL_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_mp_int_compare_value
	testq	%rax, %rax
	jg	LBB0_2
LBB0_3:
	movq	_MP_SMALL_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_mp_int_compare_value
	testq	%rax, %rax
	js	LBB0_2
## %bb.4:
	movq	%r12, %rdi
	callq	_MP_USED
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_MP_DIGITS
	testl	%ebx, %ebx
	jle	LBB0_8
## %bb.5:
	movl	%ebx, %ecx
	leaq	(%rax,%rcx,4), %rax
	movq	_MP_DIGIT_BIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%edx, %ecx
	shrl	$31, %ecx
	addl	%edx, %ecx
	sarl	%ecx
	leal	-1(%rbx), %edx
	movl	%ebx, %esi
	andl	$3, %esi
	cmpl	$3, %edx
	jae	LBB0_9
## %bb.6:
	xorl	%edx, %edx
	jmp	LBB0_11
LBB0_2:
	movq	_MP_RANGE@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_8:
	xorl	%edx, %edx
	jmp	LBB0_14
LBB0_9:
	andl	$-4, %ebx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	shll	%cl, %edx
	shll	%cl, %edx
	orl	-4(%rax), %edx
	shll	%cl, %edx
	shll	%cl, %edx
	orl	-8(%rax), %edx
	shll	%cl, %edx
	shll	%cl, %edx
	orl	-12(%rax), %edx
	shll	%cl, %edx
	shll	%cl, %edx
	orl	-16(%rax), %edx
	addq	$-16, %rax
	addl	$-4, %ebx
	jne	LBB0_10
LBB0_11:
	testl	%esi, %esi
	je	LBB0_14
## %bb.12:
	negl	%esi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	shll	%cl, %edx
	shll	%cl, %edx
	orl	-4(%rax,%rdi,4), %edx
	decq	%rdi
	cmpl	%edi, %esi
	jne	LBB0_13
LBB0_14:
	movq	_MP_OK@GOTPCREL(%rip), %rax
	testq	%r14, %r14
	je	LBB0_16
## %bb.15:
	movq	_MP_NEG@GOTPCREL(%rip), %rcx
	movl	%edx, %esi
	negl	%esi
	cmpq	(%rcx), %r15
	cmovnel	%edx, %esi
	movl	%esi, (%r14)
LBB0_16:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MP_ZPOS,8,3                    ## @MP_ZPOS
	.comm	_MP_SMALL_MAX,4,2               ## @MP_SMALL_MAX
	.comm	_MP_SMALL_MIN,4,2               ## @MP_SMALL_MIN
	.comm	_MP_RANGE,4,2                   ## @MP_RANGE
	.comm	_MP_DIGIT_BIT,4,2               ## @MP_DIGIT_BIT
	.comm	_MP_NEG,8,3                     ## @MP_NEG
	.comm	_MP_OK,4,2                      ## @MP_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mp_int_to_int                  ; -- Begin function mp_int_to_int
	.p2align	2
_mp_int_to_int:                         ; @mp_int_to_int
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x21, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	mov	x0, x21
	bl	_MP_SIGN
	mov	x20, x0
Lloh0:
	adrp	x8, _MP_ZPOS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MP_ZPOS@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _MP_SMALL_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MP_SMALL_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_mp_int_compare_value
	cmp	x0, #0
	b.gt	LBB0_9
LBB0_2:
Lloh6:
	adrp	x8, _MP_SMALL_MIN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MP_SMALL_MIN@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_mp_int_compare_value
	tbnz	x0, #63, LBB0_9
; %bb.3:
	mov	x0, x21
	bl	_MP_USED
	mov	x22, x0
	mov	x0, x21
	bl	_MP_DIGITS
	cmp	w22, #1
	b.lt	LBB0_11
; %bb.4:
	mov	w8, #0
Lloh9:
	adrp	x10, _MP_DIGIT_BIT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _MP_DIGIT_BIT@GOTPAGEOFF]
	mov	w9, w22
Lloh11:
	ldr	w10, [x10]
	cmp	w10, #0
	cinc	w10, w10, lt
	asr	w10, w10, #1
	sub	x11, x0, #4
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	lsl	w8, w8, w10
	lsl	w8, w8, w10
	ldr	w12, [x11, x9, lsl #2]
	orr	w8, w8, w12
	sub	x9, x9, #1
	add	w12, w9, #1
	cmp	w12, #1
	b.hi	LBB0_5
; %bb.6:
	cbz	x19, LBB0_8
LBB0_7:
Lloh12:
	adrp	x9, _MP_NEG@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MP_NEG@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x20, x9
	cneg	w8, w8, eq
	str	w8, [x19]
LBB0_8:
Lloh15:
	adrp	x8, _MP_OK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MP_OK@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh17:
	adrp	x8, _MP_RANGE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MP_RANGE@GOTPAGEOFF]
LBB0_10:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_11:
	mov	w8, #0
	cbnz	x19, LBB0_7
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_MP_ZPOS,8,3                    ; @MP_ZPOS
	.comm	_MP_SMALL_MAX,4,2               ; @MP_SMALL_MAX
	.comm	_MP_SMALL_MIN,4,2               ; @MP_SMALL_MIN
	.comm	_MP_RANGE,4,2                   ; @MP_RANGE
	.comm	_MP_DIGIT_BIT,4,2               ; @MP_DIGIT_BIT
	.comm	_MP_NEG,8,3                     ; @MP_NEG
	.comm	_MP_OK,4,2                      ; @MP_OK
.subsections_via_symbols
