	.file	"extr_cryptoloop.c_cryptoloop_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"cbc"
.LC1:
	.string	"-"
	.text
	.p2align 4
	.type	cryptoloop_init, @function
cryptoloop_init:
.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
	push	r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	mov	r13, rsi
	push	r12
	push	rbx
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 40
	movsx	rdx, DWORD PTR LO_NAME_SIZE[rip]
	mov	r12d, DWORD PTR EINVAL[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	rcx, rsp
	mov	r8, rdx
	add	rdx, 15
	mov	rax, rdx
	and	rdx, -4096
	sub	rcx, rdx
	and	rax, -16
	mov	rdx, rcx
	cmp	rsp, rdx
	je	.L3
.L23:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rdx
	jne	.L23
.L3:
	and	eax, 4095
	sub	rsp, rax
	test	rax, rax
	jne	.L24
.L4:
	mov	eax, DWORD PTR 0[r13]
	mov	r14, rsp
	cdq
	idiv	DWORD PTR LOOP_IV_SECTOR_SIZE[rip]
	test	edx, edx
	je	.L5
.L21:
	neg	r12d
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L25
	lea	rsp, -40[rbp]
	mov	eax, r12d
	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
.L5:
	.cfi_restore_state
	mov	esi, DWORD PTR 12[r13]
	mov	edx, r8d
	mov	rdi, rsp
	call	strncpy@PLT
	mov	eax, DWORD PTR LO_NAME_SIZE[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rsp
	sub	eax, 1
	cdqe
	mov	BYTE PTR [rsp+rax], 0
	call	strcspn@PLT
	movsx	rcx, eax
	cmp	BYTE PTR [rsp+rcx], 0
	mov	r15, rcx
	lea	r8, [rsp+rcx]
	jne	.L7
.L9:
	lea	r8, .LC0[rip]
	mov	r12d, 3
.L8:
	lea	eax, 2[r12+r15]
	cmp	eax, DWORD PTR LO_NAME_SIZE[rip]
	jl	.L10
	mov	r12d, DWORD PTR EINVAL[rip]
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rsi, r8
	mov	edx, r12d
	mov	rdi, r14
	add	r12, r14
	mov	QWORD PTR -72[rbp], rcx
	call	memmove@PLT
	mov	BYTE PTR [r12], 40
	mov	esi, DWORD PTR 12[r13]
	mov	edx, r15d
	lea	rdi, 1[r12]
	call	memcpy@PLT
	mov	rcx, QWORD PTR -72[rbp]
	mov	eax, 41
	xor	esi, esi
	mov	edx, DWORD PTR CRYPTO_ALG_ASYNC[rip]
	mov	rdi, r14
	mov	WORD PTR 1[r12+rcx], ax
	call	crypto_alloc_blkcipher@PLT
	mov	rdi, rax
	mov	r14, rax
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L26
	mov	edx, DWORD PTR 4[r13]
	mov	esi, DWORD PTR 8[r13]
	mov	rdi, r14
	call	crypto_blkcipher_setkey@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L27
	mov	QWORD PTR [rbx], r14
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L24:
	or	QWORD PTR -8[rsp+rax], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L26:
	mov	rdi, r14
	call	PTR_ERR@PLT
	mov	r12d, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	add	r8, 1
	lea	rsi, .LC1[rip]
	mov	QWORD PTR -80[rbp], rcx
	mov	rdi, r8
	mov	QWORD PTR -72[rbp], r8
	call	strcspn@PLT
	mov	r8, QWORD PTR -72[rbp]
	mov	rcx, QWORD PTR -80[rbp]
	movsx	r12, eax
	test	r12d, r12d
	je	.L9
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L27:
	mov	rdi, r14
	call	crypto_free_blkcipher@PLT
	jmp	.L1
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	cryptoloop_init, .-cryptoloop_init
	.comm	LO_NAME_SIZE,4,4
	.comm	LOOP_IV_SECTOR_SIZE,4,4
	.comm	EINVAL,4,4
	.comm	CRYPTO_ALG_ASYNC,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_cryptoloop.c_cryptoloop_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"cbc\000"
	.global	__aeabi_idivmod
	.align	2
.LC1:
	.ascii	"-\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cryptoloop_init, %function
cryptoloop_init:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #20
	mov	r7, r0
	ldr	r5, .L17
	ldr	r2, .L17+4
	ldr	r6, [r5]
	mov	r4, r1
	add	r3, r6, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldr	r3, .L17+8
	ldr	r0, [r1]
	str	r7, [fp, #-48]
	ldr	r1, [r2]
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	bl	__aeabi_idivmod
	ldr	r8, .L17+12
	subs	r10, r1, #0
	ldr	r3, [r8]
	rsbne	r4, r3, #0
	beq	.L12
.L1:
	ldr	r3, .L17+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	mov	r0, r4
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L12:
	mov	r2, r6
	ldr	r1, [r4, #12]
	mov	r0, sp
	bl	strncpy
	ldr	r7, [r5]
	mov	r0, sp
	add	r2, sp, r7
	strb	r10, [r2, #-1]
	ldr	r1, .L17+16
	bl	strcspn
	ldrb	r2, [sp, r0]	@ zero_extendqisi2
	mov	r9, sp
	cmp	r2, #0
	mov	r5, r0
	add	r10, sp, r0
	beq	.L9
	add	r10, r10, #1
	mov	r0, r10
	ldr	r1, .L17+16
	bl	strcspn
	subs	r6, r0, #0
	moveq	r6, #3
	ldr	r2, .L17+20
	moveq	r10, r2
	add	r2, r6, r5
	add	r2, r2, #2
	cmp	r7, r2
	bgt	.L5
.L14:
	ldr	r4, [r8]
	rsb	r4, r4, #0
	b	.L1
.L9:
	mov	r6, #3
	add	r2, r6, r5
	add	r2, r2, #2
	cmp	r7, r2
	ldr	r10, .L17+20
	ble	.L14
.L5:
	mov	r1, r10
	mov	r2, r6
	mov	r0, r9
	bl	memmove
	mov	r3, #40
	add	r8, r9, r6
	add	r8, r8, #1
	mov	r2, r5
	ldr	r1, [r4, #12]
	mov	r0, r8
	strb	r3, [r9, r6]
	bl	memcpy
	mov	r1, #0
	mov	ip, #41
	ldr	r3, .L17+24
	strb	ip, [r8, r5]
	ldr	r2, [r3]
	add	r3, r8, r5
	strb	r1, [r3, #1]
	mov	r0, r9
	bl	crypto_alloc_blkcipher
	mov	r5, r0
	bl	IS_ERR
	cmp	r0, #0
	bne	.L15
	ldr	r2, [r4, #4]
	ldr	r1, [r4, #8]
	mov	r0, r5
	bl	crypto_blkcipher_setkey
	subs	r4, r0, #0
	bne	.L16
	ldr	r3, [fp, #-48]
	str	r5, [r3]
	b	.L1
.L15:
	mov	r0, r5
	bl	PTR_ERR
	mov	r4, r0
	b	.L1
.L16:
	mov	r0, r5
	bl	crypto_free_blkcipher
	b	.L1
.L13:
	bl	__stack_chk_fail
.L18:
	.align	2
.L17:
	.word	LO_NAME_SIZE
	.word	LOOP_IV_SECTOR_SIZE
	.word	.LC2
	.word	EINVAL
	.word	.LC1
	.word	.LC0
	.word	CRYPTO_ALG_ASYNC
	.size	cryptoloop_init, .-cryptoloop_init
	.comm	LO_NAME_SIZE,4,4
	.comm	LOOP_IV_SECTOR_SIZE,4,4
	.comm	EINVAL,4,4
	.comm	CRYPTO_ALG_ASYNC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
