	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function mgag200_device_init
LCPI0_0:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	0                               ## 0x0
	.long	2                               ## 0x2
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_mgag200_device_init:                   ## @mgag200_device_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	8(%rdi), %rbx
	movl	%esi, 48(%rbx)
	movl	$1, (%rbx)
	movl	(%rdi), %edi
	movq	_PCI_MGA_OPTION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	callq	_pci_read_config_dword
	xorl	%eax, %eax
	testl	$16384, -20(%rbp)               ## imm = 0x4000
	sete	%al
	movl	%eax, 4(%rbx)
	movq	40(%rbx), %rax
	movl	4(%rax), %edi
	movl	$1, %esi
	callq	_pci_resource_start
	movl	%eax, 36(%rbx)
	movq	40(%rbx), %rax
	movl	4(%rax), %edi
	movl	$1, %esi
	callq	_pci_resource_len
	movl	%eax, 32(%rbx)
	movq	40(%rbx), %rcx
	movl	(%rcx), %edi
	movl	36(%rbx), %esi
	leaq	L_.str(%rip), %rcx
	movl	%eax, %edx
	callq	_devm_request_mem_region
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	movl	(%r14), %edi
	xorl	%r14d, %r14d
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_pcim_iomap
	movq	%rax, 24(%rbx)
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	%rbx, %rdi
	callq	_IS_G200_SE
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	$7716, %edi                     ## imm = 0x1E24
	callq	_RREG32
	movl	%eax, 16(%rbx)
LBB0_4:
	movq	%rbx, %rdi
	callq	_mga_vram_init
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.5:
	movq	8(%rbx), %rax
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,1,0,2]
	movups	%xmm0, (%rax)
	xorl	%r14d, %r14d
	jmp	LBB0_9
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_ERROR
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	jmp	LBB0_8
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_8:
	subl	(%rax), %r14d
LBB0_9:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_MGA_OPTION,4,2             ## @PCI_MGA_OPTION
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mgadrmfb_mmio"

L_.str.1:                               ## @.str.1
	.asciz	"can't reserve mmio registers\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_mgag200_device_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function mgag200_device_init
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.long	2                               ; 0x2
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_mgag200_device_init:                   ; @mgag200_device_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
	ldr	x19, [x0, #8]
	str	w1, [x19, #48]
	mov	w21, #1
	str	w21, [x19]
	ldr	w0, [x0]
Lloh0:
	adrp	x8, _PCI_MGA_OPTION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_MGA_OPTION@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_pci_read_config_dword
	ldr	w8, [sp, #12]
	bic	w8, w21, w8, lsr #14
	str	w8, [x19, #4]
	ldr	x8, [x19, #40]
	ldr	w0, [x8, #4]
	mov	w1, #1
	bl	_pci_resource_start
	str	w0, [x19, #36]
	ldr	x8, [x19, #40]
	ldr	w0, [x8, #4]
	mov	w1, #1
	bl	_pci_resource_len
	mov	x2, x0
	str	w0, [x19, #32]
	ldr	x8, [x19, #40]
	ldr	w0, [x8]
	ldr	w1, [x19, #36]
Lloh3:
	adrp	x3, l_.str@PAGE
Lloh4:
	add	x3, x3, l_.str@PAGEOFF
	bl	_devm_request_mem_region
	cbz	w0, LBB0_6
; %bb.1:
	ldr	w0, [x20]
	mov	w1, #1
	mov	w2, #0
	bl	_pcim_iomap
	str	x0, [x19, #24]
	cbz	x0, LBB0_7
; %bb.2:
	mov	x0, x19
	bl	_IS_G200_SE
	cbz	x0, LBB0_4
; %bb.3:
	mov	w0, #7716
	bl	_RREG32
	str	w0, [x19, #16]
LBB0_4:
	mov	x0, x19
	bl	_mga_vram_init
	cbnz	w0, LBB0_8
; %bb.5:
	ldr	x8, [x19, #8]
Lloh5:
	adrp	x9, lCPI0_0@PAGE
Lloh6:
	ldr	q0, [x9, lCPI0_0@PAGEOFF]
	str	q0, [x8]
	b	LBB0_8
LBB0_6:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
LBB0_7:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdr	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_MGA_OPTION,4,2             ; @PCI_MGA_OPTION
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mgadrmfb_mmio"

l_.str.1:                               ; @.str.1
	.asciz	"can't reserve mmio registers\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_mgag200_device_init
.subsections_via_symbols
