	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttm_bo_wait                    ## -- Begin function ttm_bo_wait
	.p2align	4, 0x90
_ttm_bo_wait:                           ## @ttm_bo_wait
	.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	%ecx, -72(%rbp)                 ## 4-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r12d
	movq	%rdi, %r14
	movq	16(%rdi), %rbx
	movq	8(%rbx), %r15
	xorl	%edi, %edi
	cmpq	$0, (%r14)
	sete	%dil
	callq	_likely
	xorl	%r13d, %r13d
	testq	%rax, %rax
	je	LBB0_1
LBB0_9:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%r12d, -68(%rbp)                ## 4-byte Spill
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.2:
	leaq	8(%r14), %r12
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r14), %rax
	movq	%rax, -64(%rbp)
	movq	$0, (%r14)
	movq	_TTM_BO_PRIV_FLAG_MOVING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_clear_bit
	movq	%rbx, %rdi
	callq	_spin_unlock
	leaq	-64(%rbp), %rdi
	callq	*8(%r15)
	movq	%rbx, %rdi
	callq	_spin_lock
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	callq	*24(%r15)
	testq	%rax, %rax
	jne	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, -72(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r14), %rdi
	callq	*16(%r15)
	movq	%rax, -56(%rbp)
	movq	%rbx, %rdi
	callq	_spin_unlock
	movq	-56(%rbp), %rdi
	movl	-68(%rbp), %esi                 ## 4-byte Reload
	movl	%r13d, %edx
	callq	*(%r15)
	movl	%eax, %r13d
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_spin_lock
	movq	(%r14), %rax
	xorl	%edi, %edi
	cmpq	-56(%rbp), %rax
	sete	%dil
	callq	_likely
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r14), %rax
	movq	%rax, -64(%rbp)
	movq	$0, (%r14)
	movq	_TTM_BO_PRIV_FLAG_MOVING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_clear_bit
	movq	%rbx, %rdi
	callq	_spin_unlock
	leaq	-56(%rbp), %rdi
	callq	*8(%r15)
	leaq	-64(%rbp), %rdi
	jmp	LBB0_15
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	callq	_spin_unlock
	leaq	-56(%rbp), %rdi
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	callq	*8(%r15)
	movq	%rbx, %rdi
	callq	_spin_lock
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	jmp	LBB0_5
LBB0_6:
	xorl	%r13d, %r13d
	jmp	LBB0_9
LBB0_8:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_9
LBB0_11:
	leaq	-56(%rbp), %rdi
	callq	*8(%r15)
	movq	%rbx, %rdi
	callq	_spin_lock
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_TTM_BO_PRIV_FLAG_MOVING,4,2    ## @TTM_BO_PRIV_FLAG_MOVING
	.comm	_EBUSY,4,2                      ## @EBUSY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttm_bo_wait                    ; -- Begin function ttm_bo_wait
	.p2align	2
_ttm_bo_wait:                           ; @ttm_bo_wait
	.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	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	ldr	x19, [x0, #16]
	ldr	x26, [x19, #8]
	ldr	x8, [x0]
	cmp	x8, #0
	cset	w0, eq
	bl	_likely
	cbz	x0, LBB0_3
LBB0_1:
	mov	w25, #0
LBB0_2:
	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_3:
	ldr	x0, [x23]
	cbz	x0, LBB0_1
; %bb.4:
	add	x24, x23, #8
Lloh0:
	adrp	x27, _TTM_BO_PRIV_FLAG_MOVING@GOTPAGE
Lloh1:
	ldr	x27, [x27, _TTM_BO_PRIV_FLAG_MOVING@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x23]
	str	x8, [sp]
	str	xzr, [x23]
	ldr	w0, [x27]
	mov	x1, x24
	bl	_clear_bit
	mov	x0, x19
	bl	_spin_unlock
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x26, #8]
	mov	x0, sp
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	blr	x8
	mov	x0, x19
	bl	_spin_lock
	ldr	x0, [x23]
	cbz	x0, LBB0_1
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x26, #24]
	blr	x8
	cbnz	x0, LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	cbnz	w20, LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x26, #16]
	ldr	x0, [x23]
	blr	x8
	str	x0, [sp, #8]
	mov	x0, x19
	bl	_spin_unlock
	ldr	x8, [x26]
	ldr	x0, [sp, #8]
	mov	x1, x22
	mov	x2, x21
	blr	x8
	mov	x25, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_15
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x19
	bl	_spin_lock
	ldr	x8, [x23]
	ldr	x9, [sp, #8]
	cmp	x8, x9
	cset	w0, eq
	bl	_likely
	cbz	x0, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x23]
	str	x8, [sp]
	str	xzr, [x23]
	ldr	w0, [x27]
	mov	x1, x24
	bl	_clear_bit
	mov	x0, x19
	bl	_spin_unlock
	ldr	x8, [x26, #8]
	add	x0, sp, #8
	blr	x8
	b	LBB0_6
LBB0_13:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x19
	bl	_spin_unlock
	ldr	x8, [x26, #8]
	add	x0, sp, #8
	b	LBB0_7
LBB0_14:
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_2
LBB0_15:
	ldr	x8, [x26, #8]
	add	x0, sp, #8
	blr	x8
	mov	x0, x19
	bl	_spin_lock
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_TTM_BO_PRIV_FLAG_MOVING,4,2    ; @TTM_BO_PRIV_FLAG_MOVING
	.comm	_EBUSY,4,2                      ; @EBUSY
.subsections_via_symbols
