	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function igt_buddy_alloc_optimistic
_igt_buddy_alloc_optimistic:            ## @igt_buddy_alloc_optimistic
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_blocks@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_LIST_HEAD
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, %esi
	shll	$17, %esi
	subl	%edx, %esi
	leaq	-40(%rbp), %rdi
	callq	_i915_buddy_init
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_err
	jmp	LBB0_9
LBB0_2:
	xorl	%edi, %edi
	cmpl	$16, -40(%rbp)
	setne	%dil
	callq	_GEM_BUG_ON
	xorl	%ebx, %ebx
	leaq	-40(%rbp), %r14
	movq	_blocks@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_i915_buddy_alloc
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_list_add_tail
	incl	%ebx
	cmpl	$17, %ebx
	jne	LBB0_3
## %bb.6:
	leaq	-40(%rbp), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_i915_buddy_alloc
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pr_info
	movq	_blocks@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_list_add_tail
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_info
	movq	%r12, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
LBB0_8:
	movq	_blocks@GOTPCREL(%rip), %rsi
	leaq	-40(%rbp), %r14
	movq	%r14, %rdi
	callq	_i915_buddy_free_list
	movq	%r14, %rdi
	callq	_i915_buddy_fini
LBB0_9:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_blocks,4,2                     ## @blocks
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"buddy_init failed(%d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"buddy_alloc hit -ENOMEM with order=%d\n"

L_.str.2:                               ## @.str.2
	.asciz	"buddy_alloc unexpectedly succeeded, it should be full!"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_igt_buddy_alloc_optimistic
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function igt_buddy_alloc_optimistic
_igt_buddy_alloc_optimistic:            ; @igt_buddy_alloc_optimistic
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x8, _blocks@GOTPAGE
Lloh1:
	ldr	x8, [x8, _blocks@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_LIST_HEAD
Lloh3:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	lsl	w8, w2, #17
	sub	w1, w8, w2
	add	x0, sp, #8
	bl	_i915_buddy_init
	mov	x19, x0
	cbz	w0, LBB0_2
; %bb.1:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_pr_err
	b	LBB0_9
LBB0_2:
	ldr	w8, [sp, #8]
	cmp	w8, #16
	cset	w0, ne
	bl	_GEM_BUG_ON
Lloh8:
	adrp	x20, _blocks@GOTPAGE
Lloh9:
	ldr	x20, [x20, _blocks@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #8
	mov	x1, x19
	bl	_i915_buddy_alloc
	mov	x21, x0
	bl	_IS_ERR
	cbnz	x0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	mov	x1, x20
	bl	_list_add_tail
	add	w19, w19, #1
	cmp	w19, #17
	b.ne	LBB0_3
; %bb.5:
	add	x0, sp, #8
	mov	w1, #0
	bl	_i915_buddy_alloc
	mov	x20, x0
	bl	_IS_ERR
	mov	w19, #0
	cbnz	x0, LBB0_8
; %bb.6:
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_info
Lloh12:
	adrp	x1, _blocks@GOTPAGE
Lloh13:
	ldr	x1, [x1, _blocks@GOTPAGEOFF]
	mov	x0, x20
	bl	_list_add_tail
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_8
LBB0_7:
	str	x19, [sp]
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_info
	mov	x0, x21
	bl	_PTR_ERR
	mov	x19, x0
LBB0_8:
Lloh19:
	adrp	x1, _blocks@GOTPAGE
Lloh20:
	ldr	x1, [x1, _blocks@GOTPAGEOFF]
	add	x0, sp, #8
	bl	_i915_buddy_free_list
	add	x0, sp, #8
	bl	_i915_buddy_fini
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_blocks,4,2                     ; @blocks
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"buddy_init failed(%d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"buddy_alloc hit -ENOMEM with order=%d\n"

l_.str.2:                               ; @.str.2
	.asciz	"buddy_alloc unexpectedly succeeded, it should be full!"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_igt_buddy_alloc_optimistic
.subsections_via_symbols
