	.file	"extr_eap_sim_common.c_eap_sim_derive_keys.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"EAP-SIM: Failed to derive keys"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"EAP-SIM: K_encr"
.LC2:
	.string	"EAP-SIM: K_aut"
	.section	.rodata.str1.8
	.align 8
.LC3:
	.string	"EAP-SIM: keying material (MSK)"
	.section	.rodata.str1.1
.LC4:
	.string	"EAP-SIM: EMSK"
	.text
	.p2align 4
	.globl	eap_sim_derive_keys
	.type	eap_sim_derive_keys, @function
eap_sim_derive_keys:
.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, rsi
	push	r14
	.cfi_offset 14, -32
	mov	r14, rdx
	push	r13
	.cfi_offset 13, -40
	mov	r13, rcx
	push	r12
	.cfi_offset 12, -48
	mov	r12, r8
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -56
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR EAP_SIM_K_AUT_LEN[rip]
	add	eax, DWORD PTR EAP_SIM_K_ENCR_LEN[rip]
	mov	rbx, rsp
	add	eax, DWORD PTR EAP_SIM_KEYING_DATA_LEN[rip]
	add	eax, DWORD PTR EAP_EMSK_LEN[rip]
	movsx	rdx, eax
	lea	rdx, 15[0+rdx*4]
	mov	rcx, rdx
	and	rdx, -4096
	sub	rbx, rdx
	and	rcx, -16
	mov	rdx, rbx
	cmp	rsp, rdx
	je	.L3
.L13:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rdx
	jne	.L13
.L3:
	and	ecx, 4095
	sub	rsp, rcx
	test	rcx, rcx
	jne	.L14
.L4:
	sal	eax, 2
	mov	rbx, rsp
	mov	edx, eax
	mov	rsi, rbx
	mov	DWORD PTR -76[rbp], eax
	call	eap_sim_prf@PLT
	test	rax, rax
	js	.L15
	mov	edx, DWORD PTR EAP_SIM_K_ENCR_LEN[rip]
	mov	rsi, rbx
	mov	rdi, r15
	call	os_memcpy@PLT
	movsx	rax, DWORD PTR EAP_SIM_K_ENCR_LEN[rip]
	mov	edx, DWORD PTR EAP_SIM_K_AUT_LEN[rip]
	mov	rdi, r14
	lea	rcx, [rbx+rax*4]
	mov	rsi, rcx
	mov	QWORD PTR -72[rbp], rcx
	call	os_memcpy@PLT
	mov	rcx, QWORD PTR -72[rbp]
	movsx	rax, DWORD PTR EAP_SIM_K_AUT_LEN[rip]
	mov	rdi, r13
	mov	edx, DWORD PTR EAP_SIM_KEYING_DATA_LEN[rip]
	lea	rcx, [rcx+rax*4]
	mov	rsi, rcx
	mov	QWORD PTR -72[rbp], rcx
	call	os_memcpy@PLT
	mov	rcx, QWORD PTR -72[rbp]
	movsx	rax, DWORD PTR EAP_SIM_KEYING_DATA_LEN[rip]
	mov	rdi, r12
	mov	edx, DWORD PTR EAP_EMSK_LEN[rip]
	lea	rsi, [rcx+rax*4]
	call	os_memcpy@PLT
	mov	ecx, DWORD PTR EAP_SIM_K_ENCR_LEN[rip]
	mov	rdx, r15
	mov	edi, DWORD PTR MSG_DEBUG[rip]
	lea	rsi, .LC1[rip]
	call	wpa_hexdump_key@PLT
	mov	ecx, DWORD PTR EAP_SIM_K_AUT_LEN[rip]
	mov	rdx, r14
	mov	edi, DWORD PTR MSG_DEBUG[rip]
	lea	rsi, .LC2[rip]
	call	wpa_hexdump_key@PLT
	mov	ecx, DWORD PTR EAP_SIM_KEYING_DATA_LEN[rip]
	mov	rdx, r13
	mov	edi, DWORD PTR MSG_DEBUG[rip]
	lea	rsi, .LC3[rip]
	call	wpa_hexdump_key@PLT
	mov	ecx, DWORD PTR EAP_EMSK_LEN[rip]
	mov	rdx, r12
	mov	edi, DWORD PTR MSG_DEBUG[rip]
	lea	rsi, .LC4[rip]
	call	wpa_hexdump_key@PLT
	mov	edx, DWORD PTR -76[rbp]
	xor	esi, esi
	mov	rdi, rbx
	call	os_memset@PLT
	xor	eax, eax
.L1:
	mov	rbx, QWORD PTR -56[rbp]
	xor	rbx, QWORD PTR fs:40
	jne	.L16
	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
.L14:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rcx], 0
	jmp	.L4
