	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ironlake_compute_srwm
_ironlake_compute_srwm:                 ## @ironlake_compute_srwm
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movq	32(%rbp), %rcx
	movq	24(%rbp), %rax
	movq	16(%rbp), %rbx
	testl	%r12d, %r12d
	je	LBB0_1
## %bb.3:
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, %esi
	callq	_intel_get_crtc_for_plane
	movl	8(%rax), %r15d
	movl	16(%rax), %esi
	movq	(%rax), %rcx
	movl	(%rcx), %ecx
	leal	7(%rcx), %r13d
	testl	%ecx, %ecx
	cmovnsl	%ecx, %r13d
	sarl	$3, %r13d
	imull	$1000, 12(%rax), %eax           ## imm = 0x3E8
	cltd
	idivl	%esi
	movl	%eax, %ecx
	movslq	%eax, %rdi
	movslq	%r12d, %rax
	movq	%rax, %rdx
	orq	%rdi, %rdx
	shrq	$32, %rdx
	je	LBB0_4
## %bb.5:
	xorl	%edx, %edx
	divq	%rdi
	jmp	LBB0_6
LBB0_1:
	movl	$0, (%rcx)
	movl	$0, (%rax)
	movl	$0, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_2
LBB0_4:
	movl	%r12d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_6:
	addq	$1000, %rax                     ## imm = 0x3E8
	shrq	$3, %rax
	movabsq	$2361183241434822607, %rcx      ## imm = 0x20C49BA5E353F7CF
	mulq	%rcx
	movq	%rdx, %r14
	shrq	$4, %r14
	imull	%r13d, %r15d
	imull	%r13d, %esi
	movslq	%esi, %rax
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$38, %rax
	addl	%ecx, %eax
	imull	%r12d, %eax
	cltq
	imulq	$274877907, %rax, %rdi          ## imm = 0x10624DD3
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$38, %rdi
	addl	%eax, %edi
	movl	%r15d, %esi
	imull	%r14d, %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_min
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movl	(%r12), %esi
	movl	%eax, %edi
	callq	_DIV_ROUND_UP
	addl	4(%r12), %eax
	movq	24(%rbp), %rcx
	movl	%eax, (%rcx)
	shll	$6, %eax
	movl	%eax, %edi
	movl	%r15d, %esi
	callq	_DIV_ROUND_UP
	addl	$2, %eax
	movl	%eax, (%rbx)
	imull	%r14d, %r13d
	shll	$6, %r13d
	movq	%rbx, %r14
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %esi
	movl	%r13d, %edi
	callq	_DIV_ROUND_UP
	addl	4(%rbx), %eax
	movq	32(%rbp), %rcx
	movl	%eax, (%rcx)
	movl	(%r14), %edx
	movq	24(%rbp), %rcx
	movl	(%rcx), %ecx
	movq	%rbx, (%rsp)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %r8d
	movq	%r12, %r9
	callq	_ironlake_check_srwm
LBB0_2:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_ironlake_compute_srwm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ironlake_compute_srwm
_ironlake_compute_srwm:                 ; @ironlake_compute_srwm
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x7
	mov	x22, x6
	ldr	x27, [x29, #16]
	cbz	w3, LBB0_2
; %bb.1:
	mov	x19, x5
	mov	x21, x4
	mov	x25, x3
	mov	x24, x0
	str	w1, [sp, #12]                   ; 4-byte Folded Spill
	mov	x1, x2
	bl	_intel_get_crtc_for_plane
	ldp	w8, w9, [x0, #8]
	ldr	w10, [x0, #16]
	ldr	x11, [x0]
	ldr	w11, [x11]
	add	w12, w11, #7
	cmp	w11, #0
	csel	w11, w12, w11, lt
	asr	w28, w11, #3
	mov	w11, #1000
	mul	w9, w9, w11
	sdiv	w9, w9, w10
	sxtw	x9, w9
	sxtw	x11, w25
	udiv	x9, x11, x9
	add	x9, x9, #1000
	lsr	x9, x9, #3
	mov	x11, #63439
	movk	x11, #58195, lsl #16
	movk	x11, #39845, lsl #32
	movk	x11, #8388, lsl #48
	umulh	x9, x9, x11
	lsr	x23, x9, #4
	mul	w26, w28, w8
	mul	w8, w28, w10
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	smull	x8, w8, w9
	lsr	x10, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w10
	mul	w8, w8, w25
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w0, w8, w9
	mul	w1, w26, w23
	bl	_min
	ldr	w1, [x21]
	bl	_DIV_ROUND_UP
	ldr	w8, [x21, #4]
	add	w8, w8, w0
	str	w8, [x20]
	lsl	w0, w8, #6
	mov	x1, x26
	bl	_DIV_ROUND_UP
	add	w8, w0, #2
	str	w8, [x22]
	mul	w8, w28, w23
	lsl	w0, w8, #6
	ldr	w1, [x19]
	bl	_DIV_ROUND_UP
	ldr	w8, [x19, #4]
	add	w4, w8, w0
	str	w4, [x27]
	ldr	w2, [x22]
	ldr	w3, [x20]
	mov	x0, x24
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	mov	x5, x21
	mov	x6, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_ironlake_check_srwm
LBB0_2:
	str	wzr, [x27]
	str	wzr, [x20]
	str	wzr, [x22]
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_ironlake_compute_srwm
.subsections_via_symbols
