	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rsa_verify_signature
_rsa_verify_signature:                  ## @rsa_verify_signature
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movq	%r8, %r13
	movq	%rdx, %rbx
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movl	%edi, %r15d
	leaq	-88(%rbp), %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	(%rbx), %rax
	movq	%rax, -96(%rbp)
	movl	8(%rbx), %eax
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	movslq	%ecx, %rdx
	movq	%rdx, -64(%rbp)
	leaq	-96(%rbp), %rsi
	xorl	%edi, %edi
	callq	_d2i_RSAPublicKey
	testq	%rax, %rax
	je	LBB0_25
## %bb.1:
	movq	%rax, %r12
	movq	%r13, %rbx
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	%rax, %rdi
	callq	_RSA_size
	movl	%eax, %r13d
	movl	%eax, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movq	%rax, %r15
	movq	(%r14), %rdi
	movq	8(%r14), %rsi
	movq	_RSA_PKCS1_PADDING@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rdx
	movq	%r12, %rcx
	callq	_RSA_public_decrypt
	movl	%eax, %r14d
	testl	%eax, %eax
	jle	LBB0_5
## %bb.6:
	cmpl	%r13d, %r14d
	jle	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %rdi
	callq	__hx509_abort
LBB0_8:
	movq	_RA_RSA_USES_DIGEST_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, (%rcx)
	movq	%rbx, %r13
	je	LBB0_21
## %bb.9:
	leaq	-88(%rbp), %rdx
	leaq	-64(%rbp), %rcx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_decode_DigestInfo
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_free
	testl	%ebx, %ebx
	jne	LBB0_27
## %bb.10:
	movl	%r14d, %eax
	cmpq	%rax, -64(%rbp)
	jne	LBB0_11
## %bb.12:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rsi
	testq	%rsi, %rsi
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	je	LBB0_17
## %bb.13:
	leaq	-72(%rbp), %rdi
	callq	_der_heim_oid_cmp
	testq	%rax, %rax
	je	LBB0_17
## %bb.14:
	movq	_HX509_CRYPTO_OID_MISMATCH@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str.4(%rip), %rcx
	jmp	LBB0_15
LBB0_25:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str(%rip), %rcx
	movl	%r15d, %edi
	xorl	%esi, %esi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_hx509_set_error_string
	leaq	-88(%rbp), %rdi
	callq	_free_DigestInfo
	jmp	LBB0_28
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str(%rip), %rcx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	jmp	LBB0_16
LBB0_5:
	movq	_HX509_CRYPTO_SIG_INVALID_FORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str.1(%rip), %rcx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	xorl	%esi, %esi
	movl	%ebx, %edx
	movl	%r14d, %r8d
	xorl	%eax, %eax
	callq	_hx509_set_error_string
	movq	%r15, %rdi
	callq	_free
	jmp	LBB0_27
LBB0_21:
	movl	%r14d, %eax
	cmpq	%rax, (%r13)
	jne	LBB0_23
## %bb.22:
	movq	8(%r13), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_ct_memcmp
	testq	%rax, %rax
	je	LBB0_24
LBB0_23:
	movq	_HX509_CRYPTO_SIG_INVALID_FORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str.7(%rip), %rcx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	jmp	LBB0_16
LBB0_11:
	movq	_HX509_CRYPTO_SIG_INVALID_FORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str.3(%rip), %rcx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	jmp	LBB0_16
