	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	$1004, %edi                     ## imm = 0x3EC
	addq	16(%r14), %rdi
	callq	_wpabuf_alloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %rbx
	movq	_IKE_SA_AUTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IKEV2_PAYLOAD_ENCRYPTED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$1, %r8d
	callq	_ikev2_build_hdr
	movl	$1000, %edi                     ## imm = 0x3E8
	addq	16(%r14), %rdi
	callq	_wpabuf_alloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	%rax, %r15
	movq	_IKEV2_PAYLOAD_AUTHENTICATION@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_ikev2_build_idr
	testq	%rax, %rax
	jne	LBB0_5
## %bb.3:
	movq	_IKEV2_PAYLOAD_NO_NEXT_PAYLOAD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_ikev2_build_auth
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movl	8(%r14), %esi
	movl	12(%r14), %edi
	leaq	4(%r14), %rdx
	movq	_IKEV2_PAYLOAD_IDr@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	xorl	%ecx, %ecx
	movq	%rbx, %r8
	movq	%r15, %r9
	callq	_ikev2_build_encrypted
	testq	%rax, %rax
	je	LBB0_9
LBB0_5:
	movq	%r15, %rdi
	callq	_wpabuf_free
LBB0_6:
	movq	%rbx, %rdi
	callq	_wpabuf_free
LBB0_7:
	xorl	%ebx, %ebx
LBB0_8:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r15, %rdi
	callq	_wpabuf_free
	movq	_MSG_MSGDUMP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	callq	_wpa_hexdump_buf
	movq	_IKEV2_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.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_IDr,4,2          ## @IKEV2_PAYLOAD_IDr
	.comm	_MSG_MSGDUMP,4,2                ## @MSG_MSGDUMP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IKEV2: Sending message (SA_AUTH)"

	.comm	_IKEV2_DONE,4,2                 ## @IKEV2_DONE
	.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:
	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	x20, x0
	ldr	x8, [x0, #16]
	add	x0, x8, #1004
	bl	_wpabuf_alloc
	mov	x19, x0
	cbz	x0, LBB0_7
; %bb.1:
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, x20
	mov	x1, x19
	mov	w4, #1
	bl	_ikev2_build_hdr
	ldr	x8, [x20, #16]
	add	x0, x8, #1000
	bl	_wpabuf_alloc
	cbz	x0, LBB0_6
; %bb.2:
	mov	x21, x0
Lloh6:
	adrp	x8, _IKEV2_PAYLOAD_AUTHENTICATION@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IKEV2_PAYLOAD_AUTHENTICATION@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_ikev2_build_idr
	cbnz	x0, LBB0_5
; %bb.3:
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, x20
	mov	x1, x21
	bl	_ikev2_build_auth
	cbnz	x0, LBB0_5
; %bb.4:
	ldp	w1, w0, [x20, #8]
	add	x2, x20, #4
Lloh12:
	adrp	x8, _IKEV2_PAYLOAD_IDr@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IKEV2_PAYLOAD_IDr@GOTPAGEOFF]
Lloh14:
	ldr	w6, [x8]
	mov	w3, #0
	mov	x4, x19
	mov	x5, x21
	bl	_ikev2_build_encrypted
	cbz	x0, LBB0_8
LBB0_5:
	mov	x0, x21
	bl	_wpabuf_free
LBB0_6:
	mov	x0, x19
	bl	_wpabuf_free
	mov	x19, #0
LBB0_7:
	mov	x0, x19
	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
LBB0_8:
	mov	x0, x21
	bl	_wpabuf_free
Lloh15:
	adrp	x8, _MSG_MSGDUMP@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MSG_MSGDUMP@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_wpa_hexdump_buf
Lloh20:
	adrp	x8, _IKEV2_DONE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IKEV2_DONE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	str	w8, [x20]
	b	LBB0_7
	.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 AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.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_IDr,4,2          ; @IKEV2_PAYLOAD_IDr
	.comm	_MSG_MSGDUMP,4,2                ; @MSG_MSGDUMP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IKEV2: Sending message (SA_AUTH)"

	.comm	_IKEV2_DONE,4,2                 ; @IKEV2_DONE
	.no_dead_strip	_ikev2_build_sa_auth
.subsections_via_symbols
