	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p2p_build_go_neg_req
_p2p_build_go_neg_req:                  ## @p2p_build_go_neg_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, %rbx
	movq	8(%rdi), %rax
	movl	$1000, %edi                     ## imm = 0x3E8
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_VENDOR_ELEM_P2P_GO_NEG_REQ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rax, %rdi
	callq	_wpabuf_len
	movq	%rax, %rdi
	addl	$1000, %edi                     ## imm = 0x3E8
LBB0_3:
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_wpabuf_alloc
	xorl	%r13d, %r13d
	testq	%rax, %rax
	je	LBB0_19
## %bb.4:
	movq	%rax, %r14
	movq	_P2P_GO_NEG_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	20(%r15), %edx
	movq	%r14, %rdi
	callq	_p2p_buf_add_public_action_hdr
	movq	%r14, %rdi
	callq	_p2p_buf_add_ie_hdr
	movq	%rax, %r12
	movl	(%r15), %eax
	movq	_P2P_DEV_PREFER_PERSISTENT_GROUP@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.5:
	movq	_P2P_GROUP_CAPAB_PERSISTENT_GROUP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
	movq	_P2P_DEV_PREFER_PERSISTENT_RECONN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.6:
	movq	_P2P_GROUP_CAPAB_PERSISTENT_RECONN@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
LBB0_7:
	xorl	%eax, %eax
	cmpq	$0, 72(%rbx)
	movl	$0, %edx
	je	LBB0_9
## %bb.8:
	movq	_P2P_GROUP_CAPAB_CROSS_CONN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
LBB0_9:
	orl	%r13d, %edx
	movq	40(%rbx), %rcx
	cmpq	$0, 16(%rcx)
	je	LBB0_11
## %bb.10:
	movq	_P2P_GROUP_CAPAB_INTRA_BSS_DIST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_11:
	orl	%eax, %edx
	movq	_P2P_DEV_CAPAB_CLIENT_DISCOVERABILITY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	notl	%esi
	andl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_p2p_buf_add_capability
	movl	4(%rbx), %esi
	addl	%esi, %esi
	orl	4(%r15), %esi
	movq	%r14, %rdi
	callq	_p2p_buf_add_go_intent
	movl	64(%rbx), %edx
	movl	68(%rbx), %esi
	movq	%r14, %rdi
	callq	_p2p_buf_add_config_timeout
	movq	40(%rbx), %rax
	movl	8(%rax), %edx
	movl	(%rax), %esi
	movl	4(%rax), %ecx
	movq	%r14, %rdi
	callq	_p2p_buf_add_listen_channel
	movl	56(%rbx), %edx
	testl	%edx, %edx
	je	LBB0_13
## %bb.12:
	movl	60(%rbx), %esi
	movq	%r14, %rdi
	callq	_p2p_buf_add_ext_listen_timing
LBB0_13:
	movl	52(%rbx), %esi
	movq	%r14, %rdi
	callq	_p2p_buf_add_intended_addr
	movq	40(%rbx), %rax
	movl	(%rax), %esi
	leaq	48(%rbx), %rdx
	movq	%r14, %rdi
	callq	_p2p_buf_add_channel_list
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_p2p_buf_add_device_info
	movq	40(%rbx), %rax
	movl	(%rax), %esi
	movl	32(%rbx), %ecx
	movl	36(%rbx), %edx
	movq	%r14, %rdi
	callq	_p2p_buf_add_operating_channel
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_p2p_buf_update_ie_hdr
	movl	24(%rbx), %edx
	movl	28(%rbx), %esi
	movq	%r14, %rdi
	callq	_p2p_buf_add_pref_channel_list
	movl	16(%r15), %edi
	callq	_p2p_wps_method_pw_id
	movq	8(%r15), %rdx
	testq	%rdx, %rdx
	cmoveq	%rax, %rdx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%ecx, %ecx
	callq	_p2p_build_wps_ie
	testq	%rax, %rax
	js	LBB0_18
## %bb.14:
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_20
## %bb.15:
	movq	_VENDOR_ELEM_P2P_GO_NEG_REQ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_20
