	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_single_step
_check_single_step:                     ## @check_single_step
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_lookup_addr
	movq	%rax, %r14
	incq	%rbx
	movq	_kgdbts_gdb_regs@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	movq	_NUMREGBYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_kgdb_hex2mem
	movq	(%r15), %rdi
	movq	_kgdbts_regs@GOTPCREL(%rip), %rbx
	movq	%rbx, %rsi
	callq	_gdb_regs_to_pt_regs
	movq	%rbx, %rdi
	callq	_instruction_pointer
	leaq	L_.str(%rip), %rdi
	movq	%rax, %rsi
	callq	_v2printk
	movq	_sstep_thread_id@GOTPCREL(%rip), %rax
	movq	_cont_thread_id@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	cmpq	%rsi, (%rax)
	jne	LBB0_3
LBB0_1:
	movl	$0, _check_single_step.matched_id(%rip)
	movq	_kgdbts_regs@GOTPCREL(%rip), %rdi
	callq	_instruction_pointer
	movq	%rax, %rcx
	xorl	%eax, %eax
	cmpq	%r14, %rcx
	jne	LBB0_11
## %bb.2:
	movq	_kgdbts_regs@GOTPCREL(%rip), %rdi
	callq	_instruction_pointer
	leaq	L_.str.2(%rip), %rdi
	movq	%rax, %rsi
	callq	_eprintk
	movl	$1, %eax
	jmp	LBB0_11
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	callq	_v2printk
	movq	_arch_needs_sstep_emulation@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_7
## %bb.4:
	cmpl	$0, _check_single_step.matched_id(%rip)
	je	LBB0_8
## %bb.5:
	movq	_kgdbts_regs@GOTPCREL(%rip), %rdi
	callq	_instruction_pointer
	cmpq	%r14, %rax
	jne	LBB0_1
## %bb.6:
	movl	_check_single_step.matched_id(%rip), %eax
	incl	%eax
	jmp	LBB0_9
LBB0_7:
	movq	_cont_instead_of_sstep@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movq	_ts@GOTPCREL(%rip), %rax
	addl	$-4, (%rax)
	jmp	LBB0_10
LBB0_8:
	movl	$1, %eax
LBB0_9:
	movq	_ts@GOTPCREL(%rip), %rcx
	addl	$-2, (%rcx)
	movl	%eax, _check_single_step.matched_id(%rip)
	movq	_sstep_state@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
LBB0_10:
	xorl	%eax, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_check_single_step.matched_id,4,2 ## @check_single_step.matched_id
	.comm	_kgdbts_gdb_regs,8,3            ## @kgdbts_gdb_regs
	.comm	_NUMREGBYTES,4,2                ## @NUMREGBYTES
	.comm	_kgdbts_regs,4,2                ## @kgdbts_regs
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Singlestep stopped at IP: %lx\n"

	.comm	_sstep_thread_id,8,3            ## @sstep_thread_id
	.comm	_cont_thread_id,8,3             ## @cont_thread_id
L_.str.1:                               ## @.str.1
	.asciz	"ThrID does not match: %lx\n"

	.comm	_arch_needs_sstep_emulation,8,3 ## @arch_needs_sstep_emulation
	.comm	_ts,4,2                         ## @ts
	.comm	_sstep_state,8,3                ## @sstep_state
	.comm	_cont_instead_of_sstep,4,2      ## @cont_instead_of_sstep
L_.str.2:                               ## @.str.2
	.asciz	"kgdbts: SingleStep failed at %lx\n"

	.no_dead_strip	_check_single_step
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_single_step
_check_single_step:                     ; @check_single_step
	.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	x20, x0
	mov	x0, x1
	bl	_lookup_addr
	mov	x19, x0
	add	x0, x20, #1
Lloh0:
	adrp	x20, _kgdbts_gdb_regs@GOTPAGE
Lloh1:
	ldr	x20, [x20, _kgdbts_gdb_regs@GOTPAGEOFF]
	ldr	x1, [x20]
Lloh2:
	adrp	x8, _NUMREGBYTES@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NUMREGBYTES@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	bl	_kgdb_hex2mem
	ldr	x0, [x20]
Lloh5:
	adrp	x20, _kgdbts_regs@GOTPAGE
Lloh6:
	ldr	x20, [x20, _kgdbts_regs@GOTPAGEOFF]
	mov	x1, x20
	bl	_gdb_regs_to_pt_regs
	mov	x0, x20
	bl	_instruction_pointer
	mov	x1, x0
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_v2printk
Lloh9:
	adrp	x8, _sstep_thread_id@GOTPAGE
