	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_windbg_sync                    ## -- Begin function windbg_sync
	.p2align	4, 0x90
_windbg_sync:                           ## @windbg_sync
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%ebx, %ebx
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.1:
	movq	%rdi, %r14
	movl	52(%rdi), %edi
	testl	%edi, %edi
	je	LBB0_7
## %bb.2:
	movl	$1, %ebx
	cmpl	$0, (%r14)
	jne	LBB0_7
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edx
	callq	_iob_write
	movl	$0, %ebx
	cmpl	$1, %eax
	jne	LBB0_7
## %bb.4:
	movl	52(%r14), %edi
	movq	_KD_PACKET_TYPE_RESET@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_kd_send_ctrl_packet
	movq	_KD_E_OK@GOTPCREL(%rip), %r12
	cmpl	(%r12), %eax
	jne	LBB0_7
## %bb.5:
	movl	(%r15), %esi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_windbg_wait_packet
	cmpl	(%r12), %eax
	jne	LBB0_7
## %bb.6:
	movq	_KD_PACKET_TYPE_STATE_CHANGE64@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rdx
	movq	%r14, %rdi
	callq	_windbg_wait_packet
	movl	$-2139095039, 4(%r14)           ## imm = 0x80800001
	movq	-40(%rbp), %rax
	movq	(%rax), %rax
	movl	4(%rax), %ecx
	movl	%ecx, 48(%r14)
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movq	$0, 40(%r14)
	movq	32(%r14), %rdi
	callq	_r_list_free
	movq	$0, 32(%r14)
	movq	24(%r14), %rdi
	callq	_r_list_free
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%r14)
	movl	$1, (%r14)
	movq	-40(%rbp), %rdi
	callq	_free
	movl	8(%r14), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_eprintf
	movl	$1, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"b"

	.comm	_KD_PACKET_TYPE_RESET,4,2       ## @KD_PACKET_TYPE_RESET
	.comm	_KD_E_OK,4,2                    ## @KD_E_OK
	.comm	_KD_PACKET_TYPE_STATE_CHANGE64,4,2 ## @KD_PACKET_TYPE_STATE_CHANGE64
L_.str.1:                               ## @.str.1
	.asciz	"Sync done! (%i cpus found)\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_windbg_sync                    ; -- Begin function windbg_sync
	.p2align	2
_windbg_sync:                           ; @windbg_sync
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	cbz	x0, LBB0_8
; %bb.1:
	mov	x19, x0
	ldr	w0, [x0, #52]
	cbz	w0, LBB0_8
; %bb.2:
	ldr	w8, [x19]
	cbz	w8, LBB0_4
; %bb.3:
	mov	w20, #1
	b	LBB0_9
LBB0_4:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #1
	bl	_iob_write
	cmp	w0, #1
	b.ne	LBB0_8
; %bb.5:
	ldr	w0, [x19, #52]
Lloh2:
	adrp	x21, _KD_PACKET_TYPE_RESET@GOTPAGE
Lloh3:
	ldr	x21, [x21, _KD_PACKET_TYPE_RESET@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w2, #0
	bl	_kd_send_ctrl_packet
	mov	w20, #0
Lloh4:
	adrp	x22, _KD_E_OK@GOTPAGE
Lloh5:
	ldr	x22, [x22, _KD_E_OK@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w0, w8
	b.ne	LBB0_9
; %bb.6:
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, #0
	bl	_windbg_wait_packet
	ldr	w8, [x22]
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.7:
Lloh6:
	adrp	x8, _KD_PACKET_TYPE_STATE_CHANGE64@GOTPAGE
Lloh7:
	ldr	x8, [x8, _KD_PACKET_TYPE_STATE_CHANGE64@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	bl	_windbg_wait_packet
	mov	w8, #1
	movk	w8, #32896, lsl #16
	ldr	x9, [sp, #8]
	ldr	x9, [x9]
	ldp	w9, w10, [x9]
	str	w10, [x19, #48]
	stp	w8, w9, [x19, #4]
	str	xzr, [x19, #40]
	ldr	x0, [x19, #32]
	bl	_r_list_free
	str	xzr, [x19, #32]
	ldr	x0, [x19, #24]
	bl	_r_list_free
	stp	xzr, xzr, [x19, #16]
	mov	w20, #1
	str	w20, [x19]
	ldr	x0, [sp, #8]
	bl	_free
	ldr	w1, [x19, #8]
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_eprintf
	b	LBB0_9
LBB0_8:
	mov	w20, #0
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"b"

	.comm	_KD_PACKET_TYPE_RESET,4,2       ; @KD_PACKET_TYPE_RESET
	.comm	_KD_E_OK,4,2                    ; @KD_E_OK
	.comm	_KD_PACKET_TYPE_STATE_CHANGE64,4,2 ; @KD_PACKET_TYPE_STATE_CHANGE64
l_.str.1:                               ; @.str.1
	.asciz	"Sync done! (%i cpus found)\n"

.subsections_via_symbols
