	.file	"extr_eap_sake_common.c_eap_sake_derive_keys.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"EAP-SAKE: Deriving keys"
.LC1:
	.string	"EAP-SAKE: Root-Secret-A"
.LC2:
	.string	"SAKE Master Secret A"
.LC3:
	.string	"EAP-SAKE: SMS-A"
.LC4:
	.string	"Transient EAP Key"
.LC5:
	.string	"EAP-SAKE: TEK-Auth"
.LC6:
	.string	"EAP-SAKE: TEK-Cipher"
.LC7:
	.string	"EAP-SAKE: Root-Secret-B"
.LC8:
	.string	"SAKE Master Secret B"
.LC9:
	.string	"EAP-SAKE: SMS-B"
.LC10:
	.string	"Master Session Key"
.LC11:
	.string	"EAP-SAKE: MSK"
.LC12:
	.string	"EAP-SAKE: EMSK"
	.text
	.p2align 4
	.globl	eap_sake_derive_keys
	.type	eap_sake_derive_keys, @function
eap_sake_derive_keys:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	r10, rdi
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	mov	r14, rsi
	push	r13
	.cfi_offset 13, -40
	mov	r13, r8
	push	r12
	.cfi_offset 12, -48
	mov	r12, rdx
	push	rbx
	.cfi_offset 3, -56
	mov	rbx, rcx
	sub	rsp, 88
	mov	rax, QWORD PTR 16[rbp]
	mov	QWORD PTR -80[rbp], r9
	mov	rdi, rsp
	mov	QWORD PTR -88[rbp], rax
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR EAP_SAKE_SMS_LEN[rip]
	lea	rax, 15[0+rax*4]
	mov	rcx, rax
	mov	rdx, rax
	and	rcx, -4096
	and	rdx, -16
	sub	rdi, rcx
	mov	rcx, rdi
	cmp	rsp, rcx
	je	.L3
.L26:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rcx
	jne	.L26
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L27
.L4:
	mov	rdx, rax
	mov	rsi, rsp
	and	rax, -4096
	mov	r11, rsp
	sub	rsi, rax
	and	rdx, -16
	mov	rax, rsi
	cmp	rsp, rax
	je	.L6
.L28:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L28
.L6:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L29
.L7:
	mov	eax, DWORD PTR EAP_EMSK_LEN[rip]
	add	eax, DWORD PTR EAP_MSK_LEN[rip]
	mov	rsi, rsp
	mov	r15, rsp
	mov	DWORD PTR -92[rbp], eax
	cdqe
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rsi, rax
	and	rdx, -16
	mov	rax, rsi
	cmp	rsp, rax
	je	.L9
.L30:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L30
.L9:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	je	.L10
	or	QWORD PTR -8[rsp+rdx], 0
