	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ikev2_derive_keys
_ikev2_derive_keys:                     ## @ikev2_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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	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, %r15
	movl	64(%r12), %edi
	callq	_ikev2_get_integ
	movq	%rax, %r14
	movl	60(%r12), %edi
	callq	_ikev2_get_prf
	movq	%rax, %rbx
	movl	56(%r12), %edi
	callq	_ikev2_get_encr
	testq	%r14, %r14
	je	LBB0_3
## %bb.1:
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.2:
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	movq	%rbx, -136(%rbp)                ## 8-byte Spill
	movq	%r14, -128(%rbp)                ## 8-byte Spill
	movq	16(%r12), %rsi
	movq	24(%r12), %rdi
	movq	32(%r12), %rdx
	callq	_dh_derive_shared
	movl	$-1, %r14d
	testq	%rax, %rax
	je	LBB0_13
## %bb.5:
	movq	%rax, %r13
	movslq	(%r12), %rax
	movslq	4(%r12), %rcx
	addq	%rax, %rcx
	movq	_IKEV2_SPI_LEN@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(%rcx,%rax,2), %rdi
	movq	%rdi, -112(%rbp)                ## 8-byte Spill
	callq	_os_malloc
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%r15, -104(%rbp)                ## 8-byte Spill
	movl	(%r12), %edx
	movl	52(%r12), %esi
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_os_memcpy
	movslq	(%r12), %rax
	leaq	(%r15,%rax,4), %r15
	movl	4(%r12), %edx
	movl	48(%r12), %esi
	movq	%r15, %rdi
	callq	_os_memcpy
	movslq	4(%r12), %rax
	leaq	(%r15,%rax,4), %r15
	movl	44(%r12), %esi
	movq	_IKEV2_SPI_LEN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r15, %rdi
	callq	_os_memcpy
	movslq	(%rbx), %rdx
	leaq	(%r15,%rdx,4), %rdi
	movl	40(%r12), %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_os_memcpy
	movq	32(%r12), %rax
	movq	(%rax), %r15
	movq	%r13, %rdi
	callq	_wpabuf_len
	subq	%rax, %r15
	movl	$1, %edi
	cmovneq	%r15, %rdi
	callq	_os_zalloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	%rax, -64(%rbp)
	movq	%r15, -80(%rbp)
	movq	%r13, %rdi
	callq	_wpabuf_head
	movq	%rax, -56(%rbp)
	movq	%r13, %rdi
	callq	_wpabuf_len
	movq	%rax, -72(%rbp)
	movq	-136(%rbp), %rbx                ## 8-byte Reload
	movl	4(%rbx), %edi
	movl	4(%r12), %edx
	addl	(%r12), %edx
	subq	$8, %rsp
	leaq	-64(%rbp), %r8
	leaq	-80(%rbp), %r9
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movl	$2, %ecx
	movq	-104(%rbp), %r15                ## 8-byte Reload
	pushq	%r15
	callq	_ikev2_prf_hash
	addq	$16, %rsp
	testq	%rax, %rax
	js	LBB0_10
## %bb.11:
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	_os_free
	movq	%r13, %rdi
	callq	_wpabuf_free
	movq	24(%r12), %rdi
	callq	_wpabuf_free
	movq	$0, 24(%r12)
	movq	16(%r12), %rdi
	callq	_wpabuf_free
	movq	$0, 16(%r12)
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %ecx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdx
	callq	_wpa_hexdump_key
	addq	$8, %r12
	subq	$8, %rsp
	movq	%rbx, %rdi
	movq	-128(%rbp), %rsi                ## 8-byte Reload
	movq	-120(%rbp), %rdx                ## 8-byte Reload
	movq	%r15, %rcx
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %r8
	movq	-112(%rbp), %r9                 ## 8-byte Reload
	pushq	%r12
	callq	_ikev2_derive_sk_keys
	addq	$16, %rsp
	movl	%eax, %r14d
	movq	%rbx, %rdi
	jmp	LBB0_12
LBB0_3:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	movl	$-1, %r14d
	jmp	LBB0_13
LBB0_6:
	movq	%r13, %rdi
	callq	_wpabuf_free
	jmp	LBB0_13
