	.file	"extr_tlsv1_server_read.c_tls_process_client_key_exchange_rsa.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"TLSv1: Invalid ClientKeyExchange format: encr_len=%u left=%u"
	.align 8
.LC1:
	.string	"TLSv1: Failed to decrypt PreMasterSecret (encr_len=%u outlen=%lu)"
	.align 8
.LC2:
	.string	"TLSv1: Unexpected PreMasterSecret length %lu"
	.align 8
.LC3:
	.string	"TLSv1: Client version in ClientKeyExchange does not match with version in ClientHello"
	.align 8
.LC4:
	.string	"TLSv1: Using random premaster secret to avoid revealing information about private key"
	.align 8
.LC5:
	.string	"TLSv1: Failed to get random data"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC6:
	.string	"TLSv1: Failed to derive keys"
	.text
	.p2align 4
	.type	tls_process_client_key_exchange_rsa, @function
tls_process_client_key_exchange_rsa:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rax, rdx
	sub	rax, rsi
	cmp	rax, 4
	jle	.L20
	mov	rdi, rsi
	mov	rbp, rsi
	mov	rbx, rdx
	call	WPA_GET_BE16@PLT
	add	rbp, 8
	mov	r15, rbx
	mov	r14, rax
	cdqe
	sub	r15, rbp
	lea	rax, 0[rbp+rax*4]
	sar	r15, 2
	cmp	rbx, rax
	jb	.L23
	cmp	QWORD PTR TLS_PRE_MASTER_SECRET_LEN[rip], r15
	mov	rdi, r15
	mov	QWORD PTR [rsp], r15
	cmovnb	rdi, QWORD PTR TLS_PRE_MASTER_SECRET_LEN[rip]
	call	os_malloc@PLT
	mov	r13, rax
	test	rax, rax
	je	.L21
	mov	rax, QWORD PTR 8[r12]
	mov	r8, rsp
	mov	rcx, r13
	mov	edx, r14d
	mov	rsi, rbp
	mov	edi, DWORD PTR [rax]
	call	crypto_private_key_decrypt_pkcs1_v15@PLT
	test	rax, rax
	js	.L6
	mov	rdx, QWORD PTR [rsp]
	cmp	rdx, QWORD PTR TLS_PRE_MASTER_SECRET_LEN[rip]
	jne	.L24
	mov	rdi, r13
	call	WPA_GET_BE16@PLT
	cmp	rax, QWORD PTR [r12]
	je	.L10
	mov	edi, DWORD PTR MSG_DEBUG[rip]
	lea	rsi, .LC3[rip]
	xor	eax, eax
	call	wpa_printf@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L24:
	mov	edi, DWORD PTR MSG_DEBUG[rip]
	lea	rsi, .LC2[rip]
	xor	eax, eax
	call	wpa_printf@PLT
.L9:
	mov	edi, DWORD PTR MSG_DEBUG[rip]
	lea	rsi, .LC4[rip]
	xor	eax, eax
	call	wpa_printf@PLT
	mov	rsi, QWORD PTR TLS_PRE_MASTER_SECRET_LEN[rip]
	mov	rdi, r13
	mov	QWORD PTR [rsp], rsi
	call	os_get_random@PLT
	test	rax, rax
	jne	.L25
.L10:
	mov	rdx, QWORD PTR [rsp]
	mov	rsi, r13
	mov	rdi, r12
	call	tlsv1_server_derive_keys@PLT
	xor	esi, esi
	mov	rdi, r13
	mov	rdx, r15
	mov	r14d, eax
	call	os_memset@PLT
	mov	rdi, r13
	call	os_free@PLT
	test	r14d, r14d
	jne	.L26
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L27
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r14d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	rcx, QWORD PTR [rsp]
	mov	edi, DWORD PTR MSG_DEBUG[rip]
	mov	edx, r14d
	xor	eax, eax
	lea	rsi, .LC1[rip]
	call	wpa_printf@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L23:
	mov	edi, DWORD PTR MSG_DEBUG[rip]
	mov	ecx, r15d
	mov	edx, r14d
	xor	eax, eax
	lea	rsi, .LC0[rip]
	call	wpa_printf@PLT
