	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ikev2_decrypt_payload          ## -- Begin function ikev2_decrypt_payload
	.p2align	4, 0x90
_ikev2_decrypt_payload:                 ## @ikev2_decrypt_payload
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %rbx
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r13d
	movq	%rdx, %r15
	movl	%esi, %r14d
	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	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rdx
	xorl	%eax, %eax
	testl	%r13d, %r13d
	sete	%cl
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.1:
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movb	%cl, %al
	movq	(%r15,%rax,8), %rbx
	movq	16(%r15,%rax,8), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movl	%r12d, %edi
	callq	_ikev2_get_encr
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	%rax, %r13
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rbx
	movl	%r14d, %edi
	callq	_ikev2_get_integ
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	%rax, %r12
	movq	16(%rbp), %rcx
	movq	(%rax), %rax
	leaq	(%rbx,%rax), %rdx
	incq	%rdx
	cmpq	%rcx, %rdx
	jbe	LBB0_8
## %bb.4:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_14
LBB0_5:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_14
LBB0_6:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_14
LBB0_7:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_14
LBB0_8:
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_12
## %bb.9:
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rdx,%rcx,8), %r8
	shlq	$3, %rax
	subq	%rax, %r8
	movl	36(%r15), %edx
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	subq	%rcx, %r8
	shrq	$3, %r8
	movl	%r14d, %edi
                                        ## kill: def $r8d killed $r8d killed $r8
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %r9
	callq	_ikev2_integ_hash
	testq	%rax, %rax
	js	LBB0_13
## %bb.10:
	movq	(%r12), %rdx
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_os_memcmp_const
	testq	%rax, %rax
	je	LBB0_18
## %bb.11:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_14
LBB0_12:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_14
LBB0_13:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
LBB0_14:
	callq	_wpa_printf
LBB0_15:
	xorl	%ebx, %ebx
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_27
## %bb.17:
	movq	%rbx, %rax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_24
## %bb.19:
	movq	%r12, %r14
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	leaq	(%r12,%rbx,8), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	subq	%rax, %r14
	sarq	$3, %r14
	movq	%r14, %rdi
	callq	_os_malloc
	testq	%rax, %rax
	je	LBB0_15
## %bb.20:
	movq	%rax, %rbx
	movl	8(%r13), %edi
	movl	32(%r15), %edx
	subq	$8, %rsp
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	%r12, %rcx
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movq	%rax, %r9
	pushq	%r14
	callq	_ikev2_encr_decrypt
	addq	$16, %rsp
	testq	%rax, %rax
	js	LBB0_23
## %bb.21:
	movq	-8(%rbx,%r14,8), %rax
	incq	%rax
	subq	%rax, %r14
	jae	LBB0_26
## %bb.22:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.8(%rip), %rsi
	callq	_wpa_printf
LBB0_23:
	movq	%rbx, %rdi
	callq	_os_free
	jmp	LBB0_15
LBB0_24:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_14
LBB0_26:
	movq	24(%rbp), %rax
	movq	%r14, (%rax)
	jmp	LBB0_16
LBB0_27:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_IKEV2_MAX_HASH_LEN,4,2         ## @IKEV2_MAX_HASH_LEN
	.comm	_MSG_INFO,4,2                   ## @MSG_INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IKEV2: No Encrypted payload in SA_AUTH"

L_.str.1:                               ## @.str.1
	.asciz	"IKEV2: Unsupported encryption type"

L_.str.2:                               ## @.str.2
	.asciz	"IKEV2: Unsupported intergrity type"

L_.str.3:                               ## @.str.3
	.asciz	"IKEV2: No room for IV or Integrity Checksum"

L_.str.4:                               ## @.str.4
	.asciz	"IKEV2: No SK_a available"

L_.str.5:                               ## @.str.5
	.asciz	"IKEV2: Failed to calculate integrity hash"

L_.str.6:                               ## @.str.6
	.asciz	"IKEV2: Incorrect Integrity Checksum Data"

L_.str.7:                               ## @.str.7
	.asciz	"IKEV2: No SK_e available"

L_.str.8:                               ## @.str.8
	.asciz	"IKEV2: Invalid padding in encrypted payload"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ikev2_decrypt_payload          ; -- Begin function ikev2_decrypt_payload
	.p2align	2
_ikev2_decrypt_payload:                 ; @ikev2_decrypt_payload
	.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
	sub	sp, sp, #32
	mov	x19, x7
	mov	x27, x6
	mov	x20, x5
	mov	x24, x4
	mov	x21, x2
	mov	x26, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _IKEV2_MAX_HASH_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IKEV2_MAX_HASH_LEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #3
	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, #0xffffffff0
	sub	x25, x9, x8
	cmp	w3, #0
	cset	w8, eq
	mov	sp, x25
	mov	w9, #16
	mov	w10, #24
	csel	x9, x10, x9, eq
	cbz	x5, LBB0_5
