	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gdb_cpu_mtrap                  ## -- Begin function gdb_cpu_mtrap
	.p2align	4, 0x90
_gdb_cpu_mtrap:                         ## @gdb_cpu_mtrap
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_debug
	movq	_gdb_lock@GOTPCREL(%rip), %rdi
	callq	_pthread_mutex_lock
	movq	_stepping_vcpu@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_2
## %bb.1:
	movl	$-1, (%rax)
	movq	_ctx@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_VM_CAP_MTRAP_EXIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %esi
	xorl	%ecx, %ecx
	callq	_vm_set_capability
	movl	(%r14), %edi
	movl	%ebx, %esi
	callq	_vm_suspend_cpu
	movq	_stopped_vcpu@GOTPCREL(%rip), %r14
	xorl	%edi, %edi
	cmpl	$-1, (%r14)
	sete	%dil
	callq	_assert
	movl	%ebx, (%r14)
	movl	%ebx, %edi
	movl	$1, %esi
	callq	__gdb_cpu_suspend
LBB0_2:
	movq	_gdb_lock@GOTPCREL(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_pthread_mutex_unlock           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"$vCPU %d MTRAP\n"

	.comm	_gdb_lock,4,2                   ## @gdb_lock
	.comm	_stepping_vcpu,4,2              ## @stepping_vcpu
	.comm	_ctx,4,2                        ## @ctx
	.comm	_VM_CAP_MTRAP_EXIT,4,2          ## @VM_CAP_MTRAP_EXIT
	.comm	_stopped_vcpu,4,2               ## @stopped_vcpu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gdb_cpu_mtrap                  ; -- Begin function gdb_cpu_mtrap
	.p2align	2
_gdb_cpu_mtrap:                         ; @gdb_cpu_mtrap
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_debug
Lloh2:
	adrp	x0, _gdb_lock@GOTPAGE
Lloh3:
	ldr	x0, [x0, _gdb_lock@GOTPAGEOFF]
	bl	_pthread_mutex_lock
Lloh4:
	adrp	x8, _stepping_vcpu@GOTPAGE
Lloh5:
	ldr	x8, [x8, _stepping_vcpu@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, w19
	b.ne	LBB0_2
; %bb.1:
	mov	w9, #-1
	str	w9, [x8]
Lloh6:
	adrp	x20, _ctx@GOTPAGE
Lloh7:
	ldr	x20, [x20, _ctx@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh8:
	adrp	x8, _VM_CAP_MTRAP_EXIT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VM_CAP_MTRAP_EXIT@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x1, x19
	mov	w3, #0
	bl	_vm_set_capability
	ldr	w0, [x20]
	mov	x1, x19
	bl	_vm_suspend_cpu
Lloh11:
	adrp	x20, _stopped_vcpu@GOTPAGE
Lloh12:
	ldr	x20, [x20, _stopped_vcpu@GOTPAGEOFF]
	ldr	w8, [x20]
	cmn	w8, #1
	cset	w0, eq
	bl	_assert
	str	w19, [x20]
	mov	x0, x19
	mov	w1, #1
	bl	__gdb_cpu_suspend
LBB0_2:
Lloh13:
	adrp	x0, _gdb_lock@GOTPAGE
Lloh14:
	ldr	x0, [x0, _gdb_lock@GOTPAGEOFF]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_pthread_mutex_unlock
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"$vCPU %d MTRAP\n"

	.comm	_gdb_lock,4,2                   ; @gdb_lock
	.comm	_stepping_vcpu,4,2              ; @stepping_vcpu
	.comm	_ctx,4,2                        ; @ctx
	.comm	_VM_CAP_MTRAP_EXIT,4,2          ; @VM_CAP_MTRAP_EXIT
	.comm	_stopped_vcpu,4,2               ; @stopped_vcpu
.subsections_via_symbols
