	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mp_mod_2d
_mp_mod_2d:                             ## @mp_mod_2d
	.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	%rdx, %rbx
	testl	%esi, %esi
	jle	LBB0_1
## %bb.2:
	movl	%esi, %r14d
	movq	_DIGIT_BIT@GOTPCREL(%rip), %r12
	movl	(%r12), %r15d
	imull	(%rdi), %r15d
	movq	%rbx, %rsi
	callq	_mp_copy
	cmpl	%r14d, %r15d
	jle	LBB0_9
## %bb.3:
	movq	_MP_OKAY@GOTPCREL(%rip), %r15
	cmpl	(%r15), %eax
	jne	LBB0_9
## %bb.4:
	movl	%r14d, %eax
	cltd
	idivl	(%r12)
	cmpl	$1, %edx
	movl	%eax, %ecx
	sbbl	$-1, %ecx
	movq	8(%rbx), %rsi
	cmpl	(%rbx), %ecx
	jge	LBB0_8
## %bb.5:
	movslq	%ecx, %rax
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, (%rsi,%rax,4)
	incq	%rax
	movslq	(%rbx), %rcx
	cmpq	%rcx, %rax
	jl	LBB0_6
## %bb.7:
	movl	%r14d, %eax
	cltd
	idivl	(%r12)
LBB0_8:
	movl	$-1, %edi
	movl	%edx, %ecx
	shll	%cl, %edi
	notl	%edi
	cltq
	andl	%edi, (%rsi,%rax,4)
	movq	%rbx, %rdi
	callq	_mp_clamp
	movl	(%r15), %eax
	jmp	LBB0_9
LBB0_1:
	movq	%rbx, %rdi
	callq	_mp_zero
	movq	_MP_OKAY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MP_OKAY,4,2                    ## @MP_OKAY
	.comm	_DIGIT_BIT,4,2                  ## @DIGIT_BIT
	.no_dead_strip	_mp_mod_2d
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mp_mod_2d
_mp_mod_2d:                             ; @mp_mod_2d
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x2
	cmp	w1, #0
	b.le	LBB0_7
; %bb.1:
	mov	x20, x1
	ldr	w8, [x0]
Lloh0:
	adrp	x22, _DIGIT_BIT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _DIGIT_BIT@GOTPAGEOFF]
	ldr	w9, [x22]
	mul	w23, w9, w8
	mov	x1, x19
	bl	_mp_copy
Lloh2:
	adrp	x21, _MP_OKAY@GOTPAGE
Lloh3:
	ldr	x21, [x21, _MP_OKAY@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w23, w20
	ccmp	w0, w8, #0, gt
	b.ne	LBB0_8
; %bb.2:
	ldr	w8, [x22]
	sdiv	w9, w20, w8
	msub	w10, w9, w8, w20
	cmp	w10, #0
	cinc	w11, w9, ne
	ldr	w12, [x19]
	ldr	x8, [x19, #8]
	cmp	w11, w12
	b.ge	LBB0_6
; %bb.3:
	sxtw	x9, w11
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	str	wzr, [x8, x9, lsl #2]
	add	x9, x9, #1
	ldrsw	x10, [x19]
	cmp	x9, x10
	b.lt	LBB0_4
; %bb.5:
	ldr	w10, [x22]
	sdiv	w9, w20, w10
	msub	w10, w9, w10, w20
LBB0_6:
	mov	w11, #-1
	lsl	w10, w11, w10
	sbfiz	x9, x9, #2, #32
	ldr	w11, [x8, x9]
	bic	w10, w11, w10
	str	w10, [x8, x9]
	mov	x0, x19
	bl	_mp_clamp
	ldr	w0, [x21]
	b	LBB0_8
LBB0_7:
	mov	x0, x19
	bl	_mp_zero
Lloh4:
	adrp	x8, _MP_OKAY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MP_OKAY@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_MP_OKAY,4,2                    ; @MP_OKAY
	.comm	_DIGIT_BIT,4,2                  ; @DIGIT_BIT
	.no_dead_strip	_mp_mod_2d
.subsections_via_symbols