; %bb.1:
	ldr	x22, [x21, w8, uxtw #3]
	ldr	x28, [x21, x9]
	bl	_ikev2_get_encr
	cbz	x0, LBB0_6
; %bb.2:
	mov	x23, x0
	stp	x19, x22, [x29, #-104]          ; 16-byte Folded Spill
	ldr	x19, [x0]
	mov	x0, x26
	bl	_ikev2_get_integ
	cbz	x0, LBB0_7
; %bb.3:
	mov	x22, x0
	ldr	x8, [x0]
	add	x9, x19, x8
	add	x9, x9, #1
	cmp	x9, x27
	b.ls	LBB0_8
; %bb.4:
Lloh8:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_14
LBB0_5:
Lloh13:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_14
LBB0_6:
Lloh18:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_7:
Lloh23:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_14
LBB0_8:
	cbz	x28, LBB0_12
; %bb.9:
	add	x9, x20, x27, lsl #3
	sub	x27, x9, x8, lsl #3
	ldr	w2, [x21, #36]
	sub	x8, x27, x24
	lsr	x4, x8, #3
	mov	x0, x26
	mov	x1, x28
	mov	x3, x24
                                        ; kill: def $w4 killed $w4 killed $x4
	mov	x5, x25
	bl	_ikev2_integ_hash
	tbnz	x0, #63, LBB0_13
; %bb.10:
	ldr	x2, [x22]
	mov	x0, x27
	mov	x1, x25
	bl	_os_memcmp_const
	cbz	x0, LBB0_18
; %bb.11:
Lloh28:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh29:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
Lloh31:
	adrp	x1, l_.str.6@PAGE
Lloh32:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_14
LBB0_12:
Lloh33:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh34:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
Lloh36:
	adrp	x1, l_.str.4@PAGE
Lloh37:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_14
LBB0_13:
Lloh38:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh39:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
Lloh41:
	adrp	x1, l_.str.5@PAGE
Lloh42:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_14:
	bl	_wpa_printf
LBB0_15:
	mov	x24, #0
LBB0_16:
	ldur	x8, [x29, #-88]
Lloh43:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh44:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh45:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_26
; %bb.17:
	mov	x0, x24
	sub	sp, x29, #80
	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_18:
	ldur	x8, [x29, #-96]                 ; 8-byte Folded Reload
	cbz	x8, LBB0_24
; %bb.19:
	add	x25, x20, x19, lsl #3
	sub	x8, x27, x25
	asr	x22, x8, #3
	mov	x0, x22
	bl	_os_malloc
	mov	x24, x0
	cbz	x0, LBB0_16
; %bb.20:
	ldr	w0, [x23, #8]
	ldr	w2, [x21, #32]
	ldur	x1, [x29, #-96]                 ; 8-byte Folded Reload
	mov	x3, x20
	mov	x4, x25
	mov	x5, x24
	mov	x6, x22
	bl	_ikev2_encr_decrypt
	tbnz	x0, #63, LBB0_23
; %bb.21:
	add	x8, x24, x22, lsl #3
	ldur	x8, [x8, #-8]
	add	x8, x8, #1
	subs	x8, x22, x8
	b.hs	LBB0_25
; %bb.22:
Lloh46:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh47:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh48:
	ldr	w0, [x8]
Lloh49:
	adrp	x1, l_.str.8@PAGE
Lloh50:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_wpa_printf
LBB0_23:
	mov	x0, x24
	bl	_os_free
	b	LBB0_15
LBB0_24:
Lloh51:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh52:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh53:
	ldr	w0, [x8]
Lloh54:
	adrp	x1, l_.str.7@PAGE
Lloh55:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_14
LBB0_25:
	ldur	x9, [x29, #-104]                ; 8-byte Folded Reload
	str	x8, [x9]
	b	LBB0_16
LBB0_26:
	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	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.cfi_endproc
                                        ; -- End function
	.comm	_IKEV2_MAX_HASH_LEN,4,2         ; @IKEV2_MAX_HASH_LEN
	.comm	_MSG_INFO,4,2                   ; @MSG_INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IKEV2: No Encrypted payload in SA_AUTH"

l_.str.1:                               ; @.str.1
	.asciz	"IKEV2: Unsupported encryption type"

l_.str.2:                               ; @.str.2
	.asciz	"IKEV2: Unsupported intergrity type"

l_.str.3:                               ; @.str.3
	.asciz	"IKEV2: No room for IV or Integrity Checksum"

l_.str.4:                               ; @.str.4
	.asciz	"IKEV2: No SK_a available"

l_.str.5:                               ; @.str.5
	.asciz	"IKEV2: Failed to calculate integrity hash"

l_.str.6:                               ; @.str.6
	.asciz	"IKEV2: Incorrect Integrity Checksum Data"

l_.str.7:                               ; @.str.7
	.asciz	"IKEV2: No SK_e available"

l_.str.8:                               ; @.str.8
	.asciz	"IKEV2: Invalid padding in encrypted payload"

.subsections_via_symbols
