	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function assert_rotated
_assert_rotated:                        ## @assert_rotated
	.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
	movq	%rcx, %rbx
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movl	%edx, %r12d
	movq	(%rsi), %rax
	cmpl	$0, (%rax,%r12,8)
	je	LBB0_14
## %bb.1:
	xorl	%ecx, %ecx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	incl	%ecx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	cmpl	(%rax,%r12,8), %ecx
	jae	LBB0_14
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	cmpl	$0, 4(%rax,%r12,8)
	je	LBB0_13
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	%rsi, %r14
	movq	%rsi, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%r13d, %ecx
	callq	_rotated_index
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, %rsi
	callq	_i915_gem_object_get_dma_address
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_sg_dma_len
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	%rbx, %rdi
	callq	_sg_dma_address
	cmpq	%r15, %rax
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	%rbx, %rdi
	callq	_sg_next
	movq	%rax, %rbx
	movq	%r14, %rsi
	movq	(%r14), %rax
	incq	%r13
	cmpl	4(%rax,%r12,8), %r13d
	jb	LBB0_4
	jmp	LBB0_13
LBB0_14:
	movq	%rbx, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str(%rip), %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	movq	%r13, %rcx
	jmp	LBB0_6
LBB0_8:
	movq	%rbx, %rdi
	callq	_sg_dma_len
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	movl	%r13d, %r8d
	movq	-64(%rbp), %r9                  ## 8-byte Reload
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_9
LBB0_11:
	leaq	L_.str.2(%rip), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%r13d, %edx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
LBB0_6:
	xorl	%eax, %eax
	callq	_pr_err
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid sg table: too short at plane %d, (%d, %d)!\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"Invalid sg.length, found %d, expected %lu for rotated page (%d, %d) [src index %lu]\n"

L_.str.2:                               ## @.str.2
	.asciz	"Invalid address for rotated page (%d, %d) [src index %lu]\n"

	.no_dead_strip	_assert_rotated
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function assert_rotated
_assert_rotated:                        ; @assert_rotated
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x3
	mov	w27, w2
	ldr	x8, [x1]
	lsl	x10, x27, #3
	ldr	w9, [x8, x10]
	cbz	w9, LBB0_10
; %bb.1:
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	mov	w19, #0
Lloh0:
	adrp	x28, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x28, [x28, _PAGE_SIZE@GOTPAGEOFF]
	str	x10, [sp, #24]                  ; 8-byte Folded Spill
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x10, [sp, #24]                  ; 8-byte Folded Reload
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w19, w19, #1
	ldr	w9, [x8, x10]
	cmp	w19, w9
	b.hs	LBB0_10
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	add	x9, x8, x27, lsl #3
	ldr	w9, [x9, #4]
	cbz	w9, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x24, #0
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cbz	x20, LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x22
	mov	x1, x21
	mov	x2, x19
	mov	x3, x24
	bl	_rotated_index
	mov	x25, x0
	mov	x0, x23
	mov	x1, x25
	bl	_i915_gem_object_get_dma_address
	mov	x26, x0
	mov	x0, x20
	bl	_sg_dma_len
	ldr	w8, [x28]
	cmp	w0, w8
	b.ne	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x20
	bl	_sg_dma_address
	cmp	x0, x26
	b.ne	LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x20
	bl	_sg_next
	mov	x20, x0
	ldr	x8, [x22]
	add	x9, x8, x27, lsl #3
	ldr	w9, [x9, #4]
	add	x24, x24, #1
	cmp	w24, w9
	b.lo	LBB0_6
	b	LBB0_2
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_11:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x2, x19
	mov	x3, x24
	b	LBB0_14
LBB0_12:
	mov	x0, x20
	bl	_sg_dma_len
	mov	x1, x0
	ldr	w2, [x28]
	mov	w3, w19
	stp	x24, x25, [sp]
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_13:
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	mov	x2, x24
	mov	x3, x25
LBB0_14:
	bl	_pr_err
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_ERR_PTR
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid sg table: too short at plane %d, (%d, %d)!\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"Invalid sg.length, found %d, expected %lu for rotated page (%d, %d) [src index %lu]\n"

l_.str.2:                               ; @.str.2
	.asciz	"Invalid address for rotated page (%d, %d) [src index %lu]\n"

	.no_dead_strip	_assert_rotated
.subsections_via_symbols
