	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ttm_mem_io_reserve
_ttm_mem_io_reserve:                    ## @ttm_mem_io_reserve
	.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	(%rdi), %rax
	xorl	%ebx, %ebx
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.1:
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	(%rsi), %r15
	shlq	$2, %r15
	addq	8(%rdi), %r15
	movl	(%r15), %edi
	callq	_likely
	movq	(%r12), %rcx
	movq	(%rcx), %rcx
	testq	%rax, %rax
	je	LBB0_2
## %bb.9:
	movq	%r12, %rdi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rcx                           ## TAILCALL
LBB0_2:
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.3:
	movl	8(%r14), %eax
	leal	1(%rax), %edx
	movl	%edx, 8(%r14)
	testl	%eax, %eax
	je	LBB0_4
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	*%rcx
	movl	%eax, %ebx
	movq	_EAGAIN@GOTPCREL(%rip), %r13
	addl	(%r13), %eax
	jne	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_ttm_mem_io_evict
	testl	%eax, %eax
	jne	LBB0_7
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	(%r12), %rax
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	*(%rax)
	movl	%eax, %ebx
	addl	(%r13), %eax
	je	LBB0_6
	jmp	LBB0_8
LBB0_7:
	movl	%eax, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_ttm_mem_io_reserve
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ttm_mem_io_reserve
_ttm_mem_io_reserve:                    ; @ttm_mem_io_reserve
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x0]
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	x9, [x1]
	add	x21, x8, x9, lsl #2
	ldr	w0, [x21]
	bl	_likely
	ldr	x8, [x20]
	ldr	x2, [x8]
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	br	x2
LBB0_3:
	cbz	x2, LBB0_5
; %bb.4:
	ldr	w8, [x19, #8]
	add	w9, w8, #1
	str	w9, [x19, #8]
	cbz	w8, LBB0_7
LBB0_5:
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	x0, x20
	mov	x1, x19
	blr	x2
Lloh0:
	adrp	x22, _EAGAIN@GOTPAGE
Lloh1:
	ldr	x22, [x22, _EAGAIN@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22]
	cmn	w0, w8
	b.ne	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x21
	bl	_ttm_mem_io_evict
	cbnz	w0, LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x20]
	ldr	x8, [x8]
	mov	x0, x20
	mov	x1, x19
	blr	x8
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_ttm_mem_io_reserve
.subsections_via_symbols
