	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p2p_build_invitation_req
_p2p_build_invitation_req:              ## @p2p_build_invitation_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movq	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movl	$1000, %edi                     ## imm = 0x3E8
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_VENDOR_ELEM_P2P_INV_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
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_25
## %bb.4:
	movl	(%r12), %eax
	incl	%eax
	movl	$1, %edx
	cmovnel	%eax, %edx
	movl	%edx, (%r12)
	movq	_P2P_INVITATION_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_p2p_buf_add_public_action_hdr
	movq	%r15, %rdi
	callq	_p2p_buf_add_ie_hdr
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rax
	movq	_P2P_INVITE_ROLE_ACTIVE_GO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.5:
	cmpq	$0, 72(%rbx)
	je	LBB0_6
## %bb.7:
	movl	80(%rbx), %edx
	movl	84(%rbx), %esi
	movq	%r15, %rdi
	jmp	LBB0_8
LBB0_6:
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
LBB0_8:
	callq	_p2p_buf_add_config_timeout
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	xorl	%esi, %esi
	cmpq	$0, 72(%rbx)
	je	LBB0_10
## %bb.9:
	movq	_P2P_INVITATION_FLAGS_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_10:
	movq	%r15, %rdi
	callq	_p2p_buf_add_invitation_flags
	movq	(%rbx), %rax
	movq	_P2P_INVITE_ROLE_CLIENT@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rax
	jne	LBB0_12
## %bb.11:
	movq	_P2P_DEV_NO_PREF_CHAN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r12)
	jne	LBB0_13
LBB0_12:
	movq	40(%rbx), %rax
	movl	8(%rax), %esi
	movl	68(%rbx), %edx
	movl	64(%rbx), %ecx
	movq	%r15, %rdi
	callq	_p2p_buf_add_operating_channel
LBB0_13:
	cmpq	$0, 56(%rbx)
	je	LBB0_15
## %bb.14:
	movl	52(%rbx), %esi
	movq	%r15, %rdi
	callq	_p2p_buf_add_group_bssid
LBB0_15:
	movq	40(%rbx), %rax
	movl	8(%rax), %esi
	leaq	48(%rbx), %rdx
	movq	%r15, %rdi
	callq	_p2p_buf_add_channel_list
	testq	%r13, %r13
	jne	LBB0_20
## %bb.16:
	movq	(%rbx), %rax
	cmpq	(%r14), %rax
	jne	LBB0_18
## %bb.17:
	leaq	8(%r12), %rax
	jmp	LBB0_19
LBB0_18:
	movq	40(%rbx), %rax
LBB0_19:
	movq	(%rax), %r13
LBB0_20:
	movl	32(%rbx), %ecx
	movl	36(%rbx), %edx
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_p2p_buf_add_group_id
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_p2p_buf_add_device_info
	movq	%r15, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_p2p_buf_update_ie_hdr
	movl	24(%rbx), %edx
	movl	28(%rbx), %esi
	movq	%r15, %rdi
	callq	_p2p_buf_add_pref_channel_list
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_23
## %bb.21:
	movq	_VENDOR_ELEM_P2P_INV_REQ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_23
## %bb.22:
	movq	%r15, %rdi
	callq	_wpabuf_put_buf
LBB0_23:
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	testl	%edx, %edx
	js	LBB0_25
