	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_rsa_check_pubkey       ## -- Begin function mbedtls_rsa_check_pubkey
	.p2align	4, 0x90
_mbedtls_rsa_check_pubkey:              ## @mbedtls_rsa_check_pubkey
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rdi, %rbx
	movq	8(%rdi), %rcx
	testq	%rcx, %rcx
	je	LBB0_9
## %bb.2:
	testb	$1, (%rax)
	je	LBB0_9
## %bb.3:
	testb	$1, (%rcx)
	je	LBB0_9
## %bb.4:
	movq	%rbx, %rdi
	callq	_mbedtls_mpi_bitlen
	cmpl	$128, %eax
	jl	LBB0_9
## %bb.5:
	movq	%rbx, %rdi
	callq	_mbedtls_mpi_bitlen
	movq	_MBEDTLS_MPI_MAX_BITS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jg	LBB0_9
## %bb.6:
	leaq	8(%rbx), %r14
	movq	%r14, %rdi
	callq	_mbedtls_mpi_bitlen
	cmpl	$2, %eax
	jl	LBB0_9
## %bb.7:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_mbedtls_mpi_cmp_mpi
	testq	%rax, %rax
	js	LBB0_8
LBB0_9:
	movq	_MBEDTLS_ERR_RSA_KEY_CHECK_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_10:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_8:
	xorl	%eax, %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_MBEDTLS_ERR_RSA_KEY_CHECK_FAILED,4,2 ## @MBEDTLS_ERR_RSA_KEY_CHECK_FAILED
	.comm	_MBEDTLS_MPI_MAX_BITS,4,2       ## @MBEDTLS_MPI_MAX_BITS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_rsa_check_pubkey       ; -- Begin function mbedtls_rsa_check_pubkey
	.p2align	2
_mbedtls_rsa_check_pubkey:              ; @mbedtls_rsa_check_pubkey
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0]
	cbz	x8, LBB0_8
; %bb.1:
	mov	x19, x0
	mov	x20, x0
	ldr	x9, [x20, #8]!
	cbz	x9, LBB0_8
; %bb.2:
	ldrb	w8, [x8]
	tbz	w8, #0, LBB0_8
; %bb.3:
	ldrb	w8, [x9]
	tbz	w8, #0, LBB0_8
; %bb.4:
	mov	x0, x19
	bl	_mbedtls_mpi_bitlen
	cmp	w0, #128
	b.lt	LBB0_8
; %bb.5:
	mov	x0, x19
	bl	_mbedtls_mpi_bitlen
Lloh0:
	adrp	x8, _MBEDTLS_MPI_MAX_BITS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MBEDTLS_MPI_MAX_BITS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.gt	LBB0_8
; %bb.6:
	mov	x0, x20
	bl	_mbedtls_mpi_bitlen
	cmp	w0, #2
	b.lt	LBB0_8
; %bb.7:
	mov	x0, x20
	mov	x1, x19
	bl	_mbedtls_mpi_cmp_mpi
	tbnz	x0, #63, LBB0_10
LBB0_8:
Lloh3:
	adrp	x8, _MBEDTLS_ERR_RSA_KEY_CHECK_FAILED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MBEDTLS_ERR_RSA_KEY_CHECK_FAILED@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	w0, #0
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MBEDTLS_ERR_RSA_KEY_CHECK_FAILED,4,2 ; @MBEDTLS_ERR_RSA_KEY_CHECK_FAILED
	.comm	_MBEDTLS_MPI_MAX_BITS,4,2       ; @MBEDTLS_MPI_MAX_BITS
.subsections_via_symbols