LBB0_8:
	movq	%r13, %rdi
	callq	_wpabuf_free
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_12
LBB0_10:
	movq	%r13, %rdi
	callq	_wpabuf_free
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_os_free
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
LBB0_12:
	callq	_os_free
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	movl	%r14d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	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: Unsupported proposal"

	.comm	_IKEV2_SPI_LEN,4,2              ## @IKEV2_SPI_LEN
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"IKEV2: SKEYSEED"

	.no_dead_strip	_ikev2_derive_keys
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ikev2_derive_keys
_ikev2_derive_keys:                     ; @ikev2_derive_keys
	.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, #48
	mov	x19, x0
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, #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
	ldr	w0, [x0, #64]
	bl	_ikev2_get_integ
	mov	x21, x0
	ldr	w0, [x19, #60]
	bl	_ikev2_get_prf
	mov	x22, x0
	ldr	w0, [x19, #56]
	bl	_ikev2_get_encr
	cmp	x21, #0
	ccmp	x22, #0, #4, ne
	ccmp	x0, #0, #4, ne
	b.ne	LBB0_2
; %bb.1:
Lloh8:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	b	LBB0_11
LBB0_2:
	mov	x23, x0
	ldp	x1, x0, [x19, #16]
	ldr	x2, [x19, #32]
	bl	_dh_derive_shared
	cbz	x0, LBB0_11
; %bb.3:
	mov	x26, x0
	ldpsw	x8, x9, [x19]
	add	x8, x9, x8
Lloh13:
	adrp	x28, _IKEV2_SPI_LEN@GOTPAGE
Lloh14:
	ldr	x28, [x28, _IKEV2_SPI_LEN@GOTPAGEOFF]
	ldrsw	x9, [x28]
	add	x25, x8, x9, lsl #1
	mov	x0, x25
	bl	_os_malloc
	cbz	x0, LBB0_7
; %bb.4:
	mov	x24, x0
	ldr	w1, [x19, #52]
	ldr	w2, [x19]
	bl	_os_memcpy
	ldp	w8, w2, [x19]
                                        ; kill: def $w8 killed $w8 def $x8
	sxtw	x8, w8
	add	x27, x24, x8, lsl #2
	ldr	w1, [x19, #48]
	mov	x0, x27
	bl	_os_memcpy
	ldrsw	x8, [x19, #4]
	add	x27, x27, x8, lsl #2
	ldr	w1, [x19, #44]
	ldr	w2, [x28]
	mov	x0, x27
	bl	_os_memcpy
	ldrsw	x2, [x28]
	add	x0, x27, x2, lsl #2
	ldr	w1, [x19, #40]
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_os_memcpy
	ldr	x8, [x19, #32]
	ldr	x27, [x8]
	mov	x0, x26
	bl	_wpabuf_len
	subs	x28, x27, x0
	csinc	x0, x28, xzr, ne
	bl	_os_zalloc
	cbz	x0, LBB0_8
; %bb.5:
	mov	x27, x0
	stur	x0, [x29, #-104]
	stur	x28, [x29, #-120]
	mov	x0, x26
	bl	_wpabuf_head
	stur	x0, [x29, #-96]
	mov	x0, x26
	bl	_wpabuf_len
	stur	x0, [x29, #-112]
	ldr	w0, [x22, #4]
	ldp	w8, w9, [x19]
	add	w2, w9, w8
	sub	x4, x29, #104
	sub	x5, x29, #120
	mov	x1, x24
	mov	w3, #2
	mov	x6, x20
	bl	_ikev2_prf_hash
	tbnz	x0, #63, LBB0_9
; %bb.6:
	mov	x0, x27
	bl	_os_free
	mov	x0, x26
	bl	_wpabuf_free
	ldr	x0, [x19, #24]
	bl	_wpabuf_free
	str	xzr, [x19, #24]
	ldr	x0, [x19, #16]
	bl	_wpabuf_free
	str	xzr, [x19, #16]
Lloh15:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	ldr	w3, [x22]
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_wpa_hexdump_key
	add	x6, x19, #8
	mov	x0, x22
	mov	x1, x21
	mov	x2, x23
	mov	x3, x20
	mov	x4, x24
	mov	x5, x25
	bl	_ikev2_derive_sk_keys
	mov	x19, x0
	mov	x0, x24
	bl	_os_free
	b	LBB0_12
LBB0_7:
	mov	x0, x26
	bl	_wpabuf_free
	b	LBB0_11
LBB0_8:
	mov	x0, x26
	bl	_wpabuf_free
	mov	x0, x24
	b	LBB0_10
LBB0_9:
	mov	x0, x26
	bl	_wpabuf_free
	mov	x0, x24
	bl	_os_free
	mov	x0, x27
LBB0_10:
	bl	_os_free
LBB0_11:
	mov	w19, #-1
LBB0_12:
	ldur	x8, [x29, #-88]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	mov	x0, x19
	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_14:
	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 AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.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: Unsupported proposal"

	.comm	_IKEV2_SPI_LEN,4,2              ; @IKEV2_SPI_LEN
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"IKEV2: SKEYSEED"

	.no_dead_strip	_ikev2_derive_keys
.subsections_via_symbols
