	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ikev2_process_sa_init
_ikev2_process_sa_init:                 ## @ikev2_process_sa_init
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r12
	movl	32(%rdx), %edx
	movl	36(%rbx), %esi
	callq	_ikev2_process_sar1
	movl	$-1, %r14d
	testq	%rax, %rax
	js	LBB0_8
## %bb.1:
	movl	24(%rbx), %edx
	movl	28(%rbx), %esi
	movq	%r12, %rdi
	callq	_ikev2_process_ker
	testq	%rax, %rax
	js	LBB0_8
## %bb.2:
	movl	16(%rbx), %edx
	movl	20(%rbx), %esi
	movq	%r12, %rdi
	callq	_ikev2_process_nr
	testq	%rax, %rax
	js	LBB0_8
## %bb.3:
	movl	4(%r12), %edi
	movl	(%r15), %esi
	movq	_IKEV2_SPI_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_os_memcpy
	movq	%r12, %rdi
	callq	_ikev2_derive_keys
	testq	%rax, %rax
	js	LBB0_8
## %bb.4:
	cmpq	$0, 8(%rbx)
	je	LBB0_7
## %bb.5:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	movq	8(%rbx), %rdx
	movl	(%rbx), %r8d
	movl	4(%rbx), %ecx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_ikev2_process_sa_init_encr
	testq	%rax, %rax
	js	LBB0_6
LBB0_7:
	movq	_SA_AUTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	xorl	%r14d, %r14d
	jmp	LBB0_8
LBB0_6:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_wpa_printf
LBB0_8:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IKEV2_SPI_LEN,4,2              ## @IKEV2_SPI_LEN
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IKEV2: Encrypted payload in SA_INIT - try to get IDr from it"

	.comm	_MSG_INFO,4,2                   ## @MSG_INFO
L_.str.1:                               ## @.str.1
	.asciz	"IKEV2: Failed to process encrypted payload"

	.comm	_SA_AUTH,4,2                    ## @SA_AUTH
	.no_dead_strip	_ikev2_process_sa_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ikev2_process_sa_init
_ikev2_process_sa_init:                 ; @ikev2_process_sa_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldp	w2, w1, [x2, #32]
	bl	_ikev2_process_sar1
	tbnz	x0, #63, LBB0_8
; %bb.1:
	ldp	w2, w1, [x21, #24]
	mov	x0, x19
	bl	_ikev2_process_ker
	tbnz	x0, #63, LBB0_8
; %bb.2:
	ldp	w2, w1, [x21, #16]
	mov	x0, x19
	bl	_ikev2_process_nr
	tbnz	x0, #63, LBB0_8
; %bb.3:
	ldr	w0, [x19, #4]
	ldr	w1, [x20]
Lloh0:
	adrp	x8, _IKEV2_SPI_LEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IKEV2_SPI_LEN@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_os_memcpy
	mov	x0, x19
	bl	_ikev2_derive_keys
	tbnz	x0, #63, LBB0_8
; %bb.4:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_6
; %bb.5:
Lloh3:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	ldr	x2, [x21, #8]
	ldp	w4, w3, [x21]
	mov	x0, x19
	mov	x1, x20
	bl	_ikev2_process_sa_init_encr
	tbnz	x0, #63, LBB0_7
LBB0_6:
	mov	w0, #0
Lloh8:
	adrp	x8, _SA_AUTH@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SA_AUTH@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x19]
	b	LBB0_9
LBB0_7:
Lloh11:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_printf
LBB0_8:
	mov	w0, #-1
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_IKEV2_SPI_LEN,4,2              ; @IKEV2_SPI_LEN
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IKEV2: Encrypted payload in SA_INIT - try to get IDr from it"

	.comm	_MSG_INFO,4,2                   ; @MSG_INFO
l_.str.1:                               ; @.str.1
	.asciz	"IKEV2: Failed to process encrypted payload"

	.comm	_SA_AUTH,4,2                    ; @SA_AUTH
	.no_dead_strip	_ikev2_process_sa_init
.subsections_via_symbols
