	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_gtt_stolen_size
_intel_gtt_stolen_size:                 ## @intel_gtt_stolen_size
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_INTEL_GTT_GEN@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	cmpl	$1, (%rax)
	je	LBB0_27
## %bb.1:
	movq	_intel_private@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	movq	_I830_GMCH_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	callq	_pci_read_config_word
	movq	(%r12), %rbx
	movq	(%rbx), %rcx
	movq	_PCI_DEVICE_ID_INTEL_82830_HB@GOTPCREL(%rip), %rdx
	movl	-36(%rbp), %eax
	cmpq	(%rdx), %rcx
	je	LBB0_3
## %bb.2:
	movq	_PCI_DEVICE_ID_INTEL_82845G_HB@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_3
## %bb.7:
	movq	_I855_GMCH_GMS_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	addl	$-128, %eax
	cmpl	$16, %eax
	ja	LBB0_26
## %bb.8:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_18:
	movl	$96, %edi
	jmp	LBB0_22
LBB0_3:
	movq	_I830_GMCH_GMS_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	addl	$-139, %eax
	cmpl	$3, %eax
	ja	LBB0_26
## %bb.4:
	leaq	LJTI0_1(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_11:
	movl	$8, %edi
	jmp	LBB0_22
LBB0_9:
	movl	$1, %edi
	jmp	LBB0_22
LBB0_5:
	movl	$512, %edi                      ## imm = 0x200
	callq	_KB
	jmp	LBB0_23
LBB0_6:
	movq	_I830_RDRAM_CHANNEL_TYPE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r12), %rdi
	callq	_readb
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_I830_RDRAM_ND
	movl	%eax, %ebx
	incl	%ebx
	movl	%r14d, %edi
	callq	_I830_RDRAM_DDT
	leaq	_intel_gtt_stolen_size.ddt(%rip), %rcx
	movl	(%rcx,%rax,4), %edi
	callq	_MB
	movl	%eax, %r15d
	imull	%ebx, %r15d
	leaq	L_.str.1(%rip), %r14
	jmp	LBB0_24
LBB0_21:
	movl	$352, %edi                      ## imm = 0x160
	jmp	LBB0_22
LBB0_20:
	movl	$224, %edi
	jmp	LBB0_22
LBB0_19:
	movl	$160, %edi
	jmp	LBB0_22
LBB0_15:
	movl	$64, %edi
	jmp	LBB0_22
LBB0_14:
	movl	$48, %edi
	jmp	LBB0_22
LBB0_10:
	movl	$4, %edi
	jmp	LBB0_22
LBB0_13:
	movl	$32, %edi
	jmp	LBB0_22
LBB0_12:
	movl	$16, %edi
	jmp	LBB0_22
LBB0_17:
	movl	$256, %edi                      ## imm = 0x100
	jmp	LBB0_22
LBB0_16:
	movl	$128, %edi
LBB0_22:
	callq	_MB
LBB0_23:
	movl	%eax, %r15d
	leaq	L_.str.2(%rip), %r14
LBB0_24:
	movq	(%r12), %rbx
	testl	%r15d, %r15d
	je	LBB0_26
## %bb.25:
	addq	$8, %rbx
	movl	$1, %edi
	callq	_KB
	movl	%eax, %ecx
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%ecx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	movq	%r14, %rcx
	xorl	%eax, %eax
	callq	_dev_info
	jmp	LBB0_27
