	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rsa_item_sign
_rsa_item_sign:                         ## @rsa_item_sign
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r12
	movq	%rcx, %r14
	callq	_EVP_MD_CTX_pkey_ctx
	movq	%rax, %rbx
	leaq	-36(%rbp), %rsi
	movq	%rax, %rdi
	callq	_EVP_PKEY_CTX_get_rsa_padding
	testq	%rax, %rax
	jle	LBB0_11
## %bb.1:
	movl	-36(%rbp), %ecx
	movq	_RSA_PKCS1_PADDING@GOTPCREL(%rip), %rdx
	movl	$2, %eax
	cmpl	(%rdx), %ecx
	je	LBB0_12
## %bb.2:
	movq	_RSA_PKCS1_PSS_PADDING@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_12
## %bb.3:
	movq	%rbx, %rdi
	callq	_rsa_ctx_to_pss_string
	testq	%rax, %rax
	je	LBB0_11
## %bb.4:
	movq	%rax, %r15
	testq	%r12, %r12
	je	LBB0_7
## %bb.5:
	movq	%r15, %rdi
	callq	_ASN1_STRING_dup
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:
	movq	%rax, %rbx
	movq	_EVP_PKEY_RSA_PSS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_OBJ_nid2obj
	movq	_V_ASN1_SEQUENCE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	movq	%rbx, %rcx
	callq	_X509_ALGOR_set0
LBB0_7:
	movq	_EVP_PKEY_RSA_PSS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_OBJ_nid2obj
	movq	_V_ASN1_SEQUENCE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	movq	%r15, %rcx
	callq	_X509_ALGOR_set0
	movl	$3, %eax
	jmp	LBB0_12
LBB0_10:
	movq	%r15, %rdi
	callq	_ASN1_STRING_free
LBB0_11:
	xorl	%eax, %eax
LBB0_12:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RSA_PKCS1_PADDING,4,2          ## @RSA_PKCS1_PADDING
	.comm	_RSA_PKCS1_PSS_PADDING,4,2      ## @RSA_PKCS1_PSS_PADDING
	.comm	_EVP_PKEY_RSA_PSS,4,2           ## @EVP_PKEY_RSA_PSS
	.comm	_V_ASN1_SEQUENCE,4,2            ## @V_ASN1_SEQUENCE
	.no_dead_strip	_rsa_item_sign
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rsa_item_sign
_rsa_item_sign:                         ; @rsa_item_sign
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x4
	mov	x19, x3
	bl	_EVP_MD_CTX_pkey_ctx
	mov	x21, x0
	add	x1, sp, #12
	bl	_EVP_PKEY_CTX_get_rsa_padding
	cmp	x0, #1
	b.lt	LBB0_9
; %bb.1:
	ldr	w8, [sp, #12]
Lloh0:
	adrp	x9, _RSA_PKCS1_PADDING@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RSA_PKCS1_PADDING@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _RSA_PKCS1_PSS_PADDING@GOTPAGE
Lloh4:
	ldr	x10, [x10, _RSA_PKCS1_PSS_PADDING@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w8, w10, #0, ne
	b.eq	LBB0_3
; %bb.2:
	mov	w0, #2
	b	LBB0_10
LBB0_3:
	mov	x0, x21
	bl	_rsa_ctx_to_pss_string
	cbz	x0, LBB0_10
; %bb.4:
	mov	x21, x0
Lloh6:
	adrp	x24, _EVP_PKEY_RSA_PSS@GOTPAGE
Lloh7:
	ldr	x24, [x24, _EVP_PKEY_RSA_PSS@GOTPAGEOFF]
Lloh8:
	adrp	x23, _V_ASN1_SEQUENCE@GOTPAGE
Lloh9:
	ldr	x23, [x23, _V_ASN1_SEQUENCE@GOTPAGEOFF]
	cbz	x20, LBB0_7
; %bb.5:
	mov	x0, x21
	bl	_ASN1_STRING_dup
	cbz	x0, LBB0_8
; %bb.6:
	mov	x22, x0
	ldr	w0, [x24]
	bl	_OBJ_nid2obj
	mov	x1, x0
	ldr	w2, [x23]
	mov	x0, x20
	mov	x3, x22
	bl	_X509_ALGOR_set0
LBB0_7:
	ldr	w0, [x24]
	bl	_OBJ_nid2obj
	mov	x1, x0
	ldr	w2, [x23]
	mov	x0, x19
	mov	x3, x21
	bl	_X509_ALGOR_set0
	mov	w0, #3
	b	LBB0_10
LBB0_8:
	mov	x0, x21
	bl	_ASN1_STRING_free
LBB0_9:
	mov	w0, #0
LBB0_10:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_RSA_PKCS1_PADDING,4,2          ; @RSA_PKCS1_PADDING
	.comm	_RSA_PKCS1_PSS_PADDING,4,2      ; @RSA_PKCS1_PSS_PADDING
	.comm	_EVP_PKEY_RSA_PSS,4,2           ; @EVP_PKEY_RSA_PSS
	.comm	_V_ASN1_SEQUENCE,4,2            ; @V_ASN1_SEQUENCE
	.no_dead_strip	_rsa_item_sign
.subsections_via_symbols