.L10:
	mov	edi, DWORD PTR MSG_DEBUG[rip]
	lea	rsi, .LC0[rip]
	mov	QWORD PTR -120[rbp], r11
	mov	QWORD PTR -72[rbp], r10
	mov	QWORD PTR -104[rbp], rsp
	call	wpa_printf@PLT
	mov	r10, QWORD PTR -72[rbp]
	mov	ecx, DWORD PTR EAP_SAKE_ROOT_SECRET_LEN[rip]
	lea	rsi, .LC1[rip]
	mov	edi, DWORD PTR MSG_DEBUG[rip]
	mov	rdx, r10
	mov	QWORD PTR -112[rbp], r10
	call	wpa_hexdump_key@PLT
	mov	r11, QWORD PTR -120[rbp]
	sub	rsp, 8
	mov	r9, r12
	mov	r8d, DWORD PTR EAP_SAKE_RAND_LEN[rip]
	mov	eax, DWORD PTR EAP_SAKE_SMS_LEN[rip]
	mov	rcx, rbx
	lea	rdx, .LC2[rip]
	mov	r10, QWORD PTR -112[rbp]
	mov	esi, DWORD PTR EAP_SAKE_ROOT_SECRET_LEN[rip]
	mov	QWORD PTR -72[rbp], r11
	push	rax
	push	r11
	mov	rdi, r10
	push	r8
	call	eap_sake_kdf@PLT
	add	rsp, 32
	mov	r11, QWORD PTR -72[rbp]
	test	rax, rax
	js	.L13
	mov	ecx, DWORD PTR EAP_SAKE_SMS_LEN[rip]
	mov	edi, DWORD PTR MSG_DEBUG[rip]
	mov	rdx, r11
	lea	rsi, .LC3[rip]
	mov	QWORD PTR -72[rbp], r11
	call	wpa_hexdump_key@PLT
	sub	rsp, 8
	mov	r11, QWORD PTR -72[rbp]
	mov	r9, rbx
	mov	r8d, DWORD PTR EAP_SAKE_RAND_LEN[rip]
	mov	eax, DWORD PTR EAP_SAKE_TEK_LEN[rip]
	mov	rcx, r12
	lea	rdx, .LC4[rip]
	mov	esi, DWORD PTR EAP_SAKE_SMS_LEN[rip]
	mov	rdi, r11
	push	rax
	push	r13
	push	r8
	call	eap_sake_kdf@PLT
	add	rsp, 32
	test	rax, rax
	js	.L13
	mov	ecx, DWORD PTR EAP_SAKE_TEK_AUTH_LEN[rip]
	mov	edi, DWORD PTR MSG_DEBUG[rip]
	mov	rdx, r13
	lea	rsi, .LC5[rip]
	call	wpa_hexdump_key@PLT
	movsx	rax, DWORD PTR EAP_SAKE_TEK_AUTH_LEN[rip]
	mov	ecx, DWORD PTR EAP_SAKE_TEK_CIPHER_LEN[rip]
	lea	rsi, .LC6[rip]
	mov	edi, DWORD PTR MSG_DEBUG[rip]
	lea	rdx, 0[r13+rax*4]
	call	wpa_hexdump_key@PLT
	mov	ecx, DWORD PTR EAP_SAKE_ROOT_SECRET_LEN[rip]
	mov	rdx, r14
	mov	edi, DWORD PTR MSG_DEBUG[rip]
	lea	rsi, .LC7[rip]
	call	wpa_hexdump_key@PLT
	sub	rsp, 8
	mov	r9, r12
	mov	rcx, rbx
	mov	r8d, DWORD PTR EAP_SAKE_RAND_LEN[rip]
	mov	eax, DWORD PTR EAP_SAKE_SMS_LEN[rip]
	mov	rdi, r14
	lea	rdx, .LC8[rip]
	mov	esi, DWORD PTR EAP_SAKE_ROOT_SECRET_LEN[rip]
	push	rax
	push	r15
	push	r8
	call	eap_sake_kdf@PLT
	add	rsp, 32
	test	rax, rax
	js	.L13
	mov	ecx, DWORD PTR EAP_SAKE_SMS_LEN[rip]
	mov	edi, DWORD PTR MSG_DEBUG[rip]
	mov	rdx, r15
	lea	rsi, .LC9[rip]
	call	wpa_hexdump_key@PLT
	mov	eax, DWORD PTR -92[rbp]
	mov	r14, QWORD PTR -104[rbp]
	sub	rsp, 8
	mov	r8d, DWORD PTR EAP_SAKE_RAND_LEN[rip]
	mov	r9, rbx
	mov	rcx, r12
	mov	rdi, r15
	sal	eax, 2
	mov	esi, DWORD PTR EAP_SAKE_SMS_LEN[rip]
	lea	rdx, .LC10[rip]
	push	rax
	push	r14
	push	r8
	call	eap_sake_kdf@PLT
	add	rsp, 32
	test	rax, rax
	js	.L13
	mov	r15, QWORD PTR -80[rbp]
	mov	edx, DWORD PTR EAP_MSK_LEN[rip]
	mov	rsi, r14
	mov	rdi, r15
	call	os_memcpy@PLT
	mov	rbx, QWORD PTR -88[rbp]
	movsx	rax, DWORD PTR EAP_MSK_LEN[rip]
	mov	edx, DWORD PTR EAP_EMSK_LEN[rip]
	lea	rsi, [r14+rax*4]
	mov	rdi, rbx
	call	os_memcpy@PLT
	mov	ecx, DWORD PTR EAP_MSK_LEN[rip]
	mov	rdx, r15
	mov	edi, DWORD PTR MSG_DEBUG[rip]
	lea	rsi, .LC11[rip]
	call	wpa_hexdump_key@PLT
	mov	ecx, DWORD PTR EAP_EMSK_LEN[rip]
	mov	rdx, rbx
	mov	edi, DWORD PTR MSG_DEBUG[rip]
	lea	rsi, .LC12[rip]
	call	wpa_hexdump_key@PLT
	xor	eax, eax
.L1:
	mov	rbx, QWORD PTR -56[rbp]
	xor	rbx, QWORD PTR fs:40
	jne	.L31
	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
