	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tlsv1_client_process_handshake ## -- Begin function tlsv1_client_process_handshake
	.p2align	4, 0x90
_tlsv1_client_process_handshake:        ## @tlsv1_client_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, %r15
	movq	%rdx, %r12
	movq	%rdi, %r14
	movq	_TLS_CONTENT_TYPE_ALERT@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	jne	LBB0_5
## %bb.1:
	cmpq	$1, (%r15)
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	ja	LBB0_4
## %bb.2:
	leaq	L_.str(%rip), %rsi
LBB0_3:
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	_TLS_ALERT_LEVEL_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TLS_ALERT_DECODE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_tls_alert
	jmp	LBB0_26
LBB0_5:
	movq	%rsi, %r13
	movq	_TLS_CONTENT_TYPE_HANDSHAKE@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	jne	LBB0_11
## %bb.6:
	cmpq	$4, (%r15)
	jb	LBB0_11
## %bb.7:
	movq	(%r12), %rax
	movq	_TLS_HANDSHAKE_TYPE_HELLO_REQUEST@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.8:
	addq	$8, %r12
	movq	%r12, %rdi
	callq	_WPA_GET_BE24
	movq	%rax, %r12
	movq	(%r15), %rax
	addq	$-4, %rax
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	cmpq	%rax, %r12
	jbe	LBB0_10
## %bb.9:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_3
LBB0_11:
	movl	(%r14), %edx
	leal	-128(%rdx), %eax
	cmpl	$7, %eax
	ja	LBB0_25
## %bb.12:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_18:
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	movq	%r15, %rcx
	callq	_tls_process_server_key_exchange
	jmp	LBB0_14
LBB0_4:
	movq	(%r12), %rdx
	movq	8(%r12), %rcx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	$2, (%r15)
	movq	_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
LBB0_26:
	movl	$-1, %ebx
	jmp	LBB0_27
LBB0_25:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_wpa_printf
	jmp	LBB0_26
LBB0_20:
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	movq	%r15, %rcx
	callq	_tls_process_server_hello_done
	jmp	LBB0_14
LBB0_13:
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	movq	%r15, %rcx
	callq	_tls_process_server_hello
	jmp	LBB0_14
LBB0_22:
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	movq	%r15, %rcx
	callq	_tls_process_server_finished
	jmp	LBB0_14
LBB0_21:
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	movq	%r15, %rcx
	callq	_tls_process_server_change_cipher_spec
	jmp	LBB0_14
LBB0_19:
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	movq	%r15, %rcx
	callq	_tls_process_certificate_request
	jmp	LBB0_14
LBB0_17:
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	movq	%r15, %rcx
	callq	_tls_process_certificate
	jmp	LBB0_14
LBB0_23:
	testq	%r8, %r8
	je	LBB0_15
## %bb.24:
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	movq	%r15, %rcx
	callq	_tls_process_application_data
LBB0_14:
	movl	$-1, %ebx
	testl	%eax, %eax
	jne	LBB0_27
LBB0_15:
	xorl	%ebx, %ebx
	movq	_TLS_CONTENT_TYPE_HANDSHAKE@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	jne	LBB0_27
## %bb.16:
	addq	$4, %r14
	movq	(%r15), %rdx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_tls_verify_hash_add
	jmp	LBB0_27
LBB0_10:
	leaq	L_.str.3(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_wpa_printf
	addq	$4, %r12
	movq	%r12, (%r15)
LBB0_27:
	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_18, LBB0_18-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_22, LBB0_22-LJTI0_0
.set L0_0_set_21, LBB0_21-LJTI0_0
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_23, LBB0_23-LJTI0_0
LJTI0_0:
	.long	L0_0_set_18
	.long	L0_0_set_20
	.long	L0_0_set_13
	.long	L0_0_set_22
	.long	L0_0_set_21
	.long	L0_0_set_19
	.long	L0_0_set_17
	.long	L0_0_set_23
	.end_data_region
                                        ## -- End function
	.comm	_TLS_CONTENT_TYPE_ALERT,8,3     ## @TLS_CONTENT_TYPE_ALERT
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TLSv1: 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	"TLSv1: Received alert %d:%d"

	.comm	_FAILED,4,2                     ## @FAILED
	.comm	_TLS_CONTENT_TYPE_HANDSHAKE,8,3 ## @TLS_CONTENT_TYPE_HANDSHAKE
	.comm	_TLS_HANDSHAKE_TYPE_HELLO_REQUEST,8,3 ## @TLS_HANDSHAKE_TYPE_HELLO_REQUEST
L_.str.2:                               ## @.str.2
	.asciz	"TLSv1: HelloRequest underflow"

L_.str.3:                               ## @.str.3
	.asciz	"TLSv1: Ignored HelloRequest"

L_.str.4:                               ## @.str.4
	.asciz	"TLSv1: Unexpected state %d while processing received message"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tlsv1_client_process_handshake ; -- Begin function tlsv1_client_process_handshake
	.p2align	2
_tlsv1_client_process_handshake:        ; @tlsv1_client_process_handshake
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	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_4
; %bb.1:
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _MSG_DEBUG@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MSG_DEBUG@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x9]
	cmp	x8, #1
	b.hi	LBB0_12
; %bb.2:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
LBB0_3:
	bl	_wpa_printf
Lloh8:
	adrp	x8, _TLS_ALERT_LEVEL_FATAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TLS_ALERT_LEVEL_FATAL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _TLS_ALERT_DECODE_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TLS_ALERT_DECODE_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_tls_alert
	mov	w0, #-1
	b	LBB0_26
