	.file	"extr_tlsv1_client_write.c_tlsv1_key_x_rsa.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"TLSv1: Failed to derive keys"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"TLSv1: No server RSA key to use for encrypting pre-master secret"
	.section	.rodata.str1.1
.LC2:
	.string	"TLSv1: RSA encryption failed"
	.section	.rodata.str1.8
	.align 8
.LC3:
	.string	"TLSv1: Encrypted pre_master_secret"
	.text
	.p2align 4
	.type	tlsv1_key_x_rsa, @function
tlsv1_key_x_rsa:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r14
	push	r13
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_offset 12, -40
	mov	r12, rdx
	push	rbx
	.cfi_offset 3, -48
	mov	rbx, rsi
	sub	rsp, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR TLS_PRE_MASTER_SECRET_LEN[rip]
	mov	rcx, rsp
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L17:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L17
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L18
.L4:
	mov	r14, rsp
	mov	rdi, r14
	call	tls_derive_pre_master_secret@PLT
	test	rax, rax
	js	.L7
	mov	edx, DWORD PTR TLS_PRE_MASTER_SECRET_LEN[rip]
	mov	rsi, r14
	mov	rdi, r13
	call	tls_derive_keys@PLT
	test	rax, rax
	jne	.L7
	cmp	QWORD PTR 0[r13], 0
	je	.L19
	mov	rax, QWORD PTR [rbx]
	mov	edx, DWORD PTR TLS_PRE_MASTER_SECRET_LEN[rip]
	mov	rsi, r14
	lea	r8, -48[rbp]
	lea	rcx, 8[rax]
	mov	QWORD PTR [rbx], rcx
	sub	r12, rcx
	mov	rdi, QWORD PTR 0[r13]
	sar	r12, 2
	mov	QWORD PTR -48[rbp], r12
	call	crypto_public_key_encrypt_pkcs1_v15@PLT
	mov	edx, DWORD PTR TLS_PRE_MASTER_SECRET_LEN[rip]
	xor	esi, esi
	mov	rdi, r14
	mov	r12d, eax
	call	os_memset@PLT
	test	r12d, r12d
	js	.L20
	mov	rax, QWORD PTR [rbx]
	mov	rsi, QWORD PTR -48[rbp]
	lea	rdi, -8[rax]
	call	WPA_PUT_BE16@PLT
	mov	rcx, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR [rbx]
	lea	rsi, .LC3[rip]
	mov	edi, DWORD PTR MSG_MSGDUMP[rip]
	call	wpa_hexdump@PLT
	mov	rax, QWORD PTR -48[rbp]
	sal	rax, 2
	add	QWORD PTR [rbx], rax
	xor	eax, eax
.L1:
	mov	rbx, QWORD PTR -40[rbp]
	xor	rbx, QWORD PTR fs:40
	jne	.L21
	lea	rsp, -32[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L7:
	lea	rsi, .LC0[rip]
.L15:
	mov	edi, DWORD PTR MSG_DEBUG[rip]
	call	wpa_printf@PLT
	mov	edx, DWORD PTR TLS_ALERT_INTERNAL_ERROR[rip]
	mov	esi, DWORD PTR TLS_ALERT_LEVEL_FATAL[rip]
	mov	rdi, r13
	call	tls_alert@PLT
	mov	eax, -1
	jmp	.L1
.L20:
	lea	rsi, .LC2[rip]
	jmp	.L15
.L19:
	lea	rsi, .LC1[rip]
	jmp	.L15
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	tlsv1_key_x_rsa, .-tlsv1_key_x_rsa
	.comm	TLS_PRE_MASTER_SECRET_LEN,4,4
	.comm	TLS_ALERT_LEVEL_FATAL,4,4
	.comm	TLS_ALERT_INTERNAL_ERROR,4,4
	.comm	MSG_MSGDUMP,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_client_write.c_tlsv1_key_x_rsa.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"TLSv1: Failed to derive keys\000"
	.align	2
.LC1:
	.ascii	"TLSv1: No server RSA key to use for encrypting pre-"
	.ascii	"master secret\000"
	.align	2
.LC2:
	.ascii	"TLSv1: RSA encryption failed\000"
	.align	2
.LC3:
	.ascii	"TLSv1: Encrypted pre_master_secret\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tlsv1_key_x_rsa, %function
tlsv1_key_x_rsa:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #16
	ldr	r6, .L14
	mov	r5, r0
	ldr	r3, [r6]
	mov	r4, r1
	lsl	r3, r3, #2
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	add	r9, sp, #8
	ldr	r3, .L14+4
	mov	r0, r9
	mov	r7, r2
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	bl	tls_derive_pre_master_secret
	cmp	r0, #0
	blt	.L4
	mov	r1, r9
	mov	r0, r5
	ldr	r2, [r6]
	bl	tls_derive_keys
	subs	r8, r0, #0
	bne	.L4
	ldr	r3, [r5]
	cmp	r3, #0
	beq	.L11
	ldr	r3, [r4]
	sub	r2, fp, #36
	add	r3, r3, #8
	str	r3, [r4]
	sub	r7, r7, r3
	mov	r1, r9
	ldr	r0, [r5]
	asr	r7, r7, #2
	str	r2, [sp]
	ldr	r2, [r6]
	str	r7, [fp, #-36]
	bl	crypto_public_key_encrypt_pkcs1_v15
	mov	r7, r0
	mov	r1, r8
	mov	r0, r9
	ldr	r2, [r6]
	bl	os_memset
	cmp	r7, #0
	blt	.L12
	ldr	r0, [r4]
	ldr	r1, [fp, #-36]
	sub	r0, r0, #8
	bl	WPA_PUT_BE16
	ldr	r2, .L14+8
	ldr	r3, [fp, #-36]
	ldr	r0, [r2]
	ldr	r1, .L14+12
	ldr	r2, [r4]
	bl	wpa_hexdump
	ldr	r3, [r4]
	ldr	r2, [fp, #-36]
	add	r3, r3, r2, lsl #2
	str	r3, [r4]
.L1:
	ldr	r3, .L14+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	mov	r0, r8
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L4:
	ldr	r3, .L14+16
	ldr	r1, .L14+20
.L9:
	ldr	r0, [r3]
	bl	wpa_printf
	ldr	r3, .L14+24
	ldr	r2, .L14+28
	mov	r0, r5
	ldr	r2, [r2]
	ldr	r1, [r3]
	bl	tls_alert
	mvn	r8, #0
	b	.L1
.L12:
	ldr	r3, .L14+16
	ldr	r1, .L14+32
	b	.L9
.L11:
	ldr	r3, .L14+16
	ldr	r1, .L14+36
	b	.L9
.L13:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	TLS_PRE_MASTER_SECRET_LEN
	.word	.LC4
	.word	MSG_MSGDUMP
	.word	.LC3
	.word	MSG_DEBUG
	.word	.LC0
	.word	TLS_ALERT_LEVEL_FATAL
	.word	TLS_ALERT_INTERNAL_ERROR
	.word	.LC2
	.word	.LC1
	.size	tlsv1_key_x_rsa, .-tlsv1_key_x_rsa
	.comm	TLS_PRE_MASTER_SECRET_LEN,4,4
	.comm	TLS_ALERT_LEVEL_FATAL,4,4
	.comm	TLS_ALERT_INTERNAL_ERROR,4,4
	.comm	MSG_MSGDUMP,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
