	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bmod
_bmod:                                  ## @bmod
	.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
	xorl	%eax, %eax
	callq	_pop_number
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_pop_number
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	%rax, %r14
	xorl	%eax, %eax
	callq	_new_number
	movq	%rax, %r15
	movl	4(%rbx), %edi
	movl	4(%r14), %esi
	callq	_max
	movl	%eax, %r12d
	movl	%eax, 4(%r15)
	movl	(%rbx), %edi
	callq	_BN_is_zero
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_warnx
	jmp	LBB0_5
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_push_number                    ## TAILCALL
LBB0_4:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_normalize
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_normalize
	xorl	%eax, %eax
	callq	_BN_CTX_new
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_bn_checkp
	movl	(%r15), %edi
	movl	(%r14), %esi
	movl	(%rbx), %edx
	movq	%r12, %rcx
	callq	_BN_mod
	movl	%eax, %edi
	callq	_bn_check
	movq	%r12, %rdi
	callq	_BN_CTX_free
LBB0_5:
	movq	%r15, %rdi
	callq	_push_number
	movq	%rbx, %rdi
	callq	_free_number
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free_number                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"remainder by zero"

	.no_dead_strip	_bmod
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bmod
_bmod:                                  ; @bmod
	.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
	bl	_pop_number
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	bl	_pop_number
	cbz	x0, LBB0_5
; %bb.2:
	mov	x20, x0
	bl	_new_number
	mov	x21, x0
	ldr	w0, [x19, #4]
	ldr	w1, [x20, #4]
	bl	_max
	mov	x22, x0
	str	w0, [x21, #4]
	ldr	w0, [x19]
	bl	_BN_is_zero
	cbz	x0, LBB0_6
; %bb.3:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warnx
	b	LBB0_7
LBB0_4:
	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_5:
	mov	x0, x19
	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
	b	_push_number
LBB0_6:
	mov	x0, x19
	mov	x1, x22
	bl	_normalize
	mov	x0, x20
	mov	x1, x22
	bl	_normalize
	bl	_BN_CTX_new
	mov	x22, x0
	bl	_bn_checkp
	ldr	w0, [x21]
	ldr	w1, [x20]
	ldr	w2, [x19]
	mov	x3, x22
	bl	_BN_mod
	bl	_bn_check
	mov	x0, x22
	bl	_BN_CTX_free
LBB0_7:
	mov	x0, x21
	bl	_push_number
	mov	x0, x19
	bl	_free_number
	mov	x0, x20
	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
	b	_free_number
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"remainder by zero"

	.no_dead_strip	_bmod
.subsections_via_symbols
