	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wpas_p2p_lo_start              ## -- Begin function wpas_p2p_lo_start
	.p2align	4, 0x90
_wpas_p2p_lo_start:                     ## @wpas_p2p_lo_start
	.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
	movq	%rdi, %rbx
	cmpl	$0, (%rdi)
	je	LBB0_3
## %bb.1:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_wpa_dbg
LBB0_2:
	xorl	%r15d, %r15d
	jmp	LBB0_14
LBB0_3:
	movq	16(%rbx), %rax
	movq	(%rax), %r12
	testq	%r12, %r12
	je	LBB0_12
## %bb.4:
	movq	_WPA_DRIVER_FLAGS_P2P_LISTEN_OFFLOAD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rbx)
	je	LBB0_12
## %bb.5:
	movl	%r8d, %r15d
	movl	%edx, %r13d
	movl	%esi, %r14d
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	callq	_p2p_supported_freq
	testl	%eax, %eax
	je	LBB0_15
## %bb.6:
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	movq	8(%rbx), %rax
	movslq	(%rax), %rax
	incq	%rax
	movq	_WPS_DEV_TYPE_LEN@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rdi
	imulq	%rax, %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_os_malloc
	movl	$-1, %r15d
	testq	%rax, %rax
	je	LBB0_14
## %bb.7:
	movq	8(%rbx), %rcx
	movl	8(%rcx), %esi
	movq	_WPS_DEV_TYPE_LEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rdi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	callq	_os_memcpy
	movq	_WPS_DEV_TYPE_LEN@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rdi
	movq	8(%rbx), %rcx
	movl	4(%rcx), %esi
	movl	(%rcx), %edx
	imull	%eax, %edx
	callq	_os_memcpy
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_p2p_build_probe_resp_template
	testq	%rax, %rax
	je	LBB0_16
## %bb.8:
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_wpabuf_mhead_u8
	movl	%eax, %r15d
	movq	%r12, %rdi
	callq	_wpabuf_len
                                        ## kill: def $eax killed $eax def $rax
	subq	$8, %rsp
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r13d, %edx
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %r9
	pushq	%rax
	pushq	%r15
	pushq	-64(%rbp)                       ## 8-byte Folded Reload
	callq	_wpa_drv_p2p_lo_start
	addq	$32, %rsp
	movl	%eax, %r15d
	testl	%eax, %eax
	jns	LBB0_10
## %bb.9:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%rbx, %rdi
	callq	_wpa_dbg
LBB0_10:
	movq	%r14, %rdi
	callq	_os_free
	movq	%r12, %rdi
	callq	_wpabuf_free
	testl	%r15d, %r15d
	jne	LBB0_14
## %bb.11:
	movl	$1, (%rbx)
	movq	%rbx, %rdi
	callq	_wpas_stop_listen
	jmp	LBB0_2
LBB0_12:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
LBB0_13:
	movl	$-1, %r15d
LBB0_14:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_wpa_printf
	jmp	LBB0_13
LBB0_16:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_os_free
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"P2P Listen offload is already started"

	.comm	_WPA_DRIVER_FLAGS_P2P_LISTEN_OFFLOAD,4,2 ## @WPA_DRIVER_FLAGS_P2P_LISTEN_OFFLOAD
L_.str.1:                               ## @.str.1
	.asciz	"P2P: Listen offload not supported"

	.comm	_MSG_ERROR,4,2                  ## @MSG_ERROR
L_.str.2:                               ## @.str.2
	.asciz	"P2P: Input channel not supported: %u"

	.comm	_WPS_DEV_TYPE_LEN,4,2           ## @WPS_DEV_TYPE_LEN
L_.str.3:                               ## @.str.3
	.asciz	"P2P: Failed to start P2P listen offload"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wpas_p2p_lo_start              ; -- Begin function wpas_p2p_lo_start
	.p2align	2
_wpas_p2p_lo_start:                     ; @wpas_p2p_lo_start
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_wpa_dbg
	mov	w20, #0
	b	LBB0_14
LBB0_2:
	ldr	x8, [x19, #16]
	ldr	x26, [x8]
	cbz	x26, LBB0_11
; %bb.3:
	ldr	w8, [x19, #4]
Lloh5:
	adrp	x9, _WPA_DRIVER_FLAGS_P2P_LISTEN_OFFLOAD@GOTPAGE
Lloh6:
	ldr	x9, [x9, _WPA_DRIVER_FLAGS_P2P_LISTEN_OFFLOAD@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.4:
	mov	x21, x4
	mov	x22, x3
	mov	x23, x2
	mov	x20, x1
	mov	x0, x26
	bl	_p2p_supported_freq
	cbz	w0, LBB0_15
; %bb.5:
	ldr	x8, [x19, #8]
	ldrsw	x8, [x8]
Lloh8:
	adrp	x27, _WPS_DEV_TYPE_LEN@GOTPAGE
Lloh9:
	ldr	x27, [x27, _WPS_DEV_TYPE_LEN@GOTPAGEOFF]
	ldrsw	x9, [x27]
	madd	x25, x9, x8, x9
	mov	x0, x25
	bl	_os_malloc
	cbz	x0, LBB0_13
; %bb.6:
	mov	x24, x0
	ldr	x8, [x19, #8]
	ldr	w1, [x8, #8]
	ldr	w2, [x27]
	bl	_os_memcpy
	ldrsw	x8, [x27]
	add	x0, x24, x8, lsl #2
	ldr	x9, [x19, #8]
	ldp	w9, w1, [x9]
	mul	w2, w9, w8
	bl	_os_memcpy
	mov	x0, x26
	mov	x1, x20
	bl	_p2p_build_probe_resp_template
	cbz	x0, LBB0_16
; %bb.7:
	mov	x26, x0
	bl	_wpabuf_mhead_u8
	mov	x27, x0
	mov	x0, x26
	bl	_wpabuf_len
	str	w0, [sp]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x23
	mov	x3, x22
	mov	x4, x21
	mov	x5, x24
	mov	x6, x25
	mov	x7, x27
	bl	_wpa_drv_p2p_lo_start
	mov	x20, x0
	tbz	w0, #31, LBB0_9
; %bb.8:
Lloh10:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x2, l_.str.3@PAGE
Lloh14:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_wpa_dbg
LBB0_9:
	mov	x0, x24
	bl	_os_free
	mov	x0, x26
	bl	_wpabuf_free
	cbnz	w20, LBB0_14
; %bb.10:
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x19
	bl	_wpas_stop_listen
	b	LBB0_14
LBB0_11:
Lloh15:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_12:
	bl	_wpa_printf
LBB0_13:
	mov	w20, #-1
LBB0_14:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_15:
Lloh20:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	str	x20, [sp]
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_12
LBB0_16:
	mov	x0, x24
	bl	_os_free
	b	LBB0_13
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"P2P Listen offload is already started"

	.comm	_WPA_DRIVER_FLAGS_P2P_LISTEN_OFFLOAD,4,2 ; @WPA_DRIVER_FLAGS_P2P_LISTEN_OFFLOAD
l_.str.1:                               ; @.str.1
	.asciz	"P2P: Listen offload not supported"

	.comm	_MSG_ERROR,4,2                  ; @MSG_ERROR
l_.str.2:                               ; @.str.2
	.asciz	"P2P: Input channel not supported: %u"

	.comm	_WPS_DEV_TYPE_LEN,4,2           ; @WPS_DEV_TYPE_LEN
l_.str.3:                               ; @.str.3
	.asciz	"P2P: Failed to start P2P listen offload"

.subsections_via_symbols