.L20:
	mov	edx, DWORD PTR TLS_ALERT_DECODE_ERROR[rip]
	mov	esi, DWORD PTR TLS_ALERT_LEVEL_FATAL[rip]
	mov	rdi, r12
	mov	r14d, -1
	call	tlsv1_server_alert@PLT
	jmp	.L1
.L26:
	mov	edi, DWORD PTR MSG_DEBUG[rip]
	lea	rsi, .LC6[rip]
	xor	eax, eax
	call	wpa_printf@PLT
.L21:
	mov	edx, DWORD PTR TLS_ALERT_INTERNAL_ERROR[rip]
	mov	esi, DWORD PTR TLS_ALERT_LEVEL_FATAL[rip]
	mov	rdi, r12
	mov	r14d, -1
	call	tlsv1_server_alert@PLT
	jmp	.L1
.L25:
	mov	edi, DWORD PTR MSG_DEBUG[rip]
	lea	rsi, .LC5[rip]
	xor	eax, eax
	mov	r14d, -1
	call	wpa_printf@PLT
	mov	edx, DWORD PTR TLS_ALERT_INTERNAL_ERROR[rip]
	mov	esi, DWORD PTR TLS_ALERT_LEVEL_FATAL[rip]
	mov	rdi, r12
	call	tlsv1_server_alert@PLT
	mov	rdi, r13
	call	os_free@PLT
	jmp	.L1
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	tls_process_client_key_exchange_rsa, .-tls_process_client_key_exchange_rsa
	.comm	TLS_PRE_MASTER_SECRET_LEN,8,8
	.comm	TLS_ALERT_LEVEL_FATAL,4,4
	.comm	TLS_ALERT_INTERNAL_ERROR,4,4
	.comm	TLS_ALERT_DECODE_ERROR,4,4
	.comm	MSG_DEBUG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_tlsv1_server_read.c_tls_process_client_key_exchange_rsa.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"TLSv1: Invalid ClientKeyExchange format: encr_len=%"
	.ascii	"u left=%u\000"
	.align	2
.LC1:
	.ascii	"TLSv1: Failed to decrypt PreMasterSecret (encr_len="
	.ascii	"%u outlen=%lu)\000"
	.align	2
.LC2:
	.ascii	"TLSv1: Unexpected PreMasterSecret length %lu\000"
	.align	2
.LC3:
	.ascii	"TLSv1: Client version in ClientKeyExchange does not"
	.ascii	" match with version in ClientHello\000"
	.align	2
.LC4:
	.ascii	"TLSv1: Using random premaster secret to avoid revea"
	.ascii	"ling information about private key\000"
	.align	2
.LC5:
	.ascii	"TLSv1: Failed to get random data\000"
	.align	2
.LC6:
	.ascii	"TLSv1: Failed to derive keys\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tls_process_client_key_exchange_rsa, %function
