	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r_debug_windbg_wait
_r_debug_windbg_wait:                   ## @r_debug_windbg_wait
	.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, -56(%rbp)                 ## 8-byte Spill
	movq	$0, -48(%rbp)
	movq	_dbreak@GOTPCREL(%rip), %r14
	movl	$0, (%r14)
	movq	_wctx@GOTPCREL(%rip), %r12
	movq	_KD_PACKET_TYPE_STATE_CHANGE64@GOTPCREL(%rip), %rbx
	leaq	-48(%rbp), %r13
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	$0, (%r14)
	movl	(%r12), %edi
	callq	_windbg_break
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	-48(%rbp), %rdi
	callq	_R_FREE
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	movl	(%rbx), %esi
	movq	%r13, %rdx
	callq	_windbg_wait_packet
	cmpl	$0, (%r14)
	jne	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_KD_E_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-48(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r13, %r15
	movq	(%rax), %r13
	movl	16(%r13), %eax
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, 20(%rdx)
	movl	12(%r13), %eax
	movl	%eax, 16(%rdx)
	movq	(%r13), %rax
	movq	%rax, (%rdx)
	movl	(%r12), %edi
	movl	8(%r13), %esi
	callq	_windbg_set_cpu
	movq	(%r13), %rax
	movq	_DbgKdExceptionStateChange@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_DbgKdLoadSymbolsStateChange@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	%r15, %r13
	jne	LBB0_3
## %bb.12:
	movq	_R_DEBUG_REASON_NEW_LIB@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_6:
	movq	_R_DEBUG_REASON_ERROR@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_7
LBB0_9:
	movq	_R_DEBUG_REASON_INT@GOTPCREL(%rip), %rax
LBB0_10:
	movq	(%rax), %rbx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, 8(%rax)
LBB0_7:
	movq	-48(%rbp), %rdi
	callq	_free
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_R_DEBUG_REASON_UNKNOWN,8,3     ## @R_DEBUG_REASON_UNKNOWN
	.comm	_dbreak,4,2                     ## @dbreak
	.comm	_wctx,4,2                       ## @wctx
	.comm	_KD_PACKET_TYPE_STATE_CHANGE64,4,2 ## @KD_PACKET_TYPE_STATE_CHANGE64
	.comm	_KD_E_OK,4,2                    ## @KD_E_OK
	.comm	_R_DEBUG_REASON_ERROR,8,3       ## @R_DEBUG_REASON_ERROR
	.comm	_DbgKdExceptionStateChange,8,3  ## @DbgKdExceptionStateChange
	.comm	_R_DEBUG_REASON_INT,8,3         ## @R_DEBUG_REASON_INT
	.comm	_DbgKdLoadSymbolsStateChange,8,3 ## @DbgKdLoadSymbolsStateChange
	.comm	_R_DEBUG_REASON_NEW_LIB,8,3     ## @R_DEBUG_REASON_NEW_LIB
	.no_dead_strip	_r_debug_windbg_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r_debug_windbg_wait
_r_debug_windbg_wait:                   ; @r_debug_windbg_wait
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x0
Lloh0:
	adrp	x20, _dbreak@GOTPAGE
Lloh1:
	ldr	x20, [x20, _dbreak@GOTPAGEOFF]
	str	xzr, [sp, #8]
	str	wzr, [x20]
Lloh2:
	adrp	x21, _wctx@GOTPAGE
Lloh3:
	ldr	x21, [x21, _wctx@GOTPAGEOFF]
Lloh4:
	adrp	x22, _KD_PACKET_TYPE_STATE_CHANGE64@GOTPAGE
Lloh5:
	ldr	x22, [x22, _KD_PACKET_TYPE_STATE_CHANGE64@GOTPAGEOFF]
Lloh6:
	adrp	x23, _KD_E_OK@GOTPAGE
Lloh7:
	ldr	x23, [x23, _KD_E_OK@GOTPAGEOFF]
Lloh8:
	adrp	x24, _DbgKdExceptionStateChange@GOTPAGE
Lloh9:
	ldr	x24, [x24, _DbgKdExceptionStateChange@GOTPAGEOFF]
Lloh10:
	adrp	x25, _DbgKdLoadSymbolsStateChange@GOTPAGE
Lloh11:
	ldr	x25, [x25, _DbgKdLoadSymbolsStateChange@GOTPAGEOFF]
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	str	wzr, [x20]
	ldr	w0, [x21]
	bl	_windbg_break
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [sp, #8]
	bl	_R_FREE
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	ldr	w1, [x22]
	add	x2, sp, #8
	bl	_windbg_wait_packet
	ldr	w8, [x20]
	cbnz	w8, LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [x23]
	ldr	x8, [sp, #8]
	cmp	w0, w9
	ccmp	x8, #0, #4, eq
	b.eq	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x26, [x8]
	ldur	d0, [x26, #12]
	str	d0, [x19, #16]
	ldr	x8, [x26]
	str	x8, [x19]
	ldr	w0, [x21]
	ldr	w1, [x26, #8]
	bl	_windbg_set_cpu
	ldr	x8, [x26]
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.7:
Lloh12:
	adrp	x8, _R_DEBUG_REASON_NEW_LIB@GOTPAGE
Lloh13:
	ldr	x8, [x8, _R_DEBUG_REASON_NEW_LIB@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:
Lloh14:
	adrp	x8, _R_DEBUG_REASON_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _R_DEBUG_REASON_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	x20, [x8]
	b	LBB0_11
LBB0_9:
Lloh17:
	adrp	x8, _R_DEBUG_REASON_INT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _R_DEBUG_REASON_INT@GOTPAGEOFF]
LBB0_10:
	ldr	x20, [x8]
	str	x20, [x19, #8]
LBB0_11:
	ldr	x0, [sp, #8]
	bl	_free
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_R_DEBUG_REASON_UNKNOWN,8,3     ; @R_DEBUG_REASON_UNKNOWN
	.comm	_dbreak,4,2                     ; @dbreak
	.comm	_wctx,4,2                       ; @wctx
	.comm	_KD_PACKET_TYPE_STATE_CHANGE64,4,2 ; @KD_PACKET_TYPE_STATE_CHANGE64
	.comm	_KD_E_OK,4,2                    ; @KD_E_OK
	.comm	_R_DEBUG_REASON_ERROR,8,3       ; @R_DEBUG_REASON_ERROR
	.comm	_DbgKdExceptionStateChange,8,3  ; @DbgKdExceptionStateChange
	.comm	_R_DEBUG_REASON_INT,8,3         ; @R_DEBUG_REASON_INT
	.comm	_DbgKdLoadSymbolsStateChange,8,3 ; @DbgKdLoadSymbolsStateChange
	.comm	_R_DEBUG_REASON_NEW_LIB,8,3     ; @R_DEBUG_REASON_NEW_LIB
	.no_dead_strip	_r_debug_windbg_wait
.subsections_via_symbols
