	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p2p_build_prov_disc_req
_p2p_build_prov_disc_req:               ## @p2p_build_prov_disc_req
	.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	%rsi, %r15
	movq	%rdi, %r12
	movl	12(%rsi), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	16(%rsi), %r13d
	xorl	%ebx, %ebx
	testl	%edx, %edx
	movq	%rsi, %r14
	cmoveq	%rbx, %r14
	movq	8(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	_VENDOR_ELEM_P2P_PD_REQ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.3:
	callq	_wpabuf_len
	movq	%rax, %rbx
	jmp	LBB0_4
LBB0_2:
	xorl	%ebx, %ebx
LBB0_4:
	movq	24(%r12), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	(%rax), %edi
	callq	_os_strlen
	addq	%rax, %rbx
	addq	$5, %rbx
LBB0_6:
	addl	$1000, %ebx                     ## imm = 0x3E8
	movl	%ebx, %edi
	callq	_wpabuf_alloc
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_20
## %bb.7:
	movq	_P2P_PROV_DISC_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_p2p_buf_add_public_action_hdr
	movq	%rbx, %rdi
	callq	_p2p_buf_add_ie_hdr
	movq	%rax, %r13
	cmpq	$0, 24(%r12)
	je	LBB0_8
## %bb.9:
	movq	_P2P_GROUP_CAPAB_PERSISTENT_GROUP@GOTPCREL(%rip), %rax
	movq	_P2P_GROUP_CAPAB_PERSISTENT_RECONN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	xorl	%eax, %eax
	cmpq	$0, 40(%r12)
	je	LBB0_11
## %bb.10:
	movq	_P2P_GROUP_CAPAB_CROSS_CONN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_11:
	orl	%eax, %edx
	movq	32(%r12), %rax
	cmpq	$0, (%rax)
	je	LBB0_13
## %bb.12:
	movq	_P2P_GROUP_CAPAB_INTRA_BSS_DIST@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	jmp	LBB0_13
LBB0_8:
	xorl	%edx, %edx
LBB0_13:
	movq	_P2P_DEV_CAPAB_CLIENT_DISCOVERABILITY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	notl	%esi
	andl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_p2p_buf_add_capability
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_p2p_buf_add_device_info
	cmpq	$0, 24(%r12)
	je	LBB0_15
## %bb.14:
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %ecx
	callq	_p2ps_add_pd_req_attrs
	jmp	LBB0_17
LBB0_15:
	testq	%r14, %r14
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	je	LBB0_17
## %bb.16:
	movl	8(%r14), %esi
	movl	(%r14), %ecx
	movl	4(%r14), %edx
	movq	%rbx, %rdi
	callq	_p2p_buf_add_group_id
LBB0_17:
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_p2p_buf_update_ie_hdr
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_p2p_build_wps_ie_config_methods
	movq	8(%r12), %rax
	testq	%rax, %rax
	je	LBB0_20
## %bb.18:
	movq	_VENDOR_ELEM_P2P_PD_REQ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_20
## %bb.19:
	movq	%rbx, %rdi
	callq	_wpabuf_put_buf
LBB0_20:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VENDOR_ELEM_P2P_PD_REQ,8,3     ## @VENDOR_ELEM_P2P_PD_REQ
	.comm	_P2P_PROV_DISC_REQ,4,2          ## @P2P_PROV_DISC_REQ
	.comm	_P2P_GROUP_CAPAB_PERSISTENT_GROUP,4,2 ## @P2P_GROUP_CAPAB_PERSISTENT_GROUP
	.comm	_P2P_GROUP_CAPAB_PERSISTENT_RECONN,4,2 ## @P2P_GROUP_CAPAB_PERSISTENT_RECONN
	.comm	_P2P_GROUP_CAPAB_CROSS_CONN,4,2 ## @P2P_GROUP_CAPAB_CROSS_CONN
	.comm	_P2P_GROUP_CAPAB_INTRA_BSS_DIST,4,2 ## @P2P_GROUP_CAPAB_INTRA_BSS_DIST
	.comm	_P2P_DEV_CAPAB_CLIENT_DISCOVERABILITY,4,2 ## @P2P_DEV_CAPAB_CLIENT_DISCOVERABILITY
	.no_dead_strip	_p2p_build_prov_disc_req
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function p2p_build_prov_disc_req
_p2p_build_prov_disc_req:               ; @p2p_build_prov_disc_req
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x1
	mov	x19, x0
	ldp	w20, w23, [x1, #12]
	cmp	w2, #0
	csel	x25, xzr, x1, eq
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x24, _VENDOR_ELEM_P2P_PD_REQ@GOTPAGE
Lloh1:
	ldr	x24, [x24, _VENDOR_ELEM_P2P_PD_REQ@GOTPAGEOFF]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	x9, [x24]
	ldr	x0, [x8, x9, lsl #3]
	cbz	x0, LBB0_3
; %bb.2:
	bl	_wpabuf_len
	mov	x22, x0
	ldr	x8, [x19, #24]
	cbnz	x8, LBB0_4
	b	LBB0_5
LBB0_3:
	mov	x22, #0
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_5
LBB0_4:
	ldr	w0, [x8]
	bl	_os_strlen
	add	x8, x22, x0
	add	x22, x8, #5
LBB0_5:
	add	w0, w22, #1000
	bl	_wpabuf_alloc
	mov	x22, x0
	cbz	x0, LBB0_17
; %bb.6:
Lloh2:
	adrp	x8, _P2P_PROV_DISC_REQ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _P2P_PROV_DISC_REQ@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x22
	mov	x2, x23
	bl	_p2p_buf_add_public_action_hdr
	mov	x0, x22
	bl	_p2p_buf_add_ie_hdr
	mov	x23, x0
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_9
; %bb.7:
Lloh5:
	adrp	x8, _P2P_GROUP_CAPAB_PERSISTENT_GROUP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _P2P_GROUP_CAPAB_PERSISTENT_GROUP@GOTPAGEOFF]
Lloh7:
	adrp	x9, _P2P_GROUP_CAPAB_PERSISTENT_RECONN@GOTPAGE
Lloh8:
	ldr	x9, [x9, _P2P_GROUP_CAPAB_PERSISTENT_RECONN@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh11:
	adrp	x9, _P2P_GROUP_CAPAB_CROSS_CONN@GOTPAGE
Lloh12:
	ldr	x9, [x9, _P2P_GROUP_CAPAB_CROSS_CONN@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	ldp	x11, x10, [x19, #32]
	cmp	x10, #0
	csel	w9, wzr, w9, eq
	orr	w2, w8, w9
	ldr	x8, [x11]
	cbz	x8, LBB0_10
; %bb.8:
Lloh14:
	adrp	x8, _P2P_GROUP_CAPAB_INTRA_BSS_DIST@GOTPAGE
Lloh15:
	ldr	x8, [x8, _P2P_GROUP_CAPAB_INTRA_BSS_DIST@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	orr	w2, w8, w2
	b	LBB0_10
LBB0_9:
	mov	w2, #0
LBB0_10:
	ldr	w8, [x19]
Lloh17:
	adrp	x9, _P2P_DEV_CAPAB_CLIENT_DISCOVERABILITY@GOTPAGE
Lloh18:
	ldr	x9, [x9, _P2P_DEV_CAPAB_CLIENT_DISCOVERABILITY@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	bic	w1, w8, w9
	mov	x0, x22
	bl	_p2p_buf_add_capability
	mov	x0, x22
	mov	x1, x19
	mov	x2, #0
	bl	_p2p_buf_add_device_info
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_12
; %bb.11:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	mov	x3, x20
	bl	_p2ps_add_pd_req_attrs
	b	LBB0_14
LBB0_12:
	cbz	x25, LBB0_14
; %bb.13:
	ldp	w2, w1, [x25, #4]
	ldr	w3, [x25]
	mov	x0, x22
	bl	_p2p_buf_add_group_id
LBB0_14:
	mov	x0, x22
	mov	x1, x23
	bl	_p2p_buf_update_ie_hdr
	mov	x0, x22
	mov	x1, x20
	bl	_p2p_build_wps_ie_config_methods
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_17
; %bb.15:
	ldr	x9, [x24]
	ldr	x1, [x8, x9, lsl #3]
	cbz	x1, LBB0_17
; %bb.16:
	mov	x0, x22
	bl	_wpabuf_put_buf
LBB0_17:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_VENDOR_ELEM_P2P_PD_REQ,8,3     ; @VENDOR_ELEM_P2P_PD_REQ
	.comm	_P2P_PROV_DISC_REQ,4,2          ; @P2P_PROV_DISC_REQ
	.comm	_P2P_GROUP_CAPAB_PERSISTENT_GROUP,4,2 ; @P2P_GROUP_CAPAB_PERSISTENT_GROUP
	.comm	_P2P_GROUP_CAPAB_PERSISTENT_RECONN,4,2 ; @P2P_GROUP_CAPAB_PERSISTENT_RECONN
	.comm	_P2P_GROUP_CAPAB_CROSS_CONN,4,2 ; @P2P_GROUP_CAPAB_CROSS_CONN
	.comm	_P2P_GROUP_CAPAB_INTRA_BSS_DIST,4,2 ; @P2P_GROUP_CAPAB_INTRA_BSS_DIST
	.comm	_P2P_DEV_CAPAB_CLIENT_DISCOVERABILITY,4,2 ; @P2P_DEV_CAPAB_CLIENT_DISCOVERABILITY
	.no_dead_strip	_p2p_build_prov_disc_req
.subsections_via_symbols
