	.file	"extr_rsa.c_crypto_rsa_import_private_key.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"RSA: Expected SEQUENCE (public key) - found class %d tag 0x%x"
	.align 8
.LC1:
	.string	"RSA: Expected zero INTEGER in the beginning of private key; not found"
	.align 8
.LC2:
	.string	"RSA: Extra data in public key SEQUENCE"
	.text
	.p2align 4
	.globl	crypto_rsa_import_private_key
	.type	crypto_rsa_import_private_key, @function
crypto_rsa_import_private_key:
.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
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	mov	edi, 72
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xor	r12d, r12d
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	sub	rsp, 48
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	call	os_zalloc@PLT
	test	rax, rax
	je	.L1
	mov	DWORD PTR [rax], 1
	mov	rbp, rax
	mov	r12, rax
	xor	eax, eax
	call	bignum_init@PLT
	mov	QWORD PTR 64[rbp], rax
	xor	eax, eax
	call	bignum_init@PLT
	mov	QWORD PTR 56[rbp], rax
	xor	eax, eax
	call	bignum_init@PLT
	mov	QWORD PTR 48[rbp], rax
	xor	eax, eax
	call	bignum_init@PLT
	mov	QWORD PTR 40[rbp], rax
	xor	eax, eax
	call	bignum_init@PLT
	mov	QWORD PTR 32[rbp], rax
	xor	eax, eax
	call	bignum_init@PLT
	mov	QWORD PTR 24[rbp], rax
	xor	eax, eax
	call	bignum_init@PLT
	mov	QWORD PTR 16[rbp], rax
	xor	eax, eax
	call	bignum_init@PLT
	cmp	QWORD PTR 64[rbp], 0
	mov	QWORD PTR 8[rbp], rax
	je	.L9
	cmp	QWORD PTR 56[rbp], 0
	je	.L9
	cmp	QWORD PTR 48[rbp], 0
	je	.L9
	cmp	QWORD PTR 40[rbp], 0
	je	.L9
	cmp	QWORD PTR 32[rbp], 0
	je	.L9
	cmp	QWORD PTR 24[rbp], 0
	je	.L9
	cmp	QWORD PTR 16[rbp], 0
	je	.L9
	test	rax, rax
	je	.L9
	mov	rdx, rsp
	mov	rsi, r14
	mov	rdi, r13
	call	asn1_get_next@PLT
	mov	rdx, QWORD PTR [rsp]
	mov	rcx, QWORD PTR 8[rsp]
	test	rax, rax
	js	.L7
	cmp	rdx, QWORD PTR ASN1_CLASS_UNIVERSAL[rip]
	jne	.L7
	cmp	QWORD PTR ASN1_TAG_SEQUENCE[rip], rcx
	jne	.L7
	movsx	rax, DWORD PTR 16[rsp]
	mov	r15, QWORD PTR 24[rsp]
	lea	r13, [r15+rax*4]
	xor	eax, eax
	call	bignum_init@PLT
	mov	r14, rax
	test	rax, rax
	je	.L9
	mov	rdi, r15
	mov	rdx, rax
	mov	rsi, r13
	call	crypto_rsa_parse_integer@PLT
	mov	r15, rax
	test	rax, rax
	je	.L12
	xor	esi, esi
	mov	rdi, r14
	call	bignum_cmp_d@PLT
	test	rax, rax
	jne	.L12
	mov	rdi, r14
	call	bignum_deinit@PLT
	mov	rdx, QWORD PTR 64[rbp]
	mov	rsi, r13
	mov	rdi, r15
	call	crypto_rsa_parse_integer@PLT
	mov	rdx, QWORD PTR 56[rbp]
	mov	rsi, r13
	mov	rdi, rax
	call	crypto_rsa_parse_integer@PLT
	mov	rdx, QWORD PTR 48[rbp]
	mov	rsi, r13
	mov	rdi, rax
	call	crypto_rsa_parse_integer@PLT
	mov	rdx, QWORD PTR 40[rbp]
	mov	rsi, r13
	mov	rdi, rax
	call	crypto_rsa_parse_integer@PLT
	mov	rdx, QWORD PTR 32[rbp]
	mov	rsi, r13
	mov	rdi, rax
	call	crypto_rsa_parse_integer@PLT
	mov	rdx, QWORD PTR 24[rbp]
	mov	rsi, r13
	mov	rdi, rax
	call	crypto_rsa_parse_integer@PLT
	mov	rdx, QWORD PTR 16[rbp]
	mov	rsi, r13
	mov	rdi, rax
	call	crypto_rsa_parse_integer@PLT
	mov	rdx, QWORD PTR 8[rbp]
	mov	rsi, r13
	mov	rdi, rax
	call	crypto_rsa_parse_integer@PLT
	test	rax, rax
	je	.L9
	cmp	r13, rax
	je	.L1
	mov	rcx, r13
	mov	edi, DWORD PTR MSG_DEBUG[rip]
	mov	rdx, rax
	lea	rsi, .LC2[rip]
	sub	rcx, rax
	sar	rcx, 2
	call	wpa_hexdump@PLT
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdi, rbp
	xor	r12d, r12d
	call	crypto_rsa_free@PLT
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L22
	add	rsp, 48
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	rax, r12
	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