LBB0_26:
	addq	$8, %rbx
	leaq	L_.str.3(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_info
LBB0_27:
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_21, LBB0_21-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_26, LBB0_26-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
LJTI0_0:
	.long	L0_0_set_18
	.long	L0_0_set_21
	.long	L0_0_set_20
	.long	L0_0_set_19
	.long	L0_0_set_15
	.long	L0_0_set_14
	.long	L0_0_set_11
	.long	L0_0_set_10
	.long	L0_0_set_13
	.long	L0_0_set_9
	.long	L0_0_set_12
	.long	L0_0_set_26
	.long	L0_0_set_26
	.long	L0_0_set_26
	.long	L0_0_set_26
	.long	L0_0_set_17
	.long	L0_0_set_16
.set L0_1_set_11, LBB0_11-LJTI0_1
.set L0_1_set_5, LBB0_5-LJTI0_1
.set L0_1_set_9, LBB0_9-LJTI0_1
.set L0_1_set_6, LBB0_6-LJTI0_1
LJTI0_1:
	.long	L0_1_set_11
	.long	L0_1_set_5
	.long	L0_1_set_9
	.long	L0_1_set_6
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @intel_gtt_stolen_size.ddt
_intel_gtt_stolen_size.ddt:
	.long	0                               ## 0x0
	.long	16                              ## 0x10
	.long	32                              ## 0x20
	.long	64                              ## 0x40

	.comm	_INTEL_GTT_GEN,4,2              ## @INTEL_GTT_GEN
	.comm	_intel_private,16,3             ## @intel_private
	.comm	_I830_GMCH_CTRL,4,2             ## @I830_GMCH_CTRL
	.comm	_PCI_DEVICE_ID_INTEL_82830_HB,8,3 ## @PCI_DEVICE_ID_INTEL_82830_HB
	.comm	_PCI_DEVICE_ID_INTEL_82845G_HB,8,3 ## @PCI_DEVICE_ID_INTEL_82845G_HB
	.comm	_I830_GMCH_GMS_MASK,4,2         ## @I830_GMCH_GMS_MASK
	.comm	_I830_RDRAM_CHANNEL_TYPE,8,3    ## @I830_RDRAM_CHANNEL_TYPE
	.comm	_I855_GMCH_GMS_MASK,4,2         ## @I855_GMCH_GMS_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"detected %dK %s memory\n"

L_.str.1:                               ## @.str.1
	.asciz	"local"

L_.str.2:                               ## @.str.2
	.asciz	"stolen"

L_.str.3:                               ## @.str.3
	.asciz	"no pre-allocated video memory detected\n"

	.no_dead_strip	_intel_gtt_stolen_size
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_gtt_stolen_size
_intel_gtt_stolen_size:                 ; @intel_gtt_stolen_size
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x8, _INTEL_GTT_GEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INTEL_GTT_GEN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.eq	LBB0_12
; %bb.1:
Lloh3:
	adrp	x21, _intel_private@GOTPAGE
Lloh4:
	ldr	x21, [x21, _intel_private@GOTPAGEOFF]
	ldr	x0, [x21]
Lloh5:
	adrp	x8, _I830_GMCH_CTRL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _I830_GMCH_CTRL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x2, sp, #28
	bl	_pci_read_config_word
	ldr	x8, [x21]
	ldr	x10, [x8]
Lloh8:
	adrp	x9, _PCI_DEVICE_ID_INTEL_82830_HB@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PCI_DEVICE_ID_INTEL_82830_HB@GOTPAGEOFF]
Lloh10:
	ldr	x11, [x9]
Lloh11:
	adrp	x9, _PCI_DEVICE_ID_INTEL_82845G_HB@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PCI_DEVICE_ID_INTEL_82845G_HB@GOTPAGEOFF]
