	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mgag200_modeset_init           ## -- Begin function mgag200_modeset_init
	.p2align	4, 0x90
_mgag200_modeset_init:                  ## @mgag200_modeset_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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	$1, 12(%rdi)
	movq	_MGAG200_MAX_FB_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%rdi), %rcx
	movl	%eax, 8(%rcx)
	movq	_MGAG200_MAX_FB_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rcx)
	movl	8(%rdi), %eax
	movl	%eax, (%rcx)
	callq	_mga_crtc_init
	movq	(%rbx), %rdi
	callq	_mga_encoder_init
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r14
	movq	(%rbx), %rdi
	callq	_mga_vga_init
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_drm_connector_attach_encoder
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	callq	_DRM_ERROR
	movl	$-1, %eax
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MGAG200_MAX_FB_WIDTH,4,2       ## @MGAG200_MAX_FB_WIDTH
	.comm	_MGAG200_MAX_FB_HEIGHT,4,2      ## @MGAG200_MAX_FB_HEIGHT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mga_encoder_init failed\n"

L_.str.1:                               ## @.str.1
	.asciz	"mga_vga_init failed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mgag200_modeset_init           ; -- Begin function mgag200_modeset_init
	.p2align	2
_mgag200_modeset_init:                  ; @mgag200_modeset_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	mov	w8, #1
	str	w8, [x0, #12]
Lloh0:
	adrp	x8, _MGAG200_MAX_FB_WIDTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MGAG200_MAX_FB_WIDTH@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x9, [x0]
	str	w8, [x9, #8]
Lloh3:
	adrp	x8, _MGAG200_MAX_FB_HEIGHT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MGAG200_MAX_FB_HEIGHT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w10, [x0, #8]
	stp	w10, w8, [x9]
	bl	_mga_crtc_init
	ldr	x0, [x19]
	bl	_mga_encoder_init
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	ldr	x0, [x19]
	bl	_mga_vga_init
	cbz	x0, LBB0_4
; %bb.2:
	mov	x1, x20
	bl	_drm_connector_attach_encoder
	mov	w0, #0
	b	LBB0_6
LBB0_3:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_5
LBB0_4:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_5:
	bl	_DRM_ERROR
	mov	w0, #-1
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MGAG200_MAX_FB_WIDTH,4,2       ; @MGAG200_MAX_FB_WIDTH
	.comm	_MGAG200_MAX_FB_HEIGHT,4,2      ; @MGAG200_MAX_FB_HEIGHT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mga_encoder_init failed\n"

l_.str.1:                               ; @.str.1
	.asciz	"mga_vga_init failed\n"

.subsections_via_symbols