tls_process_client_key_exchange_rsa:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	sub	r3, r2, r1
	cmp	r3, #4
	ldr	r3, .L29
	sub	sp, sp, #20
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	ble	.L23
	mov	r5, r1
	mov	r7, r0
	mov	r0, r1
	mov	r4, r2
	bl	WPA_GET_BE16
	add	r5, r5, #8
	add	r3, r5, r0, lsl #2
	cmp	r4, r3
	sub	r4, r4, r5
	mov	r8, r0
	asr	r4, r4, #2
	bcc	.L24
	ldr	r9, .L29+4
	str	r4, [sp, #8]
	ldr	r0, [r9]
	cmp	r4, r0
	movcs	r0, r4
	bl	os_malloc
	subs	r6, r0, #0
	beq	.L21
	ldr	r2, [r7, #4]
	add	r3, sp, #8
	ldr	r0, [r2]
	mov	r1, r5
	str	r3, [sp]
	mov	r2, r8
	mov	r3, r6
	bl	crypto_private_key_decrypt_pkcs1_v15
	cmp	r0, #0
	blt	.L6
	ldr	r2, [sp, #8]
	ldr	r3, [r9]
	cmp	r2, r3
	bne	.L25
	mov	r0, r6
	bl	WPA_GET_BE16
	ldr	r3, [r7]
	cmp	r0, r3
	beq	.L10
	ldr	r5, .L29+8
	ldr	r1, .L29+12
	ldr	r0, [r5]
	bl	wpa_printf
	b	.L9
.L25:
	ldr	r5, .L29+8
	ldr	r1, .L29+16
	ldr	r0, [r5]
	bl	wpa_printf
.L9:
	ldr	r1, .L29+20
	ldr	r0, [r5]
	bl	wpa_printf
	ldr	r1, [r9]
	mov	r0, r6
	str	r1, [sp, #8]
	bl	os_get_random
	cmp	r0, #0
	bne	.L26
.L10:
	mov	r1, r6
	ldr	r2, [sp, #8]
	mov	r0, r7
	bl	tlsv1_server_derive_keys
	mov	r5, r0
	mov	r2, r4
	mov	r1, #0
	mov	r0, r6
	bl	os_memset
	mov	r0, r6
	bl	os_free
	cmp	r5, #0
	bne	.L27
.L1:
	ldr	r3, .L29
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L28
	mov	r0, r5
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L6:
	ldr	r5, .L29+8
	mov	r2, r8
	ldr	r0, [r5]
	ldr	r3, [sp, #8]
	ldr	r1, .L29+24
	bl	wpa_printf
	b	.L9
.L23:
	ldr	r3, .L29+28
	ldr	r2, .L29+32
	ldr	r1, [r3]
	ldr	r2, [r2]
	bl	tlsv1_server_alert
	mvn	r5, #0
	b	.L1
.L24:
	ldr	r1, .L29+8
	mov	r2, r0
	mov	r3, r4
	ldr	r0, [r1]
	ldr	r1, .L29+36
	bl	wpa_printf
	ldr	r2, .L29+32
.L20:
	ldr	r3, .L29+28
	mov	r0, r7
	ldr	r2, [r2]
	ldr	r1, [r3]
	bl	tlsv1_server_alert
	mvn	r5, #0
	b	.L1
.L27:
	ldr	r3, .L29+8
	ldr	r1, .L29+40
	ldr	r0, [r3]
	bl	wpa_printf
.L21:
	ldr	r2, .L29+44
	b	.L20
.L26:
	ldr	r0, [r5]
	ldr	r1, .L29+48
	bl	wpa_printf
	ldr	r3, .L29+28
	ldr	r2, .L29+44
	ldr	r1, [r3]
	ldr	r2, [r2]
	mov	r0, r7
	bl	tlsv1_server_alert
	mov	r0, r6
	bl	os_free
	mvn	r5, #0
	b	.L1
.L28:
	bl	__stack_chk_fail
.L30:
	.align	2
.L29:
	.word	.LC7
	.word	TLS_PRE_MASTER_SECRET_LEN
	.word	MSG_DEBUG
	.word	.LC3
	.word	.LC2
	.word	.LC4
	.word	.LC1
	.word	TLS_ALERT_LEVEL_FATAL
	.word	TLS_ALERT_DECODE_ERROR
	.word	.LC0
	.word	.LC6
	.word	TLS_ALERT_INTERNAL_ERROR
	.word	.LC5
	.size	tls_process_client_key_exchange_rsa, .-tls_process_client_key_exchange_rsa
	.comm	TLS_PRE_MASTER_SECRET_LEN,4,4
	.comm	TLS_ALERT_LEVEL_FATAL,4,4
	.comm	TLS_ALERT_INTERNAL_ERROR,4,4
	.comm	TLS_ALERT_DECODE_ERROR,4,4
	.comm	MSG_DEBUG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
