	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __igt_write_huge
___igt_write_huge:                      ## @__igt_write_huge
	.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	%rdx, %r12
	movslq	(%rdi), %r13
	testq	%r13, %r13
	movl	%r8d, -56(%rbp)                 ## 4-byte Spill
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	jne	LBB0_2
## %bb.1:
	movq	(%rsi), %rax
	movq	(%rax), %r13
LBB0_2:
	movl	16(%rbp), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_PIN_USER@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_PIN_OFFSET_FIXED@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r12, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_i915_vma_instance
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.15:
	movq	%r14, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_3:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_i915_vma_unbind
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_4
LBB0_14:
	movq	%r14, %rdi
	callq	_i915_vma_destroy
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	movl	%r15d, %ecx
	movl	%eax, %r15d
	orl	%eax, %ecx
	orl	%ebx, %ecx
	movq	%r14, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	xorl	%edx, %edx
	callq	_i915_vma_pin
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movl	%eax, %r12d
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r12d, %eax
	jne	LBB0_14
## %bb.6:
	movq	%r13, %rdi
	callq	_i915_is_ggtt
	xorl	%ecx, %ecx
	testq	%rax, %rax
	cmovnel	%ecx, %r12d
	jmp	LBB0_14
LBB0_7:
	movq	%r14, %rdi
	callq	_igt_check_page_sizes
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.8:
	movq	%r14, %rbx
	movq	%r14, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %ecx
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %r8d
	callq	_gpu_write
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_12
LBB0_10:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	movl	%r13d, %edx
	callq	_cpu_check
	testl	%eax, %eax
	je	LBB0_16
## %bb.11:
	movl	%eax, %r12d
	leaq	L_.str.1(%rip), %rdi
LBB0_12:
	movq	%rbx, %r14
	movl	%r15d, %esi
	callq	_pr_err
LBB0_13:
	movq	%r14, %rdi
	callq	_i915_vma_unpin
	jmp	LBB0_14
LBB0_16:
	xorl	%r12d, %r12d
	movq	%rbx, %r14
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_PIN_USER,4,2                   ## @PIN_USER
	.comm	_PIN_OFFSET_FIXED,4,2           ## @PIN_OFFSET_FIXED
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gpu-write failed at offset=%llx\n"

L_.str.1:                               ## @.str.1
	.asciz	"cpu-check failed at offset=%llx\n"

	.no_dead_strip	___igt_write_huge
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __igt_write_huge
___igt_write_huge:                      ; @__igt_write_huge
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x25, x4
	mov	x28, x3
	mov	x23, x2
	mov	x24, x1
	mov	x26, x0
	ldrsw	x27, [x0]
	str	w6, [sp, #12]                   ; 4-byte Folded Spill
	mov	x22, x5
	cbnz	w27, LBB0_2
; %bb.1:
	ldr	x8, [x24]
	ldr	x27, [x8]
LBB0_2:
Lloh0:
	adrp	x8, _PIN_USER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PIN_USER@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
Lloh3:
	adrp	x8, _PIN_OFFSET_FIXED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PIN_OFFSET_FIXED@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	mov	x0, x23
	mov	x1, x27
	mov	x2, #0
	bl	_i915_vma_instance
	mov	x19, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_PTR_ERR
LBB0_4:
	str	w25, [sp, #8]                   ; 4-byte Folded Spill
	mov	x0, x19
	bl	_i915_vma_unbind
	mov	x25, x0
	cbz	w0, LBB0_6
LBB0_5:
	mov	x0, x19
	bl	_i915_vma_destroy
	mov	x0, x25
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_6:
	ldr	w8, [sp, #8]                    ; 4-byte Folded Reload
	orr	w8, w20, w8
	orr	w3, w8, w21
	mov	x0, x19
	mov	x1, x28
	mov	w2, #0
	bl	_i915_vma_pin
	cbz	w0, LBB0_9
; %bb.7:
	mov	x25, x0
Lloh6:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_5
; %bb.8:
	mov	x0, x27
	bl	_i915_is_ggtt
	cmp	x0, #0
	csel	w25, w25, wzr, eq
	b	LBB0_5
LBB0_9:
	mov	x0, x19
	bl	_igt_check_page_sizes
	mov	x25, x0
	cbnz	w0, LBB0_15
; %bb.10:
	mov	x0, x19
	mov	x1, x26
	mov	x2, x24
	mov	x3, x22
	ldr	w20, [sp, #12]                  ; 4-byte Folded Reload
	mov	x4, x20
	bl	_gpu_write
	cbz	w0, LBB0_12
; %bb.11:
	mov	x25, x0
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_14
LBB0_12:
	mov	x0, x23
	mov	x1, x22
	mov	x2, x20
	bl	_cpu_check
	mov	x25, x0
	cbz	w0, LBB0_15
; %bb.13:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_14:
	ldr	w1, [sp, #8]                    ; 4-byte Folded Reload
	bl	_pr_err
LBB0_15:
	mov	x0, x19
	bl	_i915_vma_unpin
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_PIN_USER,4,2                   ; @PIN_USER
	.comm	_PIN_OFFSET_FIXED,4,2           ; @PIN_OFFSET_FIXED
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gpu-write failed at offset=%llx\n"

l_.str.1:                               ; @.str.1
	.asciz	"cpu-check failed at offset=%llx\n"

	.no_dead_strip	___igt_write_huge
.subsections_via_symbols