Lloh13:
	ldr	x12, [x9]
	ldr	w9, [sp, #28]
	cmp	x10, x11
	ccmp	x10, x12, #4, ne
	b.ne	LBB0_5
; %bb.2:
Lloh14:
	adrp	x10, _I830_GMCH_GMS_MASK@GOTPAGE
Lloh15:
	ldr	x10, [x10, _I830_GMCH_GMS_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	and	w9, w10, w9
	sub	w9, w9, #139
	cmp	w9, #3
	b.hi	LBB0_11
; %bb.3:
Lloh17:
	adrp	x8, lJTI0_1@PAGE
Lloh18:
	add	x8, x8, lJTI0_1@PAGEOFF
	adr	x10, LBB0_4
	ldrb	w11, [x8, x9]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_4:
	mov	w0, #512
	bl	_KB
	b	LBB0_24
LBB0_5:
Lloh19:
	adrp	x10, _I855_GMCH_GMS_MASK@GOTPAGE
Lloh20:
	ldr	x10, [x10, _I855_GMCH_GMS_MASK@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
	and	w9, w10, w9
	sub	w9, w9, #128
	cmp	w9, #16
	b.hi	LBB0_11
; %bb.6:
Lloh22:
	adrp	x10, lJTI0_0@PAGE
Lloh23:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_7
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_7:
	mov	w0, #96
	b	LBB0_23
LBB0_8:
	mov	w0, #8
	b	LBB0_23
LBB0_9:
	mov	w0, #1
	b	LBB0_23
LBB0_10:
	ldr	x8, [x21, #8]
Lloh24:
	adrp	x9, _I830_RDRAM_CHANNEL_TYPE@GOTPAGE
Lloh25:
	ldr	x9, [x9, _I830_RDRAM_CHANNEL_TYPE@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readb
	mov	x19, x0
	bl	_I830_RDRAM_ND
	mov	x20, x0
	mov	x0, x19
	bl	_I830_RDRAM_DDT
Lloh27:
	adrp	x8, _intel_gtt_stolen_size.ddt@PAGE
Lloh28:
	add	x8, x8, _intel_gtt_stolen_size.ddt@PAGEOFF
	ldr	w0, [x8, x0, lsl #2]
	bl	_MB
	madd	w19, w0, w20, w0
Lloh29:
	adrp	x22, l_.str.1@PAGE
Lloh30:
	add	x22, x22, l_.str.1@PAGEOFF
	ldr	x8, [x21]
	cbnz	w19, LBB0_25
LBB0_11:
	add	x0, x8, #8
Lloh31:
	adrp	x1, l_.str.3@PAGE
Lloh32:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_info
LBB0_12:
	mov	w19, #0
	b	LBB0_26
LBB0_13:
	mov	w0, #352
	b	LBB0_23
LBB0_14:
	mov	w0, #224
	b	LBB0_23
LBB0_15:
	mov	w0, #160
	b	LBB0_23
LBB0_16:
	mov	w0, #64
	b	LBB0_23
LBB0_17:
	mov	w0, #48
	b	LBB0_23
LBB0_18:
	mov	w0, #4
	b	LBB0_23
LBB0_19:
	mov	w0, #32
	b	LBB0_23
LBB0_20:
	mov	w0, #16
	b	LBB0_23
LBB0_21:
	mov	w0, #256
	b	LBB0_23
LBB0_22:
	mov	w0, #128
LBB0_23:
	bl	_MB
LBB0_24:
	mov	x19, x0
Lloh33:
	adrp	x22, l_.str.2@PAGE
Lloh34:
	add	x22, x22, l_.str.2@PAGEOFF
	ldr	x8, [x21]
	cbz	w19, LBB0_11
LBB0_25:
	add	x20, x8, #8
	mov	w0, #1
	bl	_KB
	udiv	w8, w19, w0
	stp	x8, x22, [sp]
Lloh35:
	adrp	x1, l_.str@PAGE
Lloh36:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_info
LBB0_26:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_13-LBB0_7)>>2
	.byte	(LBB0_14-LBB0_7)>>2
	.byte	(LBB0_15-LBB0_7)>>2
	.byte	(LBB0_16-LBB0_7)>>2
	.byte	(LBB0_17-LBB0_7)>>2
	.byte	(LBB0_8-LBB0_7)>>2
	.byte	(LBB0_18-LBB0_7)>>2
	.byte	(LBB0_19-LBB0_7)>>2
	.byte	(LBB0_9-LBB0_7)>>2
	.byte	(LBB0_20-LBB0_7)>>2
	.byte	(LBB0_11-LBB0_7)>>2
	.byte	(LBB0_11-LBB0_7)>>2
	.byte	(LBB0_11-LBB0_7)>>2
	.byte	(LBB0_11-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_22-LBB0_7)>>2
lJTI0_1:
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_9-LBB0_4)>>2
	.byte	(LBB0_10-LBB0_4)>>2
                                        ; -- End function
	.p2align	2                               ; @intel_gtt_stolen_size.ddt
_intel_gtt_stolen_size.ddt:
	.long	0                               ; 0x0
	.long	16                              ; 0x10
	.long	32                              ; 0x20
	.long	64                              ; 0x40

	.comm	_INTEL_GTT_GEN,4,2              ; @INTEL_GTT_GEN
	.comm	_intel_private,16,3             ; @intel_private
	.comm	_I830_GMCH_CTRL,4,2             ; @I830_GMCH_CTRL
	.comm	_PCI_DEVICE_ID_INTEL_82830_HB,8,3 ; @PCI_DEVICE_ID_INTEL_82830_HB
	.comm	_PCI_DEVICE_ID_INTEL_82845G_HB,8,3 ; @PCI_DEVICE_ID_INTEL_82845G_HB
	.comm	_I830_GMCH_GMS_MASK,4,2         ; @I830_GMCH_GMS_MASK
	.comm	_I830_RDRAM_CHANNEL_TYPE,8,3    ; @I830_RDRAM_CHANNEL_TYPE
	.comm	_I855_GMCH_GMS_MASK,4,2         ; @I855_GMCH_GMS_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"detected %dK %s memory\n"

l_.str.1:                               ; @.str.1
	.asciz	"local"

l_.str.2:                               ; @.str.2
	.asciz	"stolen"

l_.str.3:                               ; @.str.3
	.asciz	"no pre-allocated video memory detected\n"

	.no_dead_strip	_intel_gtt_stolen_size
.subsections_via_symbols
