	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tls_verify_signature           ## -- Begin function tls_verify_signature
	.p2align	4, 0x90
_tls_verify_signature:                  ## @tls_verify_signature
	.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
	movq	%rcx, %r15
	movq	16(%rbp), %rcx
	cmpq	$1, %r9
	jg	LBB0_2
## %bb.1:
	movq	_TLS_ALERT_DECODE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_18
LBB0_2:
	movq	%r9, %rbx
	movq	%r8, %r12
	movq	%rsi, %r13
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%r8, %rdi
	callq	_WPA_GET_BE16
	leaq	8(%r12), %r14
	leaq	-8(,%rbx,4), %rcx
	sarq	$2, %rcx
	cltq
	cmpq	%rax, %rcx
	jge	LBB0_4
## %bb.3:
	movq	_TLS_ALERT_DECODE_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_4:
	jle	LBB0_6
## %bb.5:
	movq	_MSG_MSGDUMP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	leaq	(%r14,%rax,4), %r12
	subl	%eax, %ecx
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_wpa_hexdump
	jmp	LBB0_7
LBB0_6:
	leaq	(%r12,%rbx,4), %r12
LBB0_7:
	movq	_MSG_MSGDUMP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	subq	%r14, %r12
	sarq	$2, %r12
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdx
	movl	%r12d, %ecx
	callq	_wpa_hexdump
	testq	%r13, %r13
	je	LBB0_13
## %bb.8:
	movq	%r12, -48(%rbp)
	movl	%r12d, %edi
	callq	_os_malloc
	testq	%rax, %rax
	je	LBB0_14
## %bb.9:
	movq	%rax, %rbx
	leaq	-48(%rbp), %r8
	movq	%r13, %rdi
	movq	%r14, %rsi
	movl	%r12d, %edx
	movq	%rax, %rcx
	callq	_crypto_public_key_decrypt_pkcs1
	testq	%rax, %rax
	js	LBB0_15
## %bb.10:
	movq	_MSG_MSGDUMP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-48(%rbp), %rcx
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdx
	callq	_wpa_hexdump_key
	cmpq	%r15, -48(%rbp)
	jne	LBB0_12
## %bb.11:
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r15, %rdx
	callq	_os_memcmp_const
	testq	%rax, %rax
	je	LBB0_20
LBB0_12:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_16
LBB0_13:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_wpa_printf
LBB0_14:
	movq	_TLS_ALERT_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_15:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
LBB0_16:
	callq	_wpa_printf
	movq	%rbx, %rdi
	callq	_os_free
	movq	_TLS_ALERT_DECRYPT_ERROR@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %eax
	movq	16(%rbp), %rcx
LBB0_18:
	movl	%eax, (%rcx)
	movl	$-1, %eax
LBB0_19:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movq	%rbx, %rdi
	callq	_os_free
	xorl	%eax, %eax
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_TLS_ALERT_DECODE_ERROR,4,2     ## @TLS_ALERT_DECODE_ERROR
	.comm	_MSG_MSGDUMP,4,2                ## @MSG_MSGDUMP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Additional data after Signature"

L_.str.1:                               ## @.str.1
	.asciz	"TLSv1: Signature"

	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
L_.str.2:                               ## @.str.2
	.asciz	"TLSv1: No public key to verify signature"

	.comm	_TLS_ALERT_INTERNAL_ERROR,4,2   ## @TLS_ALERT_INTERNAL_ERROR
L_.str.3:                               ## @.str.3
	.asciz	"TLSv1: Failed to decrypt signature"

	.comm	_TLS_ALERT_DECRYPT_ERROR,4,2    ## @TLS_ALERT_DECRYPT_ERROR
L_.str.4:                               ## @.str.4
	.asciz	"TLSv1: Decrypted Signature"

L_.str.5:                               ## @.str.5
	.asciz	"TLSv1: Invalid Signature in CertificateVerify - did not match calculated hash"

	.comm	_TLS_VERSION_1_2,4,2            ## @TLS_VERSION_1_2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tls_verify_signature           ; -- Begin function tls_verify_signature
	.p2align	2
_tls_verify_signature:                  ; @tls_verify_signature
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x6
	cmp	x5, #1
	b.le	LBB0_2
