	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ess_cert_id_v2_new_init
_ess_cert_id_v2_new_init:               ## @ess_cert_id_v2_new_init
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_EVP_MAX_MD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movl	%ebx, -52(%rbp)
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_memset
	xorl	%eax, %eax
	callq	_ESS_CERT_ID_V2_new
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_14
## %bb.1:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_EVP_sha256
	cmpq	%r15, %rax
	je	LBB0_4
## %bb.2:
	xorl	%eax, %eax
	callq	_X509_ALGOR_new
	testq	%rax, %rax
	je	LBB0_14
## %bb.3:
	movq	%rax, %r12
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_X509_ALGOR_set_md
	cmpq	$0, (%r12)
	je	LBB0_15
LBB0_4:
	movq	%r12, 16(%r13)
	leaq	-52(%rbp), %rcx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_X509_digest
	testl	%eax, %eax
	je	LBB0_12
## %bb.5:
	movl	8(%r13), %edi
	movl	-52(%rbp), %edx
	movq	%r14, %rsi
	callq	_ASN1_OCTET_STRING_set
	testl	%eax, %eax
	je	LBB0_12
## %bb.6:
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_17
## %bb.7:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_ESS_ISSUER_SERIAL_new
	movq	%rax, (%r13)
	testq	%rax, %rax
	je	LBB0_13
## %bb.8:
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_GENERAL_NAME_new
	testq	%rax, %rax
	je	LBB0_15
## %bb.9:
	movq	%rax, %rbx
	movq	_GEN_DIRNAME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_X509_get_issuer_name
	movl	%eax, %edi
	callq	_X509_NAME_dup
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:
	movq	(%r13), %rax
	movl	8(%rax), %edi
	movq	%rbx, %rsi
	callq	_sk_GENERAL_NAME_push
	testl	%eax, %eax
	je	LBB0_13
## %bb.11:
	movq	(%r13), %rax
	movq	(%rax), %rdi
	callq	_ASN1_INTEGER_free
	movq	%r14, %rdi
	callq	_X509_get_serialNumber
	movl	%eax, %edi
	callq	_ASN1_INTEGER_dup
	movq	(%r13), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	jne	LBB0_17
LBB0_12:
	xorl	%ebx, %ebx
LBB0_13:
	xorl	%r12d, %r12d
	jmp	LBB0_16
LBB0_14:
	xorl	%r12d, %r12d
LBB0_15:
	xorl	%ebx, %ebx
LBB0_16:
	movq	%r12, %rdi
	callq	_X509_ALGOR_free
	movq	%rbx, %rdi
	callq	_GENERAL_NAME_free
	movq	%r13, %rdi
	callq	_ESS_CERT_ID_V2_free
	movq	_TS_F_ESS_CERT_ID_V2_NEW_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_MALLOC_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_TSerr
	xorl	%r13d, %r13d
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_21
## %bb.18:
	movq	%r13, %rax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EVP_MAX_MD_SIZE,4,2            ## @EVP_MAX_MD_SIZE
	.comm	_GEN_DIRNAME,4,2                ## @GEN_DIRNAME
	.comm	_TS_F_ESS_CERT_ID_V2_NEW_INIT,4,2 ## @TS_F_ESS_CERT_ID_V2_NEW_INIT
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ## @ERR_R_MALLOC_FAILURE
	.no_dead_strip	_ess_cert_id_v2_new_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ess_cert_id_v2_new_init
_ess_cert_id_v2_new_init:               ; @ess_cert_id_v2_new_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	sub	sp, sp, #16
	mov	x21, x2
	mov	x20, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _EVP_MAX_MD_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EVP_MAX_MD_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x9, x2
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x2, #15
	and	x9, x9, #0x1fffffff0
	sub	x23, x8, x9
	mov	sp, x23
	stur	w2, [x29, #-60]
	mov	x0, x23
	mov	w1, #0
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_memset
	bl	_ESS_CERT_ID_V2_new
	mov	x19, x0
	cbz	x0, LBB0_14
; %bb.1:
	bl	_EVP_sha256
	cmp	x0, x22
	b.eq	LBB0_5
; %bb.2:
	bl	_X509_ALGOR_new
	mov	x24, x0
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x24
	mov	x1, x22
	bl	_X509_ALGOR_set_md
	ldr	x8, [x24]
	cbnz	x8, LBB0_6
LBB0_4:
	mov	x21, #0
	b	LBB0_16
LBB0_5:
	mov	x24, #0
LBB0_6:
	str	x24, [x19, #16]
	sub	x3, x29, #60
	mov	x0, x20
	mov	x1, x22
	mov	x2, x23
	bl	_X509_digest
	cbz	w0, LBB0_14
; %bb.7:
	ldr	w0, [x19, #8]
	ldur	w2, [x29, #-60]
	mov	x1, x23
	bl	_ASN1_OCTET_STRING_set
	cbz	w0, LBB0_14
; %bb.8:
	cbz	w21, LBB0_17
; %bb.9:
	bl	_ESS_ISSUER_SERIAL_new
	str	x0, [x19]
	cbz	x0, LBB0_14
; %bb.10:
	bl	_GENERAL_NAME_new
	mov	x21, x0
	cbz	x0, LBB0_15
; %bb.11:
Lloh8:
	adrp	x8, _GEN_DIRNAME@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GEN_DIRNAME@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x21, #8]
	mov	x0, x20
	bl	_X509_get_issuer_name
	bl	_X509_NAME_dup
	str	x0, [x21]
	cbz	x0, LBB0_15
; %bb.12:
	ldr	x8, [x19]
	ldr	w0, [x8, #8]
	mov	x1, x21
	bl	_sk_GENERAL_NAME_push
	cbz	w0, LBB0_15
; %bb.13:
	ldr	x8, [x19]
	ldr	x0, [x8]
	bl	_ASN1_INTEGER_free
	mov	x0, x20
	bl	_X509_get_serialNumber
	bl	_ASN1_INTEGER_dup
	ldr	x8, [x19]
	str	x0, [x8]
	cbnz	x0, LBB0_17
LBB0_14:
	mov	x21, #0
LBB0_15:
	mov	x24, #0
LBB0_16:
	mov	x0, x24
	bl	_X509_ALGOR_free
	mov	x0, x21
	bl	_GENERAL_NAME_free
	mov	x0, x19
	bl	_ESS_CERT_ID_V2_free
Lloh11:
	adrp	x8, _TS_F_ESS_CERT_ID_V2_NEW_INIT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TS_F_ESS_CERT_ID_V2_NEW_INIT@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x8, _ERR_R_MALLOC_FAILURE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ERR_R_MALLOC_FAILURE@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_TSerr
	mov	x19, #0
LBB0_17:
	ldur	x8, [x29, #-56]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.18:
	mov	x0, x19
	sub	sp, x29, #48
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_EVP_MAX_MD_SIZE,4,2            ; @EVP_MAX_MD_SIZE
	.comm	_GEN_DIRNAME,4,2                ; @GEN_DIRNAME
	.comm	_TS_F_ESS_CERT_ID_V2_NEW_INIT,4,2 ; @TS_F_ESS_CERT_ID_V2_NEW_INIT
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ; @ERR_R_MALLOC_FAILURE
	.no_dead_strip	_ess_cert_id_v2_new_init
.subsections_via_symbols
