	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function eap_teap_encrypt_phase2
_eap_teap_encrypt_phase2:               ## @eap_teap_encrypt_phase2
	.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	%ecx, %r12d
	movq	%rdx, %rbx
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_hexdump_buf_key
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_eap_server_tls_encrypt
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_wpabuf_free
	movl	$-1, %r15d
	testq	%r14, %r14
	je	LBB0_8
## %bb.1:
	movq	(%r13), %rdi
	testl	%r12d, %r12d
	je	LBB0_6
## %bb.2:
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.3:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r14, %rdi
	callq	_wpabuf_len
	movq	%rax, %rbx
	movq	(%r13), %rdi
	callq	_wpabuf_len
	movl	8(%r13), %r8d
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %edi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	%r14, %rdi
	callq	_wpabuf_len
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_wpabuf_resize
	testq	%rax, %rax
	js	LBB0_4
## %bb.5:
	movq	(%r13), %rdi
	movq	%r14, %rsi
	callq	_wpabuf_put_buf
	movq	%r14, %rdi
	callq	_wpabuf_free
	jmp	LBB0_7
LBB0_6:
	callq	_wpabuf_free
	movq	$0, 8(%r13)
	movq	%r14, (%r13)
LBB0_7:
	xorl	%r15d, %r15d
	jmp	LBB0_8
LBB0_4:
	movq	_MSG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	%r14, %rdi
	callq	_wpabuf_free
LBB0_8:
	movl	%r15d, %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	"EAP-TEAP: Encrypting Phase 2 TLVs"

L_.str.1:                               ## @.str.1
	.asciz	"EAP-TEAP: Piggyback Phase 2 data (len=%d) with last Phase 1 Message (len=%d used=%d)"

	.comm	_MSG_WARNING,4,2                ## @MSG_WARNING
L_.str.2:                               ## @.str.2
	.asciz	"EAP-TEAP: Failed to resize output buffer"

	.no_dead_strip	_eap_teap_encrypt_phase2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function eap_teap_encrypt_phase2
_eap_teap_encrypt_phase2:               ; @eap_teap_encrypt_phase2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x3
	mov	x22, x2
	mov	x20, x1
	mov	x19, 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_hexdump_buf_key
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	bl	_eap_server_tls_encrypt
	mov	x19, x0
	mov	x0, x22
	bl	_wpabuf_free
	cbz	x19, LBB0_7
; %bb.1:
	ldr	x0, [x20]
	cbz	w21, LBB0_5
; %bb.2:
	cbz	x0, LBB0_5
; %bb.3:
	ldr	w21, [x23]
	mov	x0, x19
	bl	_wpabuf_len
	mov	x22, x0
	ldr	x0, [x20]
	bl	_wpabuf_len
	ldr	x8, [x20, #8]
	stp	x0, x8, [sp, #8]
	str	x22, [sp]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_wpa_printf
	mov	x0, x19
	bl	_wpabuf_len
	mov	x1, x0
	mov	x0, x20
	bl	_wpabuf_resize
	tbnz	x0, #63, LBB0_6
; %bb.4:
	ldr	x0, [x20]
	mov	x1, x19
	bl	_wpabuf_put_buf
	mov	x0, x19
	bl	_wpabuf_free
	mov	w0, #0
	b	LBB0_8
LBB0_5:
	bl	_wpabuf_free
	mov	w0, #0
	stp	x19, xzr, [x20]
	b	LBB0_8
LBB0_6:
Lloh6:
	adrp	x8, _MSG_WARNING@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MSG_WARNING@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wpa_printf
	mov	x0, x19
	bl	_wpabuf_free
LBB0_7:
	mov	w0, #-1
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EAP-TEAP: Encrypting Phase 2 TLVs"

l_.str.1:                               ; @.str.1
	.asciz	"EAP-TEAP: Piggyback Phase 2 data (len=%d) with last Phase 1 Message (len=%d used=%d)"

	.comm	_MSG_WARNING,4,2                ; @MSG_WARNING
l_.str.2:                               ; @.str.2
	.asciz	"EAP-TEAP: Failed to resize output buffer"

	.no_dead_strip	_eap_teap_encrypt_phase2
.subsections_via_symbols
