	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_eap_gpsk_derive_keys           ## -- Begin function eap_gpsk_derive_keys
	.p2align	4, 0x90
_eap_gpsk_derive_keys:                  ## @eap_gpsk_derive_keys
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -80(%rbp)                  ## 8-byte Spill
	movq	%r8, %r14
	movl	%ecx, %r15d
	movl	%edx, %ebx
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	movl	%ebx, %ecx
	movq	_EAP_GPSK_VENDOR_IETF@GOTPCREL(%rip), %rax
	movl	$-1, %ebx
	cmpl	%ecx, (%rax)
	jne	LBB0_7
## %bb.1:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	movq	40(%rbp), %r15
	movq	24(%rbp), %r14
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdx
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, %rcx
	callq	_wpa_hexdump_key
	movq	_EAP_GPSK_RAND_LEN@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	leal	(%r15,%r14), %ecx
	movq	%r15, %r14
	leal	(%rcx,%rax,2), %edi
	callq	_os_malloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r13
	movq	%r12, %r15
	movq	16(%rbp), %r12
	movslq	(%r15), %rdx
	movq	%rax, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_os_memcpy
	movslq	(%r15), %rax
	leaq	(,%rax,4), %rbx
	addq	%r13, %rbx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	24(%rbp), %r12
	movq	%r12, %rdx
	callq	_os_memcpy
	leaq	(%rbx,%r12,4), %rbx
	movslq	(%r15), %rdx
	movq	%rbx, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	_os_memcpy
	movslq	(%r15), %rax
	leaq	(%rbx,%rax,4), %rbx
	movq	%rbx, %rdi
	movq	32(%rbp), %rsi
	movq	%r14, %rdx
	callq	_os_memcpy
	leaq	(%rbx,%r14,4), %rbx
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	subq	%r13, %rbx
	shrq	$2, %rbx
	leaq	L_.str.3(%rip), %rsi
	movq	%r13, %rdx
	movl	%ebx, %ecx
	callq	_wpa_hexdump
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	cmpl	$129, %ecx
	jne	LBB0_5
## %bb.4:
	movq	56(%rbp), %r9
	movq	48(%rbp), %r8
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	%r13, %rdx
	movl	%ebx, %ecx
	pushq	88(%rbp)
	pushq	80(%rbp)
	pushq	72(%rbp)
	pushq	64(%rbp)
	callq	_eap_gpsk_derive_keys_aes
	addq	$32, %rsp
	movl	%eax, %ebx
	jmp	LBB0_6
LBB0_2:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	jmp	LBB0_7
LBB0_5:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_wpa_printf
	movl	$-1, %ebx
LBB0_6:
	movq	%r13, %rdi
	callq	_os_free
LBB0_7:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EAP-GPSK: Deriving keys (%d:%d)"

	.comm	_EAP_GPSK_VENDOR_IETF,4,2       ## @EAP_GPSK_VENDOR_IETF
L_.str.1:                               ## @.str.1
	.asciz	"EAP-GPSK: PSK"

	.comm	_EAP_GPSK_RAND_LEN,4,2          ## @EAP_GPSK_RAND_LEN
L_.str.2:                               ## @.str.2
	.asciz	"EAP-GPSK: Failed to allocate memory for key derivation"

L_.str.3:                               ## @.str.3
	.asciz	"EAP-GPSK: Seed"

L_.str.4:                               ## @.str.4
	.asciz	"EAP-GPSK: Unknown cipher %d:%d used in key derivation"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_eap_gpsk_derive_keys           ; -- Begin function eap_gpsk_derive_keys
	.p2align	2
_eap_gpsk_derive_keys:                  ; @eap_gpsk_derive_keys
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x25, x7
	mov	x26, x6
	mov	x24, x5
	mov	x28, x4
	mov	x23, x3
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x19, _MSG_DEBUG@GOTPAGE
Lloh1:
	ldr	x19, [x19, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w0, [x19]
	stp	x22, x23, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
Lloh4:
	adrp	x8, _EAP_GPSK_VENDOR_IETF@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EAP_GPSK_VENDOR_IETF@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_4
; %bb.1:
	ldr	x27, [x29, #24]
	ldr	w0, [x19]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	stp	x21, x20, [sp, #32]             ; 16-byte Folded Spill
	mov	x2, x21
	mov	x3, x20
	bl	_wpa_hexdump_key
Lloh9:
	adrp	x20, _EAP_GPSK_RAND_LEN@GOTPAGE
Lloh10:
	ldr	x20, [x20, _EAP_GPSK_RAND_LEN@GOTPAGEOFF]
	ldr	w8, [x20]
	add	w9, w27, w25
	add	w0, w9, w8, lsl #1
	bl	_os_malloc
	cbz	x0, LBB0_5
; %bb.2:
	mov	x21, x0
	ldr	x8, [x29, #16]
	str	x8, [sp, #24]                   ; 8-byte Folded Spill
	ldrsw	x2, [x20]
	mov	x1, x28
	bl	_os_memcpy
	ldrsw	x8, [x20]
	add	x28, x21, x8, lsl #2
	mov	x0, x28
	mov	x1, x26
	mov	x2, x25
	bl	_os_memcpy
	add	x25, x28, x25, lsl #2
	ldrsw	x2, [x20]
	mov	x0, x25
	mov	x1, x24
	bl	_os_memcpy
	ldrsw	x8, [x20]
	add	x24, x25, x8, lsl #2
	mov	x0, x24
	ldr	x1, [sp, #24]                   ; 8-byte Folded Reload
	mov	x2, x27
	bl	_os_memcpy
	add	x8, x24, x27, lsl #2
	ldr	w0, [x19]
	sub	x8, x8, x21
	lsr	x24, x8, #2
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x21
	mov	x3, x24
	bl	_wpa_hexdump
	cmp	w23, #129
	b.ne	LBB0_6
; %bb.3:
	ldp	x9, x8, [x29, #64]
	ldp	x6, x7, [x29, #48]
	ldp	x4, x5, [x29, #32]
	stp	x9, x8, [sp]
	ldp	x0, x1, [sp, #32]               ; 16-byte Folded Reload
	mov	x2, x21
	mov	x3, x24
	bl	_eap_gpsk_derive_keys_aes
	mov	x19, x0
	b	LBB0_7
LBB0_4:
	mov	w19, #-1
	b	LBB0_8
LBB0_5:
	ldr	w0, [x19]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wpa_printf
	mov	w19, #-1
	b	LBB0_8
LBB0_6:
	ldr	w0, [x19]
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	stp	x22, x23, [sp]
Lloh15:
	adrp	x1, l_.str.4@PAGE
Lloh16:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_wpa_printf
	mov	w19, #-1
LBB0_7:
	mov	x0, x21
	bl	_os_free
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EAP-GPSK: Deriving keys (%d:%d)"

	.comm	_EAP_GPSK_VENDOR_IETF,4,2       ; @EAP_GPSK_VENDOR_IETF
l_.str.1:                               ; @.str.1
	.asciz	"EAP-GPSK: PSK"

	.comm	_EAP_GPSK_RAND_LEN,4,2          ; @EAP_GPSK_RAND_LEN
l_.str.2:                               ; @.str.2
	.asciz	"EAP-GPSK: Failed to allocate memory for key derivation"

l_.str.3:                               ; @.str.3
	.asciz	"EAP-GPSK: Seed"

l_.str.4:                               ; @.str.4
	.asciz	"EAP-GPSK: Unknown cipher %d:%d used in key derivation"

.subsections_via_symbols
