	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_eap_eke_prot                   ## -- Begin function eap_eke_prot
	.p2align	4, 0x90
_eap_eke_prot:                          ## @eap_eke_prot
	.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	%rdx, %rbx
	movq	(%rdi), %rax
	movq	_EAP_EKE_ENCR_AES128_CBC@GOTPCREL(%rip), %rdx
	movl	$-1, %r12d
	cmpq	(%rdx), %rax
	jne	LBB0_18
## %bb.1:
	movq	%rdi, %r13
	movq	_AES_BLOCK_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	8(%rdi), %rax
	movq	_EAP_EKE_PRF_HMAC_SHA1@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_3
## %bb.2:
	movq	_SHA1_MAC_LEN@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_EAP_EKE_PRF_HMAC_SHA2_256@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_18
## %bb.4:
	movq	_SHA256_MAC_LEN@GOTPCREL(%rip), %rax
LBB0_5:
	movq	(%rax), %rdi
	movq	%rbx, %rax
	orq	%r14, %rax
	shrq	$32, %rax
	je	LBB0_6
## %bb.7:
	movq	%rbx, %rax
	xorl	%edx, %edx
	divq	%r14
	jmp	LBB0_8
LBB0_6:
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%r14d
                                        ## kill: def $edx killed $edx def $rdx
LBB0_8:
	movq	%r14, %r15
	subq	%rdx, %r15
	testq	%rdx, %rdx
	cmoveq	%rdx, %r15
	leaq	(%r15,%rbx), %rdx
	leaq	(%rdx,%r14), %rax
	addq	%rdi, %rax
	cmpq	%rax, (%r8)
	jae	LBB0_10
## %bb.9:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	jmp	LBB0_18
LBB0_10:
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%rcx, %rdi
	movq	%r14, %rsi
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	callq	_random_get_bytes
	testq	%rax, %rax
	je	LBB0_11
LBB0_18:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%r14, %rcx
	callq	_wpa_hexdump
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r14,4), %r14
	movq	%r14, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_os_memcpy
	leaq	(%r14,%rbx,4), %rbx
	testq	%r15, %r15
	je	LBB0_12
## %bb.13:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_random_get_bytes
	testq	%rax, %rax
	jne	LBB0_18
## %bb.14:
	leaq	(%rbx,%r15,4), %r15
	jmp	LBB0_15
LBB0_12:
	movq	%rbx, %r15
LBB0_15:
	movl	20(%r13), %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r14, %rdx
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rcx
	callq	_aes_128_cbc_encrypt
	testq	%rax, %rax
	js	LBB0_18
## %bb.16:
	movq	8(%r13), %rdi
	movl	16(%r13), %esi
	movq	%r14, %rdx
	movq	%rbx, %rcx
	movq	%r15, %rbx
	movq	%r15, %r8
	callq	_eap_eke_mac
	testq	%rax, %rax
	js	LBB0_18
## %bb.17:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rbx,%rax,4), %rax
	subq	-48(%rbp), %rax                 ## 8-byte Folded Reload
	sarq	$2, %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	xorl	%r12d, %r12d
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_EAP_EKE_ENCR_AES128_CBC,8,3    ## @EAP_EKE_ENCR_AES128_CBC
	.comm	_AES_BLOCK_SIZE,8,3             ## @AES_BLOCK_SIZE
	.comm	_EAP_EKE_PRF_HMAC_SHA1,8,3      ## @EAP_EKE_PRF_HMAC_SHA1
	.comm	_SHA1_MAC_LEN,8,3               ## @SHA1_MAC_LEN
	.comm	_EAP_EKE_PRF_HMAC_SHA2_256,8,3  ## @EAP_EKE_PRF_HMAC_SHA2_256
	.comm	_SHA256_MAC_LEN,8,3             ## @SHA256_MAC_LEN
	.comm	_MSG_INFO,4,2                   ## @MSG_INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EAP-EKE: Not enough room for Prot() data"

	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"EAP-EKE: IV for Prot()"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_eap_eke_prot                   ; -- Begin function eap_eke_prot
	.p2align	2
