	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ds_set_pebs_reset              ## -- Begin function ds_set_pebs_reset
	.p2align	4, 0x90
_ds_set_pebs_reset:                     ## @ds_set_pebs_reset
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
                                        ## kill: def $esi killed $esi def $rsi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	_ds_cfg@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jae	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_3:
	movq	(%rdi), %rcx
	movq	_NUM_DS_PTR_FIELDS@GOTPCREL(%rip), %rdi
	movslq	(%rdi), %rdi
	movslq	4(%rax), %rax
	imulq	%rdi, %rax
	addq	(%rcx), %rax
	movq	_PEBS_RESET_FIELD_SIZE@GOTPCREL(%rip), %rcx
	imull	(%rcx), %esi
	movl	%edx, (%rsi,%rax)
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ds_cfg,8,2                     ## @ds_cfg
	.comm	_NUM_DS_PTR_FIELDS,4,2          ## @NUM_DS_PTR_FIELDS
	.comm	_PEBS_RESET_FIELD_SIZE,4,2      ## @PEBS_RESET_FIELD_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ds_set_pebs_reset              ; -- Begin function ds_set_pebs_reset
	.p2align	2
_ds_set_pebs_reset:                     ; @ds_set_pebs_reset
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x9, _ds_cfg@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ds_cfg@GOTPAGEOFF]
	ldr	w10, [x9]
	cmp	w10, w1
	b.hs	LBB0_3
LBB0_2:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	ret
LBB0_3:
	mov	x8, x0
	mov	w0, #0
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh5:
	adrp	x10, _NUM_DS_PTR_FIELDS@GOTPAGE
Lloh6:
	ldr	x10, [x10, _NUM_DS_PTR_FIELDS@GOTPAGEOFF]
Lloh7:
	ldrsw	x10, [x10]
	ldrsw	x9, [x9, #4]
	madd	x8, x9, x10, x8
Lloh8:
	adrp	x9, _PEBS_RESET_FIELD_SIZE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PEBS_RESET_FIELD_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	mul	w9, w9, w1
	str	w2, [x8, w9, uxtw]
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ds_cfg,8,2                     ; @ds_cfg
	.comm	_NUM_DS_PTR_FIELDS,4,2          ; @NUM_DS_PTR_FIELDS
	.comm	_PEBS_RESET_FIELD_SIZE,4,2      ; @PEBS_RESET_FIELD_SIZE
.subsections_via_symbols