LBB0_17:
	movq	-80(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_26
## %bb.18:
	cmpl	$2, (%rax)
	jne	LBB0_20
## %bb.19:
	movl	4(%rax), %edi
	leaq	l_.str.5(%rip), %rsi
	movl	$2, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_26
LBB0_20:
	movq	_HX509_CRYPTO_SIG_INVALID_FORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str.6(%rip), %rcx
LBB0_15:
	movl	%r14d, %edi
LBB0_16:
	xorl	%esi, %esi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_hx509_set_error_string
LBB0_27:
	leaq	-88(%rbp), %rdi
	callq	_free_DigestInfo
	movq	%r12, %rdi
	callq	_RSA_free
LBB0_28:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	movq	%r15, %rdi
	callq	_free
	xorl	%ebx, %ebx
	jmp	LBB0_27
LBB0_26:
	leaq	-80(%rbp), %rdx
	xorl	%ebx, %ebx
	leaq	-88(%rbp), %r8
	movl	%r14d, %edi
	xorl	%esi, %esi
	movq	%r13, %rcx
	callq	__hx509_verify_signature
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"out of memory"

	.comm	_RSA_PKCS1_PADDING,4,2          ## @RSA_PKCS1_PADDING
	.comm	_HX509_CRYPTO_SIG_INVALID_FORMAT,4,2 ## @HX509_CRYPTO_SIG_INVALID_FORMAT
L_.str.1:                               ## @.str.1
	.asciz	"RSA public decrypt failed: %d"

L_.str.2:                               ## @.str.2
	.asciz	"internal rsa decryption failure: ret > tosize"

	.comm	_RA_RSA_USES_DIGEST_INFO,4,2    ## @RA_RSA_USES_DIGEST_INFO
L_.str.3:                               ## @.str.3
	.asciz	"size from decryption mismatch"

	.comm	_HX509_CRYPTO_OID_MISMATCH,4,2  ## @HX509_CRYPTO_OID_MISMATCH
L_.str.4:                               ## @.str.4
	.asciz	"object identifier in RSA sig mismatch"

	.section	__TEXT,__const
l_.str.5:                               ## @.str.5
	.asciz	"\005\000"

	.section	__TEXT,__cstring,cstring_literals
L_.str.6:                               ## @.str.6
	.asciz	"Extra parameters inside RSA signature"

L_.str.7:                               ## @.str.7
	.asciz	"RSA Signature incorrect"

	.no_dead_strip	_rsa_verify_signature
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rsa_verify_signature
_rsa_verify_signature:                  ; @rsa_verify_signature
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x22, x5
	mov	x21, x4
	mov	x19, x2
	mov	x23, x1
	mov	x20, x0
	add	x0, sp, #24
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	ldr	x10, [x19]
	ldr	w8, [x19, #8]
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	sbfx	x2, x8, #3, #29
	stp	x10, x2, [sp, #8]
	add	x1, sp, #8
	mov	x0, #0
	bl	_d2i_RSAPublicKey
	cbz	x0, LBB0_11
; %bb.1:
	mov	x19, x0
	bl	_RSA_size
	mov	x26, x0
	bl	_malloc
	cbz	x0, LBB0_12
; %bb.2:
	mov	x24, x0
	ldp	x0, x1, [x22]
Lloh0:
	adrp	x8, _RSA_PKCS1_PADDING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RSA_PKCS1_PADDING@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
	mov	x2, x24
	mov	x3, x19
	bl	_RSA_public_decrypt
	mov	x25, x0
	cmp	w0, #0
	b.le	LBB0_13
; %bb.3:
	cmp	w25, w26
	b.le	LBB0_5
; %bb.4:
Lloh3:
	adrp	x0, l_.str.2@PAGE
Lloh4:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	__hx509_abort
LBB0_5:
	ldr	w8, [x23]
Lloh5:
	adrp	x9, _RA_RSA_USES_DIGEST_INFO@GOTPAGE
Lloh6:
	ldr	x9, [x9, _RA_RSA_USES_DIGEST_INFO@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.6:
	add	x2, sp, #24
	add	x3, sp, #16
	mov	x0, x24
	mov	x1, x25
	bl	_decode_DigestInfo
	mov	x22, x0
	mov	x0, x24
	bl	_free
	cbnz	w22, LBB0_23
; %bb.7:
	ldr	x8, [sp, #16]
	cmp	x8, w25, uxtw
	b.ne	LBB0_17
; %bb.8:
	ldr	x1, [x23, #8]
	cbz	x1, LBB0_18
; %bb.9:
	add	x8, sp, #24
	add	x0, x8, #16
	bl	_der_heim_oid_cmp
	cbz	x0, LBB0_18
; %bb.10:
Lloh8:
	adrp	x8, _HX509_CRYPTO_OID_MISMATCH@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HX509_CRYPTO_OID_MISMATCH@GOTPAGEOFF]
Lloh10:
	ldr	w22, [x8]
Lloh11:
	adrp	x3, l_.str.4@PAGE
Lloh12:
	add	x3, x3, l_.str.4@PAGEOFF
	b	LBB0_22
LBB0_11:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w22, [x8]
Lloh16:
	adrp	x3, l_.str@PAGE
Lloh17:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x20
	mov	w1, #0
	mov	x2, x22
	bl	_hx509_set_error_string
	add	x0, sp, #24
	bl	_free_DigestInfo
	b	LBB0_24
LBB0_12:
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh20:
	ldr	w22, [x8]
Lloh21:
	adrp	x3, l_.str@PAGE
Lloh22:
	add	x3, x3, l_.str@PAGEOFF
	b	LBB0_22
LBB0_13:
Lloh23:
	adrp	x8, _HX509_CRYPTO_SIG_INVALID_FORMAT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _HX509_CRYPTO_SIG_INVALID_FORMAT@GOTPAGEOFF]
Lloh25:
	ldr	w22, [x8]
	str	x25, [sp]
Lloh26:
	adrp	x3, l_.str.1@PAGE
Lloh27:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	w1, #0
	mov	x2, x22
	bl	_hx509_set_error_string
	mov	x0, x24
	bl	_free
	b	LBB0_23
LBB0_14:
	ldr	x8, [x21]
	cmp	x8, w25, uxtw
	b.ne	LBB0_16
; %bb.15:
	ldr	x1, [x21, #8]
	mov	x0, x24
	mov	x2, x25
	bl	_ct_memcmp
	cbz	x0, LBB0_25
LBB0_16:
Lloh28:
	adrp	x8, _HX509_CRYPTO_SIG_INVALID_FORMAT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _HX509_CRYPTO_SIG_INVALID_FORMAT@GOTPAGEOFF]
Lloh30:
	ldr	w22, [x8]
Lloh31:
	adrp	x3, l_.str.7@PAGE
Lloh32:
	add	x3, x3, l_.str.7@PAGEOFF
	b	LBB0_22
LBB0_17:
Lloh33:
	adrp	x8, _HX509_CRYPTO_SIG_INVALID_FORMAT@GOTPAGE
Lloh34:
	ldr	x8, [x8, _HX509_CRYPTO_SIG_INVALID_FORMAT@GOTPAGEOFF]
Lloh35:
	ldr	w22, [x8]
Lloh36:
	adrp	x3, l_.str.3@PAGE
Lloh37:
	add	x3, x3, l_.str.3@PAGEOFF
	b	LBB0_22
LBB0_18:
	ldr	x8, [sp, #32]
	cbz	x8, LBB0_26
; %bb.19:
	ldr	w9, [x8]
	cmp	w9, #2
	b.ne	LBB0_21
; %bb.20:
	ldr	w0, [x8, #4]
Lloh38:
	adrp	x1, l_.str.5@PAGE
Lloh39:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w2, #2
	bl	_memcmp
	cbz	x0, LBB0_26
LBB0_21:
Lloh40:
	adrp	x8, _HX509_CRYPTO_SIG_INVALID_FORMAT@GOTPAGE
Lloh41:
	ldr	x8, [x8, _HX509_CRYPTO_SIG_INVALID_FORMAT@GOTPAGEOFF]
Lloh42:
	ldr	w22, [x8]
Lloh43:
	adrp	x3, l_.str.6@PAGE
Lloh44:
	add	x3, x3, l_.str.6@PAGEOFF
LBB0_22:
	mov	x0, x20
	mov	w1, #0
	mov	x2, x22
	bl	_hx509_set_error_string
LBB0_23:
	add	x0, sp, #24
	bl	_free_DigestInfo
	mov	x0, x19
	bl	_RSA_free
LBB0_24:
	mov	x0, x22
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_25:
	mov	x0, x24
	bl	_free
	b	LBB0_27
LBB0_26:
	add	x8, sp, #24
	add	x2, x8, #8
	add	x4, sp, #24
	mov	x0, x20
	mov	x1, #0
	mov	x3, x21
	bl	__hx509_verify_signature
LBB0_27:
	mov	w22, #0
	b	LBB0_23
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"out of memory"

	.comm	_RSA_PKCS1_PADDING,4,2          ; @RSA_PKCS1_PADDING
	.comm	_HX509_CRYPTO_SIG_INVALID_FORMAT,4,2 ; @HX509_CRYPTO_SIG_INVALID_FORMAT
l_.str.1:                               ; @.str.1
	.asciz	"RSA public decrypt failed: %d"

l_.str.2:                               ; @.str.2
	.asciz	"internal rsa decryption failure: ret > tosize"

	.comm	_RA_RSA_USES_DIGEST_INFO,4,2    ; @RA_RSA_USES_DIGEST_INFO
l_.str.3:                               ; @.str.3
	.asciz	"size from decryption mismatch"

	.comm	_HX509_CRYPTO_OID_MISMATCH,4,2  ; @HX509_CRYPTO_OID_MISMATCH
l_.str.4:                               ; @.str.4
	.asciz	"object identifier in RSA sig mismatch"

	.section	__TEXT,__const
l_.str.5:                               ; @.str.5
	.asciz	"\005\000"

	.section	__TEXT,__cstring,cstring_literals
l_.str.6:                               ; @.str.6
	.asciz	"Extra parameters inside RSA signature"

l_.str.7:                               ; @.str.7
	.asciz	"RSA Signature incorrect"

	.no_dead_strip	_rsa_verify_signature
.subsections_via_symbols