_eap_eke_prot:                          ; @eap_eke_prot
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _EAP_EKE_ENCR_AES128_CBC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EAP_EKE_ENCR_AES128_CBC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.1:
	mov	x19, x4
	mov	x20, x3
	mov	x22, x2
	mov	x24, x1
	mov	x21, x0
Lloh3:
	adrp	x8, _AES_BLOCK_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AES_BLOCK_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	x25, [x8]
	ldr	x8, [x0, #8]
Lloh6:
	adrp	x9, _EAP_EKE_PRF_HMAC_SHA1@GOTPAGE
Lloh7:
	ldr	x9, [x9, _EAP_EKE_PRF_HMAC_SHA1@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
Lloh9:
	adrp	x8, _SHA1_MAC_LEN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SHA1_MAC_LEN@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:
Lloh11:
	adrp	x9, _EAP_EKE_PRF_HMAC_SHA2_256@GOTPAGE
Lloh12:
	ldr	x9, [x9, _EAP_EKE_PRF_HMAC_SHA2_256@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.4:
Lloh14:
	adrp	x8, _SHA256_MAC_LEN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SHA256_MAC_LEN@GOTPAGEOFF]
LBB0_5:
	ldr	x27, [x8]
	udiv	x8, x22, x25
	msub	x8, x8, x25, x22
	sub	x9, x25, x8
	cmp	x8, #0
	csel	x26, xzr, x9, eq
	ldr	x8, [x19]
	add	x23, x26, x22
	add	x9, x23, x25
	add	x9, x9, x27
	cmp	x8, x9
	b.hs	LBB0_7
; %bb.6:
Lloh16:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	b	LBB0_8
LBB0_7:
	mov	x0, x20
	mov	x1, x25
	bl	_random_get_bytes
	cbz	x0, LBB0_10
LBB0_8:
	mov	w0, #-1
LBB0_9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_10:
Lloh21:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	mov	x3, x25
	bl	_wpa_hexdump
	add	x25, x20, x25, lsl #2
	mov	x0, x25
	mov	x1, x24
	mov	x2, x22
	bl	_os_memcpy
	add	x22, x25, x22, lsl #2
	cbz	x26, LBB0_13
; %bb.11:
	mov	x0, x22
	mov	x1, x26
	bl	_random_get_bytes
	cbnz	x0, LBB0_8
; %bb.12:
	add	x22, x22, x26, lsl #2
LBB0_13:
	ldr	w0, [x21, #20]
	mov	x1, x20
	mov	x2, x25
	mov	x3, x23
	bl	_aes_128_cbc_encrypt
	tbnz	x0, #63, LBB0_8
; %bb.14:
	ldr	x0, [x21, #8]
	ldr	w1, [x21, #16]
	mov	x2, x25
	mov	x3, x23
	mov	x4, x22
	bl	_eap_eke_mac
	tbnz	x0, #63, LBB0_8
; %bb.15:
	mov	w0, #0
	add	x8, x22, x27, lsl #2
	sub	x8, x8, x20
	asr	x8, x8, #2
	str	x8, [x19]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_EAP_EKE_ENCR_AES128_CBC,8,3    ; @EAP_EKE_ENCR_AES128_CBC
	.comm	_AES_BLOCK_SIZE,8,3             ; @AES_BLOCK_SIZE
	.comm	_EAP_EKE_PRF_HMAC_SHA1,8,3      ; @EAP_EKE_PRF_HMAC_SHA1
	.comm	_SHA1_MAC_LEN,8,3               ; @SHA1_MAC_LEN
	.comm	_EAP_EKE_PRF_HMAC_SHA2_256,8,3  ; @EAP_EKE_PRF_HMAC_SHA2_256
	.comm	_SHA256_MAC_LEN,8,3             ; @SHA256_MAC_LEN
	.comm	_MSG_INFO,4,2                   ; @MSG_INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EAP-EKE: Not enough room for Prot() data"

	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"EAP-EKE: IV for Prot()"

.subsections_via_symbols
