	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_psb_modeset_init               ## -- Begin function psb_modeset_init
	.p2align	4, 0x90
_psb_modeset_init:                      ## @psb_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	48(%rdi), %r12
	callq	_drm_mode_config_init
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%r14)
	movq	_psb_mode_funcs@GOTPCREL(%rip), %rax
	movq	%rax, 16(%r14)
	movl	40(%r14), %edi
	movq	_PSB_BSM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	8(%r14), %rdx
	callq	_pci_read_config_dword
	cmpl	$0, (%r12)
	jle	LBB0_3
## %bb.1:
	leaq	16(%r12), %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	movq	%r15, %rdx
	callq	_psb_intel_crtc_init
	incl	%ebx
	cmpl	(%r12), %ebx
	jl	LBB0_2
LBB0_3:
	movabsq	$17592186048512, %rax           ## imm = 0x100000001000
	movq	%rax, (%r14)
	movq	%r14, %rdi
	callq	_psb_setup_outputs
	movq	8(%r12), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	*%rax
LBB0_5:
	movl	$1, 4(%r12)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_psb_mode_funcs,4,2             ## @psb_mode_funcs
	.comm	_PSB_BSM,4,2                    ## @PSB_BSM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_psb_modeset_init               ; -- Begin function psb_modeset_init
	.p2align	2
_psb_modeset_init:                      ; @psb_modeset_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	ldr	x22, [x0, #48]
	bl	_drm_mode_config_init
	str	xzr, [x19, #32]
Lloh0:
	adrp	x8, _psb_mode_funcs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _psb_mode_funcs@GOTPAGEOFF]
	stp	x8, xzr, [x19, #16]
	ldr	w0, [x19, #40]
Lloh2:
	adrp	x8, _PSB_BSM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PSB_BSM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x2, x19, #8
	bl	_pci_read_config_dword
	mov	x20, x22
	ldr	w8, [x20], #16
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	w21, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_psb_intel_crtc_init
	add	w21, w21, #1
	ldr	w8, [x22]
	cmp	w21, w8
	b.lt	LBB0_2
LBB0_3:
	movi.2s	v0, #16, lsl #8
	str	d0, [x19]
	mov	x0, x19
	bl	_psb_setup_outputs
	ldr	x8, [x22, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x19
	blr	x8
LBB0_5:
	mov	w8, #1
	str	w8, [x22, #4]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_psb_mode_funcs,4,2             ; @psb_mode_funcs
	.comm	_PSB_BSM,4,2                    ; @PSB_BSM
.subsections_via_symbols