## %bb.24:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	callq	_p2p_build_wps_ie
LBB0_25:
	movq	%r15, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VENDOR_ELEM_P2P_INV_REQ,8,3    ## @VENDOR_ELEM_P2P_INV_REQ
	.comm	_P2P_INVITATION_REQ,4,2         ## @P2P_INVITATION_REQ
	.comm	_P2P_INVITE_ROLE_ACTIVE_GO,8,3  ## @P2P_INVITE_ROLE_ACTIVE_GO
	.comm	_P2P_INVITATION_FLAGS_TYPE,4,2  ## @P2P_INVITATION_FLAGS_TYPE
	.comm	_P2P_INVITE_ROLE_CLIENT,8,3     ## @P2P_INVITE_ROLE_CLIENT
	.comm	_P2P_DEV_NO_PREF_CHAN,4,2       ## @P2P_DEV_NO_PREF_CHAN
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.no_dead_strip	_p2p_build_invitation_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_invitation_req
_p2p_build_invitation_req:              ; @p2p_build_invitation_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	x19, x3
	mov	x23, x2
	mov	x22, x1
	mov	x20, x0
	ldr	x8, [x0, #16]
Lloh0:
	adrp	x25, _VENDOR_ELEM_P2P_INV_REQ@GOTPAGE
Lloh1:
	ldr	x25, [x25, _VENDOR_ELEM_P2P_INV_REQ@GOTPAGEOFF]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	x9, [x25]
	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	x21, x0
	cbz	x0, LBB0_24
; %bb.5:
	ldr	w8, [x22]
	adds	w8, w8, #1
	csinc	w2, w8, wzr, lo
	str	w2, [x22]
Lloh2:
	adrp	x8, _P2P_INVITATION_REQ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _P2P_INVITATION_REQ@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_p2p_buf_add_public_action_hdr
	mov	x0, x21
	bl	_p2p_buf_add_ie_hdr
	mov	x24, x0
	ldr	x8, [x20]
Lloh5:
	adrp	x9, _P2P_INVITE_ROLE_ACTIVE_GO@GOTPAGE
Lloh6:
	ldr	x9, [x9, _P2P_INVITE_ROLE_ACTIVE_GO@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_8
; %bb.6:
	ldr	x8, [x20, #72]
	cbz	x8, LBB0_8
; %bb.7:
	ldp	w2, w1, [x20, #80]
	mov	x0, x21
	b	LBB0_9
LBB0_8:
	mov	x0, x21
	mov	w1, #0
	mov	w2, #0
LBB0_9:
	bl	_p2p_buf_add_config_timeout
	ldr	x8, [x20, #72]
Lloh8:
	adrp	x9, _P2P_INVITATION_FLAGS_TYPE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _P2P_INVITATION_FLAGS_TYPE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	x8, #0
	csel	w1, wzr, w9, eq
	mov	x0, x21
	bl	_p2p_buf_add_invitation_flags
	ldr	x8, [x20]
Lloh11:
	adrp	x26, _P2P_INVITE_ROLE_CLIENT@GOTPAGE
Lloh12:
	ldr	x26, [x26, _P2P_INVITE_ROLE_CLIENT@GOTPAGEOFF]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:
	ldr	w8, [x22, #4]
Lloh13:
	adrp	x9, _P2P_DEV_NO_PREF_CHAN@GOTPAGE
Lloh14:
	ldr	x9, [x9, _P2P_DEV_NO_PREF_CHAN@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_12
LBB0_11:
	ldr	x8, [x20, #40]
	ldr	w1, [x8, #8]
	ldp	w3, w2, [x20, #64]
	mov	x0, x21
	bl	_p2p_buf_add_operating_channel
LBB0_12:
	ldr	x8, [x20, #56]
	cbz	x8, LBB0_14
; %bb.13:
	ldr	w1, [x20, #52]
	mov	x0, x21
	bl	_p2p_buf_add_group_bssid
LBB0_14:
	ldr	x8, [x20, #40]
	ldr	w1, [x8, #8]
	add	x2, x20, #48
	mov	x0, x21
	bl	_p2p_buf_add_channel_list
	cbnz	x23, LBB0_19
; %bb.15:
	ldr	x8, [x20]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.16:
	add	x8, x22, #8
	b	LBB0_18
LBB0_17:
	ldr	x8, [x20, #40]
LBB0_18:
	ldr	x23, [x8]
LBB0_19:
	ldp	w3, w2, [x20, #32]
	mov	x0, x21
	mov	x1, x23
	bl	_p2p_buf_add_group_id
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	bl	_p2p_buf_add_device_info
	mov	x0, x21
	mov	x1, x24
	bl	_p2p_buf_update_ie_hdr
	ldp	w2, w1, [x20, #24]
	mov	x0, x21
	bl	_p2p_buf_add_pref_channel_list
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_22
; %bb.20:
	ldr	x9, [x25]
	ldr	x1, [x8, x9, lsl #3]
	cbz	x1, LBB0_22
; %bb.21:
	mov	x0, x21
	bl	_wpabuf_put_buf
LBB0_22:
	tbnz	w19, #31, LBB0_24
; %bb.23:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	mov	w3, #0
	bl	_p2p_build_wps_ie
LBB0_24:
	mov	x0, x21
	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	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_VENDOR_ELEM_P2P_INV_REQ,8,3    ; @VENDOR_ELEM_P2P_INV_REQ
	.comm	_P2P_INVITATION_REQ,4,2         ; @P2P_INVITATION_REQ
	.comm	_P2P_INVITE_ROLE_ACTIVE_GO,8,3  ; @P2P_INVITE_ROLE_ACTIVE_GO
	.comm	_P2P_INVITATION_FLAGS_TYPE,4,2  ; @P2P_INVITATION_FLAGS_TYPE
	.comm	_P2P_INVITE_ROLE_CLIENT,8,3     ; @P2P_INVITE_ROLE_CLIENT
	.comm	_P2P_DEV_NO_PREF_CHAN,4,2       ; @P2P_DEV_NO_PREF_CHAN
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.no_dead_strip	_p2p_build_invitation_req
.subsections_via_symbols
