	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lkdtm_STACKLEAK_ERASING        ## -- Begin function lkdtm_STACKLEAK_ERASING
	.p2align	4, 0x90
_lkdtm_STACKLEAK_ERASING:               ## @lkdtm_STACKLEAK_ERASING
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_STACKLEAK_SEARCH_DEPTH@GOTPCREL(%rip), %rax
	movslq	(%rax), %r12
	leaq	-48(%rbp), %rdi
	movl	$8, %esi
	callq	_PTR_ALIGN
	movq	%rax, %r14
	movq	_THREAD_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %r15
	decq	%r15
	andq	%r14, %r15
	cmpq	$16, %r15
	jb	LBB0_6
## %bb.1:
	shrq	$3, %r12
	shrq	$3, %r15
	leaq	-1(%r15), %r13
	leaq	-8(,%r15,8), %rsi
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pr_info
	movq	$0, -48(%rbp)
	movq	_STACKLEAK_POISON@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rax
	movl	$1, %ecx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rdx, %rsi
	incq	%rsi
	cmpq	%rax, -8(%r14,%rbx)
	movl	$0, %edx
	cmoveq	%rsi, %rdx
	movq	%rcx, -48(%rbp)
	addq	$-8, %rbx
	cmpq	%r13, %rcx
	jae	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rcx
	cmpq	%r12, %rdx
	jbe	LBB0_2
LBB0_4:
	cmpq	%r12, %rdx
	ja	LBB0_8
## %bb.5:
	negq	%rbx
	leaq	L_.str.2(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_14
LBB0_6:
	leaq	L_.str(%rip), %rdi
LBB0_7:
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_14
LBB0_8:
	movq	%rdi, %r12
	leaq	(%rbx,%rdx,8), %rsi
	negq	%rsi
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_info
	movq	-48(%rbp), %rdx
	cmpq	%r13, %rdx
	jae	LBB0_13
## %bb.9:
	movq	(%r12), %rax
	leaq	1(%rdx), %rcx
	notq	%rdx
	leaq	(%r14,%rdx,8), %rdx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%rax, (%rdx)
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%rcx, -48(%rbp)
	incq	%rcx
	addq	$-8, %rdx
	cmpq	%rcx, %r15
	jne	LBB0_10
LBB0_13:
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_info
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_STACKLEAK_SEARCH_DEPTH,4,2     ## @STACKLEAK_SEARCH_DEPTH
	.comm	_THREAD_SIZE,4,2                ## @THREAD_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FAIL: not enough stack space for the test\n"

L_.str.1:                               ## @.str.1
	.asciz	"checking unused part of the thread stack (%lu bytes)...\n"

	.comm	_STACKLEAK_POISON,8,3           ## @STACKLEAK_POISON
L_.str.2:                               ## @.str.2
	.asciz	"FAIL: thread stack is not erased (checked %lu bytes)\n"

L_.str.3:                               ## @.str.3
	.asciz	"first %lu bytes are unpoisoned\n"

L_.str.4:                               ## @.str.4
	.asciz	"FAIL: thread stack is NOT properly erased\n"

L_.str.5:                               ## @.str.5
	.asciz	"OK: the rest of the thread stack is properly erased\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lkdtm_STACKLEAK_ERASING        ; -- Begin function lkdtm_STACKLEAK_ERASING
	.p2align	2
_lkdtm_STACKLEAK_ERASING:               ; @lkdtm_STACKLEAK_ERASING
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x8, _STACKLEAK_SEARCH_DEPTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STACKLEAK_SEARCH_DEPTH@GOTPAGEOFF]
Lloh2:
	ldrsw	x20, [x8]
	add	x0, sp, #8
	mov	w1, #8
	bl	_PTR_ALIGN
Lloh3:
	adrp	x8, _THREAD_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _THREAD_SIZE@GOTPAGEOFF]
Lloh5:
	ldrsw	x8, [x8]
	sub	x8, x8, #1
	and	x8, x8, x0
	cmp	x8, #16
	b.lo	LBB0_6
; %bb.1:
	mov	x19, x0
	lsr	x23, x20, #3
	sub	x24, x0, #8
	lsr	x20, x8, #3
	sub	x21, x20, #1
	lsl	x8, x21, #3
	str	x8, [sp]
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_info
	mov	x8, #0
	mov	x9, #0
	str	xzr, [sp, #8]
Lloh8:
	adrp	x22, _STACKLEAK_POISON@GOTPAGE
Lloh9:
	ldr	x22, [x22, _STACKLEAK_POISON@GOTPAGEOFF]
	ldr	x10, [x22]
	mov	w11, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x24, x8]
	cmp	x12, x10
	csinc	x9, xzr, x9, ne
	str	x11, [sp, #8]
	sub	x8, x8, #8
	cmp	x11, x21
	b.hs	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x11, x11, #1
	cmp	x9, x23
	b.ls	LBB0_2
LBB0_4:
	cmp	x9, x23
	b.hi	LBB0_9
; %bb.5:
	neg	x8, x8
	str	x8, [sp]
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_7
LBB0_6:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
LBB0_7:
	bl	_pr_err
LBB0_8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_9:
	add	x8, x8, x9, lsl #3
	neg	x8, x8
	str	x8, [sp]
Lloh14:
	adrp	x0, l_.str.3@PAGE
Lloh15:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_info
	ldr	x10, [sp, #8]
	cmp	x10, x21
	b.hs	LBB0_13
; %bb.10:
	ldr	x8, [x22]
	add	x9, x10, #1
	mvn	x10, x10
	add	x10, x19, x10, lsl #3
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10]
	cmp	x11, x8
	b.ne	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	str	x9, [sp, #8]
	add	x9, x9, #1
	sub	x10, x10, #8
	cmp	x20, x9
	b.ne	LBB0_11
LBB0_13:
Lloh16:
	adrp	x0, l_.str.5@PAGE
Lloh17:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_pr_info
	b	LBB0_8
LBB0_14:
Lloh18:
	adrp	x0, l_.str.4@PAGE
Lloh19:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_STACKLEAK_SEARCH_DEPTH,4,2     ; @STACKLEAK_SEARCH_DEPTH
	.comm	_THREAD_SIZE,4,2                ; @THREAD_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FAIL: not enough stack space for the test\n"

l_.str.1:                               ; @.str.1
	.asciz	"checking unused part of the thread stack (%lu bytes)...\n"

	.comm	_STACKLEAK_POISON,8,3           ; @STACKLEAK_POISON
l_.str.2:                               ; @.str.2
	.asciz	"FAIL: thread stack is not erased (checked %lu bytes)\n"

l_.str.3:                               ; @.str.3
	.asciz	"first %lu bytes are unpoisoned\n"

l_.str.4:                               ; @.str.4
	.asciz	"FAIL: thread stack is NOT properly erased\n"

l_.str.5:                               ; @.str.5
	.asciz	"OK: the rest of the thread stack is properly erased\n"

.subsections_via_symbols
