	.file	"extr_encrypted.c_derived_key_encrypt.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"encrypted_key: failed to encrypt (%d)\n"
	.text
	.p2align 4
	.type	derived_key_encrypt, @function
derived_key_encrypt:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	mov	r14d, edx
	push	r13
	.cfi_offset 13, -40
	mov	r13, rsi
	push	r12
	.cfi_offset 12, -48
	mov	r12, rdi
	push	rbx
	sub	rsp, 56
	.cfi_offset 3, -56
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR AES_BLOCK_SIZE[rip]
	mov	rcx, rsp
	mov	r8, rax
	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
.L13:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L13
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L14
.L4:
	mov	esi, DWORD PTR blksize[rip]
	mov	edi, DWORD PTR [r12]
	mov	DWORD PTR -92[rbp], r8d
	mov	rbx, rsp
	call	roundup@PLT
	mov	esi, r14d
	mov	rdi, r13
	mov	r15d, eax
	call	init_skcipher_req@PLT
	mov	r14, rax
	mov	rdi, rax
	call	PTR_ERR@PLT
	mov	rdi, r14
	mov	r13d, eax
	call	IS_ERR@PLT
	test	rax, rax
	je	.L15
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L16
	lea	rsp, -40[rbp]
	mov	eax, r13d
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	lea	r13, -64[rbp]
	mov	rdi, r12
	call	dump_decrypted_data@PLT
	mov	rdi, r13
	mov	esi, 2
	call	sg_init_table@PLT
	mov	esi, DWORD PTR 12[r12]
	mov	edx, DWORD PTR [r12]
	mov	rdi, r13
	call	sg_set_buf@PLT
	mov	edx, DWORD PTR AES_BLOCK_SIZE[rip]
	xor	edi, edi
	mov	DWORD PTR -88[rbp], edx
	call	ZERO_PAGE@PLT
	mov	edx, DWORD PTR -88[rbp]
	xor	ecx, ecx
	lea	rdi, -60[rbp]
	mov	esi, eax
	call	sg_set_page@PLT
	lea	r9, -68[rbp]
	mov	esi, 1
	mov	rdi, r9
	mov	QWORD PTR -88[rbp], r9
	call	sg_init_table@PLT
	mov	r9, QWORD PTR -88[rbp]
	mov	esi, DWORD PTR 8[r12]
	mov	edx, r15d
	mov	rdi, r9
	call	sg_set_buf@PLT
	mov	r8d, DWORD PTR -92[rbp]
	mov	esi, DWORD PTR 4[r12]
	mov	rdi, rbx
	lea	edx, 0[0+r8*4]
	call	memcpy@PLT
	mov	r9, QWORD PTR -88[rbp]
	mov	r8, rbx
	mov	rsi, r13
	mov	ecx, r15d
	mov	rdi, r14
	mov	rdx, r9
	call	skcipher_request_set_crypt@PLT
	mov	rdi, r14
	call	crypto_skcipher_encrypt@PLT
	mov	rdi, r14
	mov	r13d, eax
	call	crypto_skcipher_reqtfm@PLT
	mov	rdi, r14
	mov	rbx, rax
	call	skcipher_request_free@PLT
	mov	rdi, rbx
	call	crypto_free_skcipher@PLT
	test	r13d, r13d
	js	.L17
.L5:
	endbr64
	mov	esi, r15d
	mov	rdi, r12
	call	dump_encrypted_data@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L17:
	mov	esi, r13d
	lea	rdi, .LC0[rip]
	call	pr_err@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	derived_key_encrypt, .-derived_key_encrypt
	.comm	blksize,4,4
	.comm	AES_BLOCK_SIZE,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_encrypted.c_derived_key_encrypt.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"encrypted_key: failed to encrypt (%d)\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	derived_key_encrypt, %function
derived_key_encrypt:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #36
	ldr	r8, .L10
	ldr	ip, .L10+4
	ldr	r7, [r8]
	mov	r6, r1
	lsl	r7, r7, #2
	add	r3, r7, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldr	r3, .L10+8
	ldr	r1, [ip]
	mov	r4, r0
	ldr	r0, [r0]
	mov	r5, r2
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	bl	roundup
	mov	r1, r5
	mov	r9, r0
	mov	r0, r6
	bl	init_skcipher_req
	mov	r6, r0
	bl	PTR_ERR
	mov	r5, r0
	mov	r0, r6
	bl	IS_ERR
	subs	r3, r0, #0
	str	r3, [fp, #-56]
	beq	.L7
.L1:
	ldr	r3, .L10+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L8
	mov	r0, r5
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L7:
	mov	r0, r4
	bl	dump_decrypted_data
	mov	r1, #2
	sub	r0, fp, #48
	bl	sg_init_table
	ldr	r2, [r4]
	ldr	r1, [r4, #12]
	sub	r0, fp, #48
	bl	sg_set_buf
	ldr	r3, [fp, #-56]
	add	r10, sp, #8
	mov	r0, r3
	bl	ZERO_PAGE
	ldr	r3, [fp, #-56]
	mov	r1, r0
	ldr	r2, [r8]
	sub	r0, fp, #44
	bl	sg_set_page
	mov	r1, #1
	sub	r0, fp, #52
	bl	sg_init_table
	mov	r2, r9
	ldr	r1, [r4, #8]
	sub	r0, fp, #52
	bl	sg_set_buf
	mov	r2, r7
	ldr	r1, [r4, #4]
	mov	r0, r10
	bl	memcpy
	sub	r2, fp, #52
	sub	r1, fp, #48
	mov	r3, r9
	mov	r0, r6
	str	r10, [sp]
	bl	skcipher_request_set_crypt
	mov	r0, r6
	bl	crypto_skcipher_encrypt
	mov	r5, r0
	mov	r0, r6
	bl	crypto_skcipher_reqtfm
	mov	r3, r0
	mov	r0, r6
	mov	r6, r3
	bl	skcipher_request_free
	mov	r0, r6
	bl	crypto_free_skcipher
	cmp	r5, #0
	blt	.L9
.L2:
	mov	r1, r9
	mov	r0, r4
	bl	dump_encrypted_data
	b	.L1
.L9:
	mov	r1, r5
	ldr	r0, .L10+12
	bl	pr_err
	b	.L1
.L8:
	bl	__stack_chk_fail
.L11:
	.align	2
.L10:
	.word	AES_BLOCK_SIZE
	.word	blksize
	.word	.LC1
	.word	.LC0
	.size	derived_key_encrypt, .-derived_key_encrypt
	.comm	blksize,4,4
	.comm	AES_BLOCK_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
