	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function igt_buddy_alloc_smoke
_igt_buddy_alloc_smoke:                 ## @igt_buddy_alloc_smoke
	.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
	leaq	-56(%rbp), %rdi
	leaq	-64(%rbp), %rsi
	callq	_igt_mm_config
	movl	-56(%rbp), %esi
	movq	-64(%rbp), %rdx
	leaq	L_.str(%rip), %rdi
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_pr_info
	movq	-56(%rbp), %rsi
	movq	-64(%rbp), %rdx
	leaq	-80(%rbp), %rdi
	callq	_i915_buddy_init
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_24
LBB0_2:
	movl	-80(%rbp), %ebx
	testl	%ebx, %ebx
	js	LBB0_23
## %bb.3:
	leaq	-80(%rbp), %r15
	movq	_ENOMEM@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movq	_blocks@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_LIST_HEAD
	movq	%r15, %rdi
	callq	_igt_check_mm
	testl	%eax, %eax
	jne	LBB0_5
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.3(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_info
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movl	%ebx, %r14d
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_i915_buddy_alloc
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movl	%eax, %r13d
	addl	(%r12), %eax
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=2
	addl	$-1, %r14d
	jb	LBB0_9
	jmp	LBB0_13
LBB0_14:                                ##   in Loop: Header=BB0_9 Depth=2
	movq	%rbx, %rdi
	movq	_blocks@GOTPCREL(%rip), %rsi
	callq	_list_add_tail
	movq	%rbx, %rdi
	callq	_i915_buddy_block_order
	cmpl	%r14d, %eax
	jne	LBB0_15
## %bb.18:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_i915_buddy_block_size
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	addq	%rax, %rcx
	movq	%rcx, %rax
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	cmpq	-72(%rbp), %rcx
	jl	LBB0_9
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.4(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_pr_info
	testl	%r13d, %r13d
	je	LBB0_19
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.5(%rip), %rdi
	movl	$-1, %esi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_pr_err
	testl	%r13d, %r13d
	jne	LBB0_17
LBB0_19:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	movq	_blocks@GOTPCREL(%rip), %rbx
	movq	%rbx, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	xorl	%ecx, %ecx
	callq	_igt_check_blocks
	movl	%eax, %r13d
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_i915_buddy_free_list
	testl	%r13d, %r13d
	jne	LBB0_23
## %bb.20:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	callq	_igt_check_mm
	testl	%eax, %eax
	jne	LBB0_21
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	leal	-1(%rcx), %eax
	testl	%ecx, %ecx
	movl	%eax, %ebx
	jg	LBB0_4
	jmp	LBB0_7
LBB0_15:                                ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_err
	xorl	%r13d, %r13d
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	testl	%r13d, %r13d
	je	LBB0_19
LBB0_17:
	movq	_blocks@GOTPCREL(%rip), %rsi
	leaq	-80(%rbp), %rdi
	callq	_i915_buddy_free_list
	jmp	LBB0_23
LBB0_5:
	movl	%eax, %r13d
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_22
LBB0_21:
	movl	%eax, %r13d
	leaq	L_.str.7(%rip), %rdi
LBB0_22:
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_23
LBB0_7:
	xorl	%r13d, %r13d
LBB0_23:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	movl	(%rax), %eax
	addl	%r13d, %eax
	cmovnel	%r13d, %ebx
	leaq	-80(%rbp), %rdi
	callq	_i915_buddy_fini
LBB0_24:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"buddy_init with size=%llx, chunk_size=%llx\n"

L_.str.1:                               ## @.str.1
	.asciz	"buddy_init failed(%d)\n"

	.comm	_blocks,4,2                     ## @blocks
L_.str.2:                               ## @.str.2
	.asciz	"pre-mm check failed, abort\n"

L_.str.3:                               ## @.str.3
	.asciz	"filling from max_order=%u\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.4:                               ## @.str.4
	.asciz	"buddy_alloc hit -ENOMEM with order=%d\n"

L_.str.5:                               ## @.str.5
	.asciz	"buddy_alloc with order=%d failed(%d)\n"

L_.str.6:                               ## @.str.6
	.asciz	"buddy_alloc order mismatch\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.7:                               ## @.str.7
	.asciz	"post-mm check failed\n"

	.no_dead_strip	_igt_buddy_alloc_smoke
.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_smoke
_igt_buddy_alloc_smoke:                 ; @igt_buddy_alloc_smoke
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	add	x0, sp, #16
	add	x1, sp, #24
	bl	_igt_mm_config
	ldr	w1, [sp, #16]
	ldr	x8, [sp, #24]
	str	x8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
	ldp	x1, x2, [sp, #16]
	add	x0, sp, #32
	bl	_i915_buddy_init
	cbz	w0, LBB0_2
; %bb.1:
	mov	x19, x0
	str	x19, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
	b	LBB0_23
LBB0_2:
	ldr	w19, [sp, #32]
	tbnz	w19, #31, LBB0_18
; %bb.3:
Lloh4:
	adrp	x20, _blocks@GOTPAGE
Lloh5:
	ldr	x20, [x20, _blocks@GOTPAGEOFF]
Lloh6:
	adrp	x21, l_.str.3@PAGE
Lloh7:
	add	x21, x21, l_.str.3@PAGEOFF
Lloh8:
	adrp	x28, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x28, [x28, _ENOMEM@GOTPAGEOFF]
Lloh10:
	adrp	x23, l_.str.4@PAGE
Lloh11:
	add	x23, x23, l_.str.4@PAGEOFF
	mov	w22, #-1
Lloh12:
	adrp	x24, l_.str.5@PAGE
Lloh13:
	add	x24, x24, l_.str.5@PAGEOFF
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	w0, [x20]
	bl	_LIST_HEAD
	add	x0, sp, #32
	bl	_igt_check_mm
	cbnz	w0, LBB0_19
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	x1, x19
	bl	_pr_info
	mov	x25, #0
	mov	x27, x19
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x0, sp, #32
	mov	x1, x27
	bl	_i915_buddy_alloc
	mov	x26, x0
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x26
	bl	_PTR_ERR
	mov	x26, x0
	ldr	w8, [x28]
	cmn	w0, w8
	b.eq	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	sub	w27, w27, #1
	cmn	w27, #1
	b.ne	LBB0_6
	b	LBB0_12
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x26
	mov	x1, x20
	bl	_list_add_tail
	mov	x0, x26
	bl	_i915_buddy_block_order
	cmp	w0, w27
	b.ne	LBB0_16
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=2
	add	x0, sp, #32
	mov	x1, x26
	bl	_i915_buddy_block_size
	ldr	x8, [sp, #40]
	add	x25, x0, x25
	cmp	x25, x8
	b.lt	LBB0_6
	b	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x23
	mov	x1, x27
	bl	_pr_info
	cbz	w26, LBB0_13
	b	LBB0_17
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	stp	x22, x26, [sp]
	mov	x0, x24
	bl	_pr_err
	cbnz	w26, LBB0_17
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x0, sp, #32
	mov	x1, x20
	mov	x2, x25
	mov	w3, #0
	bl	_igt_check_blocks
	mov	x26, x0
	add	x0, sp, #32
	mov	x1, x20
	bl	_i915_buddy_free_list
	cbnz	w26, LBB0_22
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x0, sp, #32
	bl	_igt_check_mm
	cbnz	w0, LBB0_20
; %bb.15:                               ;   in Loop: Header=BB0_4 Depth=1
	subs	w19, w19, #1
	b.ge	LBB0_4
	b	LBB0_18
LBB0_16:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh14:
	adrp	x0, l_.str.6@PAGE
Lloh15:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_pr_err
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w26, w8
	cbz	w26, LBB0_13
LBB0_17:
Lloh19:
	adrp	x1, _blocks@GOTPAGE
Lloh20:
	ldr	x1, [x1, _blocks@GOTPAGEOFF]
	add	x0, sp, #32
	bl	_i915_buddy_free_list
	b	LBB0_22
LBB0_18:
	mov	w26, #0
	b	LBB0_22
LBB0_19:
	mov	x26, x0
Lloh21:
	adrp	x0, l_.str.2@PAGE
Lloh22:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_21
LBB0_20:
	mov	x26, x0
Lloh23:
	adrp	x0, l_.str.7@PAGE
Lloh24:
	add	x0, x0, l_.str.7@PAGEOFF
LBB0_21:
	bl	_pr_err
LBB0_22:
Lloh25:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	cmn	w26, w8
	csel	w19, wzr, w26, eq
	add	x0, sp, #32
	bl	_i915_buddy_fini
LBB0_23:
	mov	x0, x19
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"buddy_init with size=%llx, chunk_size=%llx\n"

l_.str.1:                               ; @.str.1
	.asciz	"buddy_init failed(%d)\n"

	.comm	_blocks,4,2                     ; @blocks
l_.str.2:                               ; @.str.2
	.asciz	"pre-mm check failed, abort\n"

l_.str.3:                               ; @.str.3
	.asciz	"filling from max_order=%u\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.4:                               ; @.str.4
	.asciz	"buddy_alloc hit -ENOMEM with order=%d\n"

l_.str.5:                               ; @.str.5
	.asciz	"buddy_alloc with order=%d failed(%d)\n"

l_.str.6:                               ; @.str.6
	.asciz	"buddy_alloc order mismatch\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.7:                               ; @.str.7
	.asciz	"post-mm check failed\n"

	.no_dead_strip	_igt_buddy_alloc_smoke
.subsections_via_symbols
