	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p2p_unlink_sd_query
_p2p_unlink_sd_query:                   ## @p2p_unlink_sd_query
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rcx
	testq	%rcx, %rcx
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r15
	movq	%rdi, %r14
	cmpq	%rsi, %rcx
	je	LBB0_3
## %bb.9:
	xorl	%eax, %eax
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx), %rdx
	testq	%rdx, %rdx
	je	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_10 Depth=1
	cmpq	$1, 8(%rcx)
	sbbl	$-1, %esi
	movq	%rcx, %rbx
	movq	%rdx, %rcx
	cmpq	%r15, %rdx
	jne	LBB0_10
	jmp	LBB0_5
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_3:
	xorl	%esi, %esi
	xorl	%ebx, %ebx
LBB0_5:
	leaq	8(%r14), %r12
	cmpq	$0, 8(%r15)
	je	LBB0_7
## %bb.6:
	movq	%r14, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_p2p_decrease_sd_bc_queries
LBB0_7:
	testq	%rbx, %rbx
	movq	(%r15), %rax
	cmovneq	%rbx, %r12
	movq	%rax, (%r12)
	movl	$1, %eax
	cmpq	%r15, (%r14)
	jne	LBB0_11
## %bb.8:
	movq	$0, (%r14)
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_p2p_unlink_sd_query
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function p2p_unlink_sd_query
_p2p_unlink_sd_query:                   ; @p2p_unlink_sd_query
	.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, x0
	ldr	x8, [x21, #8]!
	cbz	x8, LBB0_10
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	cmp	x8, x1
	b.eq	LBB0_12
; %bb.2:
	mov	w1, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x8]
	cbz	x9, LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x10, [x8, #8]
	cmp	x10, #0
	cinc	w1, w1, ne
	mov	x22, x8
	mov	x8, x9
	cmp	x9, x20
	b.ne	LBB0_3
; %bb.5:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_7
LBB0_6:
	mov	x0, x19
	bl	_p2p_decrease_sd_bc_queries
LBB0_7:
	ldr	x8, [x20]
	cmp	x22, #0
	csel	x9, x21, x22, eq
	str	x8, [x9]
	ldr	x8, [x19]
	cmp	x8, x20
	b.ne	LBB0_9
; %bb.8:
	str	xzr, [x19]
LBB0_9:
	mov	w0, #1
	b	LBB0_11
LBB0_10:
	mov	w0, #0
LBB0_11:
	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
LBB0_12:
	mov	w1, #0
	mov	x22, #0
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_6
	b	LBB0_7
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_p2p_unlink_sd_query
.subsections_via_symbols
