	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kcov_mmap_enable_thread
_kcov_mmap_enable_thread:               ## @kcov_mmap_enable_thread
	.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
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_open_kcov
	movl	%eax, %r14d
	movl	%eax, (%rbx)
	movq	_KIOSETBUFSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	movq	_KCOV_ENTRY_SIZE@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%r14d, %edi
	movl	%eax, %edx
	callq	_ioctl
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_ATF_REQUIRE
	movl	(%rbx), %esi
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	movq	_PROT_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_MAP_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%edi, %edi
	movl	%r14d, %r8d
	xorl	%r9d, %r9d
	callq	_mmap
	movq	_MAP_FAILED@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_ATF_CHECK
	movq	_KIOENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_KCOV_MODE_TRACE_PC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %edi
	callq	_ioctl
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_ATF_CHECK
	movq	_sem1@GOTPCREL(%rip), %rdi
	callq	_sem_post
	movq	_sem2@GOTPCREL(%rip), %rdi
	callq	_sem_wait
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KIOSETBUFSIZE,4,2              ## @KIOSETBUFSIZE
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_KCOV_ENTRY_SIZE,4,2            ## @KCOV_ENTRY_SIZE
	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_PROT_WRITE,4,2                 ## @PROT_WRITE
	.comm	_MAP_SHARED,4,2                 ## @MAP_SHARED
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
	.comm	_KIOENABLE,4,2                  ## @KIOENABLE
	.comm	_KCOV_MODE_TRACE_PC,4,2         ## @KCOV_MODE_TRACE_PC
	.comm	_sem1,4,2                       ## @sem1
	.comm	_sem2,4,2                       ## @sem2
	.no_dead_strip	_kcov_mmap_enable_thread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kcov_mmap_enable_thread
_kcov_mmap_enable_thread:               ; @kcov_mmap_enable_thread
	.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
	bl	_open_kcov
	mov	x20, x0
	str	w0, [x19]
Lloh0:
	adrp	x8, _KIOSETBUFSIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KIOSETBUFSIZE@GOTPAGEOFF]
Lloh2:
	adrp	x19, _PAGE_SIZE@GOTPAGE
Lloh3:
	ldr	x19, [x19, _PAGE_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	ldr	w8, [x19]
Lloh5:
	adrp	x9, _KCOV_ENTRY_SIZE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _KCOV_ENTRY_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	sdiv	w2, w8, w9
	bl	_ioctl
	cmp	x0, #0
	cset	w0, eq
	bl	_ATF_REQUIRE
	ldr	w1, [x19]
Lloh8:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh10:
	adrp	x9, _PROT_WRITE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _PROT_WRITE@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh14:
	adrp	x8, _MAP_SHARED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MAP_SHARED@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x8]
	mov	x0, #0
	mov	x4, x20
	mov	w5, #0
	bl	_mmap
Lloh17:
	adrp	x8, _MAP_FAILED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MAP_FAILED@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w0, ne
	bl	_ATF_CHECK
Lloh20:
	adrp	x8, _KIOENABLE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _KIOENABLE@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x8, _KCOV_MODE_TRACE_PC@GOTPAGE
Lloh24:
	ldr	x8, [x8, _KCOV_MODE_TRACE_PC@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_ioctl
	cmp	x0, #0
	cset	w0, eq
	bl	_ATF_CHECK
Lloh26:
	adrp	x0, _sem1@GOTPAGE
Lloh27:
	ldr	x0, [x0, _sem1@GOTPAGEOFF]
	bl	_sem_post
Lloh28:
	adrp	x0, _sem2@GOTPAGE
Lloh29:
	ldr	x0, [x0, _sem2@GOTPAGEOFF]
	bl	_sem_wait
	mov	x0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_KIOSETBUFSIZE,4,2              ; @KIOSETBUFSIZE
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_KCOV_ENTRY_SIZE,4,2            ; @KCOV_ENTRY_SIZE
	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_PROT_WRITE,4,2                 ; @PROT_WRITE
	.comm	_MAP_SHARED,4,2                 ; @MAP_SHARED
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
	.comm	_KIOENABLE,4,2                  ; @KIOENABLE
	.comm	_KCOV_MODE_TRACE_PC,4,2         ; @KCOV_MODE_TRACE_PC
	.comm	_sem1,4,2                       ; @sem1
	.comm	_sem2,4,2                       ; @sem2
	.no_dead_strip	_kcov_mmap_enable_thread
.subsections_via_symbols
