	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ikev2_build_sa_auth
_ikev2_build_sa_auth:                   ## @ikev2_build_sa_auth
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movl	36(%rdi), %edi
	movl	20(%r12), %edx
	movl	32(%r12), %esi
	leaq	-40(%rbp), %rcx
	callq	*40(%r12)
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rax, %rbx
	movq	24(%r12), %rdi
	callq	_os_free
	movq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_os_memdup
	movq	%rax, 24(%r12)
	testq	%rax, %rax
	je	LBB0_15
## %bb.2:
	movl	-40(%rbp), %eax
	movl	%eax, 4(%r12)
LBB0_3:
	movslq	20(%r12), %rdi
	addq	$1004, %rdi                     ## imm = 0x3EC
	callq	_wpabuf_alloc
	testq	%rax, %rax
	je	LBB0_15
## %bb.4:
	movq	%rax, %r14
	movq	_IKE_SA_AUTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IKEV2_PAYLOAD_ENCRYPTED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	$1, %r8d
	callq	_ikev2_build_hdr
	movslq	20(%r12), %rdi
	addq	$1000, %rdi                     ## imm = 0x3E8
	callq	_wpabuf_alloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.5:
	movq	%rax, %r15
	movq	_IKEV2_PAYLOAD_AUTHENTICATION@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_ikev2_build_idi
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	movq	_IKEV2_PAYLOAD_NO_NEXT_PAYLOAD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_ikev2_build_auth
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movl	12(%r12), %esi
	movl	16(%r12), %edi
	addq	$8, %r12
	movq	_IKEV2_PAYLOAD_IDi@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%r12, %rdx
	movl	$1, %ecx
	movq	%r14, %r8
	movq	%r15, %r9
	callq	_ikev2_build_encrypted
	testq	%rax, %rax
	je	LBB0_17
LBB0_8:
	movq	%r15, %rdi
	callq	_wpabuf_free
LBB0_9:
	movq	%r14, %rdi
	callq	_wpabuf_free
	jmp	LBB0_15
LBB0_10:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	movl	$1, (%r12)
	movq	24(%r12), %rdi
	callq	_os_free
	movl	$16, %edi
	callq	_os_malloc
	movq	%rax, 24(%r12)
	testq	%rax, %rax
	je	LBB0_15
## %bb.11:
	movl	$16, 4(%r12)
	movq	%rax, %rdi
	movl	$16, %esi
	callq	_random_get_bytes
	testq	%rax, %rax
	je	LBB0_3
LBB0_15:
	xorl	%r14d, %r14d
LBB0_16:
	movq	%r14, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	%r15, %rdi
	callq	_wpabuf_free
	movq	_MSG_MSGDUMP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdx
	callq	_wpa_hexdump_buf
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_INFO,4,2                   ## @MSG_INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IKEV2: Could not get shared secret - use fake value"

	.comm	_IKE_SA_AUTH,4,2                ## @IKE_SA_AUTH
	.comm	_IKEV2_PAYLOAD_ENCRYPTED,4,2    ## @IKEV2_PAYLOAD_ENCRYPTED
	.comm	_IKEV2_PAYLOAD_AUTHENTICATION,4,2 ## @IKEV2_PAYLOAD_AUTHENTICATION
	.comm	_IKEV2_PAYLOAD_NO_NEXT_PAYLOAD,4,2 ## @IKEV2_PAYLOAD_NO_NEXT_PAYLOAD
	.comm	_IKEV2_PAYLOAD_IDi,4,2          ## @IKEV2_PAYLOAD_IDi
	.comm	_MSG_MSGDUMP,4,2                ## @MSG_MSGDUMP
