	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hx509_private_key_private_decrypt ## -- Begin function hx509_private_key_private_decrypt
	.p2align	4, 0x90
_hx509_private_key_private_decrypt:     ## @hx509_private_key_private_decrypt
	.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
	movl	%edi, %r14d
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r8)
	movq	(%rcx), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	movq	%r8, %rbx
	movq	%rcx, %r15
	movq	%rsi, %r12
	callq	_RSA_size
	movq	%rax, (%rbx)
	movq	%rax, %rdi
	callq	_malloc
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	(%r12), %rdi
	movq	8(%r12), %rsi
	movq	(%r15), %rcx
	movq	_RSA_PKCS1_PADDING@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	movq	%rax, %rdx
	callq	_RSA_private_decrypt
	movl	%eax, %r15d
	testl	%eax, %eax
	jle	LBB0_9
## %bb.3:
	movl	%r15d, %r14d
	cmpq	%r14, (%rbx)
	jae	LBB0_5
## %bb.4:
	leaq	L_.str.3(%rip), %rdi
	callq	__hx509_abort
LBB0_5:
	movq	%r14, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_6:
	movq	_HX509_PRIVATE_KEY_MISSING@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rcx
	jmp	LBB0_8
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	leaq	L_.str.1(%rip), %rcx
LBB0_8:
	movl	%r14d, %edi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	_hx509_set_error_string
	jmp	LBB0_10
LBB0_9:
	movq	%rbx, %rdi
	callq	_der_free_octet_string
	movq	_HX509_CRYPTO_RSA_PRIVATE_DECRYPT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	leaq	L_.str.2(%rip), %rcx
	movl	%r14d, %edi
	xorl	%esi, %esi
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_hx509_set_error_string
LBB0_10:
	movl	(%rbx), %eax
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HX509_PRIVATE_KEY_MISSING,4,2  ## @HX509_PRIVATE_KEY_MISSING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Private RSA key missing"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"out of memory"

	.comm	_RSA_PKCS1_PADDING,4,2          ## @RSA_PKCS1_PADDING
	.comm	_HX509_CRYPTO_RSA_PRIVATE_DECRYPT,4,2 ## @HX509_CRYPTO_RSA_PRIVATE_DECRYPT
L_.str.2:                               ## @.str.2
	.asciz	"Failed to decrypt using private key: %d"

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

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hx509_private_key_private_decrypt ; -- Begin function hx509_private_key_private_decrypt
	.p2align	2
_hx509_private_key_private_decrypt:     ; @hx509_private_key_private_decrypt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	stp	xzr, xzr, [x4]
	ldr	x0, [x3]
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x4
	mov	x21, x3
	mov	x22, x1
	bl	_RSA_size
	str	x0, [x20]
	bl	_malloc
	str	x0, [x20, #8]
	cbz	x0, LBB0_7
; %bb.2:
	mov	x2, x0
	ldp	x0, x1, [x22]
	ldr	x3, [x21]
Lloh0:
	adrp	x8, _RSA_PKCS1_PADDING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RSA_PKCS1_PADDING@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
	bl	_RSA_private_decrypt
	mov	x21, x0
	cmp	w0, #0
	b.le	LBB0_8
; %bb.3:
	ldr	x8, [x20]
	mov	w19, w21
	cmp	x8, x19
	b.hs	LBB0_5
; %bb.4:
Lloh3:
	adrp	x0, l_.str.3@PAGE
Lloh4:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	__hx509_abort
LBB0_5:
	mov	w0, #0
	str	x19, [x20]
	b	LBB0_10
LBB0_6:
Lloh5:
	adrp	x20, _HX509_PRIVATE_KEY_MISSING@GOTPAGE
Lloh6:
	ldr	x20, [x20, _HX509_PRIVATE_KEY_MISSING@GOTPAGEOFF]
	ldr	w2, [x20]
Lloh7:
	adrp	x3, l_.str@PAGE
Lloh8:
	add	x3, x3, l_.str@PAGEOFF
	b	LBB0_9
LBB0_7:
Lloh9:
	adrp	x20, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x20, [x20, _ENOMEM@GOTPAGEOFF]
	ldr	w2, [x20]
Lloh11:
	adrp	x3, l_.str.1@PAGE
Lloh12:
	add	x3, x3, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_8:
	mov	x0, x20
	bl	_der_free_octet_string
Lloh13:
	adrp	x20, _HX509_CRYPTO_RSA_PRIVATE_DECRYPT@GOTPAGE
Lloh14:
	ldr	x20, [x20, _HX509_CRYPTO_RSA_PRIVATE_DECRYPT@GOTPAGEOFF]
	ldr	w2, [x20]
	str	x21, [sp]
Lloh15:
	adrp	x3, l_.str.2@PAGE
Lloh16:
	add	x3, x3, l_.str.2@PAGEOFF
LBB0_9:
	mov	x0, x19
	mov	w1, #0
	bl	_hx509_set_error_string
	ldr	w0, [x20]
LBB0_10:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_HX509_PRIVATE_KEY_MISSING,4,2  ; @HX509_PRIVATE_KEY_MISSING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Private RSA key missing"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"out of memory"

	.comm	_RSA_PKCS1_PADDING,4,2          ; @RSA_PKCS1_PADDING
	.comm	_HX509_CRYPTO_RSA_PRIVATE_DECRYPT,4,2 ; @HX509_CRYPTO_RSA_PRIVATE_DECRYPT
l_.str.2:                               ; @.str.2
	.asciz	"Failed to decrypt using private key: %d"

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

.subsections_via_symbols
