	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function Cert_clone
_Cert_clone:                            ## @Cert_clone
	.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	%rsi, %r14
	movq	%rdi, %r12
	testq	%rdx, %rdx
	je	LBB0_3
## %bb.1:
	movl	$4, %edi
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_Context_CreateLinkContext
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_2
	jmp	LBB0_6
LBB0_3:
	movl	$0, -36(%rbp)
	movq	_cert_vtbl@GOTPCREL(%rip), %rsi
	movl	$4, %edi
	movq	%r14, %rdx
	callq	_Context_CreateDataContext
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	%rax, %rbx
	leaq	8(%rax), %r15
	leaq	8(%r12), %rsi
	movq	%r15, %rdi
	callq	_Context_CopyProperties
	movl	28(%r12), %eax
	movl	%eax, 28(%rbx)
	movl	20(%r12), %edi
	callq	_CryptMemAlloc
	movl	%eax, 24(%rbx)
	movl	20(%r12), %edx
	movl	24(%r12), %esi
	movl	%eax, %edi
	callq	_memcpy
	movl	20(%r12), %ecx
	movl	%ecx, 20(%rbx)
	movl	24(%rbx), %edx
	movl	28(%rbx), %edi
	movq	_X509_CERT_TO_BE_SIGNED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CRYPT_DECODE_ALLOC_FLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%rbx, %rax
	addq	$16, %rax
	leaq	-36(%rbp), %r10
	xorl	%r9d, %r9d
	pushq	%r10
	pushq	%rax
	callq	_CryptDecodeObjectEx
	addq	$16, %rsp
	testq	%rax, %rax
	je	LBB0_5
LBB0_2:
	movq	%r14, 8(%rbx)
	jmp	LBB0_7
LBB0_5:
	movq	%r15, %rdi
	callq	_CertFreeCertificateContext
LBB0_6:
	xorl	%ebx, %ebx
LBB0_7:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cert_vtbl,4,2                  ## @cert_vtbl
	.comm	_X509_CERT_TO_BE_SIGNED,4,2     ## @X509_CERT_TO_BE_SIGNED
	.comm	_CRYPT_DECODE_ALLOC_FLAG,4,2    ## @CRYPT_DECODE_ALLOC_FLAG
	.no_dead_strip	_Cert_clone
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function Cert_clone
_Cert_clone:                            ; @Cert_clone
	.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, x1
	mov	x22, x0
	cbz	x2, LBB0_2
; %bb.1:
	mov	w0, #4
	mov	x1, x22
	mov	x2, x19
	bl	_Context_CreateLinkContext
	mov	x20, x0
	cbnz	x0, LBB0_4
	b	LBB0_5
LBB0_2:
	str	wzr, [sp, #12]
Lloh0:
	adrp	x1, _cert_vtbl@GOTPAGE
Lloh1:
	ldr	x1, [x1, _cert_vtbl@GOTPAGEOFF]
	mov	w0, #4
	mov	x2, x19
	bl	_Context_CreateDataContext
	mov	x20, x0
	cbz	x0, LBB0_5
; %bb.3:
	add	x21, x20, #8
	add	x1, x22, #8
	mov	x0, x21
	bl	_Context_CopyProperties
	ldr	w8, [x22, #28]
	str	w8, [x20, #28]
	ldr	w0, [x22, #20]
	bl	_CryptMemAlloc
	str	w0, [x20, #24]
	ldp	w2, w1, [x22, #20]
	bl	_memcpy
	ldr	w3, [x22, #20]
	str	w3, [x20, #20]
Lloh2:
	adrp	x8, _X509_CERT_TO_BE_SIGNED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _X509_CERT_TO_BE_SIGNED@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	ldp	w2, w0, [x20, #24]
Lloh5:
	adrp	x8, _CRYPT_DECODE_ALLOC_FLAG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CRYPT_DECODE_ALLOC_FLAG@GOTPAGEOFF]
Lloh7:
	ldr	w4, [x8]
	add	x6, x20, #16
	add	x7, sp, #12
	mov	x5, #0
	bl	_CryptDecodeObjectEx
	cbz	x0, LBB0_6
LBB0_4:
	str	x19, [x20, #8]
LBB0_5:
	mov	x0, x20
	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
LBB0_6:
	mov	x0, x21
	bl	_CertFreeCertificateContext
	mov	x20, #0
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_cert_vtbl,4,2                  ; @cert_vtbl
	.comm	_X509_CERT_TO_BE_SIGNED,4,2     ; @X509_CERT_TO_BE_SIGNED
	.comm	_CRYPT_DECODE_ALLOC_FLAG,4,2    ; @CRYPT_DECODE_ALLOC_FLAG
	.no_dead_strip	_Cert_clone
.subsections_via_symbols
