	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_p2p_build_probe_resp_ies       ## -- Begin function p2p_build_probe_resp_ies
	.p2align	4, 0x90
_p2p_build_probe_resp_ies:              ## @p2p_build_probe_resp_ies
	.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, %r15d
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	16(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	_VENDOR_ELEM_PROBE_RESP_P2P@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.2:
	callq	_wpabuf_len
	jmp	LBB0_5
LBB0_4:
	xorl	%eax, %eax
LBB0_5:
	movl	%r15d, %ecx
	testl	%r15d, %r15d
	je	LBB0_7
## %bb.6:
	movq	_MAX_SVC_ADV_IE_LEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_7:
	leal	(%rcx,%rax), %edi
	addl	$1000, %edi                     ## imm = 0x3E8
	callq	_wpabuf_alloc
	testq	%rax, %rax
	je	LBB0_21
## %bb.8:
	movq	%rax, %rbx
	movq	32(%r12), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	movl	(%rax), %edi
	callq	_p2p_wps_method_pw_id
	movl	%eax, %edx
	jmp	LBB0_12
LBB0_11:
	movl	$-1, %edx
LBB0_12:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	_p2p_build_wps_ie
	testq	%rax, %rax
	js	LBB0_20
## %bb.13:
	movq	16(%r12), %rax
	testq	%rax, %rax
	je	LBB0_16
## %bb.14:
	movq	_VENDOR_ELEM_PROBE_RESP_P2P@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_16
## %bb.15:
	movq	%rbx, %rdi
	callq	_wpabuf_put_buf
LBB0_16:
	movq	%rbx, %rdi
	callq	_p2p_buf_add_ie_hdr
	movq	%rax, %r13
	movq	_P2P_DEV_CAPAB_CLIENT_DISCOVERABILITY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	notl	%esi
	andl	(%r12), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_p2p_buf_add_capability
	movl	8(%r12), %edx
	testl	%edx, %edx
	je	LBB0_18
## %bb.17:
	movl	12(%r12), %esi
	movq	%rbx, %rdi
	callq	_p2p_buf_add_ext_listen_timing
LBB0_18:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_p2p_buf_add_device_info
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_p2p_buf_update_ie_hdr
	testl	%r15d, %r15d
	je	LBB0_22
## %bb.19:
	movl	4(%r12), %r8d
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	movq	%r14, %rcx
	callq	_p2p_buf_add_service_instance
	jmp	LBB0_22
LBB0_20:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_p2p_dbg
	movq	%rbx, %rdi
	callq	_wpabuf_free
LBB0_21:
	xorl	%ebx, %ebx
LBB0_22:
	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_PROBE_RESP_P2P,8,3 ## @VENDOR_ELEM_PROBE_RESP_P2P
	.comm	_MAX_SVC_ADV_IE_LEN,8,3         ## @MAX_SVC_ADV_IE_LEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to build WPS IE for Probe Response"

	.comm	_P2P_DEV_CAPAB_CLIENT_DISCOVERABILITY,4,2 ## @P2P_DEV_CAPAB_CLIENT_DISCOVERABILITY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_p2p_build_probe_resp_ies       ; -- Begin function p2p_build_probe_resp_ies
	.p2align	2
_p2p_build_probe_resp_ies:              ; @p2p_build_probe_resp_ies
	.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	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_3
; %bb.1:
Lloh0:
	adrp	x9, _VENDOR_ELEM_PROBE_RESP_P2P@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VENDOR_ELEM_PROBE_RESP_P2P@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	x0, [x8, x9, lsl #3]
	cbz	x0, LBB0_4
; %bb.2:
	bl	_wpabuf_len
	b	LBB0_4
LBB0_3:
	mov	x0, #0
LBB0_4:
Lloh3:
	adrp	x8, _MAX_SVC_ADV_IE_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_SVC_ADV_IE_LEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w21, #0
	csel	w8, wzr, w8, eq
	add	w8, w8, w0
	add	w0, w8, #1000
	bl	_wpabuf_alloc
	mov	x22, x0
	cbz	x0, LBB0_17
; %bb.5:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_7
; %bb.6:
	ldr	w0, [x8]
	bl	_p2p_wps_method_pw_id
	mov	x2, x0
	b	LBB0_8
LBB0_7:
	mov	w2, #-1
LBB0_8:
	mov	x0, x19
	mov	x1, x22
	mov	w3, #1
	bl	_p2p_build_wps_ie
	tbnz	x0, #63, LBB0_16
; %bb.9:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_12
; %bb.10:
Lloh6:
	adrp	x9, _VENDOR_ELEM_PROBE_RESP_P2P@GOTPAGE
Lloh7:
	ldr	x9, [x9, _VENDOR_ELEM_PROBE_RESP_P2P@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	ldr	x1, [x8, x9, lsl #3]
	cbz	x1, LBB0_12
; %bb.11:
	mov	x0, x22
	bl	_wpabuf_put_buf
LBB0_12:
	mov	x0, x22
	bl	_p2p_buf_add_ie_hdr
	mov	x23, x0
	ldr	w8, [x19]
Lloh9:
	adrp	x9, _P2P_DEV_CAPAB_CLIENT_DISCOVERABILITY@GOTPAGE
Lloh10:
	ldr	x9, [x9, _P2P_DEV_CAPAB_CLIENT_DISCOVERABILITY@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	bic	w1, w8, w9
	mov	x0, x22
	mov	w2, #0
	bl	_p2p_buf_add_capability
	ldr	w2, [x19, #8]
	cbz	w2, LBB0_14
; %bb.13:
	ldr	w1, [x19, #12]
	mov	x0, x22
	bl	_p2p_buf_add_ext_listen_timing
LBB0_14:
	mov	x0, x22
	mov	x1, x19
	mov	x2, #0
	bl	_p2p_buf_add_device_info
	mov	x0, x22
	mov	x1, x23
	bl	_p2p_buf_update_ie_hdr
	cbz	w21, LBB0_17
; %bb.15:
	ldr	w4, [x19, #4]
	mov	x0, x22
	mov	x1, x19
	mov	x2, x21
	mov	x3, x20
	bl	_p2p_buf_add_service_instance
	b	LBB0_17
LBB0_16:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_p2p_dbg
	mov	x0, x22
	bl	_wpabuf_free
	mov	x22, #0
LBB0_17:
	mov	x0, x22
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_VENDOR_ELEM_PROBE_RESP_P2P,8,3 ; @VENDOR_ELEM_PROBE_RESP_P2P
	.comm	_MAX_SVC_ADV_IE_LEN,8,3         ; @MAX_SVC_ADV_IE_LEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to build WPS IE for Probe Response"

	.comm	_P2P_DEV_CAPAB_CLIENT_DISCOVERABILITY,4,2 ; @P2P_DEV_CAPAB_CLIENT_DISCOVERABILITY
.subsections_via_symbols
