	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_psb_intel_crtc_init            ## -- Begin function psb_intel_crtc_init
	.p2align	4, 0x90
_psb_intel_crtc_init:                   ## @psb_intel_crtc_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	8(%rdi), %r13
	movq	_INTELFB_CONN_LIMIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	88(,%rax,8), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %rbx
	movl	(%r12), %esi
	movl	$4, %edi
	callq	_kzalloc
	movq	%rax, 80(%rbx)
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	leaq	40(%rbx), %r12
	movq	16(%r13), %rax
	movl	8(%rax), %edx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_drm_crtc_init
	movq	16(%r13), %rax
	movl	4(%rax), %eax
	movl	%eax, 72(%rbx)
	movq	%r12, %rdi
	movl	$256, %esi                      ## imm = 0x100
	callq	_drm_mode_crtc_set_gamma_size
	movl	%r15d, (%rbx)
	movl	%r15d, 4(%rbx)
	movq	64(%rbx), %rdi
	movl	$2048, %esi                     ## imm = 0x800
	callq	___bzero
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 56(%rbx)
	movq	$0, 48(%rbx)
	movq	16(%r13), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_drm_crtc_helper_add
	movq	%r12, 32(%rbx)
	movq	8(%r13), %rdi
	callq	_ARRAY_SIZE
	movl	$1, %edi
	cmpl	%r15d, %eax
	jle	LBB0_4
## %bb.3:
	movq	8(%r13), %rax
	movslq	4(%rbx), %rcx
	xorl	%edi, %edi
	cmpq	$0, (%rax,%rcx,8)
	setne	%dil
LBB0_4:
	callq	_BUG_ON
	movq	8(%r13), %rax
	movslq	4(%rbx), %rcx
	movq	%r12, (%rax,%rcx,8)
	movq	(%r13), %rax
	movslq	(%rbx), %rcx
	movq	%r12, (%rax,%rcx,8)
	movq	%rbx, %rax
	addq	$88, %rax
	movq	%rax, 24(%rbx)
	movq	$0, 16(%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_psb_intel_cursor_init
	movl	$1, 8(%rbx)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_INTELFB_CONN_LIMIT,4,2         ## @INTELFB_CONN_LIMIT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Crtc state error: No memory\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_psb_intel_crtc_init            ; -- Begin function psb_intel_crtc_init
	.p2align	2
_psb_intel_crtc_init:                   ; @psb_intel_crtc_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x23, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x24, [x0, #8]
Lloh0:
	adrp	x8, _INTELFB_CONN_LIMIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INTELFB_CONN_LIMIT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	lsl	w8, w8, #3
	add	w0, w8, #88
Lloh3:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_kzalloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	ldr	w1, [x22]
	mov	w0, #4
	bl	_kzalloc
	str	x0, [x20, #80]
	cbz	x0, LBB0_6
; %bb.2:
	add	x22, x20, #40
	ldr	x8, [x24, #16]
	ldr	w2, [x8, #8]
	mov	x0, x19
	mov	x1, x22
	bl	_drm_crtc_init
	ldr	x8, [x24, #16]
	ldr	w8, [x8, #4]
	str	w8, [x20, #72]
	mov	x0, x22
	mov	w1, #256
	bl	_drm_mode_crtc_set_gamma_size
	stp	w21, w21, [x20]
	ldr	x0, [x20, #64]
	mov	w1, #2048
	bl	_bzero
	stp	xzr, x23, [x20, #48]
	ldr	x8, [x24, #16]
	ldr	w1, [x8]
	mov	x0, x22
	bl	_drm_crtc_helper_add
	str	x22, [x20, #32]
	ldr	x0, [x24, #8]
	bl	_ARRAY_SIZE
	mov	x8, x0
	mov	w23, #1
	mov	w0, #1
	cmp	w8, w21
	b.le	LBB0_4
; %bb.3:
	ldr	x8, [x24, #8]
	ldrsw	x9, [x20, #4]
	ldr	x8, [x8, x9, lsl #3]
	cmp	x8, #0
	cset	w0, ne
LBB0_4:
	bl	_BUG_ON
	ldr	x8, [x24, #8]
	ldpsw	x10, x9, [x20]
	str	x22, [x8, x9, lsl #3]
	ldr	x8, [x24]
	str	x22, [x8, x10, lsl #3]
	add	x8, x20, #88
	stp	xzr, x8, [x20, #16]
	mov	x0, x19
	mov	x1, x20
	bl	_psb_intel_cursor_init
	str	w23, [x20, #8]
LBB0_5:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	w0, [x19]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_kfree
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_INTELFB_CONN_LIMIT,4,2         ; @INTELFB_CONN_LIMIT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Crtc state error: No memory\n"

.subsections_via_symbols
