	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __ttm_write_lock
___ttm_write_lock:                      ## @__ttm_write_lock
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movl	16(%rbx), %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	12(%rbx), %edi
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_send_sig
	jmp	LBB0_7
LBB0_2:
	cmpl	$0, (%rbx)
	je	LBB0_5
## %bb.3:
	movq	_TTM_WRITE_LOCK_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	4(%rbx), %eax
	jmp	LBB0_4
LBB0_5:
	movl	4(%rbx), %eax
	movq	_TTM_WRITE_LOCK_PENDING@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ecx
	movl	%ecx, %esi
	notl	%esi
	testl	%esi, %eax
	je	LBB0_6
LBB0_4:
	orl	%ecx, %eax
	movl	%eax, 4(%rbx)
	xorl	%ebx, %ebx
LBB0_7:
	movq	%r14, %rdi
	callq	_spin_unlock
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	movl	$-1, (%rbx)
	movl	(%rdx), %ecx
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, 4(%rbx)
	movl	$1, %ebx
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_current,4,2                    ## @current
	.comm	_TTM_WRITE_LOCK_PENDING,4,2     ## @TTM_WRITE_LOCK_PENDING
	.no_dead_strip	___ttm_write_lock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __ttm_write_lock
___ttm_write_lock:                      ; @__ttm_write_lock
	.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
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_spin_lock
	ldr	w0, [x20, #16]
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x20, #12]
Lloh0:
	adrp	x8, _current@GOTPAGE
Lloh1:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_send_sig
	mov	w21, #0
	b	LBB0_6
LBB0_2:
	ldr	w8, [x20]
	cbz	w8, LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _TTM_WRITE_LOCK_PENDING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TTM_WRITE_LOCK_PENDING@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x8]
	ldr	w8, [x20, #4]
	b	LBB0_5
LBB0_4:
	ldr	w8, [x20, #4]
Lloh6:
	adrp	x10, _TTM_WRITE_LOCK_PENDING@GOTPAGE
Lloh7:
	ldr	x10, [x10, _TTM_WRITE_LOCK_PENDING@GOTPAGEOFF]
	ldr	w9, [x10]
	bics	wzr, w8, w9
	b.eq	LBB0_7
LBB0_5:
	mov	w21, #0
	orr	w8, w8, w9
	str	w8, [x20, #4]
LBB0_6:
	mov	x0, x19
	bl	_spin_unlock
	mov	x0, x21
	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	w9, #-1
	str	w9, [x20]
	ldr	w9, [x10]
	bic	w8, w8, w9
	str	w8, [x20, #4]
	mov	w21, #1
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_current,4,2                    ; @current
	.comm	_TTM_WRITE_LOCK_PENDING,4,2     ; @TTM_WRITE_LOCK_PENDING
	.no_dead_strip	___ttm_write_lock
.subsections_via_symbols
