	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ieee802_1x_mka_encode_icv_body
_ieee802_1x_mka_encode_icv_body:        ## @ieee802_1x_mka_encode_icv_body
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_ICV_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_ieee802_1x_mka_get_icv_length
	movl	%eax, %ebx
	movq	_mka_alg_tbl@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	8(%r14), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, %rdx
	shlq	$4, %rdx
	movq	(%rax,%rdx), %rdx
	movq	_DEFAULT_ICV_LEN@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_2
## %bb.1:
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	jmp	LBB0_3
LBB0_2:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	movq	_MKA_HDR_LEN@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_wpabuf_put
	movq	_MKA_ICV_INDICATOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax)
	subl	(%r13), %ebx
	movq	%rax, %rdi
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movl	%ebx, %esi
	callq	_set_mka_param_body_len
	movq	(%r12), %rax
	movq	8(%r14), %rcx
	movq	(%rcx), %rcx
LBB0_3:
	shlq	$4, %rcx
	movq	8(%rax,%rcx), %r12
	movl	(%r14), %r13d
	movl	4(%r14), %ebx
	movq	%r15, %rdi
	callq	_wpabuf_head
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_wpabuf_len
	movl	%ebx, %edi
	movl	%r13d, %esi
	movl	%r14d, %edx
	movl	%eax, %ecx
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %r8
	callq	*%r12
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_wpa_printf
	movl	$-1, %eax
	jmp	LBB0_6
LBB0_5:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdx
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %ecx
	callq	_wpa_hexdump
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_wpabuf_put
	movq	%rax, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_os_memcpy
	xorl	%eax, %eax
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_8
## %bb.7:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_ICV_LEN,4,2                ## @MAX_ICV_LEN
	.comm	_mka_alg_tbl,8,3                ## @mka_alg_tbl
	.comm	_DEFAULT_ICV_LEN,8,3            ## @DEFAULT_ICV_LEN
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"KaY: ICV Indicator"

	.comm	_MKA_HDR_LEN,4,2                ## @MKA_HDR_LEN
	.comm	_MKA_ICV_INDICATOR,4,2          ## @MKA_ICV_INDICATOR
	.comm	_MSG_ERROR,4,2                  ## @MSG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"KaY: failed to calculate ICV"

L_.str.2:                               ## @.str.2
	.asciz	"KaY: ICV"

	.no_dead_strip	_ieee802_1x_mka_encode_icv_body
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ieee802_1x_mka_encode_icv_body
_ieee802_1x_mka_encode_icv_body:        ; @ieee802_1x_mka_encode_icv_body
	.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	x19, 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, _MAX_ICV_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_ICV_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
	bl	_ieee802_1x_mka_get_icv_length
	mov	x21, x0
Lloh8:
	adrp	x23, _mka_alg_tbl@GOTPAGE
Lloh9:
	ldr	x23, [x23, _mka_alg_tbl@GOTPAGEOFF]
	ldr	x8, [x23]
	ldr	x9, [x22, #8]
	ldr	x9, [x9]
	lsl	x10, x9, #4
	ldr	x10, [x8, x10]
Lloh10:
	adrp	x11, _DEFAULT_ICV_LEN@GOTPAGE
Lloh11:
	ldr	x11, [x11, _DEFAULT_ICV_LEN@GOTPAGEOFF]
Lloh12:
	ldr	x11, [x11]
	cmp	x10, x11
	b.eq	LBB0_2
; %bb.1:
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
	bl	_wpa_printf
Lloh18:
	adrp	x24, _MKA_HDR_LEN@GOTPAGE
Lloh19:
	ldr	x24, [x24, _MKA_HDR_LEN@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_wpabuf_put
Lloh20:
	adrp	x8, _MKA_ICV_INDICATOR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MKA_ICV_INDICATOR@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	str	w8, [x0]
	ldr	w8, [x24]
	sub	w21, w21, w8
	mov	x1, x21
	bl	_set_mka_param_body_len
	ldr	x8, [x23]
	ldr	x9, [x22, #8]
	ldr	x9, [x9]
LBB0_2:
	add	x8, x8, x9, lsl #4
	ldr	x25, [x8, #8]
	ldp	w22, w23, [x22]
	mov	x0, x19
	bl	_wpabuf_head
	mov	x24, x0
	mov	x0, x19
	bl	_wpabuf_len
	mov	x3, x0
	mov	x0, x23
	mov	x1, x22
	mov	x2, x24
	mov	x4, x20
	blr	x25
	cbz	x0, LBB0_4
; %bb.3:
Lloh23:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_printf
	mov	w0, #-1
	b	LBB0_5
LBB0_4:
Lloh28:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh29:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
Lloh31:
	adrp	x1, l_.str.2@PAGE
Lloh32:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x20
	mov	x3, x21
	bl	_wpa_hexdump
	mov	x0, x19
	mov	x1, x21
	bl	_wpabuf_put
	mov	x1, x20
	mov	x2, x21
	bl	_os_memcpy
	mov	w0, #0
LBB0_5:
	ldur	x8, [x29, #-72]
Lloh33:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh34:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	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_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_ICV_LEN,4,2                ; @MAX_ICV_LEN
	.comm	_mka_alg_tbl,8,3                ; @mka_alg_tbl
	.comm	_DEFAULT_ICV_LEN,8,3            ; @DEFAULT_ICV_LEN
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"KaY: ICV Indicator"

	.comm	_MKA_HDR_LEN,4,2                ; @MKA_HDR_LEN
	.comm	_MKA_ICV_INDICATOR,4,2          ; @MKA_ICV_INDICATOR
	.comm	_MSG_ERROR,4,2                  ; @MSG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"KaY: failed to calculate ICV"

l_.str.2:                               ; @.str.2
	.asciz	"KaY: ICV"

	.no_dead_strip	_ieee802_1x_mka_encode_icv_body
.subsections_via_symbols