.L27:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L29:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L13:
	mov	eax, -1
	jmp	.L1
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	eap_sake_derive_keys, .-eap_sake_derive_keys
	.comm	MSG_DEBUG,4,4
	.comm	EAP_SAKE_TEK_LEN,4,4
	.comm	EAP_SAKE_TEK_CIPHER_LEN,4,4
	.comm	EAP_SAKE_TEK_AUTH_LEN,4,4
	.comm	EAP_SAKE_SMS_LEN,4,4
	.comm	EAP_SAKE_ROOT_SECRET_LEN,4,4
	.comm	EAP_SAKE_RAND_LEN,4,4
	.comm	EAP_MSK_LEN,4,4
	.comm	EAP_EMSK_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_eap_sake_common.c_eap_sake_derive_keys.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"EAP-SAKE: Deriving keys\000"
	.align	2
.LC1:
	.ascii	"EAP-SAKE: Root-Secret-A\000"
	.align	2
.LC2:
	.ascii	"SAKE Master Secret A\000"
	.align	2
.LC3:
	.ascii	"EAP-SAKE: SMS-A\000"
	.align	2
.LC4:
	.ascii	"Transient EAP Key\000"
	.align	2
.LC5:
	.ascii	"EAP-SAKE: TEK-Auth\000"
	.align	2
.LC6:
	.ascii	"EAP-SAKE: TEK-Cipher\000"
	.align	2
.LC7:
	.ascii	"EAP-SAKE: Root-Secret-B\000"
	.align	2
.LC8:
	.ascii	"SAKE Master Secret B\000"
	.align	2
.LC9:
	.ascii	"EAP-SAKE: SMS-B\000"
	.align	2
.LC10:
	.ascii	"Master Session Key\000"
	.align	2
.LC11:
	.ascii	"EAP-SAKE: MSK\000"
	.align	2
.LC12:
	.ascii	"EAP-SAKE: EMSK\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	eap_sake_derive_keys
	.syntax unified
	.arm
	.fpu softvfp
	.type	eap_sake_derive_keys, %function