## %bb.16:
	movq	%r14, %rdi
	callq	_wpabuf_put_buf
	jmp	LBB0_20
LBB0_18:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_p2p_dbg
	movq	%r14, %rdi
	callq	_wpabuf_free
LBB0_19:
	xorl	%r14d, %r14d
LBB0_20:
	movq	%r14, %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_GO_NEG_REQ,8,3 ## @VENDOR_ELEM_P2P_GO_NEG_REQ
	.comm	_P2P_GO_NEG_REQ,4,2             ## @P2P_GO_NEG_REQ
	.comm	_P2P_DEV_PREFER_PERSISTENT_GROUP,4,2 ## @P2P_DEV_PREFER_PERSISTENT_GROUP
	.comm	_P2P_GROUP_CAPAB_PERSISTENT_GROUP,4,2 ## @P2P_GROUP_CAPAB_PERSISTENT_GROUP
	.comm	_P2P_DEV_PREFER_PERSISTENT_RECONN,4,2 ## @P2P_DEV_PREFER_PERSISTENT_RECONN
	.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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to build WPS IE for GO Negotiation Request"

	.no_dead_strip	_p2p_build_go_neg_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_go_neg_req
_p2p_build_go_neg_req:                  ; @p2p_build_go_neg_req
	.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	x21, x1
	mov	x19, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_3
