	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function igt_check_block
_igt_check_block:                       ## @igt_check_block
	.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	%rsi, %r12
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_i915_buddy_block_state
	movq	_I915_BUDDY_ALLOCATED@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	movq	_I915_BUDDY_FREE@GOTPCREL(%rip), %rdx
	cmpl	(%rcx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	je	LBB0_4
## %bb.1:
	cmpl	(%rdx), %eax
	je	LBB0_4
## %bb.2:
	movq	_I915_BUDDY_SPLIT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_4:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_i915_buddy_block_size
	movl	%eax, %r13d
	movq	%r12, %rdi
	callq	_i915_buddy_block_offset
	movl	%eax, %r14d
	cmpl	(%r15), %r13d
	jge	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movl	%r13d, %edi
	callq	_is_power_of_2
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movl	(%r15), %esi
	movl	%r13d, %edi
	callq	_IS_ALIGNED
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	leaq	L_.str.3(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	(%r15), %esi
	movl	%r14d, %edi
	callq	_IS_ALIGNED
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:
	leaq	L_.str.4(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_12:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	%r14d, %edi
	movl	%r13d, %esi
	callq	_IS_ALIGNED
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:
	leaq	L_.str.5(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movq	%r12, %rdi
	callq	_get_buddy
	testq	%rax, %rax
	je	LBB0_15
## %bb.17:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_i915_buddy_block_offset
	xorl	%r13d, %r14d
	cmpl	%r14d, %eax
	je	LBB0_19
## %bb.18:
	leaq	L_.str.7(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_19:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_i915_buddy_block_size
	cmpl	%r13d, %eax
	je	LBB0_21
## %bb.20:
	leaq	L_.str.8(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_21:
	movq	%r15, %rdi
	callq	_i915_buddy_block_state
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, %eax
	jne	LBB0_25
## %bb.22:
	movq	_I915_BUDDY_FREE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_25
## %bb.23:
	leaq	L_.str.9(%rip), %rdi
	jmp	LBB0_24
LBB0_15:
	cmpq	$0, (%r12)
	je	LBB0_25
## %bb.16:
	leaq	L_.str.6(%rip), %rdi
LBB0_24:
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_25:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I915_BUDDY_ALLOCATED,4,2       ## @I915_BUDDY_ALLOCATED
	.comm	_I915_BUDDY_FREE,4,2            ## @I915_BUDDY_FREE
	.comm	_I915_BUDDY_SPLIT,4,2           ## @I915_BUDDY_SPLIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"block state mismatch\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"block size smaller than min size\n"

L_.str.2:                               ## @.str.2
	.asciz	"block size not power of two\n"

L_.str.3:                               ## @.str.3
	.asciz	"block size not aligned to min size\n"

L_.str.4:                               ## @.str.4
	.asciz	"block offset not aligned to min size\n"

L_.str.5:                               ## @.str.5
	.asciz	"block offset not aligned to block size\n"

L_.str.6:                               ## @.str.6
	.asciz	"buddy has gone fishing\n"

L_.str.7:                               ## @.str.7
	.asciz	"buddy has wrong offset\n"

L_.str.8:                               ## @.str.8
	.asciz	"buddy size mismatch\n"

L_.str.9:                               ## @.str.9
	.asciz	"block and its buddy are free\n"

	.no_dead_strip	_igt_check_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function igt_check_block
_igt_check_block:                       ; @igt_check_block
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x21, x1
	mov	x20, x0
	mov	x0, x1
	bl	_i915_buddy_block_state
	mov	x19, x0
Lloh0:
	adrp	x8, _I915_BUDDY_ALLOCATED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I915_BUDDY_ALLOCATED@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x27, _I915_BUDDY_FREE@GOTPAGE
Lloh4:
	ldr	x27, [x27, _I915_BUDDY_FREE@GOTPAGEOFF]
	ldr	w9, [x27]
Lloh5:
	adrp	x10, _I915_BUDDY_SPLIT@GOTPAGE
Lloh6:
	ldr	x10, [x10, _I915_BUDDY_SPLIT@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	cmp	w0, w8
	ccmp	w0, w9, #4, ne
	ccmp	w0, w10, #4, ne
Lloh8:
	adrp	x26, _EINVAL@GOTPAGE
Lloh9:
	ldr	x26, [x26, _EINVAL@GOTPAGEOFF]
	b.ne	LBB0_2
; %bb.1:
	mov	w23, #0
	b	LBB0_3
LBB0_2:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	ldr	w8, [x26]
	neg	w23, w8
LBB0_3:
	mov	x0, x20
	mov	x1, x21
	bl	_i915_buddy_block_size
	mov	x22, x0
	mov	x0, x21
	bl	_i915_buddy_block_offset
	mov	x24, x0
	ldr	w8, [x20]
	cmp	w22, w8
	b.ge	LBB0_5
; %bb.4:
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
	ldr	w8, [x26]
	neg	w23, w8
LBB0_5:
	mov	x0, x22
	bl	_is_power_of_2
	cbnz	w0, LBB0_7
; %bb.6:
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_err
	ldr	w8, [x26]
	neg	w23, w8
LBB0_7:
	ldr	w1, [x20]
	mov	x0, x22
	bl	_IS_ALIGNED
	cbnz	w0, LBB0_9
; %bb.8:
Lloh16:
	adrp	x0, l_.str.3@PAGE
Lloh17:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_err
	ldr	w8, [x26]
	neg	w23, w8
LBB0_9:
	ldr	w1, [x20]
	mov	x0, x24
	bl	_IS_ALIGNED
	cbnz	w0, LBB0_11
; %bb.10:
Lloh18:
	adrp	x0, l_.str.4@PAGE
Lloh19:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pr_err
	ldr	w8, [x26]
	neg	w23, w8
LBB0_11:
	mov	x0, x24
	mov	x1, x22
	bl	_IS_ALIGNED
	cbnz	w0, LBB0_13
; %bb.12:
Lloh20:
	adrp	x0, l_.str.5@PAGE
Lloh21:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_pr_err
	ldr	w8, [x26]
	neg	w23, w8
LBB0_13:
	mov	x0, x21
	bl	_get_buddy
	cbz	x0, LBB0_21
; %bb.14:
	mov	x25, x0
	bl	_i915_buddy_block_offset
	eor	w8, w24, w22
	cmp	w0, w8
	b.eq	LBB0_16
; %bb.15:
Lloh22:
	adrp	x0, l_.str.7@PAGE
Lloh23:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_pr_err
	ldr	w8, [x26]
	neg	w23, w8
LBB0_16:
	mov	x0, x20
	mov	x1, x25
	bl	_i915_buddy_block_size
	cmp	w0, w22
	b.eq	LBB0_18
; %bb.17:
Lloh24:
	adrp	x0, l_.str.8@PAGE
Lloh25:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_pr_err
	ldr	w8, [x26]
	neg	w23, w8
LBB0_18:
	mov	x0, x25
	bl	_i915_buddy_block_state
	cmp	w0, w19
	b.ne	LBB0_24
; %bb.19:
	ldr	w8, [x27]
	cmp	w19, w8
	b.ne	LBB0_24
; %bb.20:
Lloh26:
	adrp	x0, l_.str.9@PAGE
Lloh27:
	add	x0, x0, l_.str.9@PAGEOFF
	b	LBB0_23
LBB0_21:
	ldr	x8, [x21]
	cbz	x8, LBB0_24
; %bb.22:
Lloh28:
	adrp	x0, l_.str.6@PAGE
Lloh29:
	add	x0, x0, l_.str.6@PAGEOFF
LBB0_23:
	bl	_pr_err
	ldr	w8, [x26]
	neg	w23, w8
LBB0_24:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_I915_BUDDY_ALLOCATED,4,2       ; @I915_BUDDY_ALLOCATED
	.comm	_I915_BUDDY_FREE,4,2            ; @I915_BUDDY_FREE
	.comm	_I915_BUDDY_SPLIT,4,2           ; @I915_BUDDY_SPLIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"block state mismatch\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"block size smaller than min size\n"

l_.str.2:                               ; @.str.2
	.asciz	"block size not power of two\n"

l_.str.3:                               ; @.str.3
	.asciz	"block size not aligned to min size\n"

l_.str.4:                               ; @.str.4
	.asciz	"block offset not aligned to min size\n"

l_.str.5:                               ; @.str.5
	.asciz	"block offset not aligned to block size\n"

l_.str.6:                               ; @.str.6
	.asciz	"buddy has gone fishing\n"

l_.str.7:                               ; @.str.7
	.asciz	"buddy has wrong offset\n"

l_.str.8:                               ; @.str.8
	.asciz	"buddy size mismatch\n"

l_.str.9:                               ; @.str.9
	.asciz	"block and its buddy are free\n"

	.no_dead_strip	_igt_check_block
.subsections_via_symbols