Lloh10:
	ldr	x8, [x8, _sstep_thread_id@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
Lloh12:
	adrp	x9, _cont_thread_id@GOTPAGE
Lloh13:
	ldr	x9, [x9, _cont_thread_id@GOTPAGEOFF]
Lloh14:
	ldr	x1, [x9]
	cmp	x8, x1
	b.ne	LBB0_3
LBB0_1:
	adrp	x8, _check_single_step.matched_id@PAGE
	str	wzr, [x8, _check_single_step.matched_id@PAGEOFF]
Lloh15:
	adrp	x0, _kgdbts_regs@GOTPAGE
Lloh16:
	ldr	x0, [x0, _kgdbts_regs@GOTPAGEOFF]
	bl	_instruction_pointer
	mov	x8, x0
	mov	w0, #0
	cmp	x8, x19
	b.ne	LBB0_10
; %bb.2:
Lloh17:
	adrp	x0, _kgdbts_regs@GOTPAGE
Lloh18:
	ldr	x0, [x0, _kgdbts_regs@GOTPAGEOFF]
	bl	_instruction_pointer
	mov	x1, x0
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_eprintk
	mov	w0, #1
	b	LBB0_10
LBB0_3:
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_v2printk
Lloh23:
	adrp	x8, _arch_needs_sstep_emulation@GOTPAGE
Lloh24:
	ldr	x8, [x8, _arch_needs_sstep_emulation@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.4:
	adrp	x20, _check_single_step.matched_id@PAGE
	ldr	w8, [x20, _check_single_step.matched_id@PAGEOFF]
	cbz	w8, LBB0_8
; %bb.5:
Lloh26:
	adrp	x0, _kgdbts_regs@GOTPAGE
Lloh27:
	ldr	x0, [x0, _kgdbts_regs@GOTPAGEOFF]
	bl	_instruction_pointer
	cmp	x0, x19
	b.ne	LBB0_1
; %bb.6:
	ldr	w8, [x20, _check_single_step.matched_id@PAGEOFF]
	add	w8, w8, #1
	b	LBB0_9
LBB0_7:
	mov	w0, #0
Lloh28:
	adrp	x8, _cont_instead_of_sstep@GOTPAGE
Lloh29:
	ldr	x8, [x8, _cont_instead_of_sstep@GOTPAGEOFF]
	mov	w9, #1
Lloh30:
	str	w9, [x8]
Lloh31:
	adrp	x8, _ts@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ts@GOTPAGEOFF]
	ldr	w9, [x8]
	sub	w9, w9, #4
	str	w9, [x8]
	b	LBB0_10
LBB0_8:
	mov	w8, #1
LBB0_9:
	mov	w0, #0
	str	w8, [x20, _check_single_step.matched_id@PAGEOFF]
Lloh33:
	adrp	x8, _ts@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ts@GOTPAGEOFF]
	ldr	w9, [x8]
	sub	w9, w9, #2
	str	w9, [x8]
Lloh35:
	adrp	x8, _sstep_state@GOTPAGE
Lloh36:
	ldr	x8, [x8, _sstep_state@GOTPAGEOFF]
Lloh37:
	str	xzr, [x8]
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotStr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotStr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_check_single_step.matched_id,4,2 ; @check_single_step.matched_id
	.comm	_kgdbts_gdb_regs,8,3            ; @kgdbts_gdb_regs
	.comm	_NUMREGBYTES,4,2                ; @NUMREGBYTES
	.comm	_kgdbts_regs,4,2                ; @kgdbts_regs
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Singlestep stopped at IP: %lx\n"

	.comm	_sstep_thread_id,8,3            ; @sstep_thread_id
	.comm	_cont_thread_id,8,3             ; @cont_thread_id
l_.str.1:                               ; @.str.1
	.asciz	"ThrID does not match: %lx\n"

	.comm	_arch_needs_sstep_emulation,8,3 ; @arch_needs_sstep_emulation
	.comm	_ts,4,2                         ; @ts
	.comm	_sstep_state,8,3                ; @sstep_state
	.comm	_cont_instead_of_sstep,4,2      ; @cont_instead_of_sstep
l_.str.2:                               ; @.str.2
	.asciz	"kgdbts: SingleStep failed at %lx\n"

	.no_dead_strip	_check_single_step
.subsections_via_symbols
