	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_psb_intel_crtc_mode_get        ## -- Begin function psb_intel_crtc_mode_get
	.p2align	4, 0x90
_psb_intel_crtc_mode_get:               ## @psb_intel_crtc_mode_get
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_to_gma_crtc
	movslq	(%rax), %rbx
	movq	(%r12), %rax
	movq	(%rax), %r15
	movq	8(%rax), %r13
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_gma_power_begin
	shlq	$4, %rbx
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	12(%r15,%rbx), %edi
	callq	_REG_READ
	movl	%eax, %r14d
	movl	8(%r15,%rbx), %edi
	callq	_REG_READ
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	4(%r15,%rbx), %edi
	callq	_REG_READ
	movl	%eax, %r13d
	movl	(%r15,%rbx), %edi
	callq	_REG_READ
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_gma_power_end
	jmp	LBB0_3
LBB0_2:
	movl	(%r13,%rbx), %r14d
	movl	4(%r13,%rbx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	8(%r13,%rbx), %eax
	movl	12(%r13,%rbx), %ebx
	movl	%eax, %r13d
LBB0_3:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$36, %edi
	callq	_kzalloc
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r12, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_psb_intel_crtc_clock_get
	movl	%eax, 32(%r15)
	movzwl	%r14w, %eax
	incl	%eax
	movl	%eax, (%r15)
	shrl	$16, %r14d
	incl	%r14d
	movl	%r14d, 4(%r15)
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movzwl	%cx, %eax
	incl	%eax
	movl	%eax, 8(%r15)
	shrl	$16, %ecx
	incl	%ecx
	movl	%ecx, 12(%r15)
	movzwl	%r13w, %eax
	incl	%eax
	movl	%eax, 16(%r15)
	shrl	$16, %r13d
	incl	%r13d
	movl	%r13d, 20(%r15)
	movzwl	%bx, %eax
	incl	%eax
	movl	%eax, 24(%r15)
	shrl	$16, %ebx
	incl	%ebx
	movl	%ebx, 28(%r15)
	movq	%r15, %rdi
	callq	_drm_mode_set_name
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_drm_mode_set_crtcinfo
LBB0_5:
	movq	%r15, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_psb_intel_crtc_mode_get        ; -- Begin function psb_intel_crtc_mode_get
	.p2align	2
_psb_intel_crtc_mode_get:               ; @psb_intel_crtc_mode_get
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x20, x0
	mov	x0, x1
	bl	_to_gma_crtc
	ldrsw	x21, [x0]
	ldr	x8, [x20]
	ldp	x23, x22, [x8]
	mov	x0, x20
	mov	w1, #0
	bl	_gma_power_begin
	cbz	x0, LBB0_2
; %bb.1:
	add	x24, x23, x21, lsl #4
	ldr	w0, [x24, #12]
	bl	_REG_READ
	mov	x21, x0
	ldr	w0, [x24, #8]
	bl	_REG_READ
	mov	x22, x0
	ldr	w0, [x24, #4]
	bl	_REG_READ
	mov	x23, x0
	ldr	w0, [x24]
	bl	_REG_READ
	mov	x24, x0
	mov	x0, x20
	bl	_gma_power_end
	b	LBB0_3
LBB0_2:
	add	x8, x22, x21, lsl #4
	ldp	w21, w22, [x8]
	ldp	w23, w24, [x8, #8]
LBB0_3:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #36
	bl	_kzalloc
	mov	x25, x0
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, x20
	mov	x1, x19
	bl	_psb_intel_crtc_clock_get
	str	w0, [x25, #32]
	and	w8, w21, #0xffff
	add	w8, w8, #1
	lsr	w9, w21, #16
	add	w9, w9, #1
	stp	w8, w9, [x25]
	and	w8, w22, #0xffff
	add	w8, w8, #1
	lsr	w9, w22, #16
	add	w9, w9, #1
	stp	w8, w9, [x25, #8]
	and	w8, w23, #0xffff
	add	w8, w8, #1
	lsr	w9, w23, #16
	add	w9, w9, #1
	stp	w8, w9, [x25, #16]
	and	w8, w24, #0xffff
	add	w8, w8, #1
	lsr	w9, w24, #16
	add	w9, w9, #1
	stp	w8, w9, [x25, #24]
	mov	x0, x25
	bl	_drm_mode_set_name
	mov	x0, x25
	mov	w1, #0
	bl	_drm_mode_set_crtcinfo
LBB0_5:
	mov	x0, x25
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
.subsections_via_symbols
