	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ds_put_context
_ds_put_context:                        ## @ds_put_context
	.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
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.1:
	movq	%rdi, %rbx
	movq	_ds_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	decq	16(%rbx)
	je	LBB0_2
## %bb.8:
	movq	_ds_lock@GOTPCREL(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	movq	8(%rbx), %rax
	movq	$0, (%rax)
	movq	(%rbx), %r14
	testq	%r14, %r14
	je	LBB0_5
## %bb.3:
	movq	_TIF_DS_AREA_MSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_clear_tsk_thread_flag
	movq	_ds_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
	movq	_current@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	je	LBB0_6
## %bb.4:
	movq	%r14, %rdi
	callq	_wait_task_context_switch
	jmp	LBB0_6
LBB0_5:
	movq	_ds_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
LBB0_6:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ds_lock,4,2                    ## @ds_lock
	.comm	_TIF_DS_AREA_MSR,4,2            ## @TIF_DS_AREA_MSR
	.comm	_current,8,3                    ## @current
	.no_dead_strip	_ds_put_context
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ds_put_context
_ds_put_context:                        ; @ds_put_context
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x0, _ds_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _ds_lock@GOTPAGEOFF]
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #16]
	subs	x8, x8, #1
	str	x8, [x19, #16]
	b.eq	LBB0_4
; %bb.2:
Lloh2:
	adrp	x0, _ds_lock@GOTPAGE
Lloh3:
	ldr	x0, [x0, _ds_lock@GOTPAGEOFF]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	x8, [x19, #8]
	str	xzr, [x8]
	ldr	x20, [x19]
	cbz	x20, LBB0_7
; %bb.5:
Lloh4:
	adrp	x8, _TIF_DS_AREA_MSR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _TIF_DS_AREA_MSR@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_clear_tsk_thread_flag
Lloh7:
	adrp	x0, _ds_lock@GOTPAGE
Lloh8:
	ldr	x0, [x0, _ds_lock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
Lloh9:
	adrp	x8, _current@GOTPAGE
Lloh10:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x20, x8
	b.eq	LBB0_8
; %bb.6:
	mov	x0, x20
	bl	_wait_task_context_switch
	b	LBB0_8
LBB0_7:
Lloh12:
	adrp	x0, _ds_lock@GOTPAGE
Lloh13:
	ldr	x0, [x0, _ds_lock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_kfree
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ds_lock,4,2                    ; @ds_lock
	.comm	_TIF_DS_AREA_MSR,4,2            ; @TIF_DS_AREA_MSR
	.comm	_current,8,3                    ; @current
	.no_dead_strip	_ds_put_context
.subsections_via_symbols
