	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function eap_ttls_avp_encapsulate
_eap_ttls_avp_encapsulate:              ## @eap_ttls_avp_encapsulate
	.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
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	(%rdi), %rdi
	callq	_wpabuf_len
	leaq	8(%rax), %rdi
	callq	_wpabuf_alloc
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	callq	_wpabuf_mhead
	movq	%rax, %rbx
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	(%r12), %rdi
	callq	_wpabuf_len
	movq	%rbx, %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
	movl	%r13d, %ecx
	movq	%rax, %r8
	callq	_eap_ttls_avp_hdr
	movq	%rax, %r15
	movq	(%r12), %rdi
	callq	_wpabuf_head
	movl	%eax, %r13d
	movq	(%r12), %rdi
	callq	_wpabuf_len
	movq	%r15, %rdi
	movl	%r13d, %esi
	movq	%rax, %rdx
	callq	_os_memcpy
	movq	(%r12), %rdi
	callq	_wpabuf_len
	leaq	(%r15,%rax,4), %rbx
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_AVP_PAD
	movq	(%r12), %rdi
	callq	_wpabuf_clear_free
	subq	%r15, %rbx
	shrq	$2, %rbx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_wpabuf_put
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	(%r12), %rdi
	callq	_wpabuf_clear_free
	movl	$-1, %eax
LBB0_3:
	movq	%r14, (%r12)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_eap_ttls_avp_encapsulate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function eap_ttls_avp_encapsulate
_eap_ttls_avp_encapsulate:              ; @eap_ttls_avp_encapsulate
	.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	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldr	x0, [x0]
	bl	_wpabuf_len
	add	x0, x0, #8
	bl	_wpabuf_alloc
	mov	x20, x0
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_wpabuf_mhead
	mov	x23, x0
	ldr	x0, [x19]
	bl	_wpabuf_len
	mov	x4, x0
	mov	x0, x23
	mov	x1, x22
	mov	w2, #0
	mov	x3, x21
	bl	_eap_ttls_avp_hdr
	mov	x21, x0
	ldr	x0, [x19]
	bl	_wpabuf_head
	mov	x22, x0
	ldr	x0, [x19]
	bl	_wpabuf_len
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_os_memcpy
	ldr	x0, [x19]
	bl	_wpabuf_len
	add	x21, x21, x0, lsl #2
	mov	x0, x23
	mov	x1, x21
	bl	_AVP_PAD
	ldr	x0, [x19]
	bl	_wpabuf_clear_free
	sub	x8, x21, x23
	lsr	x1, x8, #2
	mov	x0, x20
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_wpabuf_put
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	ldr	x0, [x19]
	bl	_wpabuf_clear_free
	mov	w0, #-1
LBB0_3:
	str	x20, [x19]
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_eap_ttls_avp_encapsulate
.subsections_via_symbols
