	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ice_ptg_remove_ptype
_ice_ptg_remove_ptype:                  ## @ice_ptg_remove_ptype
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_ICE_XLT1_CNT@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jle	LBB0_9
## %bb.1:
	movq	(%rdi), %r10
	movl	%esi, %r8d
	shlq	$4, %r8
	movq	8(%r10,%r8), %r11
	shlq	$4, %rcx
	cmpl	$0, 8(%r11,%rcx)
	je	LBB0_11
## %bb.2:
	movq	(%r11,%rcx), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.3:
	movslq	%edx, %r9
	movq	(%r10,%r8), %rdx
	movq	%rax, %rsi
	subq	%rdx, %rsi
	sarq	$4, %rsi
	cmpq	%r9, %rsi
	jne	LBB0_5
## %bb.4:
	addq	%rcx, %r11
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rax, %r11
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %rcx
	subq	%rdx, %rcx
	sarq	$4, %rcx
	cmpq	%r9, %rcx
	jne	LBB0_5
LBB0_7:
	movq	(%rax), %rax
	movq	%rax, (%r11)
	movq	(%rdi), %rax
	movq	(%rax,%r8), %rdx
LBB0_8:
	movq	_ICE_DEFAULT_PTG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$4, %r9
	movl	%eax, 8(%rdx,%r9)
	movq	$0, (%rdx,%r9)
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_9:
	movq	_ICE_ERR_PARAM@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_11:
	movq	_ICE_ERR_DOES_NOT_EXIST@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_12:
	movq	_ICE_ERR_CFG@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ICE_XLT1_CNT,4,2               ## @ICE_XLT1_CNT
	.comm	_ICE_ERR_PARAM,4,2              ## @ICE_ERR_PARAM
	.comm	_ICE_ERR_DOES_NOT_EXIST,4,2     ## @ICE_ERR_DOES_NOT_EXIST
	.comm	_ICE_ERR_CFG,4,2                ## @ICE_ERR_CFG
	.comm	_ICE_DEFAULT_PTG,4,2            ## @ICE_DEFAULT_PTG
	.no_dead_strip	_ice_ptg_remove_ptype
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ice_ptg_remove_ptype
_ice_ptg_remove_ptype:                  ; @ice_ptg_remove_ptype
	.cfi_startproc
; %bb.0:
                                        ; kill: def $w2 killed $w2 def $x2
Lloh0:
	adrp	x8, _ICE_XLT1_CNT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ICE_XLT1_CNT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w2
	b.le	LBB0_6
; %bb.1:
	ldr	x12, [x0]
	add	x8, x12, w1, uxtw #4
	ldr	x8, [x8, #8]
	add	x9, x8, x3, lsl #4
	ldr	w8, [x9, #8]
	cbz	w8, LBB0_7
; %bb.2:
	ldr	x10, [x9]
	cbz	x10, LBB0_10
; %bb.3:
	mov	w11, w1
	sxtw	x8, w2
	lsl	x11, x11, #4
	ldr	x12, [x12, x11]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	sub	x13, x10, x12
	cmp	x8, x13, asr #4
	b.eq	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x9, x10
	ldr	x10, [x10]
	cbnz	x10, LBB0_4
	b	LBB0_9
LBB0_6:
Lloh3:
	adrp	x8, _ICE_ERR_PARAM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ICE_ERR_PARAM@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ret
LBB0_7:
Lloh6:
	adrp	x8, _ICE_ERR_DOES_NOT_EXIST@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ICE_ERR_DOES_NOT_EXIST@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ret
LBB0_8:
	ldr	x10, [x10]
	str	x10, [x9]
	ldr	x9, [x0]
	ldr	x12, [x9, x11]
LBB0_9:
	mov	w0, #0
Lloh9:
	adrp	x9, _ICE_DEFAULT_PTG@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ICE_DEFAULT_PTG@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	add	x8, x12, x8, lsl #4
	str	w9, [x8, #8]
	str	xzr, [x8]
	ret
LBB0_10:
Lloh12:
	adrp	x8, _ICE_ERR_CFG@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ICE_ERR_CFG@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ICE_XLT1_CNT,4,2               ; @ICE_XLT1_CNT
	.comm	_ICE_ERR_PARAM,4,2              ; @ICE_ERR_PARAM
	.comm	_ICE_ERR_DOES_NOT_EXIST,4,2     ; @ICE_ERR_DOES_NOT_EXIST
	.comm	_ICE_ERR_CFG,4,2                ; @ICE_ERR_CFG
	.comm	_ICE_DEFAULT_PTG,4,2            ; @ICE_DEFAULT_PTG
	.no_dead_strip	_ice_ptg_remove_ptype
.subsections_via_symbols
