	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_fb_offset_to_xy
_intel_fb_offset_to_xy:                 ## @intel_fb_offset_to_xy
	.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
	movl	%ecx, %r14d
	movq	%rdx, %rbx
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	movl	28(%rdx), %edi
	callq	_to_i915
	movq	(%rbx), %rcx
	movq	_DRM_FORMAT_MOD_LINEAR@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_4
## %bb.1:
	movslq	%r14d, %r13
	jmp	LBB0_2
LBB0_4:
	movq	8(%rbx), %rcx
	movslq	%r14d, %r13
	movl	(%rcx,%r13,4), %r15d
	movq	%rax, %rdi
	callq	_intel_tile_size
	movl	%eax, %ecx
	movl	%r15d, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	LBB0_2
## %bb.5:
	movq	8(%rbx), %rax
	movl	(%rax,%r13,4), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_2:
	movl	24(%rbx), %edi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_drm_framebuffer_plane_height
	movl	%eax, %r15d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_intel_tile_height
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_ALIGN
	movq	_u32@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	movq	16(%rbx), %rcx
	movl	(%rcx,%r13,4), %esi
	movl	%eax, %edi
	callq	_mul_u32_u32
	movq	8(%rbx), %rcx
	movl	(%rcx,%r13,4), %edx
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_add_overflows_t
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	movl	(%rax,%r13,4), %esi
	movl	(%rcx,%r13,4), %edx
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_ERANGE@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_6:
	movl	$0, (%r12)
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	$0, (%rsi)
	movq	_DRM_MODE_ROTATE_0@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	movl	(%rcx,%r13,4), %r9d
	movl	(%rax,%r13,4), %eax
	movq	%r12, %rdi
	movq	%rbx, %rdx
	movl	%r14d, %ecx
	pushq	$0
	pushq	%rax
	callq	_intel_adjust_aligned_offset
	addq	$16, %rsp
	xorl	%ebx, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_FORMAT_MOD_LINEAR,8,3      ## @DRM_FORMAT_MOD_LINEAR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Misaligned offset 0x%08x for color plane %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_u32,4,2                        ## @u32
L_.str.1:                               ## @.str.1
	.asciz	"Bad offset 0x%08x or pitch %d for color plane %d\n"

	.comm	_ERANGE,4,2                     ## @ERANGE
	.comm	_DRM_MODE_ROTATE_0,4,2          ## @DRM_MODE_ROTATE_0
	.no_dead_strip	_intel_fb_offset_to_xy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_fb_offset_to_xy
_intel_fb_offset_to_xy:                 ; @intel_fb_offset_to_xy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	w0, [x2, #28]
	bl	_to_i915
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _DRM_FORMAT_MOD_LINEAR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DRM_FORMAT_MOD_LINEAR@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x8, x19
	sxtw	x24, w8
	b	LBB0_4
LBB0_2:
	ldr	x8, [x20, #8]
	sxtw	x24, w19
	ldr	w23, [x8, w19, sxtw #2]
	bl	_intel_tile_size
	sdiv	w8, w23, w0
	msub	w8, w8, w0, w23
	cbz	w8, LBB0_4
; %bb.3:
	ldr	x8, [x20, #8]
	ldr	w1, [x8, x24, lsl #2]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x19
	bl	_DRM_DEBUG_KMS
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
	ldr	w0, [x20, #24]
	mov	x1, x20
	mov	x2, x19
	bl	_drm_framebuffer_plane_height
	mov	x23, x0
	mov	x0, x20
	mov	x1, x19
	bl	_intel_tile_height
	mov	x1, x0
	mov	x0, x23
	bl	_ALIGN
Lloh7:
	adrp	x8, _u32@GOTPAGE
Lloh8:
	ldr	x8, [x8, _u32@GOTPAGEOFF]
Lloh9:
	ldr	w23, [x8]
	ldr	x8, [x20, #16]
	lsl	x24, x24, #2
	ldr	w1, [x8, x24]
	bl	_mul_u32_u32
	mov	x1, x0
	ldr	x8, [x20, #8]
	ldr	w2, [x8, x24]
	mov	x0, x23
	bl	_add_overflows_t
	cbz	x0, LBB0_7
; %bb.5:
	ldp	x8, x9, [x20, #8]
	ldr	w1, [x8, x24]
	ldr	w2, [x9, x24]
                                        ; kill: def $w19 killed $w19 killed $x19 def $x19
	str	x19, [sp]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
Lloh12:
	adrp	x8, _ERANGE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_7:
	str	wzr, [x22]
	str	wzr, [x21]
Lloh14:
	adrp	x8, _DRM_MODE_ROTATE_0@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DRM_MODE_ROTATE_0@GOTPAGEOFF]
Lloh16:
	ldr	w4, [x8]
	ldp	x9, x8, [x20, #8]
	ldr	w5, [x8, x24]
	ldr	w6, [x9, x24]
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	mov	w7, #0
	bl	_intel_adjust_aligned_offset
	mov	w0, #0
LBB0_8:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_FORMAT_MOD_LINEAR,8,3      ; @DRM_FORMAT_MOD_LINEAR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Misaligned offset 0x%08x for color plane %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_u32,4,2                        ; @u32
l_.str.1:                               ; @.str.1
	.asciz	"Bad offset 0x%08x or pitch %d for color plane %d\n"

	.comm	_ERANGE,4,2                     ; @ERANGE
	.comm	_DRM_MODE_ROTATE_0,4,2          ; @DRM_MODE_ROTATE_0
	.no_dead_strip	_intel_fb_offset_to_xy
.subsections_via_symbols
