	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i965_gtt_total_entries
_i965_gtt_total_entries:                ## @i965_gtt_total_entries
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_intel_private@GOTPCREL(%rip), %rbx
	movl	16(%rbx), %edi
	movq	_I830_GMCH_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-12(%rbp), %rdx
	callq	_pci_read_config_word
	movq	_INTEL_GTT_GEN@GOTPCREL(%rip), %rax
	cmpl	$5, (%rax)
	jne	LBB0_3
## %bb.1:
	movq	_G4x_GMCH_SIZE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-12(%rbp), %eax
	addl	$-134, %eax
	cmpl	$4, %eax
	ja	LBB0_3
## %bb.2:
	cltq
	leaq	l_switch.table.i965_gtt_total_entries(%rip), %rcx
	movl	(%rcx,%rax,4), %edi
	callq	_i965_adjust_pgetbl_size
LBB0_3:
	movq	_I810_PGETBL_CTL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movq	_I965_PGETBL_SIZE_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	addl	$-128, %eax
	cmpl	$6, %eax
	jae	LBB0_4
## %bb.5:
	cltq
	leaq	l_switch.table.i965_gtt_total_entries.1(%rip), %rcx
	movl	(%rcx,%rax,4), %edi
	jmp	LBB0_6
LBB0_4:
	movq	(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
	movl	$512, %edi                      ## imm = 0x200
LBB0_6:
	callq	_KB
                                        ## kill: def $eax killed $eax def $rax
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovsl	%ecx, %eax
	sarl	$2, %eax
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_intel_private,24,3             ## @intel_private
	.comm	_I830_GMCH_CTRL,4,2             ## @I830_GMCH_CTRL
	.comm	_INTEL_GTT_GEN,4,2              ## @INTEL_GTT_GEN
	.comm	_G4x_GMCH_SIZE_MASK,4,2         ## @G4x_GMCH_SIZE_MASK
	.comm	_I810_PGETBL_CTL,8,3            ## @I810_PGETBL_CTL
	.comm	_I965_PGETBL_SIZE_MASK,4,2      ## @I965_PGETBL_SIZE_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unknown page table size, assuming 512KB\n"

	.no_dead_strip	_i965_gtt_total_entries
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.i965_gtt_total_entries
l_switch.table.i965_gtt_total_entries:
	.long	129                             ## 0x81
	.long	131                             ## 0x83
	.long	132                             ## 0x84
	.long	129                             ## 0x81
	.long	132                             ## 0x84

	.p2align	2                               ## @switch.table.i965_gtt_total_entries.1
l_switch.table.i965_gtt_total_entries.1:
	.long	512                             ## 0x200
	.long	2048                            ## 0x800
	.long	256                             ## 0x100
	.long	1536                            ## 0x600
	.long	1024                            ## 0x400
	.long	128                             ## 0x80

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i965_gtt_total_entries
_i965_gtt_total_entries:                ; @i965_gtt_total_entries
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x19, _intel_private@GOTPAGE
Lloh1:
	ldr	x19, [x19, _intel_private@GOTPAGEOFF]
	ldr	w0, [x19, #16]
Lloh2:
	adrp	x8, _I830_GMCH_CTRL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _I830_GMCH_CTRL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_pci_read_config_word
Lloh5:
	adrp	x8, _INTEL_GTT_GEN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _INTEL_GTT_GEN@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w8, #5
	b.ne	LBB0_3
; %bb.1:
	ldr	w8, [sp, #12]
Lloh8:
	adrp	x9, _G4x_GMCH_SIZE_MASK@GOTPAGE
Lloh9:
	ldr	x9, [x9, _G4x_GMCH_SIZE_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	and	w8, w9, w8
	sub	w8, w8, #134
	cmp	w8, #4
	b.hi	LBB0_3
; %bb.2:
Lloh11:
	adrp	x9, l_switch.table.i965_gtt_total_entries@PAGE
Lloh12:
	add	x9, x9, l_switch.table.i965_gtt_total_entries@PAGEOFF
	ldr	w0, [x9, w8, sxtw #2]
	bl	_i965_adjust_pgetbl_size
LBB0_3:
	ldr	x8, [x19, #8]
Lloh13:
	adrp	x9, _I810_PGETBL_CTL@GOTPAGE
Lloh14:
	ldr	x9, [x9, _I810_PGETBL_CTL@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
Lloh16:
	adrp	x8, _I965_PGETBL_SIZE_MASK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _I965_PGETBL_SIZE_MASK@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	and	w8, w8, w0
	sub	w8, w8, #128
	cmp	w8, #6
	b.hs	LBB0_5
; %bb.4:
Lloh19:
	adrp	x9, l_switch.table.i965_gtt_total_entries.1@PAGE
Lloh20:
	add	x9, x9, l_switch.table.i965_gtt_total_entries.1@PAGEOFF
	ldr	w0, [x9, w8, sxtw #2]
	b	LBB0_6
LBB0_5:
	ldr	x0, [x19]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	mov	w0, #512
LBB0_6:
	bl	_KB
	add	w8, w0, #3
	cmp	w0, #0
	csel	w8, w8, w0, lt
	asr	w0, w8, #2
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_intel_private,24,3             ; @intel_private
	.comm	_I830_GMCH_CTRL,4,2             ; @I830_GMCH_CTRL
	.comm	_INTEL_GTT_GEN,4,2              ; @INTEL_GTT_GEN
	.comm	_G4x_GMCH_SIZE_MASK,4,2         ; @G4x_GMCH_SIZE_MASK
	.comm	_I810_PGETBL_CTL,8,3            ; @I810_PGETBL_CTL
	.comm	_I965_PGETBL_SIZE_MASK,4,2      ; @I965_PGETBL_SIZE_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unknown page table size, assuming 512KB\n"

	.no_dead_strip	_i965_gtt_total_entries
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.i965_gtt_total_entries
l_switch.table.i965_gtt_total_entries:
	.long	129                             ; 0x81
	.long	131                             ; 0x83
	.long	132                             ; 0x84
	.long	129                             ; 0x81
	.long	132                             ; 0x84

	.p2align	2                               ; @switch.table.i965_gtt_total_entries.1
l_switch.table.i965_gtt_total_entries.1:
	.long	512                             ; 0x200
	.long	2048                            ; 0x800
	.long	256                             ; 0x100
	.long	1536                            ; 0x600
	.long	1024                            ; 0x400
	.long	128                             ; 0x80

.subsections_via_symbols