.L7:
	.cfi_restore_state
	mov	edi, DWORD PTR MSG_DEBUG[rip]
	lea	rsi, .LC0[rip]
	xor	eax, eax
	call	wpa_printf@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L12:
	mov	edi, DWORD PTR MSG_DEBUG[rip]
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	wpa_printf@PLT
	mov	rdi, r14
	call	bignum_deinit@PLT
	jmp	.L9
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	crypto_rsa_import_private_key, .-crypto_rsa_import_private_key
	.comm	MSG_DEBUG,4,4
	.comm	ASN1_TAG_SEQUENCE,8,8
	.comm	ASN1_CLASS_UNIVERSAL,8,8
	.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_rsa.c_crypto_rsa_import_private_key.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"RSA: Expected SEQUENCE (public key) - found class %"
	.ascii	"d tag 0x%x\000"
	.align	2
.LC1:
	.ascii	"RSA: Expected zero INTEGER in the beginning of priv"
	.ascii	"ate key; not found\000"
	.align	2
.LC2:
	.ascii	"RSA: Extra data in public key SEQUENCE\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	crypto_rsa_import_private_key
	.syntax unified
	.arm
	.fpu softvfp
	.type	crypto_rsa_import_private_key, %function
crypto_rsa_import_private_key:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L40
	sub	sp, sp, #24
	mov	r7, r0
	mov	r0, #36
	mov	r6, r1
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	bl	os_zalloc
	subs	r4, r0, #0
	moveq	r5, r4
	beq	.L1
	mov	r3, #1
	str	r3, [r4]
	bl	bignum_init
	str	r0, [r4, #32]
	bl	bignum_init
	str	r0, [r4, #28]
	bl	bignum_init
	str	r0, [r4, #24]
	bl	bignum_init
	str	r0, [r4, #20]
	bl	bignum_init
	str	r0, [r4, #16]
	bl	bignum_init
	str	r0, [r4, #12]
	bl	bignum_init
	str	r0, [r4, #8]
	bl	bignum_init
	ldr	r3, [r4, #32]
	mov	r5, r4
	cmp	r3, #0
	str	r0, [r4, #4]
	beq	.L8
	ldr	r3, [r4, #28]
	cmp	r3, #0
	beq	.L8
	ldr	r3, [r4, #24]
	cmp	r3, #0
	beq	.L8
	ldr	r3, [r4, #20]
	cmp	r3, #0
	beq	.L8
	ldr	r3, [r4, #16]
	cmp	r3, #0
	beq	.L8
	ldr	r3, [r4, #12]
	cmp	r3, #0
	beq	.L8
	ldr	r3, [r4, #8]
	cmp	r0, #0
	cmpne	r3, #0
	beq	.L8
	mov	r1, r6
	mov	r0, r7
	add	r2, sp, #4
	bl	asn1_get_next
	cmp	r0, #0
	blt	.L38
	ldr	r3, .L40+4
	ldr	r2, [sp, #4]
	ldr	r1, [r3]
	ldr	r3, [sp, #8]
	cmp	r2, r1
	bne	.L6
	ldr	r1, .L40+8
	ldr	r1, [r1]
	cmp	r1, r3
	bne	.L6
	ldr	r8, [sp, #16]
	ldr	r6, [sp, #12]
	bl	bignum_init
	subs	r7, r0, #0
	add	r6, r8, r6, lsl #2
	beq	.L8
	mov	r0, r8
	mov	r2, r7
	mov	r1, r6
	bl	crypto_rsa_parse_integer
	subs	r8, r0, #0
	beq	.L11
	mov	r1, #0
	mov	r0, r7
	bl	bignum_cmp_d
	cmp	r0, #0
	bne	.L11
	mov	r0, r7
	bl	bignum_deinit
	mov	r1, r6
	ldr	r2, [r4, #32]
	mov	r0, r8
	bl	crypto_rsa_parse_integer
	mov	r1, r6
	ldr	r2, [r4, #28]
	bl	crypto_rsa_parse_integer
	mov	r1, r6
	ldr	r2, [r4, #24]
	bl	crypto_rsa_parse_integer
	mov	r1, r6
	ldr	r2, [r4, #20]
	bl	crypto_rsa_parse_integer
	mov	r1, r6
	ldr	r2, [r4, #16]
	bl	crypto_rsa_parse_integer
	mov	r1, r6
	ldr	r2, [r4, #12]
	bl	crypto_rsa_parse_integer
	mov	r1, r6
	ldr	r2, [r4, #8]
	bl	crypto_rsa_parse_integer
	ldr	r2, [r4, #4]
	mov	r1, r6
	bl	crypto_rsa_parse_integer
	subs	r2, r0, #0
	beq	.L8
	cmp	r6, r2
	beq	.L1
	ldr	r1, .L40+12
	sub	r3, r6, r2
	ldr	r0, [r1]
	asr	r3, r3, #2
	ldr	r1, .L40+16
	bl	wpa_hexdump
.L8:
	mov	r0, r4
	bl	crypto_rsa_free
	mov	r5, #0
.L1:
	ldr	r3, .L40
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L39
	mov	r0, r5
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L38:
	ldmib	sp, {r2, r3}
.L6:
	ldr	r1, .L40+12
	ldr	r0, [r1]
	ldr	r1, .L40+20
	bl	wpa_printf
	b	.L8
.L11:
	ldr	r3, .L40+12
	ldr	r1, .L40+24
	ldr	r0, [r3]
	bl	wpa_printf
	mov	r0, r7
	bl	bignum_deinit
	b	.L8
.L39:
	bl	__stack_chk_fail
.L41:
	.align	2
.L40:
	.word	.LC3
	.word	ASN1_CLASS_UNIVERSAL
	.word	ASN1_TAG_SEQUENCE
	.word	MSG_DEBUG
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.size	crypto_rsa_import_private_key, .-crypto_rsa_import_private_key
	.comm	MSG_DEBUG,4,4
	.comm	ASN1_TAG_SEQUENCE,4,4
	.comm	ASN1_CLASS_UNIVERSAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
