	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_windbg_query_mem               ## -- Begin function windbg_query_mem
	.p2align	4, 0x90
_windbg_query_mem:                      ## @windbg_query_mem
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r12d, %r12d
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.1:
	movq	%rdi, %rbx
	cmpl	$0, 4(%rdi)
	je	LBB0_13
## %bb.2:
	cmpl	$0, 12(%rbx)
	je	LBB0_13
## %bb.3:
	movq	%rcx, %r14
	movq	%rdx, %r15
	movl	%esi, %r13d
	leaq	-80(%rbp), %rdi
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movq	_DbgKdQueryMemoryApi@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movl	8(%rbx), %eax
	movl	%eax, -56(%rbp)
	movl	%r13d, -72(%rbp)
	movl	$0, -80(%rbp)
	movl	(%rbx), %edx
	movl	4(%rbx), %edi
	movq	_KD_PACKET_TYPE_STATE_MANIPULATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	$1, %edx
	movl	%edx, (%rbx)
	movl	$0, (%rsp)
	leaq	-80(%rbp), %rcx
	movl	$32, %r8d
	xorl	%r9d, %r9d
	callq	_kd_send_data_packet
	movq	_KD_E_OK@GOTPCREL(%rip), %r13
	cmpl	(%r13), %eax
	jne	LBB0_13
## %bb.4:
	movq	_KD_PACKET_TYPE_ACKNOWLEDGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_windbg_wait_packet
	cmpl	(%r13), %eax
	jne	LBB0_13
## %bb.5:
	movq	_KD_PACKET_TYPE_STATE_MANIPULATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_windbg_wait_packet
	cmpl	(%r13), %eax
	jne	LBB0_13
## %bb.6:
	movl	%eax, %ebx
	movq	-48(%rbp), %rdi
	callq	_PKT_REQ
	xorl	%r12d, %r12d
	cmpq	$0, 16(%rax)
	jne	LBB0_12
## %bb.7:
	testq	%r15, %r15
	je	LBB0_9
## %bb.8:
	movl	(%rax), %ecx
	movl	%ecx, (%r15)
LBB0_9:
	testq	%r14, %r14
	je	LBB0_11
## %bb.10:
	movl	4(%rax), %eax
	movl	%eax, (%r14)
LBB0_11:
	movl	%ebx, %r12d
LBB0_12:
	movq	-48(%rbp), %rdi
	callq	_free
LBB0_13:
	movl	%r12d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DbgKdQueryMemoryApi,4,2        ## @DbgKdQueryMemoryApi
	.comm	_KD_PACKET_TYPE_STATE_MANIPULATE,4,2 ## @KD_PACKET_TYPE_STATE_MANIPULATE
	.comm	_KD_E_OK,4,2                    ## @KD_E_OK
	.comm	_KD_PACKET_TYPE_ACKNOWLEDGE,4,2 ## @KD_PACKET_TYPE_ACKNOWLEDGE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_windbg_query_mem               ; -- Begin function windbg_query_mem
	.p2align	2
_windbg_query_mem:                      ; @windbg_query_mem
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	cbz	x0, LBB0_8
; %bb.1:
	mov	x21, x0
	ldr	w8, [x0, #4]
	cbz	w8, LBB0_8
; %bb.2:
	ldr	w8, [x21, #12]
	cbz	w8, LBB0_8
; %bb.3:
	mov	x19, x3
	mov	x20, x2
	mov	x22, x1
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #32
	bl	_memset
Lloh0:
	adrp	x8, _DbgKdQueryMemoryApi@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DbgKdQueryMemoryApi@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldp	w0, w9, [x21, #4]
	stp	w9, w8, [sp, #40]
Lloh3:
	adrp	x23, _KD_PACKET_TYPE_STATE_MANIPULATE@GOTPAGE
Lloh4:
	ldr	x23, [x23, _KD_PACKET_TYPE_STATE_MANIPULATE@GOTPAGEOFF]
	str	w22, [sp, #24]
	str	wzr, [sp, #16]
	ldr	w1, [x23]
	ldr	w8, [x21]
	eor	w2, w8, #0x1
	str	w2, [x21]
	add	x3, sp, #16
	mov	w4, #32
	mov	x5, #0
	mov	w6, #0
	bl	_kd_send_data_packet
	mov	w22, #0
Lloh5:
	adrp	x24, _KD_E_OK@GOTPAGE
Lloh6:
	ldr	x24, [x24, _KD_E_OK@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_9
; %bb.4:
Lloh7:
	adrp	x8, _KD_PACKET_TYPE_ACKNOWLEDGE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _KD_PACKET_TYPE_ACKNOWLEDGE@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, #0
	bl	_windbg_wait_packet
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.5:
	ldr	w1, [x23]
	add	x2, sp, #8
	mov	x0, x21
	bl	_windbg_wait_packet
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.6:
	mov	x22, x0
	ldr	x0, [sp, #8]
	bl	_PKT_REQ
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_10
; %bb.7:
	mov	w22, #0
	b	LBB0_14
LBB0_8:
	mov	w22, #0
LBB0_9:
	mov	x0, x22
	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
	add	sp, sp, #112
	ret
LBB0_10:
	cbz	x20, LBB0_12
; %bb.11:
	ldr	w8, [x0]
	str	w8, [x20]
LBB0_12:
	cbz	x19, LBB0_14
; %bb.13:
	ldr	w8, [x0, #4]
	str	w8, [x19]
LBB0_14:
	ldr	x0, [sp, #8]
	bl	_free
	b	LBB0_9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_DbgKdQueryMemoryApi,4,2        ; @DbgKdQueryMemoryApi
	.comm	_KD_PACKET_TYPE_STATE_MANIPULATE,4,2 ; @KD_PACKET_TYPE_STATE_MANIPULATE
	.comm	_KD_E_OK,4,2                    ; @KD_E_OK
	.comm	_KD_PACKET_TYPE_ACKNOWLEDGE,4,2 ; @KD_PACKET_TYPE_ACKNOWLEDGE
.subsections_via_symbols
