	.file	"extr_blake2b-ref.c_blake2b_init_key_salt_personal.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	blake2b_init_key_salt_personal
	.type	blake2b_init_key_salt_personal, @function
blake2b_init_key_salt_personal:
.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
	.cfi_offset 15, -24
	mov	r15, rdi
	push	r14
	.cfi_offset 14, -32
	mov	r14, r8
	push	r13
	.cfi_offset 13, -40
	mov	r13, rsi
	push	r12
	.cfi_offset 12, -48
	mov	r12, rcx
	push	rbx
	.cfi_offset 3, -56
	mov	rbx, r9
	sub	rsp, 104
	mov	QWORD PTR -136[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	test	rsi, rsi
	je	.L2
	cmp	QWORD PTR BLAKE2B_OUTBYTES[rip], rsi
	jl	.L2
.L3:
	cmp	QWORD PTR -136[rbp], 0
	je	.L4
	test	r12, r12
	je	.L4
	cmp	QWORD PTR BLAKE2B_KEYBYTES[rip], r12
	jl	.L4
.L5:
	mov	edi, DWORD PTR -60[rbp]
	xor	esi, esi
	mov	QWORD PTR -128[rbp], r13
	movabs	rax, 4294967297
	mov	QWORD PTR -120[rbp], r12
	mov	QWORD PTR -112[rbp], rax
	call	STORE32_LE@PLT
	mov	edi, DWORD PTR -64[rbp]
	xor	esi, esi
	call	STORE64_LE@PLT
	mov	rdi, QWORD PTR -104[rbp]
	xor	esi, esi
	mov	edx, 8
	mov	QWORD PTR -72[rbp], 0
	mov	QWORD PTR -80[rbp], 0
	call	memset@PLT
	test	r14, r14
	je	.L6
	lea	r13, -128[rbp]
	mov	rsi, r14
	mov	rdi, r13
	call	blake2b_param_set_salt@PLT
.L7:
	test	rbx, rbx
	je	.L8
	mov	rsi, rbx
	mov	rdi, r13
	call	blake2b_param_set_personal@PLT
	mov	rsi, r13
	mov	rdi, r15
	call	blake2b_init_param@PLT
	test	rax, rax
	js	.L23
.L10:
	movsx	rax, DWORD PTR BLAKE2B_BLOCKBYTES[rip]
	mov	rbx, rsp
	mov	r8, rax
	lea	rax, 15[0+rax*8]
	mov	rdx, rax
	and	rax, -4096
	sub	rbx, rax
	and	rdx, -16
	mov	rax, rbx
	cmp	rsp, rax
	je	.L12
.L24:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L24
.L12:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L25
.L13:
	mov	r13, rsp
	mov	edx, r8d
	xor	esi, esi
	mov	rdi, r13
	call	memset@PLT
	mov	rsi, QWORD PTR -136[rbp]
	mov	rdx, r12
	mov	rdi, r13
	call	memcpy@PLT
	mov	edx, DWORD PTR BLAKE2B_BLOCKBYTES[rip]
	mov	rsi, r13
	mov	rdi, r15
	call	blake2b_update@PLT
	mov	esi, DWORD PTR BLAKE2B_BLOCKBYTES[rip]
	mov	rdi, r13
	call	sodium_memzero@PLT
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L26
	lea	rsp, -40[rbp]
	xor	eax, eax
	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
.L4:
	.cfi_restore_state
	xor	eax, eax
	call	sodium_misuse@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	xor	eax, eax
	call	sodium_misuse@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rdi, QWORD PTR -88[rbp]
	xor	esi, esi
	mov	edx, 8
	call	memset@PLT
	mov	rsi, r13
	mov	rdi, r15
	call	blake2b_init_param@PLT
	test	rax, rax
	jns	.L10
.L23:
	xor	eax, eax
	call	sodium_misuse@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdi, QWORD PTR -96[rbp]
	mov	edx, 8
	xor	esi, esi
	lea	r13, -128[rbp]
	call	memset@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L25:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L13
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	blake2b_init_key_salt_personal, .-blake2b_init_key_salt_personal
	.comm	BLAKE2B_OUTBYTES,8,8
	.comm	BLAKE2B_KEYBYTES,8,8
	.comm	BLAKE2B_BLOCKBYTES,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_blake2b-ref.c_blake2b_init_key_salt_personal.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	blake2b_init_key_salt_personal
	.syntax unified
	.arm
	.fpu softvfp
	.type	blake2b_init_key_salt_personal, %function
blake2b_init_key_salt_personal:
	@ args = 8, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #48
	mov	r4, r3
	ldr	r3, .L20
	subs	r9, r1, #0
	mov	r5, r0
	mov	r6, r2
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	ldr	r8, [fp, #4]
	ldr	r7, [fp, #8]
	beq	.L2
	ldr	r3, .L20+4
	ldr	r3, [r3]
	cmp	r3, r9
	blt	.L2
.L3:
	cmp	r4, #0
	cmpne	r6, #0
	beq	.L4
	ldr	r3, .L20+8
	ldr	r3, [r3]
	cmp	r3, r4
	blt	.L4
.L5:
	mov	r3, #1
	mov	r1, #0
	ldr	r0, [fp, #-36]
	str	r3, [fp, #-68]
	str	r3, [fp, #-64]
	str	r9, [fp, #-76]
	str	r4, [fp, #-72]
	bl	STORE32_LE
	mov	r1, #0
	ldr	r0, [fp, #-40]
	bl	STORE64_LE
	mov	r1, #0
	ldr	r3, [fp, #-60]
	cmp	r8, r1
	str	r1, [fp, #-44]
	str	r1, [fp, #-48]
	strb	r1, [r3]
	strb	r1, [r3, #1]
	strb	r1, [r3, #2]
	strb	r1, [r3, #3]
	beq	.L6
	sub	r9, fp, #76
	mov	r1, r8
	mov	r0, r9
	bl	blake2b_param_set_salt
	cmp	r7, #0
	beq	.L8
.L19:
	mov	r1, r7
	mov	r0, r9
	bl	blake2b_param_set_personal
.L9:
	mov	r1, r9
	mov	r0, r5
	bl	blake2b_init_param
	cmp	r0, #0
	blt	.L17
.L10:
	ldr	r8, .L20+12
	mov	r1, #0
	ldr	r7, [r8]
	lsl	r3, r7, #2
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	mov	r9, sp
	mov	r2, r7
	mov	r0, r9
	bl	memset
	mov	r2, r4
	mov	r1, r6
	mov	r0, r9
	bl	memcpy
	mov	r2, r7
	mov	r1, r9
	mov	r0, r5
	bl	blake2b_update
	mov	r0, r9
	ldr	r1, [r8]
	bl	sodium_memzero
	ldr	r3, .L20
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L18
	mov	r0, #0
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L4:
	bl	sodium_misuse
	b	.L5
.L2:
	bl	sodium_misuse
	b	.L3
.L6:
	ldr	r3, [fp, #-56]
	cmp	r7, #0
	sub	r9, fp, #76
	strb	r8, [r3]
	strb	r8, [r3, #1]
	strb	r8, [r3, #2]
	strb	r8, [r3, #3]
	bne	.L19
.L8:
	ldr	r3, [fp, #-52]
	strb	r7, [r3]
	strb	r7, [r3, #1]
	strb	r7, [r3, #2]
	strb	r7, [r3, #3]
	b	.L9
.L17:
	bl	sodium_misuse
	b	.L10
.L18:
	bl	__stack_chk_fail
.L21:
	.align	2
.L20:
	.word	.LC0
	.word	BLAKE2B_OUTBYTES
	.word	BLAKE2B_KEYBYTES
	.word	BLAKE2B_BLOCKBYTES
	.size	blake2b_init_key_salt_personal, .-blake2b_init_key_salt_personal
	.comm	BLAKE2B_OUTBYTES,4,4
	.comm	BLAKE2B_KEYBYTES,4,4
	.comm	BLAKE2B_BLOCKBYTES,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
