	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bts_write
_bts_write:                             ## @bts_write
	.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	%rsi, %r12
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_SIZEOF_BTS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	testq	%r15, %r15
	je	LBB0_1
## %bb.3:
	movq	_ds_cfg@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ds_bts@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	cmpl	(%rax,%rcx,4), %ebx
	jge	LBB0_5
## %bb.4:
	movq	_EOVERFLOW@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_5:
	movl	(%r12), %edx
	leal	-128(%rdx), %eax
	cmpl	$2, %eax
	jb	LBB0_9
## %bb.6:
	cmpl	$131, %edx
	je	LBB0_10
## %bb.7:
	cmpl	$130, %edx
	jne	LBB0_1
## %bb.8:
	movq	_bts_from@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_bts_set
	movq	_bts_to@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_bts_set
	movq	_bts_flags@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
LBB0_9:
	movq	_bts_qual@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_bts_escape@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r14, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_bts_set
	movq	_bts_clock@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r12), %edx
	movq	%r14, %rdi
	callq	_bts_set
	movl	8(%r12), %ebx
	movq	_bts_pid@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_10:
	movq	_bts_from@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%r12), %edx
	movq	%r14, %rdi
	callq	_bts_set
	movq	_bts_to@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%r12), %edx
	movq	%r14, %rdi
	callq	_bts_set
	movq	_bts_flags@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_11:
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_bts_set
	movl	(%r15), %edi
	movq	(%r13), %rsi
	movq	_ds_cfg@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rsi,4), %ecx
	movq	%r14, %rdx
	callq	_ds_write
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_14
## %bb.13:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_SIZEOF_BTS,4,2             ## @MAX_SIZEOF_BTS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ds_cfg,8,3                     ## @ds_cfg
	.comm	_ds_bts,8,3                     ## @ds_bts
	.comm	_EOVERFLOW,4,2                  ## @EOVERFLOW
	.comm	_bts_from,4,2                   ## @bts_from
	.comm	_bts_to,4,2                     ## @bts_to
	.comm	_bts_flags,4,2                  ## @bts_flags
	.comm	_bts_qual,4,2                   ## @bts_qual
	.comm	_bts_escape,4,2                 ## @bts_escape
	.comm	_bts_clock,4,2                  ## @bts_clock
	.comm	_bts_pid,4,2                    ## @bts_pid
	.no_dead_strip	_bts_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bts_write
_bts_write:                             ; @bts_write
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	sub	sp, sp, #16
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _MAX_SIZEOF_BTS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_SIZEOF_BTS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x10, x10, #0x1fffffff0
	sub	x20, x9, x10
	mov	sp, x20
	cbz	x0, LBB0_7
; %bb.1:
Lloh8:
	adrp	x22, _ds_cfg@GOTPAGE
Lloh9:
	ldr	x22, [x22, _ds_cfg@GOTPAGEOFF]
	ldr	x9, [x22]
Lloh10:
	adrp	x23, _ds_bts@GOTPAGE
Lloh11:
	ldr	x23, [x23, _ds_bts@GOTPAGEOFF]
	ldr	x10, [x23]
	ldr	w9, [x9, x10, lsl #2]
	cmp	w8, w9
	b.ge	LBB0_3
; %bb.2:
Lloh12:
	adrp	x8, _EOVERFLOW@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EOVERFLOW@GOTPAGEOFF]
	b	LBB0_8
LBB0_3:
	ldr	w8, [x21]
	sub	w9, w8, #128
	cmp	w9, #2
	b.lo	LBB0_9
; %bb.4:
	cmp	w8, #131
	b.eq	LBB0_10
; %bb.5:
	cmp	w8, #130
	b.ne	LBB0_7
; %bb.6:
Lloh14:
	adrp	x8, _bts_from@GOTPAGE
Lloh15:
	ldr	x8, [x8, _bts_from@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_bts_set
Lloh17:
	adrp	x8, _bts_to@GOTPAGE
Lloh18:
	ldr	x8, [x8, _bts_to@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	b	LBB0_11
LBB0_7:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_9:
Lloh22:
	adrp	x9, _bts_qual@GOTPAGE
Lloh23:
	ldr	x9, [x9, _bts_qual@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x9]
Lloh25:
	adrp	x9, _bts_escape@GOTPAGE
Lloh26:
	ldr	x9, [x9, _bts_escape@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x20
	bl	_bts_set
Lloh28:
	adrp	x8, _bts_clock@GOTPAGE
Lloh29:
	ldr	x8, [x8, _bts_clock@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	ldr	w2, [x21, #4]
	mov	x0, x20
	bl	_bts_set
	ldr	w2, [x21, #8]
Lloh31:
	adrp	x8, _bts_pid@GOTPAGE
Lloh32:
	ldr	x8, [x8, _bts_pid@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
Lloh33:
	adrp	x8, _bts_from@GOTPAGE
Lloh34:
	ldr	x8, [x8, _bts_from@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	ldr	w2, [x21, #12]
	mov	x0, x20
	bl	_bts_set
Lloh36:
	adrp	x8, _bts_to@GOTPAGE
Lloh37:
	ldr	x8, [x8, _bts_to@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	ldr	w2, [x21, #16]
	mov	x0, x20
LBB0_11:
	bl	_bts_set
	mov	w2, #0
Lloh39:
	adrp	x8, _bts_flags@GOTPAGE
Lloh40:
	ldr	x8, [x8, _bts_flags@GOTPAGEOFF]
LBB0_12:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_bts_set
	ldr	w0, [x19]
	ldr	x1, [x23]
	ldr	x8, [x22]
	ldr	w3, [x8, x1, lsl #2]
	mov	x2, x20
	bl	_ds_write
LBB0_13:
	ldur	x8, [x29, #-56]
Lloh41:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh42:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh43:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	sub	sp, x29, #48
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_SIZEOF_BTS,4,2             ; @MAX_SIZEOF_BTS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ds_cfg,8,3                     ; @ds_cfg
	.comm	_ds_bts,8,3                     ; @ds_bts
	.comm	_EOVERFLOW,4,2                  ; @EOVERFLOW
	.comm	_bts_from,4,2                   ; @bts_from
	.comm	_bts_to,4,2                     ; @bts_to
	.comm	_bts_flags,4,2                  ; @bts_flags
	.comm	_bts_qual,4,2                   ; @bts_qual
	.comm	_bts_escape,4,2                 ; @bts_escape
	.comm	_bts_clock,4,2                  ; @bts_clock
	.comm	_bts_pid,4,2                    ; @bts_pid
	.no_dead_strip	_bts_write
.subsections_via_symbols
