	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_crypto_rsa_exptmod             ## -- Begin function crypto_rsa_exptmod
	.p2align	4, 0x90
_crypto_rsa_exptmod:                    ## @crypto_rsa_exptmod
	.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	%r9d, %ebx
	movq	%r8, %r13
	movq	%rsi, %r14
	movq	%rdi, %r15
	testl	%r9d, %r9d
	je	LBB0_2
## %bb.1:
	cmpl	$0, 28(%r13)
	je	LBB0_18
LBB0_2:
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_bignum_init
	testq	%rax, %rax
	je	LBB0_18
## %bb.3:
	movq	%rax, %r12
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_bignum_set_unsigned_bin
	movl	$-1, %r14d
	testq	%rax, %rax
	js	LBB0_14
## %bb.4:
	movl	(%r13), %edi
	movq	%r12, %rsi
	callq	_bignum_cmp
	testq	%rax, %rax
	js	LBB0_14
## %bb.5:
	testl	%ebx, %ebx
	je	LBB0_20
## %bb.6:
	xorl	%eax, %eax
	callq	_bignum_init
	movq	%rax, %r15
	xorl	%eax, %eax
	callq	_bignum_init
	movq	%rax, %rbx
	testq	%r15, %r15
	je	LBB0_16
## %bb.7:
	testq	%rbx, %rbx
	je	LBB0_16
## %bb.8:
	movl	12(%r13), %edx
	movl	24(%r13), %esi
	movq	%r12, %rdi
	movq	%r15, %rcx
	callq	_bignum_exptmod
	testq	%rax, %rax
	js	LBB0_16
## %bb.9:
	movl	8(%r13), %edx
	movl	20(%r13), %esi
	movq	%r12, %rdi
	movq	%rbx, %rcx
	callq	_bignum_exptmod
	testq	%rax, %rax
	js	LBB0_16
## %bb.10:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_bignum_sub
	testq	%rax, %rax
	js	LBB0_16
## %bb.11:
	movl	12(%r13), %edx
	movl	16(%r13), %esi
	movq	%r12, %rdi
	movq	%r12, %rcx
	callq	_bignum_mulmod
	testq	%rax, %rax
	js	LBB0_16
## %bb.12:
	movl	8(%r13), %esi
	movq	%r12, %rdi
	movq	%r12, %rdx
	callq	_bignum_mul
	testq	%rax, %rax
	js	LBB0_16
## %bb.13:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_bignum_add
	testq	%rax, %rax
	jns	LBB0_21
	jmp	LBB0_16
LBB0_18:
	movl	$-1, %r14d
	jmp	LBB0_19
LBB0_14:
	xorl	%r15d, %r15d
LBB0_15:
	xorl	%ebx, %ebx
LBB0_16:
	movq	%r12, %rdi
	callq	_bignum_deinit
	movq	%r15, %rdi
	callq	_bignum_deinit
	movq	%rbx, %rdi
	callq	_bignum_deinit
LBB0_19:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movl	(%r13), %edx
	movl	4(%r13), %esi
	movq	%r12, %rdi
	movq	%r12, %rcx
	callq	_bignum_exptmod
	xorl	%r15d, %r15d
	movl	$0, %ebx
	testq	%rax, %rax
	js	LBB0_15
LBB0_21:
	movq	%r13, %rdi
	callq	_crypto_rsa_get_modulus_len
	movq	%rax, %r13
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	(%rax), %r13
	jbe	LBB0_24
## %bb.22:
	movq	%r13, (%rax)
	jmp	LBB0_16
LBB0_24:
	movq	%r12, %rdi
	callq	_bignum_get_unsigned_bin_len
	cmpq	%r13, %rax
	ja	LBB0_16
## %bb.25:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r13, (%rax)
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	_os_memset
	movq	%r12, %rdi
	callq	_bignum_get_unsigned_bin_len
	subq	%rax, %r13
	leaq	(%r14,%r13,4), %rsi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_bignum_get_unsigned_bin
	movq	%rax, %r14
	sarq	$63, %r14
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_crypto_rsa_exptmod             ; -- Begin function crypto_rsa_exptmod
	.p2align	2
