	.file	"extr_wps_common.c_wps_kdf.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	wps_kdf
	.type	wps_kdf, @function
wps_kdf:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	r10, rcx
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	.cfi_offset 15, -24
	mov	r15, rsi
	push	r14
	.cfi_offset 14, -32
	mov	r14, rdi
	push	r13
	push	r12
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	mov	r12, r9
	push	rbx
	.cfi_offset 3, -56
	mov	rbx, r8
	sub	rsp, 168
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR SHA256_MAC_LEN[rip]
	mov	rdi, rsp
	lea	rax, 15[0+rax*4]
	mov	rcx, rax
	and	rax, -4096
	sub	rdi, rax
	and	rcx, -16
	mov	rax, rdi
	cmp	rsp, rax
	je	.L3
.L16:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L16
.L3:
	and	ecx, 4095
	sub	rsp, rcx
	test	rcx, rcx
	jne	.L17
.L4:
	lea	rcx, -144[rbp]
	lea	esi, 0[0+r12*8]
	mov	r13, rsp
	mov	QWORD PTR -184[rbp], r10
	mov	rdi, rcx
	mov	QWORD PTR -168[rbp], rcx
	mov	QWORD PTR -176[rbp], rdx
	call	WPA_PUT_BE32@PLT
	mov	r10, QWORD PTR -184[rbp]
	mov	rdx, QWORD PTR -176[rbp]
	lea	rax, -160[rbp]
	mov	QWORD PTR -200[rbp], rax
	mov	rdi, r10
	mov	QWORD PTR -88[rbp], rdx
	mov	QWORD PTR -128[rbp], rax
	mov	QWORD PTR -96[rbp], 16
	mov	QWORD PTR -120[rbp], r15
	mov	QWORD PTR -112[rbp], r10
	call	os_strlen@PLT
	mov	rcx, QWORD PTR -168[rbp]
	xor	edx, edx
	mov	QWORD PTR -72[rbp], 16
	mov	QWORD PTR -80[rbp], rax
	mov	QWORD PTR -104[rbp], rcx
	movsx	rcx, DWORD PTR SHA256_MAC_LEN[rip]
	lea	rax, -1[rcx+r12]
	div	rcx
	mov	DWORD PTR -188[rbp], eax
	test	eax, eax
	jle	.L1
	add	eax, 1
	mov	r15d, 1
	mov	DWORD PTR -168[rbp], eax
	lea	rax, -96[rbp]
	mov	QWORD PTR -176[rbp], rax
	lea	rax, -128[rbp]
	mov	QWORD PTR -184[rbp], rax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L18:
	movsx	rdx, DWORD PTR SHA256_MAC_LEN[rip]
	mov	rdi, rbx
	mov	rsi, r13
	add	r15d, 1
	call	os_memcpy@PLT
	movsx	rax, DWORD PTR SHA256_MAC_LEN[rip]
	lea	rbx, [rbx+rax*4]
	sub	r12, rax
	cmp	DWORD PTR -168[rbp], r15d
	je	.L1
.L8:
	mov	rdi, QWORD PTR -200[rbp]
	mov	esi, r15d
	call	WPA_PUT_BE32@PLT
	mov	r9, r13
	mov	edx, 4
	mov	rdi, r14
	mov	r8, QWORD PTR -176[rbp]
	mov	rcx, QWORD PTR -184[rbp]
	mov	esi, DWORD PTR SHA256_MAC_LEN[rip]
	call	hmac_sha256_vector@PLT
	cmp	DWORD PTR -188[rbp], r15d
	jg	.L18
	mov	rdx, r12
	mov	rsi, r13
	mov	rdi, rbx
	add	r15d, 1
	call	os_memcpy@PLT
	cmp	DWORD PTR -168[rbp], r15d
	jne	.L8
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L19
	lea	rsp, -40[rbp]
	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
.L17:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rcx], 0
	jmp	.L4
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	wps_kdf, .-wps_kdf
	.comm	SHA256_MAC_LEN,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_wps_common.c_wps_kdf.c"
	.text
	.global	__aeabi_uidiv
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	wps_kdf
	.syntax unified
	.arm
	.fpu softvfp
	.type	wps_kdf, %function
wps_kdf:
	@ args = 8, pretend = 0, frame = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #92
	mov	r4, r3
	mov	r7, #16
	ldr	r5, .L12
	ldr	r10, [fp, #8]
	ldr	r3, [r5]
	ldr	ip, .L12+4
	lsl	r3, r3, #2
	add	r3, r3, #7
	str	r2, [fp, #-116]
	bic	r3, r3, #7
	sub	r2, fp, #88
	sub	sp, sp, r3
	str	r1, [fp, #-112]
	mov	r8, r0
	lsl	r1, r10, #3
	mov	r0, r2
	ldr	ip, [ip]
	str	ip, [fp, #-40]
	mov	ip,#0
	ldr	r6, [fp, #4]
	bl	WPA_PUT_BE32
	ldr	r3, [fp, #-112]
	mov	r0, r4
	str	r3, [fp, #-68]
	ldr	r3, [fp, #-116]
	sub	r9, fp, #104
	str	r3, [fp, #-52]
	str	r4, [fp, #-64]
	str	r7, [fp, #-56]
	str	r9, [fp, #-72]
	bl	os_strlen
	mov	r3, r0
	ldr	r1, [r5]
	sub	r2, fp, #88
	sub	r0, r1, #1
	add	r0, r0, r10
	str	r3, [fp, #-48]
	str	r2, [fp, #-60]
	str	r7, [fp, #-44]
	bl	__aeabi_uidiv
	subs	r3, r0, #0
	str	r3, [fp, #-112]
	ble	.L1
	mov	r4, #1
	add	r3, r3, r4
	add	r7, sp, #8
	str	r3, [fp, #-116]
	b	.L5
.L10:
	mov	r0, r6
	mov	r1, r7
	ldr	r2, [r5]
	bl	os_memcpy
	ldr	r3, [r5]
	add	r4, r4, #1
	add	r6, r6, r3, lsl #2
	sub	r10, r10, r3
	ldr	r3, [fp, #-116]
	cmp	r3, r4
	beq	.L1
.L5:
	mov	r1, r4
	mov	r0, r9
	bl	WPA_PUT_BE32
	sub	r3, fp, #56
	str	r3, [sp]
	mov	r2, #4
	sub	r3, fp, #72
	mov	r0, r8
	ldr	r1, [r5]
	str	r7, [sp, #4]
	bl	hmac_sha256_vector
	ldr	r3, [fp, #-112]
	cmp	r3, r4
	bgt	.L10
	mov	r2, r10
	mov	r1, r7
	mov	r0, r6
	bl	os_memcpy
	ldr	r3, [fp, #-116]
	add	r4, r4, #1
	cmp	r3, r4
	bne	.L5
.L1:
	ldr	r3, .L12+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L11
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L11:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	SHA256_MAC_LEN
	.word	.LC0
	.size	wps_kdf, .-wps_kdf
	.comm	SHA256_MAC_LEN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
