	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function php_openssl_matches_common_name
_php_openssl_matches_common_name:       ## @php_openssl_matches_common_name
	.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	%rbx
	subq	$1032, %rsp                     ## imm = 0x408
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	callq	_X509_get_subject_name
	movq	_NID_commonName@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-1056(%rbp), %rdx
	movq	%rax, %rdi
	movl	$1024, %ecx                     ## imm = 0x400
	callq	_X509_NAME_get_text_by_NID
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %ebx
	movslq	%eax, %r15
	leaq	-1056(%rbp), %rdi
	callq	_strlen
	cmpq	%r15, %rax
	jne	LBB0_3
## %bb.4:
	leaq	-1056(%rbp), %rsi
	movq	%r14, %rdi
	callq	_php_openssl_matches_wildcard_name
	movl	$1, %r15d
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movq	_E_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	xorl	%r15d, %r15d
	leaq	-1056(%rbp), %r8
	xorl	%edi, %edi
	movl	%ebx, %ecx
	movq	%r14, %r9
	xorl	%eax, %eax
	callq	_php_error_docref
	jmp	LBB0_6
LBB0_1:
	movq	_E_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	xorl	%eax, %eax
	callq	_php_error_docref
	jmp	LBB0_6
LBB0_3:
	movq	_E_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	xorl	%r15d, %r15d
	leaq	-1056(%rbp), %r8
	xorl	%edi, %edi
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_php_error_docref
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	movl	%r15d, %eax
	addq	$1032, %rsp                     ## imm = 0x408
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_NID_commonName,4,2             ## @NID_commonName
	.comm	_E_WARNING,4,2                  ## @E_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to locate peer certificate CN"

L_.str.1:                               ## @.str.1
	.asciz	"Peer certificate CN=`%.*s' is malformed"

L_.str.2:                               ## @.str.2
	.asciz	"Peer certificate CN=`%.*s' did not match expected CN=`%s'"

	.no_dead_strip	_php_openssl_matches_common_name
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function php_openssl_matches_common_name
_php_openssl_matches_common_name:       ; @php_openssl_matches_common_name
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	sub	sp, sp, #1056
	mov	x19, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	bl	_X509_get_subject_name
Lloh3:
	adrp	x8, _NID_commonName@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NID_commonName@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #24
	mov	w3, #1024
	bl	_X509_NAME_get_text_by_NID
	cmn	w0, #1
	b.eq	LBB0_4
; %bb.1:
	mov	x20, x0
	add	x21, sp, #24
	add	x0, sp, #24
	bl	_strlen
	cmp	x0, w20, sxtw
	b.ne	LBB0_5
; %bb.2:
	add	x21, sp, #24
	add	x1, sp, #24
	mov	x0, x19
	bl	_php_openssl_matches_wildcard_name
	cbz	x0, LBB0_6
; %bb.3:
	mov	w0, #1
	b	LBB0_8
LBB0_4:
Lloh6:
	adrp	x8, _E_WARNING@GOTPAGE
Lloh7:
	ldr	x8, [x8, _E_WARNING@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, #0
	b	LBB0_7
LBB0_5:
Lloh11:
	adrp	x8, _E_WARNING@GOTPAGE
Lloh12:
	ldr	x8, [x8, _E_WARNING@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	stp	x20, x21, [sp]
Lloh14:
	adrp	x2, l_.str.1@PAGE
Lloh15:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, #0
	b	LBB0_7
LBB0_6:
Lloh16:
	adrp	x8, _E_WARNING@GOTPAGE
Lloh17:
	ldr	x8, [x8, _E_WARNING@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	stp	x21, x19, [sp, #8]
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	str	x20, [sp]
Lloh19:
	adrp	x2, l_.str.2@PAGE
Lloh20:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_7:
	bl	_php_error_docref
	mov	w0, #0
LBB0_8:
	ldur	x8, [x29, #-40]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	add	sp, sp, #1056
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_NID_commonName,4,2             ; @NID_commonName
	.comm	_E_WARNING,4,2                  ; @E_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to locate peer certificate CN"

l_.str.1:                               ; @.str.1
	.asciz	"Peer certificate CN=`%.*s' is malformed"

l_.str.2:                               ; @.str.2
	.asciz	"Peer certificate CN=`%.*s' did not match expected CN=`%s'"

	.no_dead_strip	_php_openssl_matches_common_name
.subsections_via_symbols
