	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function igt_gem_huge
_igt_gem_huge:                          ## @igt_gem_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	imull	$509, %edx, %esi                ## imm = 0x1FD
	addq	(%rdi), %rdx
	callq	_huge_gem_object
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.9:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	%r14, %rdi
	callq	_i915_gem_object_pin_pages
	movl	%eax, %r15d
	movl	(%r14), %eax
	movl	(%r12), %ecx
	testl	%r15d, %r15d
	je	LBB0_2
## %bb.10:
	xorl	%edx, %edx
	divl	%ecx
	leaq	L_.str(%rip), %rdi
	movl	$509, %esi                      ## imm = 0x1FD
	movl	%eax, %edx
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_8
LBB0_2:
	xorl	%r15d, %r15d
	cmpl	%eax, %ecx
	ja	LBB0_7
## %bb.3:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %r13d
	movq	%r13, %rax
	movl	$2160140723, %ecx               ## imm = 0x80C121B3
	imulq	%rcx, %rax
	shrq	$40, %rax
	imull	$-509, %eax, %r15d              ## imm = 0xFE03
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_i915_gem_object_get_page
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	addl	%ebx, %r15d
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_i915_gem_object_get_page
	cmpq	%rax, -48(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	incl	%ebx
	movl	(%r14), %eax
	xorl	%r15d, %r15d
	xorl	%edx, %edx
	divl	(%r12)
	cmpl	%eax, %ebx
	jb	LBB0_4
	jmp	LBB0_7
LBB0_5:
	movl	$2160140723, %eax               ## imm = 0x80C121B3
	imulq	%r13, %rax
	shrq	$40, %rax
	imull	$-509, %eax, %edx               ## imm = 0xFE03
	addl	%ebx, %edx
	leaq	L_.str.1(%rip), %rdi
	xorl	%r15d, %r15d
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_7:
	movq	%r14, %rdi
	callq	_i915_gem_object_unpin_pages
LBB0_8:
	movq	%r14, %rdi
	callq	_i915_gem_object_put
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate %u pages (%lu total), err=%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Page lookup mismatch at index %u [%u]\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function igt_gem_huge
_igt_gem_huge:                          ; @igt_gem_huge
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
Lloh0:
	adrp	x22, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w8, [x22]
	mov	w9, #509
	mul	w1, w8, w9
	ldr	x9, [x0]
	add	x2, x9, x8
	bl	_huge_gem_object
	mov	x19, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	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
	add	sp, sp, #96
	b	_PTR_ERR
LBB0_2:
	mov	x0, x19
	bl	_i915_gem_object_pin_pages
	ldr	w8, [x19]
	ldr	w9, [x22]
	cbz	w0, LBB0_4
; %bb.3:
	mov	x20, x0
	udiv	w2, w8, w9
	str	x20, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	w1, #509
	bl	_pr_err
	b	LBB0_11
LBB0_4:
	cmp	w9, w8
	b.hi	LBB0_8
; %bb.5:
	mov	w20, #0
	mov	w23, #8627
	movk	w23, #32961, lsl #16
	mov	w24, #-509
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	umull	x8, w20, w23
	lsr	x25, x8, #40
	mov	x0, x19
	mov	x1, x20
	bl	_i915_gem_object_get_page
	mov	x21, x0
	madd	w1, w25, w24, w20
	mov	x0, x19
	bl	_i915_gem_object_get_page
	cmp	x21, x0
	b.ne	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w20, w20, #1
	ldr	w8, [x19]
	ldr	w9, [x22]
	udiv	w8, w8, w9
	cmp	w20, w8
	b.lo	LBB0_6
LBB0_8:
	mov	w20, #0
	b	LBB0_10
LBB0_9:
	mov	w8, #8627
	movk	w8, #32961, lsl #16
	umull	x8, w20, w8
	lsr	x8, x8, #40
	mov	w9, #-509
	madd	w2, w8, w9, w20
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_pr_err
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_10:
	mov	x0, x19
	bl	_i915_gem_object_unpin_pages
LBB0_11:
	mov	x0, x19
	bl	_i915_gem_object_put
	mov	x0, x20
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate %u pages (%lu total), err=%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Page lookup mismatch at index %u [%u]\n"

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