_crypto_rsa_exptmod:                    ; @crypto_rsa_exptmod
	.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, x5
	mov	x24, x4
	mov	x23, x3
	mov	x22, x2
	mov	x21, x1
	mov	x25, x0
	cbz	w5, LBB0_2
; %bb.1:
	ldr	w8, [x24, #28]
	cbz	w8, LBB0_14
LBB0_2:
	bl	_bignum_init
	cbz	x0, LBB0_14
; %bb.3:
	mov	x19, x0
	mov	x1, x25
	mov	x2, x21
	bl	_bignum_set_unsigned_bin
	tbnz	x0, #63, LBB0_15
; %bb.4:
	ldr	w0, [x24]
	mov	x1, x19
	bl	_bignum_cmp
	tbnz	x0, #63, LBB0_15
; %bb.5:
	cbz	w20, LBB0_19
; %bb.6:
	bl	_bignum_init
	mov	x20, x0
	bl	_bignum_init
	mov	x21, x0
	mov	w25, #-1
	cbz	x20, LBB0_17
; %bb.7:
	cbz	x21, LBB0_17
; %bb.8:
	ldr	w1, [x24, #24]
	ldr	w2, [x24, #12]
	mov	x0, x19
	mov	x3, x20
	bl	_bignum_exptmod
	tbnz	x0, #63, LBB0_16
; %bb.9:
	ldr	w1, [x24, #20]
	ldr	w2, [x24, #8]
	mov	x0, x19
	mov	x3, x21
	bl	_bignum_exptmod
	tbnz	x0, #63, LBB0_16
; %bb.10:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_bignum_sub
	tbnz	x0, #63, LBB0_16
; %bb.11:
	ldp	w2, w1, [x24, #12]
	mov	x0, x19
	mov	x3, x19
	bl	_bignum_mulmod
	tbnz	x0, #63, LBB0_16
; %bb.12:
	ldr	w1, [x24, #8]
	mov	x0, x19
	mov	x2, x19
	bl	_bignum_mul
	tbnz	x0, #63, LBB0_16
; %bb.13:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x19
	bl	_bignum_add
	tbz	x0, #63, LBB0_21
	b	LBB0_16
LBB0_14:
	mov	w25, #-1
	b	LBB0_18
LBB0_15:
	mov	x20, #0
	mov	x21, #0
LBB0_16:
	mov	w25, #-1
LBB0_17:
	mov	x0, x19
	bl	_bignum_deinit
	mov	x0, x20
	bl	_bignum_deinit
	mov	x0, x21
	bl	_bignum_deinit
LBB0_18:
	mov	x0, x25
	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_19:
	ldp	w2, w1, [x24]
	mov	x0, x19
	mov	x3, x19
	bl	_bignum_exptmod
	mov	x20, #0
	tbnz	x0, #63, LBB0_23
; %bb.20:
	mov	x21, x20
LBB0_21:
	mov	x0, x24
	bl	_crypto_rsa_get_modulus_len
	mov	x24, x0
	ldr	x8, [x23]
	cmp	x0, x8
	b.ls	LBB0_24
; %bb.22:
	str	x24, [x23]
	b	LBB0_16
LBB0_23:
	mov	w25, #-1
	mov	x21, x20
	b	LBB0_17
LBB0_24:
	mov	x0, x19
	bl	_bignum_get_unsigned_bin_len
	cmp	x0, x24
	b.hi	LBB0_16
; %bb.25:
	str	x24, [x23]
	mov	x0, x22
	mov	w1, #0
	mov	x2, x24
	bl	_os_memset
	mov	x0, x19
	bl	_bignum_get_unsigned_bin_len
	sub	x8, x24, x0
	add	x1, x22, x8, lsl #2
	mov	x0, x19
	mov	x2, #0
	bl	_bignum_get_unsigned_bin
	asr	x25, x0, #63
	b	LBB0_17
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