; %bb.1:
	mov	x23, x5
	mov	x25, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x0, x4
	bl	_WPA_GET_BE16
                                        ; kill: def $w0 killed $w0 def $x0
	lsl	x8, x23, #2
	sub	x9, x8, #8
	asr	x10, x9, #2
	sxtw	x8, w0
	cmp	x10, x8
	b.ge	LBB0_5
LBB0_2:
Lloh0:
	adrp	x8, _TLS_ALERT_DECODE_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TLS_ALERT_DECODE_ERROR@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	str	w8, [x19]
	mov	w0, #-1
LBB0_4:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_5:
	add	x24, x25, #8
Lloh2:
	adrp	x26, _MSG_MSGDUMP@GOTPAGE
Lloh3:
	ldr	x26, [x26, _MSG_MSGDUMP@GOTPAGEOFF]
	b.le	LBB0_7
; %bb.6:
	lsr	x9, x9, #2
	ldr	w0, [x26]
	add	x23, x24, x8, lsl #2
	sub	w3, w9, w8
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	bl	_wpa_hexdump
	b	LBB0_8
LBB0_7:
	add	x23, x25, x23, lsl #2
LBB0_8:
	ldr	w0, [x26]
	sub	x8, x23, x24
	asr	x25, x8, #2
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x24
	mov	x3, x25
	bl	_wpa_hexdump
	cbz	x22, LBB0_14
; %bb.9:
	str	x25, [sp, #8]
	mov	x0, x25
	bl	_os_malloc
	cbz	x0, LBB0_15
; %bb.10:
	mov	x23, x0
	add	x4, sp, #8
	mov	x0, x22
	mov	x1, x24
	mov	x2, x25
	mov	x3, x23
	bl	_crypto_public_key_decrypt_pkcs1
	tbnz	x0, #63, LBB0_16
; %bb.11:
	ldr	w0, [x26]
	ldr	x3, [sp, #8]
Lloh8:
	adrp	x1, l_.str.4@PAGE
Lloh9:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x2, x23
	bl	_wpa_hexdump_key
	ldr	x8, [sp, #8]
	cmp	x8, x20
	b.ne	LBB0_13
; %bb.12:
	mov	x0, x23
	mov	x1, x21
	mov	x2, x20
	bl	_os_memcmp_const
	cbz	x0, LBB0_18
LBB0_13:
Lloh10:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str.5@PAGE
Lloh14:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_17
LBB0_14:
Lloh15:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wpa_printf
LBB0_15:
Lloh20:
	adrp	x8, _TLS_ALERT_INTERNAL_ERROR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TLS_ALERT_INTERNAL_ERROR@GOTPAGEOFF]
	b	LBB0_3
LBB0_16:
Lloh22:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
Lloh25:
	adrp	x1, l_.str.3@PAGE
Lloh26:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_17:
	bl	_wpa_printf
	mov	x0, x23
	bl	_os_free
Lloh27:
	adrp	x8, _TLS_ALERT_DECRYPT_ERROR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _TLS_ALERT_DECRYPT_ERROR@GOTPAGEOFF]
	b	LBB0_3
LBB0_18:
	mov	x0, x23
	bl	_os_free
	mov	w0, #0
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_TLS_ALERT_DECODE_ERROR,4,2     ; @TLS_ALERT_DECODE_ERROR
	.comm	_MSG_MSGDUMP,4,2                ; @MSG_MSGDUMP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Additional data after Signature"

l_.str.1:                               ; @.str.1
	.asciz	"TLSv1: Signature"

	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
l_.str.2:                               ; @.str.2
	.asciz	"TLSv1: No public key to verify signature"

	.comm	_TLS_ALERT_INTERNAL_ERROR,4,2   ; @TLS_ALERT_INTERNAL_ERROR
l_.str.3:                               ; @.str.3
	.asciz	"TLSv1: Failed to decrypt signature"

	.comm	_TLS_ALERT_DECRYPT_ERROR,4,2    ; @TLS_ALERT_DECRYPT_ERROR
l_.str.4:                               ; @.str.4
	.asciz	"TLSv1: Decrypted Signature"

l_.str.5:                               ; @.str.5
	.asciz	"TLSv1: Invalid Signature in CertificateVerify - did not match calculated hash"

	.comm	_TLS_VERSION_1_2,4,2            ; @TLS_VERSION_1_2
.subsections_via_symbols
