	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tlsv1_key_x_rsa
_tlsv1_key_x_rsa:                       ## @tlsv1_key_x_rsa
	.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	%rdx, %r12
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_TLS_PRE_MASTER_SECRET_LEN@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	%rbx, %rdi
	callq	_tls_derive_pre_master_secret
	testq	%rax, %rax
	js	LBB0_2
## %bb.1:
	movl	(%r13), %edx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_tls_derive_keys
	testq	%rax, %rax
	je	LBB0_4
LBB0_2:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
LBB0_3:
	callq	_wpa_printf
	movq	_TLS_ALERT_LEVEL_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TLS_ALERT_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_tls_alert
	movl	$-1, %r12d
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	movl	%r12d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	cmpq	$0, (%r15)
	je	LBB0_5
## %bb.6:
	movq	(%r14), %rcx
	addq	$8, %rcx
	movq	%rcx, (%r14)
	subq	%rcx, %r12
	sarq	$2, %r12
	movq	%r12, -56(%rbp)
	movq	(%r15), %rdi
	movl	(%r13), %edx
	leaq	-56(%rbp), %r8
	movq	%rbx, %rsi
	callq	_crypto_public_key_encrypt_pkcs1_v15
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	(%r13), %edx
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_os_memset
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	js	LBB0_7
## %bb.8:
	movq	(%r14), %rdi
	addq	$-8, %rdi
	movq	-56(%rbp), %rsi
	callq	_WPA_PUT_BE16
	movq	_MSG_MSGDUMP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r14), %rdx
	movq	-56(%rbp), %rcx
	leaq	L_.str.3(%rip), %rsi
	callq	_wpa_hexdump
	movq	-56(%rbp), %rax
	shlq	$2, %rax
	addq	%rax, (%r14)
	jmp	LBB0_9
LBB0_5:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_3
LBB0_7:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_3
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_TLS_PRE_MASTER_SECRET_LEN,4,2  ## @TLS_PRE_MASTER_SECRET_LEN
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TLSv1: Failed to derive keys"

	.comm	_TLS_ALERT_LEVEL_FATAL,4,2      ## @TLS_ALERT_LEVEL_FATAL
	.comm	_TLS_ALERT_INTERNAL_ERROR,4,2   ## @TLS_ALERT_INTERNAL_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"TLSv1: No server RSA key to use for encrypting pre-master secret"

L_.str.2:                               ## @.str.2
	.asciz	"TLSv1: RSA encryption failed"

	.comm	_MSG_MSGDUMP,4,2                ## @MSG_MSGDUMP
L_.str.3:                               ## @.str.3
	.asciz	"TLSv1: Encrypted pre_master_secret"

	.no_dead_strip	_tlsv1_key_x_rsa
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tlsv1_key_x_rsa
_tlsv1_key_x_rsa:                       ; @tlsv1_key_x_rsa
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	sub	sp, sp, #16
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x23, _TLS_PRE_MASTER_SECRET_LEN@GOTPAGE
Lloh4:
	ldr	x23, [x23, _TLS_PRE_MASTER_SECRET_LEN@GOTPAGEOFF]
	ldr	w8, [x23]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	mov	x0, x21
	bl	_tls_derive_pre_master_secret
	tbnz	x0, #63, LBB0_2
; %bb.1:
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x21
	bl	_tls_derive_keys
	cbz	x0, LBB0_6
LBB0_2:
Lloh7:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
LBB0_3:
	bl	_wpa_printf
Lloh12:
	adrp	x8, _TLS_ALERT_LEVEL_FATAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TLS_ALERT_LEVEL_FATAL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _TLS_ALERT_INTERNAL_ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TLS_ALERT_INTERNAL_ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_tls_alert
	mov	w0, #-1
LBB0_4:
	ldur	x8, [x29, #-56]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.5:
	sub	sp, x29, #48
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	x8, [x19]
	cbz	x8, LBB0_9
; %bb.7:
	ldr	x8, [x20]
	add	x3, x8, #8
	str	x3, [x20]
	sub	x8, x22, x3
	asr	x8, x8, #2
	stur	x8, [x29, #-64]
	ldr	x0, [x19]
	ldr	w2, [x23]
	sub	x4, x29, #64
	mov	x1, x21
	bl	_crypto_public_key_encrypt_pkcs1_v15
	mov	x22, x0
	ldr	w2, [x23]
	mov	x0, x21
	mov	w1, #0
	bl	_os_memset
	tbnz	w22, #31, LBB0_10
; %bb.8:
	ldr	x8, [x20]
	sub	x0, x8, #8
	ldur	x1, [x29, #-64]
	bl	_WPA_PUT_BE16
Lloh21:
	adrp	x8, _MSG_MSGDUMP@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MSG_MSGDUMP@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	ldr	x2, [x20]
	ldur	x3, [x29, #-64]
Lloh24:
	adrp	x1, l_.str.3@PAGE
Lloh25:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_wpa_hexdump
	mov	w0, #0
	ldur	x8, [x29, #-64]
	ldr	x9, [x20]
	add	x8, x9, x8, lsl #2
	str	x8, [x20]
	b	LBB0_4
LBB0_9:
Lloh26:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
Lloh29:
	adrp	x1, l_.str.1@PAGE
Lloh30:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_10:
Lloh31:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh32:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
Lloh34:
	adrp	x1, l_.str.2@PAGE
Lloh35:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_3
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_TLS_PRE_MASTER_SECRET_LEN,4,2  ; @TLS_PRE_MASTER_SECRET_LEN
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TLSv1: Failed to derive keys"

	.comm	_TLS_ALERT_LEVEL_FATAL,4,2      ; @TLS_ALERT_LEVEL_FATAL
	.comm	_TLS_ALERT_INTERNAL_ERROR,4,2   ; @TLS_ALERT_INTERNAL_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"TLSv1: No server RSA key to use for encrypting pre-master secret"

l_.str.2:                               ; @.str.2
	.asciz	"TLSv1: RSA encryption failed"

	.comm	_MSG_MSGDUMP,4,2                ; @MSG_MSGDUMP
l_.str.3:                               ; @.str.3
	.asciz	"TLSv1: Encrypted pre_master_secret"

	.no_dead_strip	_tlsv1_key_x_rsa
.subsections_via_symbols
