	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tlsv1_server_process_handshake ## -- Begin function tlsv1_server_process_handshake
	.p2align	4, 0x90
_tlsv1_server_process_handshake:        ## @tlsv1_server_process_handshake
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r15
	movq	%rdi, %r12
	movq	_TLS_CONTENT_TYPE_ALERT@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	jne	LBB0_4
## %bb.1:
	cmpq	$1, (%r14)
	ja	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_tlsv1_server_log
	movq	_TLS_ALERT_LEVEL_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TLS_ALERT_DECODE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_tlsv1_server_alert
	jmp	LBB0_16
LBB0_4:
	movl	(%r12), %edx
	leal	-128(%rdx), %eax
	cmpl	$5, %eax
	ja	LBB0_15
## %bb.5:
	movq	%rsi, %r13
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_11:
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_tls_process_client_key_exchange
	jmp	LBB0_7
LBB0_3:
	movq	(%r15), %rdx
	movq	8(%r15), %rcx
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_tlsv1_server_log
	movq	$2, (%r14)
	movq	_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	jmp	LBB0_16
LBB0_15:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_tlsv1_server_log
LBB0_16:
	movl	$-1, %ebx
	jmp	LBB0_17
LBB0_6:
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_tls_process_client_hello
	jmp	LBB0_7
LBB0_14:
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_tls_process_client_finished
	jmp	LBB0_7
LBB0_10:
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_tls_process_certificate
	jmp	LBB0_7
LBB0_13:
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_tls_process_change_cipher_spec
	jmp	LBB0_7
LBB0_12:
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_tls_process_certificate_verify
LBB0_7:
	movl	$-1, %ebx
	testl	%eax, %eax
	jne	LBB0_17
## %bb.8:
	movq	_TLS_CONTENT_TYPE_HANDSHAKE@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpq	%r13, (%rax)
	jne	LBB0_17
## %bb.9:
	addq	$4, %r12
	movq	(%r14), %rdx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_tls_verify_hash_add
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
LJTI0_0:
	.long	L0_0_set_11
	.long	L0_0_set_6
	.long	L0_0_set_14
	.long	L0_0_set_10
	.long	L0_0_set_13
	.long	L0_0_set_12
	.end_data_region
                                        ## -- End function
	.comm	_TLS_CONTENT_TYPE_ALERT,8,3     ## @TLS_CONTENT_TYPE_ALERT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Alert underflow"

	.comm	_TLS_ALERT_LEVEL_FATAL,4,2      ## @TLS_ALERT_LEVEL_FATAL
	.comm	_TLS_ALERT_DECODE_ERROR,4,2     ## @TLS_ALERT_DECODE_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"Received alert %d:%d"

	.comm	_FAILED,4,2                     ## @FAILED
L_.str.2:                               ## @.str.2
	.asciz	"Unexpected state %d while processing received message"

	.comm	_TLS_CONTENT_TYPE_HANDSHAKE,8,3 ## @TLS_CONTENT_TYPE_HANDSHAKE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tlsv1_server_process_handshake ; -- Begin function tlsv1_server_process_handshake
	.p2align	2
_tlsv1_server_process_handshake:        ; @tlsv1_server_process_handshake
	.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	x20, x3
	mov	x21, x2
	mov	x19, x0
Lloh0:
	adrp	x8, _TLS_CONTENT_TYPE_ALERT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TLS_CONTENT_TYPE_ALERT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x1
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x20]
	cmp	x8, #1
	b.hi	LBB0_6
; %bb.2:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_tlsv1_server_log
Lloh5:
	adrp	x8, _TLS_ALERT_LEVEL_FATAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TLS_ALERT_LEVEL_FATAL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _TLS_ALERT_DECODE_ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TLS_ALERT_DECODE_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_tlsv1_server_alert
	mov	w0, #-1
	b	LBB0_14
LBB0_3:
	ldr	w8, [x19]
	sub	w9, w8, #128
	cmp	w9, #5
	b.hi	LBB0_7
; %bb.4:
	mov	x22, x1
Lloh11:
	adrp	x8, lJTI0_0@PAGE
Lloh12:
	add	x8, x8, lJTI0_0@PAGEOFF
	adr	x10, LBB0_5
	ldrb	w11, [x8, x9]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_5:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_tls_process_client_key_exchange
	cbnz	w0, LBB0_9
	b	LBB0_11
LBB0_6:
	ldp	x8, x9, [x21]
	stp	x8, x9, [sp]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_tlsv1_server_log
	mov	w8, #2
	str	x8, [x20]
Lloh15:
	adrp	x8, _FAILED@GOTPAGE
Lloh16:
	ldr	x8, [x8, _FAILED@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x19]
	mov	w0, #-1
	b	LBB0_14
LBB0_7:
	str	x8, [sp]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_tlsv1_server_log
	mov	w0, #-1
	b	LBB0_14
LBB0_8:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_tls_process_client_hello
	cbz	w0, LBB0_11
LBB0_9:
	mov	w0, #-1
	b	LBB0_14
LBB0_10:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_tls_process_client_finished
	cbnz	w0, LBB0_9
LBB0_11:
Lloh20:
	adrp	x8, _TLS_CONTENT_TYPE_HANDSHAKE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TLS_CONTENT_TYPE_HANDSHAKE@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	cmp	x8, x22
	b.ne	LBB0_13
; %bb.12:
	add	x0, x19, #4
	ldr	x2, [x20]
	mov	x1, x21
	bl	_tls_verify_hash_add
LBB0_13:
	mov	w0, #0
LBB0_14:
	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_15:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_tls_process_certificate
	cbnz	w0, LBB0_9
	b	LBB0_11
LBB0_16:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_tls_process_change_cipher_spec
	cbnz	w0, LBB0_9
	b	LBB0_11
LBB0_17:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_tls_process_certificate_verify
	cbnz	w0, LBB0_9
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_8-LBB0_5)>>2
	.byte	(LBB0_10-LBB0_5)>>2
	.byte	(LBB0_15-LBB0_5)>>2
	.byte	(LBB0_16-LBB0_5)>>2
	.byte	(LBB0_17-LBB0_5)>>2
                                        ; -- End function
	.comm	_TLS_CONTENT_TYPE_ALERT,8,3     ; @TLS_CONTENT_TYPE_ALERT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Alert underflow"

	.comm	_TLS_ALERT_LEVEL_FATAL,4,2      ; @TLS_ALERT_LEVEL_FATAL
	.comm	_TLS_ALERT_DECODE_ERROR,4,2     ; @TLS_ALERT_DECODE_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"Received alert %d:%d"

	.comm	_FAILED,4,2                     ; @FAILED
l_.str.2:                               ; @.str.2
	.asciz	"Unexpected state %d while processing received message"

	.comm	_TLS_CONTENT_TYPE_HANDSHAKE,8,3 ; @TLS_CONTENT_TYPE_HANDSHAKE
.subsections_via_symbols
