	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_eap_ikev2_validate_icv         ## -- Begin function eap_ikev2_validate_icv
	.p2align	4, 0x90
_eap_ikev2_validate_icv:                ## @eap_ikev2_validate_icv
	.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, %r14
	movq	%r8, %r13
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movl	%edx, %ebx
	movq	%rsi, %r15
	movl	%edi, %r12d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_IKEV2_MAX_HASH_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -80(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	testl	%ebx, %ebx
	setne	%al
	movq	8(%r15,%rax,8), %rbx
	movl	%r12d, %edi
	callq	_ikev2_get_integ
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rbx, %rdx
	movq	(%rax), %rbx
	movq	%r14, %rax
	subq	%r13, %rax
	sarq	$2, %rax
	movslq	%ebx, %rcx
	cmpq	%rcx, %rax
	jge	LBB0_4
## %bb.2:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_10
LBB0_3:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_10
LBB0_4:
	testq	%rdx, %rdx
	je	LBB0_8
## %bb.5:
	movq	%rdx, %r13
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	(%r15), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_wpabuf_head
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_wpabuf_len
	subq	%rbx, %rax
	movl	%r12d, %edi
	movq	%r13, %rsi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movl	%r14d, %ecx
	movq	%rax, %r8
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %r9
	callq	_ikev2_integ_hash
	testq	%rax, %rax
	js	LBB0_9
## %bb.6:
	leaq	(,%rbx,4), %rax
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	subq	%rax, %r15
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_os_memcmp_const
	testq	%rax, %rax
	je	LBB0_14
## %bb.7:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_wpa_printf
	movq	_MSG_DEBUG@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	leaq	L_.str.5(%rip), %rsi
	movq	%r12, %rdx
	movq	%rbx, %rcx
	callq	_wpa_hexdump
	movl	(%r14), %edi
	leaq	L_.str.6(%rip), %rsi
	movq	%r15, %rdx
	movq	%rbx, %rcx
	callq	_wpa_hexdump
	jmp	LBB0_11
LBB0_8:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_10
LBB0_9:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
LBB0_10:
	callq	_wpa_printf
LBB0_11:
	movl	$-1, %ebx
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.13:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.7(%rip), %rsi
	callq	_wpa_printf
	jmp	LBB0_12
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_IKEV2_MAX_HASH_LEN,4,2         ## @IKEV2_MAX_HASH_LEN
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EAP-IKEV2: Unknown INTEG transform / cannot validate ICV"

L_.str.1:                               ## @.str.1
	.asciz	"EAP-IKEV2: Not enough room in the message for Integrity Checksum Data"

L_.str.2:                               ## @.str.2
	.asciz	"EAP-IKEV2: No SK_a for ICV validation"

	.comm	_MSG_INFO,4,2                   ## @MSG_INFO
L_.str.3:                               ## @.str.3
	.asciz	"EAP-IKEV2: Could not calculate ICV"

L_.str.4:                               ## @.str.4
	.asciz	"EAP-IKEV2: Invalid ICV"

L_.str.5:                               ## @.str.5
	.asciz	"EAP-IKEV2: Calculated ICV"

L_.str.6:                               ## @.str.6
	.asciz	"EAP-IKEV2: Received ICV"

L_.str.7:                               ## @.str.7
	.asciz	"EAP-IKEV2: Valid Integrity Checksum Data in the received message"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_eap_ikev2_validate_icv         ; -- Begin function eap_ikev2_validate_icv
	.p2align	2
_eap_ikev2_validate_icv:                ; @eap_ikev2_validate_icv
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	sub	sp, sp, #16
	mov	x21, x5
	mov	x25, x4
	mov	x23, x3
	mov	x24, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _IKEV2_MAX_HASH_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IKEV2_MAX_HASH_LEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	cmp	w2, #0
	mov	w8, #16
	mov	w9, #8
	csel	x8, x9, x8, eq
	ldr	x26, [x1, x8]
	bl	_ikev2_get_integ
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x19, [x0]
	sub	x8, x21, x25
	asr	x8, x8, #2
	cmp	x8, w19, sxtw
	b.ge	LBB0_4
; %bb.2:
Lloh8:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_3:
Lloh13:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_10
LBB0_4:
	cbz	x26, LBB0_8
; %bb.5:
	ldr	w24, [x24]
	mov	x0, x23
	bl	_wpabuf_head
	mov	x25, x0
	mov	x0, x23
	bl	_wpabuf_len
	sub	x4, x0, x19
	mov	x0, x22
	mov	x1, x26
	mov	x2, x24
	mov	x3, x25
	mov	x5, x20
	bl	_ikev2_integ_hash
	tbnz	x0, #63, LBB0_9
; %bb.6:
	sub	x21, x21, x19, lsl #2
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_os_memcmp_const
	cbz	x0, LBB0_14
; %bb.7:
Lloh18:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_wpa_printf
Lloh23:
	adrp	x22, _MSG_DEBUG@GOTPAGE
Lloh24:
	ldr	x22, [x22, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh25:
	adrp	x1, l_.str.5@PAGE
Lloh26:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x2, x20
	mov	x3, x19
	bl	_wpa_hexdump
	ldr	w0, [x22]
Lloh27:
	adrp	x1, l_.str.6@PAGE
Lloh28:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x2, x21
	mov	x3, x19
	bl	_wpa_hexdump
	b	LBB0_11
LBB0_8:
Lloh29:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh30:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
Lloh32:
	adrp	x1, l_.str.2@PAGE
Lloh33:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_9:
Lloh34:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh35:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
Lloh37:
	adrp	x1, l_.str.3@PAGE
Lloh38:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_10:
	bl	_wpa_printf
LBB0_11:
	mov	w19, #-1
LBB0_12:
	ldur	x8, [x29, #-72]
Lloh39:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh40:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh41:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.13:
	mov	x0, x19
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_14:
Lloh42:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh43:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh44:
	ldr	w0, [x8]
Lloh45:
	adrp	x1, l_.str.7@PAGE
Lloh46:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_wpa_printf
	b	LBB0_12
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_IKEV2_MAX_HASH_LEN,4,2         ; @IKEV2_MAX_HASH_LEN
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EAP-IKEV2: Unknown INTEG transform / cannot validate ICV"

l_.str.1:                               ; @.str.1
	.asciz	"EAP-IKEV2: Not enough room in the message for Integrity Checksum Data"

l_.str.2:                               ; @.str.2
	.asciz	"EAP-IKEV2: No SK_a for ICV validation"

	.comm	_MSG_INFO,4,2                   ; @MSG_INFO
l_.str.3:                               ; @.str.3
	.asciz	"EAP-IKEV2: Could not calculate ICV"

l_.str.4:                               ; @.str.4
	.asciz	"EAP-IKEV2: Invalid ICV"

l_.str.5:                               ; @.str.5
	.asciz	"EAP-IKEV2: Calculated ICV"

l_.str.6:                               ; @.str.6
	.asciz	"EAP-IKEV2: Received ICV"

l_.str.7:                               ; @.str.7
	.asciz	"EAP-IKEV2: Valid Integrity Checksum Data in the received message"

.subsections_via_symbols