L_.str.1:                               ## @.str.1
	.asciz	"IKEV2: Sending message (SA_AUTH)"

	.no_dead_strip	_ikev2_build_sa_auth
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ikev2_build_sa_auth
_ikev2_build_sa_auth:                   ; @ikev2_build_sa_auth
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
	ldr	x8, [x0, #40]
	ldr	w0, [x0, #36]
	ldr	w1, [x19, #32]
	ldr	w2, [x19, #20]
	add	x3, sp, #8
	blr	x8
	cbz	x0, LBB0_10
; %bb.1:
	mov	x20, x0
	ldr	x0, [x19, #24]
	bl	_os_free
	ldr	x1, [sp, #8]
	mov	x0, x20
	bl	_os_memdup
	str	x0, [x19, #24]
	cbz	x0, LBB0_12
; %bb.2:
	ldr	x8, [sp, #8]
	str	w8, [x19, #4]
LBB0_3:
	ldrsw	x8, [x19, #20]
	add	x0, x8, #1004
	bl	_wpabuf_alloc
	mov	x20, x0
	cbz	x0, LBB0_13
; %bb.4:
Lloh0:
	adrp	x8, _IKE_SA_AUTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IKE_SA_AUTH@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x8, _IKEV2_PAYLOAD_ENCRYPTED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IKEV2_PAYLOAD_ENCRYPTED@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w4, #1
	bl	_ikev2_build_hdr
	ldrsw	x8, [x19, #20]
	add	x0, x8, #1000
	bl	_wpabuf_alloc
	cbz	x0, LBB0_9
; %bb.5:
	mov	x21, x0
Lloh6:
	adrp	x8, _IKEV2_PAYLOAD_AUTHENTICATION@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IKEV2_PAYLOAD_AUTHENTICATION@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_ikev2_build_idi
	cbnz	x0, LBB0_8
; %bb.6:
Lloh9:
	adrp	x8, _IKEV2_PAYLOAD_NO_NEXT_PAYLOAD@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IKEV2_PAYLOAD_NO_NEXT_PAYLOAD@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_ikev2_build_auth
	cbnz	x0, LBB0_8
; %bb.7:
	ldp	w1, w0, [x19, #12]
	add	x2, x19, #8
Lloh12:
	adrp	x8, _IKEV2_PAYLOAD_IDi@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IKEV2_PAYLOAD_IDi@GOTPAGEOFF]
Lloh14:
	ldr	w6, [x8]
	mov	w3, #1
	mov	x4, x20
	mov	x5, x21
	bl	_ikev2_build_encrypted
	cbz	x0, LBB0_14
LBB0_8:
	mov	x0, x21
	bl	_wpabuf_free
LBB0_9:
	mov	x0, x20
	bl	_wpabuf_free
	b	LBB0_12
LBB0_10:
Lloh15:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	mov	w8, #1
	str	w8, [x19]
	ldr	x0, [x19, #24]
	bl	_os_free
	mov	w20, #16
	mov	w0, #16
	bl	_os_malloc
	str	x0, [x19, #24]
	cbz	x0, LBB0_12
; %bb.11:
	str	w20, [x19, #4]
	mov	w1, #16
	bl	_random_get_bytes
	cbz	x0, LBB0_3
LBB0_12:
	mov	x20, #0
LBB0_13:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_14:
	mov	x0, x21
	bl	_wpabuf_free
Lloh20:
	adrp	x8, _MSG_MSGDUMP@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MSG_MSGDUMP@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_wpa_hexdump_buf
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_INFO,4,2                   ; @MSG_INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IKEV2: Could not get shared secret - use fake value"

	.comm	_IKE_SA_AUTH,4,2                ; @IKE_SA_AUTH
	.comm	_IKEV2_PAYLOAD_ENCRYPTED,4,2    ; @IKEV2_PAYLOAD_ENCRYPTED
	.comm	_IKEV2_PAYLOAD_AUTHENTICATION,4,2 ; @IKEV2_PAYLOAD_AUTHENTICATION
	.comm	_IKEV2_PAYLOAD_NO_NEXT_PAYLOAD,4,2 ; @IKEV2_PAYLOAD_NO_NEXT_PAYLOAD
	.comm	_IKEV2_PAYLOAD_IDi,4,2          ; @IKEV2_PAYLOAD_IDi
	.comm	_MSG_MSGDUMP,4,2                ; @MSG_MSGDUMP
l_.str.1:                               ; @.str.1
	.asciz	"IKEV2: Sending message (SA_AUTH)"

	.no_dead_strip	_ikev2_build_sa_auth
.subsections_via_symbols