; %bb.1:
Lloh0:
	adrp	x9, _VENDOR_ELEM_P2P_GO_NEG_REQ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VENDOR_ELEM_P2P_GO_NEG_REQ@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	x0, [x8, x9, lsl #3]
	cbz	x0, LBB0_3
; %bb.2:
	bl	_wpabuf_len
	add	w0, w0, #1000
	b	LBB0_4
LBB0_3:
	mov	w0, #1000
LBB0_4:
	bl	_wpabuf_alloc
	mov	x20, x0
	cbz	x0, LBB0_16
; %bb.5:
Lloh3:
	adrp	x8, _P2P_GO_NEG_REQ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _P2P_GO_NEG_REQ@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	w2, [x21, #20]
	mov	x0, x20
	bl	_p2p_buf_add_public_action_hdr
	mov	x0, x20
	bl	_p2p_buf_add_ie_hdr
	mov	x22, x0
	ldr	w9, [x21]
Lloh6:
	adrp	x8, _P2P_DEV_PREFER_PERSISTENT_GROUP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _P2P_DEV_PREFER_PERSISTENT_GROUP@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w9
	b.eq	LBB0_8
; %bb.6:
Lloh9:
	adrp	x8, _P2P_GROUP_CAPAB_PERSISTENT_GROUP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _P2P_GROUP_CAPAB_PERSISTENT_GROUP@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x10, _P2P_DEV_PREFER_PERSISTENT_RECONN@GOTPAGE
Lloh13:
	ldr	x10, [x10, _P2P_DEV_PREFER_PERSISTENT_RECONN@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_9
; %bb.7:
Lloh15:
	adrp	x9, _P2P_GROUP_CAPAB_PERSISTENT_RECONN@GOTPAGE
Lloh16:
	ldr	x9, [x9, _P2P_GROUP_CAPAB_PERSISTENT_RECONN@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w9, w8
	b	LBB0_9
LBB0_8:
	mov	w8, #0
LBB0_9:
Lloh18:
	adrp	x9, _P2P_GROUP_CAPAB_CROSS_CONN@GOTPAGE
Lloh19:
	ldr	x9, [x9, _P2P_GROUP_CAPAB_CROSS_CONN@GOTPAGEOFF]
	ldr	x10, [x19, #72]
Lloh20:
	ldr	w9, [x9]
	cmp	x10, #0
	csel	w9, wzr, w9, eq
	orr	w8, w9, w8
	ldr	x9, [x19, #40]
	ldr	x9, [x9, #16]
Lloh21:
	adrp	x10, _P2P_GROUP_CAPAB_INTRA_BSS_DIST@GOTPAGE
Lloh22:
	ldr	x10, [x10, _P2P_GROUP_CAPAB_INTRA_BSS_DIST@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
	cmp	x9, #0
	csel	w9, wzr, w10, eq
	orr	w2, w8, w9
	ldr	w8, [x19]
Lloh24:
	adrp	x9, _P2P_DEV_CAPAB_CLIENT_DISCOVERABILITY@GOTPAGE
Lloh25:
	ldr	x9, [x9, _P2P_DEV_CAPAB_CLIENT_DISCOVERABILITY@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	bic	w1, w8, w9
	mov	x0, x20
	bl	_p2p_buf_add_capability
	ldr	w8, [x19, #4]
	ldr	w9, [x21, #4]
	orr	w1, w9, w8, lsl #1
	mov	x0, x20
	bl	_p2p_buf_add_go_intent
	ldp	w2, w1, [x19, #64]
	mov	x0, x20
	bl	_p2p_buf_add_config_timeout
	ldr	x8, [x19, #40]
	ldp	w3, w2, [x8, #4]
	ldr	w1, [x8]
	mov	x0, x20
	bl	_p2p_buf_add_listen_channel
	ldr	w2, [x19, #56]
	cbz	w2, LBB0_11
; %bb.10:
	ldr	w1, [x19, #60]
	mov	x0, x20
	bl	_p2p_buf_add_ext_listen_timing
LBB0_11:
	ldr	w1, [x19, #52]
	mov	x0, x20
	bl	_p2p_buf_add_intended_addr
	ldr	x8, [x19, #40]
	ldr	w1, [x8]
	add	x2, x19, #48
	mov	x0, x20
	bl	_p2p_buf_add_channel_list
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_p2p_buf_add_device_info
	ldr	x8, [x19, #40]
	ldr	w1, [x8]
	ldp	w3, w2, [x19, #32]
	mov	x0, x20
	bl	_p2p_buf_add_operating_channel
	mov	x0, x20
	mov	x1, x22
	bl	_p2p_buf_update_ie_hdr
	ldp	w2, w1, [x19, #24]
	mov	x0, x20
	bl	_p2p_buf_add_pref_channel_list
	ldr	w0, [x21, #16]
	bl	_p2p_wps_method_pw_id
	ldr	x8, [x21, #8]
	cmp	x8, #0
	csel	x2, x0, x8, eq
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	bl	_p2p_build_wps_ie
	tbnz	x0, #63, LBB0_15
; %bb.12:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_16
; %bb.13:
Lloh27:
	adrp	x9, _VENDOR_ELEM_P2P_GO_NEG_REQ@GOTPAGE
Lloh28:
	ldr	x9, [x9, _VENDOR_ELEM_P2P_GO_NEG_REQ@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	ldr	x1, [x8, x9, lsl #3]
	cbz	x1, LBB0_16
; %bb.14:
	mov	x0, x20
	bl	_wpabuf_put_buf
	b	LBB0_16
LBB0_15:
Lloh30:
	adrp	x1, l_.str@PAGE
Lloh31:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_p2p_dbg
	mov	x0, x20
	bl	_wpabuf_free
	mov	x20, #0
LBB0_16:
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_VENDOR_ELEM_P2P_GO_NEG_REQ,8,3 ; @VENDOR_ELEM_P2P_GO_NEG_REQ
	.comm	_P2P_GO_NEG_REQ,4,2             ; @P2P_GO_NEG_REQ
	.comm	_P2P_DEV_PREFER_PERSISTENT_GROUP,4,2 ; @P2P_DEV_PREFER_PERSISTENT_GROUP
	.comm	_P2P_GROUP_CAPAB_PERSISTENT_GROUP,4,2 ; @P2P_GROUP_CAPAB_PERSISTENT_GROUP
	.comm	_P2P_DEV_PREFER_PERSISTENT_RECONN,4,2 ; @P2P_DEV_PREFER_PERSISTENT_RECONN
	.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
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to build WPS IE for GO Negotiation Request"

	.no_dead_strip	_p2p_build_go_neg_req
.subsections_via_symbols
