	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_compression_threshold
_find_compression_threshold:            ## @find_compression_threshold
	.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
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r12
	callq	_IS_BROADWELL
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	callq	_IS_GEN9_BC
	testq	%rax, %rax
	je	LBB0_3
LBB0_2:
	movq	%r12, %rdi
	callq	_resource_size
	movq	%rax, %r13
	addq	$-8388608, %r13                 ## imm = 0xFF800000
LBB0_4:
	addl	%ebx, %ebx
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	movl	$4096, %ecx                     ## imm = 0x1000
	xorl	%r8d, %r8d
	movq	%r13, %r9
	callq	_i915_gem_stolen_insert_node_in_range
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	$1, %r14d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$2, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$2, %r14d
	je	LBB0_13
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	sarl	%ebx
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	movl	$4096, %ecx                     ## imm = 0x1000
	xorl	%r8d, %r8d
	movq	%r13, %r9
	callq	_i915_gem_stolen_insert_node_in_range
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%r12, %rdi
	callq	_INTEL_GEN
	cmpl	$5, %eax
	jl	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	addl	%r14d, %r14d
	cmpl	$5, %r14d
	jl	LBB0_7
LBB0_13:
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_5:
	movl	$1, %eax
	jmp	LBB0_14
LBB0_10:
	movl	%r14d, %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_U64_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_U64_MAX,8,3                    ## @U64_MAX
	.no_dead_strip	_find_compression_threshold
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_compression_threshold
_find_compression_threshold:            ; @find_compression_threshold
	.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
	mov	x22, x3
	mov	x23, x2
	mov	x20, x1
	mov	x19, x0
	bl	_IS_BROADWELL
	cbnz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_IS_GEN9_BC
	cbz	x0, LBB0_14
LBB0_2:
	mov	x0, x19
	bl	_resource_size
	sub	x21, x0, #2048, lsl #12         ; =8388608
LBB0_3:
	lsl	w23, w23, #1
	mov	x0, x19
	mov	x1, x20
	mov	x2, x23
	mov	w3, #4096
	mov	w4, #0
	mov	x5, x21
	bl	_i915_gem_stolen_insert_node_in_range
	cbz	w0, LBB0_12
; %bb.4:
	asr	w2, w23, #1
	mov	x0, x19
	mov	x1, x20
	mov	w3, #4096
	mov	w4, #0
	mov	x5, x21
	bl	_i915_gem_stolen_insert_node_in_range
	cbz	w0, LBB0_12
; %bb.5:
	mov	x0, x19
	bl	_INTEL_GEN
	mov	x8, x0
	mov	w0, #0
	cmp	w8, #5
	b.lt	LBB0_13
; %bb.6:
	cmp	w22, #2
	b.eq	LBB0_13
; %bb.7:
	asr	w2, w23, #2
	mov	x0, x19
	mov	x1, x20
	mov	w3, #4096
	mov	w4, #0
	mov	x5, x21
	bl	_i915_gem_stolen_insert_node_in_range
	cbz	w0, LBB0_15
; %bb.8:
	mov	x0, x19
	bl	_INTEL_GEN
	cmp	w0, #5
	b.lt	LBB0_11
; %bb.9:
	asr	w2, w23, #3
	mov	x0, x19
	mov	x1, x20
	mov	w3, #4096
	mov	w4, #0
	mov	x5, x21
	bl	_i915_gem_stolen_insert_node_in_range
	cbz	w0, LBB0_16
; %bb.10:
	mov	x0, x19
	bl	_INTEL_GEN
LBB0_11:
	mov	w0, #0
	b	LBB0_13
LBB0_12:
	mov	w0, #1
LBB0_13:
	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_14:
Lloh0:
	adrp	x8, _U64_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _U64_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
	b	LBB0_3
LBB0_15:
	mov	w0, #2
	b	LBB0_13
LBB0_16:
	mov	w0, #4
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_U64_MAX,8,3                    ; @U64_MAX
	.no_dead_strip	_find_compression_threshold
.subsections_via_symbols
