	.file	"extr_scrypt.c_kdf_scrypt_set_ctx_params.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	kdf_scrypt_set_ctx_params, @function
kdf_scrypt_set_ctx_params:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	mov	rdi, rbp
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	esi, DWORD PTR OSSL_KDF_PARAM_PASSWORD[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	OSSL_PARAM_locate_const@PLT
	test	rax, rax
	je	.L5
	mov	rdx, rax
	lea	rsi, 24[rbx]
	lea	rdi, 28[rbx]
	call	scrypt_set_membuf@PLT
	test	eax, eax
	je	.L9
.L5:
	mov	esi, DWORD PTR OSSL_KDF_PARAM_SALT[rip]
	mov	rdi, rbp
	call	OSSL_PARAM_locate_const@PLT
	mov	rdx, rax
	test	rax, rax
	je	.L4
	lea	rsi, 16[rbx]
	lea	rdi, 20[rbx]
	call	scrypt_set_membuf@PLT
	test	eax, eax
	je	.L9
.L4:
	mov	esi, DWORD PTR OSSL_KDF_PARAM_SCRYPT_N[rip]
	mov	rdi, rbp
	call	OSSL_PARAM_locate_const@PLT
	mov	rdi, rax
	test	rax, rax
	je	.L8
	lea	rsi, 4[rsp]
	call	OSSL_PARAM_get_uint64@PLT
	test	eax, eax
	je	.L9
	mov	edi, DWORD PTR 4[rsp]
	cmp	edi, 1
	jle	.L9
	call	is_power_of_two@PLT
	test	eax, eax
	je	.L9
	mov	eax, DWORD PTR 4[rsp]
	mov	DWORD PTR [rbx], eax
.L8:
	mov	esi, DWORD PTR OSSL_KDF_PARAM_SCRYPT_R[rip]
	mov	rdi, rbp
	call	OSSL_PARAM_locate_const@PLT
	mov	rdi, rax
	test	rax, rax
	je	.L10
	lea	rsi, 4[rsp]
	call	OSSL_PARAM_get_uint64@PLT
	test	eax, eax
	je	.L9
	mov	eax, DWORD PTR 4[rsp]
	test	eax, eax
	jle	.L9
	mov	DWORD PTR 4[rbx], eax
.L10:
	mov	esi, DWORD PTR OSSL_KDF_PARAM_SCRYPT_P[rip]
	mov	rdi, rbp
	call	OSSL_PARAM_locate_const@PLT
	mov	rdi, rax
	test	rax, rax
	je	.L11
	lea	rsi, 4[rsp]
	call	OSSL_PARAM_get_uint64@PLT
	test	eax, eax
	je	.L9
	mov	eax, DWORD PTR 4[rsp]
	test	eax, eax
	jle	.L9
	mov	DWORD PTR 8[rbx], eax
.L11:
	mov	esi, DWORD PTR OSSL_KDF_PARAM_SCRYPT_MAXMEM[rip]
	mov	rdi, rbp
	mov	r12d, 1
	call	OSSL_PARAM_locate_const@PLT
	mov	rdi, rax
	test	rax, rax
	je	.L1
	lea	rsi, 4[rsp]
	call	OSSL_PARAM_get_uint64@PLT
	test	eax, eax
	je	.L9
	mov	eax, DWORD PTR 4[rsp]
	test	eax, eax
	jle	.L9
	mov	DWORD PTR 12[rbx], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	xor	r12d, r12d
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L41
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
.L41:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	kdf_scrypt_set_ctx_params, .-kdf_scrypt_set_ctx_params
	.comm	OSSL_KDF_PARAM_SCRYPT_R,4,4
	.comm	OSSL_KDF_PARAM_SCRYPT_P,4,4
	.comm	OSSL_KDF_PARAM_SCRYPT_N,4,4
	.comm	OSSL_KDF_PARAM_SCRYPT_MAXMEM,4,4
	.comm	OSSL_KDF_PARAM_SALT,4,4
	.comm	OSSL_KDF_PARAM_PASSWORD,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_scrypt.c_kdf_scrypt_set_ctx_params.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	kdf_scrypt_set_ctx_params, %function
kdf_scrypt_set_ctx_params:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	ldr	r3, .L41
	mov	r4, r1
	mov	r5, r0
	mov	r0, r1
	ldr	r1, [r3]
	ldr	r3, .L41+4
	sub	sp, sp, #12
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	OSSL_PARAM_locate_const
	subs	r2, r0, #0
	beq	.L5
	add	r1, r5, #24
	add	r0, r5, #28
	bl	scrypt_set_membuf
	cmp	r0, #0
	beq	.L9
.L5:
	ldr	r3, .L41+8
	mov	r0, r4
	ldr	r1, [r3]
	bl	OSSL_PARAM_locate_const
	subs	r2, r0, #0
	beq	.L4
	add	r1, r5, #16
	add	r0, r5, #20
	bl	scrypt_set_membuf
	cmp	r0, #0
	beq	.L9
.L4:
	ldr	r3, .L41+12
	mov	r0, r4
	ldr	r1, [r3]
	bl	OSSL_PARAM_locate_const
	cmp	r0, #0
	beq	.L8
	mov	r1, sp
	bl	OSSL_PARAM_get_uint64
	cmp	r0, #0
	beq	.L9
	ldr	r0, [sp]
	cmp	r0, #1
	ble	.L9
	bl	is_power_of_two
	cmp	r0, #0
	beq	.L9
	ldr	r3, [sp]
	str	r3, [r5]
.L8:
	ldr	r3, .L41+16
	mov	r0, r4
	ldr	r1, [r3]
	bl	OSSL_PARAM_locate_const
	cmp	r0, #0
	beq	.L10
	mov	r1, sp
	bl	OSSL_PARAM_get_uint64
	cmp	r0, #0
	beq	.L9
	ldr	r3, [sp]
	cmp	r3, #0
	ble	.L9
	str	r3, [r5, #4]
.L10:
	ldr	r3, .L41+20
	mov	r0, r4
	ldr	r1, [r3]
	bl	OSSL_PARAM_locate_const
	cmp	r0, #0
	beq	.L11
	mov	r1, sp
	bl	OSSL_PARAM_get_uint64
	cmp	r0, #0
	beq	.L9
	ldr	r3, [sp]
	cmp	r3, #0
	ble	.L9
	str	r3, [r5, #8]
.L11:
	ldr	r3, .L41+24
	mov	r0, r4
	ldr	r1, [r3]
	bl	OSSL_PARAM_locate_const
	cmp	r0, #0
	moveq	r0, #1
	beq	.L1
	mov	r1, sp
	bl	OSSL_PARAM_get_uint64
	cmp	r0, #0
	beq	.L9
	ldr	r3, [sp]
	cmp	r3, #0
	movgt	r0, #1
	strgt	r3, [r5, #12]
	bgt	.L1
.L9:
	mov	r0, #0
.L1:
	ldr	r3, .L41+4
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L40
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L40:
	bl	__stack_chk_fail
.L42:
	.align	2
.L41:
	.word	OSSL_KDF_PARAM_PASSWORD
	.word	.LC0
	.word	OSSL_KDF_PARAM_SALT
	.word	OSSL_KDF_PARAM_SCRYPT_N
	.word	OSSL_KDF_PARAM_SCRYPT_R
	.word	OSSL_KDF_PARAM_SCRYPT_P
	.word	OSSL_KDF_PARAM_SCRYPT_MAXMEM
	.size	kdf_scrypt_set_ctx_params, .-kdf_scrypt_set_ctx_params
	.comm	OSSL_KDF_PARAM_SCRYPT_R,4,4
	.comm	OSSL_KDF_PARAM_SCRYPT_P,4,4
	.comm	OSSL_KDF_PARAM_SCRYPT_N,4,4
	.comm	OSSL_KDF_PARAM_SCRYPT_MAXMEM,4,4
	.comm	OSSL_KDF_PARAM_SALT,4,4
	.comm	OSSL_KDF_PARAM_PASSWORD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
