	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p2p_add_wps_string
_p2p_add_wps_string:                    ## @p2p_add_wps_string
	.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
	movq	%rdx, %r12
	movl	%esi, %r13d
	movq	%rdi, %r14
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.2:
	movq	%r12, %rdi
	callq	_os_strlen
	movq	%rax, %rbx
	jmp	LBB0_3
LBB0_1:
	xorl	%ebx, %ebx
LBB0_3:
	movq	%r14, %rdi
	callq	_wpabuf_tailroom
	cltq
	leaq	4(%rbx), %rcx
	movl	$-1, %r15d
	cmpq	%rax, %rcx
	ja	LBB0_9
## %bb.4:
	movl	%r13d, %esi
	movq	%r14, %rdi
	callq	_wpabuf_put_be16
	movq	%r14, %rdi
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.7:
	movq	%rbx, %rsi
	callq	_wpabuf_put_be16
	xorl	%r15d, %r15d
	testq	%r12, %r12
	je	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_wpabuf_put_data
	jmp	LBB0_9
LBB0_5:
	callq	_wpabuf_tailroom
	cmpl	$3, %eax
	jl	LBB0_9
## %bb.6:
	movl	$1, %esi
	movq	%r14, %rdi
	callq	_wpabuf_put_be16
	movq	%r14, %rdi
	movl	$32, %esi
	callq	_wpabuf_put_u8
	xorl	%r15d, %r15d
LBB0_9:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_p2p_add_wps_string
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function p2p_add_wps_string
_p2p_add_wps_string:                    ; @p2p_add_wps_string
	.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, x2
	mov	x22, x1
	mov	x19, x0
	cbz	x2, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_os_strlen
	mov	x21, x0
	b	LBB0_3
LBB0_2:
	mov	x21, #0
LBB0_3:
	mov	x0, x19
	bl	_wpabuf_tailroom
	add	x8, x21, #4
	cmp	x8, w0, sxtw
	b.ls	LBB0_5
LBB0_4:
	mov	w0, #-1
	b	LBB0_11
LBB0_5:
	mov	w1, w22
	mov	x0, x19
	bl	_wpabuf_put_be16
	mov	x0, x19
	cbz	x21, LBB0_8
; %bb.6:
	mov	x1, x21
	bl	_wpabuf_put_be16
	cbz	x20, LBB0_10
; %bb.7:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_wpabuf_put_data
	b	LBB0_10
LBB0_8:
	bl	_wpabuf_tailroom
	cmp	w0, #3
	b.lt	LBB0_4
; %bb.9:
	mov	x0, x19
	mov	w1, #1
	bl	_wpabuf_put_be16
	mov	x0, x19
	mov	w1, #32
	bl	_wpabuf_put_u8
LBB0_10:
	mov	w0, #0
LBB0_11:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_p2p_add_wps_string
.subsections_via_symbols
