	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ttm_dma_pool_alloc_new_pages
_ttm_dma_pool_alloc_new_pages:          ## @ttm_dma_pool_alloc_new_pages
	.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
	movl	%edx, %ebx
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	sarl	$3, %esi
	movl	%edx, %edi
	callq	_min
	movl	%eax, %r14d
	leal	(,%r14,8), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	cmpl	$2, %ebx
	jb	LBB0_10
## %bb.3:
	movl	(%r15), %esi
	movl	4(%r15), %edx
	movq	_current@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %ecx
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %r8d
	callq	_pr_debug
	jmp	LBB0_4
LBB0_1:
	movl	(%r15), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pr_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_21
LBB0_10:
	testl	%ebx, %ebx
	je	LBB0_11
LBB0_4:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	%edx, %r14d
	movq	%r13, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_list_add
	incl	%r12d
	cmpl	%r12d, %ebx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_16
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	___ttm_dma_alloc_page
	testq	%rax, %rax
	je	LBB0_6
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %r13
	movq	8(%rax), %rax
	movl	%r14d, %edx
	movl	%r14d, %ecx
	incl	%edx
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%rax, (%r15,%rcx,8)
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	cmpl	%r14d, %edx
	jne	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_ttm_set_pages_caching
	xorl	%edx, %edx
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	movl	%eax, %ebx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r15, %rdx
	movl	%r14d, %ecx
	callq	_ttm_dma_handle_caching_state_failure
	movq	%r15, %r12
	jmp	LBB0_20
LBB0_6:
	movl	(%r15), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_pr_err
	testl	%r14d, %r14d
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_9
## %bb.7:
	movl	%r14d, %edx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_ttm_set_pages_caching
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movq	%r15, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r12, %rdx
	movl	%r14d, %ecx
	callq	_ttm_dma_handle_caching_state_failure
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_20
LBB0_16:
	xorl	%ebx, %ebx
	testl	%r14d, %r14d
	je	LBB0_17
## %bb.18:
	movq	%r15, %rdi
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rsi
	movl	%r14d, %edx
	callq	_ttm_set_pages_caching
	testl	%eax, %eax
	je	LBB0_20
## %bb.19:
	movq	%r15, %rdi
	movl	%eax, %r15d
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r12, %rdx
	movl	%r14d, %ecx
	callq	_ttm_dma_handle_caching_state_failure
	movl	%r15d, %ebx
	jmp	LBB0_20
LBB0_11:
	xorl	%ebx, %ebx
	jmp	LBB0_20
LBB0_17:
	movq	-48(%rbp), %r12                 ## 8-byte Reload
LBB0_20:
	movq	%r12, %rdi
	callq	_kfree
LBB0_21:
	movl	%ebx, %eax
	addq	$40, %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
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Unable to allocate table for new pages\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"%s: (%s:%d) Getting %d pages\n"

	.comm	_current,8,3                    ## @current
L_.str.2:                               ## @.str.2
	.asciz	"%s: Unable to get page %u\n"

	.no_dead_strip	_ttm_dma_pool_alloc_new_pages
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ttm_dma_pool_alloc_new_pages
_ttm_dma_pool_alloc_new_pages:          ; @ttm_dma_pool_alloc_new_pages
	.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	x22, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	asr	w1, w8, #3
	mov	x0, x2
	bl	_min
	mov	x23, x0
	lsl	w0, w0, #3
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_kmalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	cmp	w22, #2
	b.lo	LBB0_4
; %bb.2:
	ldp	w1, w2, [x21]
Lloh6:
	adrp	x8, _current@GOTPAGE
Lloh7:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	w3, [x8]
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x4, x22
	bl	_pr_debug
	b	LBB0_5
LBB0_3:
	ldr	w1, [x21]
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_22
LBB0_4:
	cbz	w22, LBB0_18
LBB0_5:
	mov	w24, #0
	mov	w27, #0
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x26
	mov	x1, x20
	bl	_list_add
	add	w27, w27, #1
	cmp	w22, w27
	b.eq	LBB0_15
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	___ttm_dma_alloc_page
	cbz	x0, LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x26, x0
	ldr	x8, [x0, #8]
	str	x8, [x19, w24, uxtw #3]
	add	w8, w24, #1
	mov	x24, x8
	cmp	w8, w23
	b.ne	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x21
	mov	x1, x19
	mov	x2, x23
	bl	_ttm_set_pages_caching
	cbnz	w0, LBB0_19
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	w24, #0
	b	LBB0_6
LBB0_11:
	ldr	w1, [x21]
	str	x27, [sp]
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_err
	cbz	w24, LBB0_14
; %bb.12:
	mov	x0, x21
	mov	x1, x19
	mov	x2, x24
	bl	_ttm_set_pages_caching
	cbz	w0, LBB0_14
; %bb.13:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	x3, x24
	bl	_ttm_dma_handle_caching_state_failure
LBB0_14:
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_21
LBB0_15:
	cbz	w24, LBB0_18
; %bb.16:
	mov	x0, x21
	mov	x1, x19
	mov	x2, x24
	bl	_ttm_set_pages_caching
	mov	x25, x0
	cbz	w0, LBB0_21
; %bb.17:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	x3, x24
	b	LBB0_20
LBB0_18:
	mov	w25, #0
	b	LBB0_21
LBB0_19:
	mov	x25, x0
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	x3, x23
LBB0_20:
	bl	_ttm_dma_handle_caching_state_failure
LBB0_21:
	mov	x0, x19
	bl	_kfree
LBB0_22:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Unable to allocate table for new pages\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"%s: (%s:%d) Getting %d pages\n"

	.comm	_current,8,3                    ; @current
l_.str.2:                               ; @.str.2
	.asciz	"%s: Unable to get page %u\n"

	.no_dead_strip	_ttm_dma_pool_alloc_new_pages
.subsections_via_symbols
