	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ikev2_build_ker
_ikev2_build_ker:                       ## @ikev2_build_ker
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r13d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	_MSG_DEBUG@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	movq	(%rbx), %rdi
	leaq	12(%rbx), %rsi
	callq	_dh_init
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	%r15, %rdi
	movl	$24, %esi
	callq	_wpabuf_put
	movq	%rax, %r14
	movl	%r13d, 16(%rax)
	movq	$0, 8(%rax)
	movl	8(%rbx), %esi
	movq	%r15, %rdi
	callq	_wpabuf_put_be16
	movq	%r15, %rdi
	movl	$2, %esi
	callq	_wpabuf_put
	movq	(%rbx), %rax
	movl	(%rax), %ebx
	movq	%r12, %rdi
	callq	_wpabuf_len
	subl	%eax, %ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_wpabuf_put
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_wpabuf_put_buf
	movq	%r12, %rdi
	callq	_wpabuf_free
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_wpabuf_put
	subq	%r14, %rax
	sarq	$2, %rax
	movl	(%r14), %edi
	movq	%rax, %rsi
	callq	_WPA_PUT_BE16
	jmp	LBB0_3
LBB0_1:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_wpa_printf
	movl	$-1, %ebx
LBB0_3:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IKEV2: Adding KEr payload"

L_.str.1:                               ## @.str.1
	.asciz	"IKEV2: Failed to initialize DH"

	.no_dead_strip	_ikev2_build_ker
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ikev2_build_ker
_ikev2_build_ker:                       ; @ikev2_build_ker
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x23, _MSG_DEBUG@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	mov	x1, x21
	ldr	x0, [x1], #12
	bl	_dh_init
	cbz	x0, LBB0_2
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	mov	w1, #24
	bl	_wpabuf_put
	mov	x23, x0
	str	w22, [x0, #16]
	str	xzr, [x0, #8]
	ldr	w1, [x21, #8]
	mov	x0, x19
	bl	_wpabuf_put_be16
	mov	x0, x19
	mov	w1, #2
	bl	_wpabuf_put
	ldr	x8, [x21]
	ldr	w21, [x8]
	mov	x0, x20
	bl	_wpabuf_len
	sub	w1, w21, w0
	mov	x0, x19
	bl	_wpabuf_put
	mov	x0, x19
	mov	x1, x20
	bl	_wpabuf_put_buf
	mov	x0, x20
	bl	_wpabuf_free
	mov	x0, x19
	mov	w1, #0
	bl	_wpabuf_put
	sub	x8, x0, x23
	asr	x1, x8, #2
	ldr	w0, [x23]
	bl	_WPA_PUT_BE16
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	ldr	w0, [x23]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_printf
	mov	w0, #-1
LBB0_3:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IKEV2: Adding KEr payload"

l_.str.1:                               ; @.str.1
	.asciz	"IKEV2: Failed to initialize DH"

	.no_dead_strip	_ikev2_build_ker
.subsections_via_symbols
