	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_compute_aligned_offset
_intel_compute_aligned_offset:          ## @intel_compute_aligned_offset
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movl	%r8d, %r14d
	movq	%rcx, %r12
	movq	%rdx, %r13
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	24(%rbp), %ebx
	movq	8(%rcx), %rax
	movq	(%rax), %rax
	movslq	%r8d, %rsi
	movl	(%rax,%rsi,4), %r15d
	xorl	%eax, %eax
	subl	$1, %ebx
	cmovbl	%eax, %ebx
	movl	(%rcx), %edi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_is_surface_linear
	testl	%eax, %eax
	je	LBB0_1
## %bb.5:
	movq	%r13, %rsi
	movl	(%r13), %ecx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	imull	%edi, %ecx
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	movl	(%r13), %eax
	imull	%r15d, %eax
	addl	%ecx, %eax
	movl	%ebx, %ecx
	notl	%ecx
	andl	%eax, %ecx
	andl	%ebx, %eax
	xorl	%edx, %edx
	divl	%edi
	movl	%eax, (%rsi)
	movl	%edx, %eax
	xorl	%edx, %edx
	divl	%r15d
	movl	%eax, (%r13)
	movl	%ecx, %ebx
	jmp	LBB0_6
LBB0_1:
	movl	%r15d, -68(%rbp)                ## 4-byte Spill
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	movl	16(%rbp), %r13d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_intel_tile_size
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	leaq	-48(%rbp), %rdx
	leaq	-52(%rbp), %rcx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_intel_tile_dims
	movl	%r13d, %edi
	callq	_drm_rotation_90_or_270
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	-52(%rbp), %r14d
	movl	-48(%rbp), %edi
	movl	%r14d, %esi
	callq	_swap
	movl	-48(%rbp), %r11d
	jmp	LBB0_4
LBB0_3:
	movl	-48(%rbp), %r11d
	movl	-68(%rbp), %r14d                ## 4-byte Reload
	imull	%r11d, %r14d
LBB0_4:
	movq	%r15, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	xorl	%edx, %edx
	divl	%r14d
	movl	%eax, %r9d
	movl	(%rsi), %eax
	movl	-52(%rbp), %ecx
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %r10d
	movl	%edx, (%rsi)
	movl	(%r15), %eax
	xorl	%edx, %edx
	divl	%r11d
	movl	%edx, (%r15)
	imull	%r9d, %r10d
	addl	%eax, %r10d
	movl	-64(%rbp), %r8d                 ## 4-byte Reload
	imull	%r8d, %r10d
	notl	%ebx
	andl	%r10d, %ebx
	movl	%r11d, %edx
	pushq	%rbx
	pushq	%r10
	callq	_intel_adjust_tile_offset
	addq	$16, %rsp
LBB0_6:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_intel_compute_aligned_offset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_compute_aligned_offset
_intel_compute_aligned_offset:          ; @intel_compute_aligned_offset
	.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	x23, x6
	mov	x21, x5
	mov	x24, x4
	mov	x25, x3
	mov	x20, x2
	mov	x19, x1
	mov	x22, x0
	ldr	x8, [x3, #8]
	ldr	x8, [x8]
	ldr	w27, [x8, w4, sxtw #2]
	sub	w8, w7, #1
	cmp	w7, #0
	csel	w26, wzr, w8, eq
	ldr	w0, [x3]
	mov	x1, x4
	bl	_is_surface_linear
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w8, [x20]
	mul	w8, w8, w21
	ldr	w9, [x19]
	madd	w8, w9, w27, w8
	bic	w23, w8, w26
	and	w8, w8, w26
	udiv	w9, w8, w21
	str	w9, [x20]
	msub	w8, w9, w21, w8
	udiv	w8, w8, w27
	str	w8, [x19]
	b	LBB0_6
LBB0_2:
	mov	x0, x22
	bl	_intel_tile_size
	mov	x22, x0
	add	x2, sp, #12
	add	x3, sp, #8
	mov	x0, x25
	mov	x1, x24
	bl	_intel_tile_dims
	mov	x0, x23
	bl	_drm_rotation_90_or_270
	cbz	x0, LBB0_4
; %bb.3:
	ldp	w23, w0, [sp, #8]
	mov	x1, x23
	bl	_swap
	ldr	w2, [sp, #12]
	b	LBB0_5
LBB0_4:
	ldr	w2, [sp, #12]
	mul	w23, w2, w27
LBB0_5:
	udiv	w5, w21, w23
	ldr	w8, [x20]
	ldr	w3, [sp, #8]
	udiv	w9, w8, w3
	msub	w8, w9, w3, w8
	str	w8, [x20]
	ldr	w8, [x19]
	udiv	w10, w8, w2
	msub	w8, w10, w2, w8
	str	w8, [x19]
	madd	w8, w9, w5, w10
	mul	w6, w8, w22
	bic	w23, w6, w26
	mov	x0, x19
	mov	x1, x20
	mov	x4, x22
	mov	x7, x23
	bl	_intel_adjust_tile_offset
LBB0_6:
	mov	x0, x23
	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	_intel_compute_aligned_offset
.subsections_via_symbols
