	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_p2p_sd_response                ## -- Begin function p2p_sd_response
	.p2align	4, 0x90
_p2p_sd_response:                       ## @p2p_sd_response
	.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	%r8, %r13
	movl	%ecx, %r12d
	movq	%rdx, %r14
	movq	%rdi, %r15
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	cmpl	$56161, %esi                    ## imm = 0xDB61
	movl	$928, %eax                      ## imm = 0x3A0
	movl	$1400, %ebx                     ## imm = 0x578
	cmovgeq	%rax, %rbx
	movq	%r8, %rdi
	callq	_wpabuf_len
	cmpq	%rbx, %rax
	jbe	LBB0_5
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_p2p_dbg
	cmpq	$0, 40(%r15)
	je	LBB0_3
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_p2p_dbg
	movq	40(%r15), %rdi
	callq	_wpabuf_free
LBB0_3:
	movq	%r13, %rdi
	callq	_wpabuf_dup
	movq	%rax, 40(%r15)
	testq	%rax, %rax
	je	LBB0_11
## %bb.4:
	movl	36(%r15), %edi
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rsi
	callq	_os_memcpy
	movl	%r12d, 32(%r15)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%r15)
	movq	_WLAN_STATUS_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%r15), %ecx
	movl	%r12d, %edi
	movl	$1, %edx
	xorl	%r8d, %r8d
	callq	_p2p_build_sd_response
	movq	%rax, %r12
	movl	$200, %ebx
	testq	%r12, %r12
	jne	LBB0_7
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	_p2p_dbg
	movq	_WLAN_STATUS_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%r15), %ecx
	xorl	%ebx, %ebx
	movl	%r12d, %edi
	xorl	%edx, %edx
	movq	%r13, %r8
	callq	_p2p_build_sd_response
	movq	%rax, %r12
	testq	%r12, %r12
	je	LBB0_10
LBB0_7:
	movq	_P2P_NO_PENDING_ACTION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movq	(%r15), %rax
	movl	(%rax), %r13d
	movq	%r12, %rdi
	callq	_wpabuf_head
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_wpabuf_len
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	%r14, %rdx
	movl	%r13d, %ecx
	movl	%r13d, %r8d
	movl	%ebx, %r9d
	pushq	-56(%rbp)                       ## 8-byte Folded Reload
	pushq	%rax
	callq	_p2p_send_action
	addq	$16, %rsp
	testq	%rax, %rax
	jns	LBB0_9
## %bb.8:
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_p2p_dbg
LBB0_9:
	movq	%r12, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wpabuf_free                    ## TAILCALL
LBB0_11:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_p2p_err                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SD response long enough to require fragmentation"

L_.str.1:                               ## @.str.1
	.asciz	"Drop previous SD response"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to allocate SD response fragmentation area"

	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.comm	_WLAN_STATUS_SUCCESS,4,2        ## @WLAN_STATUS_SUCCESS
L_.str.3:                               ## @.str.3
	.asciz	"SD response fits in initial response"

	.comm	_P2P_NO_PENDING_ACTION,4,2      ## @P2P_NO_PENDING_ACTION
L_.str.4:                               ## @.str.4
	.asciz	"Failed to send Action frame"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_p2p_sd_response                ; -- Begin function p2p_sd_response
	.p2align	2
_p2p_sd_response:                       ; @p2p_sd_response
	.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	x23, x4
	mov	x22, x3
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	mov	w8, #56160
	cmp	w1, w8
	mov	w8, #1400
	mov	w9, #928
	csel	x24, x9, x8, gt
	mov	x0, x4
	bl	_wpabuf_len
	cmp	x0, x24
	b.ls	LBB0_6
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_p2p_dbg
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_3
; %bb.2:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_p2p_dbg
	ldr	x0, [x19, #40]
	bl	_wpabuf_free
LBB0_3:
	mov	x0, x23
	bl	_wpabuf_dup
	str	x0, [x19, #40]
	cbz	x0, LBB0_10
; %bb.4:
	ldr	w0, [x19, #36]
Lloh4:
	adrp	x8, _ETH_ALEN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ETH_ALEN@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	x1, x20
	bl	_os_memcpy
	str	w22, [x19, #32]
	stp	xzr, xzr, [x19, #16]
Lloh7:
	adrp	x8, _WLAN_STATUS_SUCCESS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _WLAN_STATUS_SUCCESS@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	ldr	w3, [x19, #12]
	mov	x0, x22
	mov	w2, #1
	mov	x4, #0
	bl	_p2p_build_sd_response
	mov	x22, x0
	mov	w23, #200
	cbnz	x22, LBB0_7
LBB0_5:
	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
LBB0_6:
Lloh10:
	adrp	x1, l_.str.3@PAGE
Lloh11:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_p2p_dbg
Lloh12:
	adrp	x8, _WLAN_STATUS_SUCCESS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _WLAN_STATUS_SUCCESS@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldr	w3, [x19, #12]
	mov	x0, x22
	mov	w2, #0
	mov	x4, x23
	bl	_p2p_build_sd_response
	mov	x22, x0
	mov	w23, #0
	cbz	x22, LBB0_5
LBB0_7:
Lloh15:
	adrp	x8, _P2P_NO_PENDING_ACTION@GOTPAGE
Lloh16:
	ldr	x8, [x8, _P2P_NO_PENDING_ACTION@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	ldr	x8, [x19]
	ldr	w24, [x8]
	mov	x0, x22
	bl	_wpabuf_head
	mov	x25, x0
	mov	x0, x22
	bl	_wpabuf_len
	mov	x6, x0
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	mov	x3, x24
	mov	x4, x24
	mov	x5, x25
	mov	x7, x23
	bl	_p2p_send_action
	tbz	x0, #63, LBB0_9
; %bb.8:
Lloh18:
	adrp	x1, l_.str.4@PAGE
Lloh19:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_p2p_dbg
LBB0_9:
	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
	b	_wpabuf_free
LBB0_10:
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	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
	b	_p2p_err
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SD response long enough to require fragmentation"

l_.str.1:                               ; @.str.1
	.asciz	"Drop previous SD response"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to allocate SD response fragmentation area"

	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.comm	_WLAN_STATUS_SUCCESS,4,2        ; @WLAN_STATUS_SUCCESS
l_.str.3:                               ; @.str.3
	.asciz	"SD response fits in initial response"

	.comm	_P2P_NO_PENDING_ACTION,4,2      ; @P2P_NO_PENDING_ACTION
l_.str.4:                               ; @.str.4
	.asciz	"Failed to send Action frame"

.subsections_via_symbols