LBB0_4:
	mov	x22, x1
Lloh14:
	adrp	x23, _TLS_CONTENT_TYPE_HANDSHAKE@GOTPAGE
Lloh15:
	ldr	x23, [x23, _TLS_CONTENT_TYPE_HANDSHAKE@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x8, x1
	b.ne	LBB0_9
; %bb.5:
	ldr	x8, [x20]
	cmp	x8, #4
	b.lo	LBB0_9
; %bb.6:
	ldr	x8, [x21]
Lloh16:
	adrp	x9, _TLS_HANDSHAKE_TYPE_HELLO_REQUEST@GOTPAGE
Lloh17:
	ldr	x9, [x9, _TLS_HANDSHAKE_TYPE_HELLO_REQUEST@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.7:
	add	x0, x21, #8
	bl	_WPA_GET_BE24
	mov	x21, x0
	ldr	x8, [x20]
	sub	x8, x8, #4
Lloh19:
	adrp	x9, _MSG_DEBUG@GOTPAGE
Lloh20:
	ldr	x9, [x9, _MSG_DEBUG@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x9]
	cmp	x21, x8
	b.ls	LBB0_27
; %bb.8:
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_3
LBB0_9:
	ldr	w8, [x19]
	sub	w9, w8, #128
	cmp	w9, #7
	b.hi	LBB0_13
; %bb.10:
Lloh24:
	adrp	x8, lJTI0_0@PAGE
Lloh25:
	add	x8, x8, lJTI0_0@PAGEOFF
	adr	x10, LBB0_11
	ldrb	w11, [x8, x9]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_11:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_tls_process_server_key_exchange
	cbnz	w0, LBB0_22
	b	LBB0_23
LBB0_12:
	ldp	x8, x9, [x21]
	stp	x8, x9, [sp]
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_printf
	mov	w8, #2
	str	x8, [x20]
Lloh28:
	adrp	x8, _FAILED@GOTPAGE
Lloh29:
	ldr	x8, [x8, _FAILED@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	str	w8, [x19]
	mov	w0, #-1
	b	LBB0_26
LBB0_13:
Lloh31:
	adrp	x9, _MSG_DEBUG@GOTPAGE
Lloh32:
	ldr	x9, [x9, _MSG_DEBUG@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x9]
	str	x8, [sp]
Lloh34:
	adrp	x1, l_.str.4@PAGE
Lloh35:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_wpa_printf
	mov	w0, #-1
	b	LBB0_26
LBB0_14:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_tls_process_server_hello_done
	cbnz	w0, LBB0_22
	b	LBB0_23
LBB0_15:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_tls_process_server_hello
	cbnz	w0, LBB0_22
	b	LBB0_23
LBB0_16:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_tls_process_server_finished
	cbnz	w0, LBB0_22
	b	LBB0_23
LBB0_17:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_tls_process_server_change_cipher_spec
	cbnz	w0, LBB0_22
	b	LBB0_23
LBB0_18:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_tls_process_certificate_request
	cbnz	w0, LBB0_22
	b	LBB0_23
LBB0_19:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_tls_process_certificate
	cbnz	w0, LBB0_22
	b	LBB0_23
LBB0_20:
	cbz	x4, LBB0_23
; %bb.21:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_tls_process_application_data
	cbz	w0, LBB0_23
LBB0_22:
	mov	w0, #-1
	b	LBB0_26
LBB0_23:
	ldr	x8, [x23]
	cmp	x8, x22
	b.ne	LBB0_25
; %bb.24:
	add	x0, x19, #4
	ldr	x2, [x20]
	mov	x1, x21
	bl	_tls_verify_hash_add
LBB0_25:
	mov	w0, #0
LBB0_26:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_27:
Lloh36:
	adrp	x1, l_.str.3@PAGE
Lloh37:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_wpa_printf
	mov	w0, #0
	add	x8, x21, #4
	str	x8, [x20]
	b	LBB0_26
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_11-LBB0_11)>>2
	.byte	(LBB0_14-LBB0_11)>>2
	.byte	(LBB0_15-LBB0_11)>>2
	.byte	(LBB0_16-LBB0_11)>>2
	.byte	(LBB0_17-LBB0_11)>>2
	.byte	(LBB0_18-LBB0_11)>>2
	.byte	(LBB0_19-LBB0_11)>>2
	.byte	(LBB0_20-LBB0_11)>>2
                                        ; -- End function
	.comm	_TLS_CONTENT_TYPE_ALERT,8,3     ; @TLS_CONTENT_TYPE_ALERT
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TLSv1: 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	"TLSv1: Received alert %d:%d"

	.comm	_FAILED,4,2                     ; @FAILED
	.comm	_TLS_CONTENT_TYPE_HANDSHAKE,8,3 ; @TLS_CONTENT_TYPE_HANDSHAKE
	.comm	_TLS_HANDSHAKE_TYPE_HELLO_REQUEST,8,3 ; @TLS_HANDSHAKE_TYPE_HELLO_REQUEST
l_.str.2:                               ; @.str.2
	.asciz	"TLSv1: HelloRequest underflow"

l_.str.3:                               ; @.str.3
	.asciz	"TLSv1: Ignored HelloRequest"

l_.str.4:                               ; @.str.4
	.asciz	"TLSv1: Unexpected state %d while processing received message"

.subsections_via_symbols