.L15:
	mov	edi, DWORD PTR MSG_ERROR[rip]
	lea	rsi, .LC0[rip]
	call	wpa_printf@PLT
	mov	eax, -1
	jmp	.L1
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	eap_sim_derive_keys, .-eap_sim_derive_keys
	.comm	MSG_ERROR,4,4
	.comm	MSG_DEBUG,4,4
	.comm	EAP_SIM_K_ENCR_LEN,4,4
	.comm	EAP_SIM_K_AUT_LEN,4,4
	.comm	EAP_SIM_KEYING_DATA_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_sim_common.c_eap_sim_derive_keys.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"EAP-SIM: Failed to derive keys\000"
	.align	2
.LC1:
	.ascii	"EAP-SIM: K_encr\000"
	.align	2
.LC2:
	.ascii	"EAP-SIM: K_aut\000"
	.align	2
.LC3:
	.ascii	"EAP-SIM: keying material (MSK)\000"
	.align	2
.LC4:
	.ascii	"EAP-SIM: EMSK\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	eap_sim_derive_keys
	.syntax unified
	.arm
	.fpu softvfp
	.type	eap_sim_derive_keys, %function
eap_sim_derive_keys:
	@ args = 4, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #28
	ldr	r9, .L9
	ldr	r8, .L9+4
	ldr	r4, [r9]
	ldr	ip, [r8]
	ldr	r7, .L9+8
	add	r4, r4, ip
	ldr	ip, .L9+12
	ldr	lr, [r7]
	ldr	ip, [ip]
	add	r4, r4, lr
	add	r4, r4, ip
	lsl	r4, r4, #2
	add	ip, r4, #7
	bic	ip, ip, #7
	sub	sp, sp, ip
	mov	ip, r2
	mov	r6, sp
	str	r3, [fp, #-52]
	ldr	r3, .L9+16
	str	ip, [fp, #-48]
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	ldr	r3, [fp, #4]
	mov	r5, r1
	mov	r2, r4
	mov	r1, r6
	str	r3, [fp, #-56]
	bl	eap_sim_prf
	cmp	r0, #0
	blt	.L7
	mov	r1, r6
	ldr	r2, [r9]
	mov	r0, r5
	bl	os_memcpy
	ldr	r1, [r9]
	ldr	r2, [r8]
	add	r10, r6, r1, lsl #2
	mov	r1, r10
	ldr	r0, [fp, #-48]
	bl	os_memcpy
	ldr	r1, [r8]
	ldr	r2, [r7]
	add	r1, r10, r1, lsl #2
	ldr	r0, [fp, #-52]
	str	r1, [fp, #-60]
	bl	os_memcpy
	ldr	r3, [r7]
	ldr	r1, [fp, #-60]
	ldr	r10, .L9+20
	add	r1, r1, r3, lsl #2
	ldr	r3, .L9+12
	ldr	r0, [fp, #-56]
	ldr	r2, [r3]
	bl	os_memcpy
	mov	r2, r5
	ldr	r3, [r9]
	ldr	r1, .L9+24
	ldr	r0, [r10]
	bl	wpa_hexdump_key
	ldr	r3, [r8]
	ldr	r2, [fp, #-48]
	ldr	r1, .L9+28
	ldr	r0, [r10]
	bl	wpa_hexdump_key
	ldr	r3, [r7]
	ldr	r2, [fp, #-52]
	ldr	r1, .L9+32
	ldr	r0, [r10]
	bl	wpa_hexdump_key
	ldr	r3, .L9+12
	ldr	r2, [fp, #-56]
	ldr	r3, [r3]
	ldr	r1, .L9+36
	ldr	r0, [r10]
	bl	wpa_hexdump_key
	mov	r2, r4
	mov	r0, r6
	mov	r1, #0
	bl	os_memset
	mov	r0, #0
.L1:
	ldr	r3, .L9+16
	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}
.L7:
	ldr	r3, .L9+40
	ldr	r1, .L9+44
	ldr	r0, [r3]
	bl	wpa_printf
	mvn	r0, #0
	b	.L1
.L8:
	bl	__stack_chk_fail
.L10:
	.align	2
.L9:
	.word	EAP_SIM_K_ENCR_LEN
	.word	EAP_SIM_K_AUT_LEN
	.word	EAP_SIM_KEYING_DATA_LEN
	.word	EAP_EMSK_LEN
	.word	.LC5
	.word	MSG_DEBUG
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	MSG_ERROR
	.word	.LC0
	.size	eap_sim_derive_keys, .-eap_sim_derive_keys
	.comm	MSG_ERROR,4,4
	.comm	MSG_DEBUG,4,4
	.comm	EAP_SIM_K_ENCR_LEN,4,4
	.comm	EAP_SIM_K_AUT_LEN,4,4
	.comm	EAP_SIM_KEYING_DATA_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
