	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ttm_put_pages
_ttm_put_pages:                         ## @ttm_put_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r13d
	movq	%rdi, %r14
	movl	%edx, %edi
	xorl	%esi, %esi
	movl	%ecx, %edx
	callq	_ttm_get_pool
	testq	%rax, %rax
	je	LBB0_1
## %bb.8:
	movq	%rax, %rbx
	leaq	4(%rax), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	testl	%r13d, %r13d
	je	LBB0_15
## %bb.9:
	movq	%rbx, %r12
	addq	$8, %r12
	movl	%r13d, %r15d
	xorl	%r13d, %r13d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	(%r14,%r13,8), %rdi
	movq	%r12, %rsi
	callq	_list_add_tail
	movq	$0, (%r14,%r13,8)
	incl	(%rbx)
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	incq	%r13
	cmpq	%r13, %r15
	je	LBB0_15
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r14,%r13,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	callq	_page_count
	cmpl	$1, %eax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	jmp	LBB0_13
LBB0_15:
	movl	(%rbx), %r15d
	movq	__manager@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %r12d
	movl	%r15d, %r14d
	subl	%r12d, %r14d
	movq	_NUM_PAGES_TO_ALLOC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %r14d
	cmovbel	%eax, %r14d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	cmpl	%r12d, %r15d
	jbe	LBB0_17
## %bb.16:
	testl	%r14d, %r14d
	je	LBB0_17
## %bb.18:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ttm_page_pool_free             ## TAILCALL
LBB0_1:
	testl	%r13d, %r13d
	je	LBB0_17
## %bb.2:
	movl	%r13d, %r15d
	xorl	%ebx, %ebx
	leaq	L_.str(%rip), %r12
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r14,%rbx,8), %rdi
	xorl	%esi, %esi
	callq	___free_pages
	movq	$0, (%r14,%rbx,8)
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	cmpq	%rbx, %r15
	je	LBB0_17
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	callq	_page_count
	cmpl	$1, %eax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	callq	_pr_err
	jmp	LBB0_6
LBB0_17:
	addq	$8, %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	"Erroneous page count. Leaking pages.\n"

	.comm	__manager,8,3                   ## @_manager
	.comm	_NUM_PAGES_TO_ALLOC,4,2         ## @NUM_PAGES_TO_ALLOC
	.comm	_HPAGE_PMD_NR,4,2               ## @HPAGE_PMD_NR
	.comm	_HPAGE_PMD_ORDER,4,2            ## @HPAGE_PMD_ORDER
	.comm	_TTM_PAGE_FLAG_DMA32,4,2        ## @TTM_PAGE_FLAG_DMA32
	.no_dead_strip	_ttm_put_pages
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ttm_put_pages
_ttm_put_pages:                         ; @ttm_put_pages
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x23, x1
	mov	x19, x0
	mov	x0, x2
	mov	w1, #0
	mov	x2, x3
	bl	_ttm_get_pool
	cbz	x0, LBB0_10
; %bb.1:
	mov	x20, x0
	add	x21, x0, #4
	mov	x0, x21
	bl	_spin_lock_irqsave
	cbz	w23, LBB0_8
; %bb.2:
	add	x22, x20, #8
	mov	w24, w23
Lloh0:
	adrp	x23, l_.str@PAGE
Lloh1:
	add	x23, x23, l_.str@PAGEOFF
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x19]
	mov	x1, x22
	bl	_list_add_tail
	str	xzr, [x19]
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x19, x19, #8
	subs	x24, x24, #1
	b.eq	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19]
	cbz	x0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	bl	_page_count
	cmp	w0, #1
	b.eq	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x23
	bl	_pr_err
	b	LBB0_3
LBB0_8:
	ldr	w22, [x20]
Lloh2:
	adrp	x8, __manager@GOTPAGE
Lloh3:
	ldr	x8, [x8, __manager@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	ldr	w23, [x8]
	subs	w8, w22, w23
Lloh5:
	adrp	x9, _NUM_PAGES_TO_ALLOC@GOTPAGE
Lloh6:
	ldr	x9, [x9, _NUM_PAGES_TO_ALLOC@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w19, w8, w9, hi
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	cmp	w22, w23
	ccmp	w19, #0, #4, hi
	b.eq	LBB0_17
; %bb.9:
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ttm_page_pool_free
LBB0_10:
	cbz	w23, LBB0_17
; %bb.11:
	mov	w21, w23
Lloh8:
	adrp	x20, l_.str@PAGE
Lloh9:
	add	x20, x20, l_.str@PAGEOFF
	b	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	x0, [x19]
	mov	w1, #0
	bl	___free_pages
	str	xzr, [x19]
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x19, x19, #8
	subs	x21, x21, #1
	b.eq	LBB0_17
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19]
	cbz	x0, LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	bl	_page_count
	cmp	w0, #1
	b.eq	LBB0_12
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x0, x20
	bl	_pr_err
	b	LBB0_12
LBB0_17:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Erroneous page count. Leaking pages.\n"

	.comm	__manager,8,3                   ; @_manager
	.comm	_NUM_PAGES_TO_ALLOC,4,2         ; @NUM_PAGES_TO_ALLOC
	.comm	_HPAGE_PMD_NR,4,2               ; @HPAGE_PMD_NR
	.comm	_HPAGE_PMD_ORDER,4,2            ; @HPAGE_PMD_ORDER
	.comm	_TTM_PAGE_FLAG_DMA32,4,2        ; @TTM_PAGE_FLAG_DMA32
	.no_dead_strip	_ttm_put_pages
.subsections_via_symbols
