	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tls_parse_cert                 ## -- Begin function tls_parse_cert
	.p2align	4, 0x90
_tls_parse_cert:                        ## @tls_parse_cert
	.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
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	_MSG_MSGDUMP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	movq	%r12, %rcx
	callq	_wpa_hexdump
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_crypto_public_key_from_cert
	movq	%rax, (%r14)
	xorl	%r15d, %r15d
	testq	%rax, %rax
	jne	LBB0_6
## %bb.1:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_x509_certificate_parse
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %rbx
	movl	(%rax), %esi
	movl	4(%rax), %edi
	callq	_crypto_public_key_import
	movq	%rax, (%r14)
	movq	%rbx, %rdi
	callq	_x509_certificate_free
	cmpq	$0, (%r14)
	jne	LBB0_6
## %bb.4:
	leaq	L_.str.2(%rip), %rsi
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %edi
	callq	_wpa_printf
	movl	$-1, %r15d
LBB0_6:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_MSGDUMP,4,2                ## @MSG_MSGDUMP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TLSv1: Parse ASN.1 DER certificate"

	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"TLSv1: Failed to parse X.509 certificate"

	.comm	_MSG_ERROR,4,2                  ## @MSG_ERROR
L_.str.2:                               ## @.str.2
	.asciz	"TLSv1: Failed to import server public key"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tls_parse_cert                 ; -- Begin function tls_parse_cert
	.p2align	2
_tls_parse_cert:                        ; @tls_parse_cert
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _MSG_MSGDUMP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSG_MSGDUMP@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	mov	x3, x20
	bl	_wpa_hexdump
	mov	x0, x21
	mov	x1, x20
	bl	_crypto_public_key_from_cert
	str	x0, [x19]
	cbz	x0, LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_7
LBB0_2:
	mov	x0, x21
	mov	x1, x20
	bl	_x509_certificate_parse
	cbz	x0, LBB0_5
; %bb.3:
	mov	x20, x0
	ldr	w0, [x0, #4]
	ldr	w1, [x20]
	bl	_crypto_public_key_import
	str	x0, [x19]
	mov	x0, x20
	bl	_x509_certificate_free
	ldr	x8, [x19]
	cbnz	x8, LBB0_1
; %bb.4:
Lloh5:
	adrp	x1, l_.str.2@PAGE
Lloh6:
	add	x1, x1, l_.str.2@PAGEOFF
Lloh7:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
Lloh11:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
	bl	_wpa_printf
	mov	w0, #-1
LBB0_7:
	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
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_MSGDUMP,4,2                ; @MSG_MSGDUMP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TLSv1: Parse ASN.1 DER certificate"

	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"TLSv1: Failed to parse X.509 certificate"

	.comm	_MSG_ERROR,4,2                  ; @MSG_ERROR
l_.str.2:                               ; @.str.2
	.asciz	"TLSv1: Failed to import server public key"

.subsections_via_symbols