eap_sake_derive_keys:
	@ args = 12, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #68
	mov	ip, r1
	mov	r10, r0
	mov	r6, r3
	ldr	r5, .L9
	ldr	r0, .L9+4
	ldr	r3, [r5]
	ldr	r9, .L9+8
	lsl	r3, r3, #2
	add	r3, r3, #7
	bic	r3, r3, #7
	ldr	r1, [r0]
	str	r2, [fp, #-48]
	sub	sp, sp, r3
	ldr	r2, [r9]
	add	r8, sp, #24
	sub	sp, sp, r3
	add	r3, sp, #24
	add	r2, r2, r1
	lsl	r1, r2, #2
	str	r3, [fp, #-56]
	ldr	r3, .L9+12
	str	ip, [fp, #-60]
	str	r1, [fp, #-64]
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	ldr	r3, [fp, #4]
	ldr	r4, .L9+16
	str	r3, [fp, #-52]
	ldr	r3, [fp, #8]
	add	r2, r1, #7
	bic	r2, r2, #7
	str	r3, [fp, #-68]
	ldr	r3, [fp, #12]
	sub	sp, sp, r2
	ldr	r1, .L9+20
	ldr	r0, [r4]
	str	r3, [fp, #-72]
	bl	wpa_printf
	ldr	r3, .L9+24
	mov	r2, r10
	ldr	r3, [r3]
	ldr	r1, .L9+28
	ldr	r7, .L9+32
	ldr	r0, [r4]
	bl	wpa_hexdump_key
	ldr	r2, [r5]
	ldr	r3, [r7]
	ldr	r1, [fp, #-48]
	str	r2, [sp, #16]
	ldr	r2, .L9+24
	str	r3, [sp, #8]
	str	r3, [sp]
	str	r8, [sp, #12]
	str	r1, [sp, #4]
	ldr	r1, [r2]
	mov	r0, r10
	mov	r3, r6
	ldr	r2, .L9+36
	bl	eap_sake_kdf
	cmp	r0, #0
	blt	.L4
	mov	r2, r8
	ldr	r3, [r5]
	ldr	r1, .L9+40
	ldr	r0, [r4]
	bl	wpa_hexdump_key
	ldr	r2, .L9+44
	ldr	r3, [r7]
	ldr	r2, [r2]
	ldr	r1, [fp, #-52]
	str	r2, [sp, #16]
	str	r3, [sp, #8]
	str	r3, [sp]
	str	r1, [sp, #12]
	str	r6, [sp, #4]
	mov	r0, r8
	ldr	r3, [fp, #-48]
	ldr	r2, .L9+48
	ldr	r1, [r5]
	bl	eap_sake_kdf
	cmp	r0, #0
	blt	.L4
	ldr	r8, .L9+52
	ldr	r2, [fp, #-52]
	ldr	r3, [r8]
	ldr	r1, .L9+56
	ldr	r0, [r4]
	bl	wpa_hexdump_key
	ldr	r2, [r8]
	ldr	r1, [fp, #-52]
	ldr	r3, .L9+60
	add	r2, r1, r2, lsl #2
	ldr	r3, [r3]
	ldr	r1, .L9+64
	ldr	r0, [r4]
	bl	wpa_hexdump_key
	ldr	r2, .L9+24
	ldr	r1, .L9+68
	ldr	r3, [r2]
	ldr	r0, [r4]
	ldr	r2, [fp, #-60]
	bl	wpa_hexdump_key
	ldr	r1, [fp, #-56]
	ldr	r8, [fp, #-48]
	ldr	r3, [r7]
	ldr	r2, [r5]
	ldr	ip, .L9+24
	str	r1, [sp, #12]
	str	r8, [sp, #4]
	ldr	r1, [ip]
	ldr	r0, [fp, #-60]
	str	r3, [sp, #8]
	str	r3, [sp]
	str	r2, [sp, #16]
	mov	r3, r6
	ldr	r2, .L9+72
	bl	eap_sake_kdf
	cmp	r0, #0
	blt	.L4
	ldr	r3, [r5]
	ldr	r2, [fp, #-56]
	ldr	r1, .L9+76
	ldr	r0, [r4]
	bl	wpa_hexdump_key
	ldr	r3, [r7]
	ldr	r1, [fp, #-64]
	add	r10, sp, #24
	str	r3, [sp, #8]
	str	r3, [sp]
	str	r1, [sp, #16]
	str	r10, [sp, #12]
	str	r6, [sp, #4]
	mov	r3, r8
	ldr	r1, [r5]
	ldr	r0, [fp, #-56]
	ldr	r2, .L9+80
	bl	eap_sake_kdf
	cmp	r0, #0
	blt	.L4
	ldr	r7, [fp, #-68]
	mov	r1, r10
	ldr	r2, [r9]
	mov	r0, r7
	bl	os_memcpy
	ldr	r5, .L9+4
	ldr	r6, [fp, #-72]
	ldr	r1, [r9]
	ldr	r2, [r5]
	add	r1, r10, r1, lsl #2
	mov	r0, r6
	bl	os_memcpy
	mov	r2, r7
	ldr	r3, [r9]
	ldr	r1, .L9+84
	ldr	r0, [r4]
	bl	wpa_hexdump_key
	mov	r2, r6
	ldr	r3, [r5]
	ldr	r0, [r4]
	ldr	r1, .L9+88
	bl	wpa_hexdump_key
	mov	r0, #0
.L1:
	ldr	r3, .L9+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L8
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	mvn	r0, #0
	b	.L1
.L8:
	bl	__stack_chk_fail
.L10:
	.align	2
.L9:
	.word	EAP_SAKE_SMS_LEN
	.word	EAP_EMSK_LEN
	.word	EAP_MSK_LEN
	.word	.LC13
	.word	MSG_DEBUG
	.word	.LC0
	.word	EAP_SAKE_ROOT_SECRET_LEN
	.word	.LC1
	.word	EAP_SAKE_RAND_LEN
	.word	.LC2
	.word	.LC3
	.word	EAP_SAKE_TEK_LEN
	.word	.LC4
	.word	EAP_SAKE_TEK_AUTH_LEN
	.word	.LC5
	.word	EAP_SAKE_TEK_CIPHER_LEN
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.size	eap_sake_derive_keys, .-eap_sake_derive_keys
	.comm	MSG_DEBUG,4,4
	.comm	EAP_SAKE_TEK_LEN,4,4
	.comm	EAP_SAKE_TEK_CIPHER_LEN,4,4
	.comm	EAP_SAKE_TEK_AUTH_LEN,4,4
	.comm	EAP_SAKE_SMS_LEN,4,4
	.comm	EAP_SAKE_ROOT_SECRET_LEN,4,4
	.comm	EAP_SAKE_RAND_LEN,4,4
	.comm	EAP_MSK_LEN,4,4
	.comm	EAP_EMSK_LEN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
