	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___lwp_sema_seize               ## -- Begin function __lwp_sema_seize
	.p2align	4, 0x90
___lwp_sema_seize:                      ## @__lwp_sema_seize
	.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	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movq	__thr_executing@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	_LWP_SEMA_SUCCESSFUL@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	%rax, 16(%r14)
	callq	__CPU_ISR_Disable
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	decq	%rax
	movq	%rax, (%rbx)
	callq	__CPU_ISR_Restore
	movq	(%r15), %rax
	jmp	LBB0_5
LBB0_2:
	testq	%r12, %r12
	je	LBB0_3
## %bb.4:
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	___lwp_threadqueue_csenter
	movq	%rbx, 8(%r14)
	movq	%r13, (%r14)
	callq	__CPU_ISR_Restore
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	___lwp_threadqueue_enqueue
	movq	_LWP_SEMA_SUCCESSFUL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_5
LBB0_3:
	callq	__CPU_ISR_Restore
	movq	_LWP_SEMA_UNSATISFIED_NOWAIT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%r14)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	__thr_executing,8,3             ## @_thr_executing
	.comm	_LWP_SEMA_SUCCESSFUL,8,3        ## @LWP_SEMA_SUCCESSFUL
	.comm	_LWP_SEMA_UNSATISFIED_NOWAIT,8,3 ## @LWP_SEMA_UNSATISFIED_NOWAIT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___lwp_sema_seize               ; -- Begin function __lwp_sema_seize
	.p2align	2
___lwp_sema_seize:                      ; @__lwp_sema_seize
	.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	x19, x3
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, __thr_executing@GOTPAGE
Lloh1:
	ldr	x8, [x8, __thr_executing@GOTPAGEOFF]
Lloh2:
	ldr	x24, [x8]
Lloh3:
	adrp	x23, _LWP_SEMA_SUCCESSFUL@GOTPAGE
Lloh4:
	ldr	x23, [x23, _LWP_SEMA_SUCCESSFUL@GOTPAGEOFF]
	ldr	x8, [x23]
	str	x8, [x24, #16]
	bl	__CPU_ISR_Disable
	ldr	x8, [x21]
	cbz	x8, LBB0_2
; %bb.1:
	sub	x8, x8, #1
	str	x8, [x21]
	bl	__CPU_ISR_Restore
	b	LBB0_4
LBB0_2:
	cbz	x22, LBB0_6
; %bb.3:
	add	x21, x21, #8
	mov	x0, x21
	bl	___lwp_threadqueue_csenter
	stp	x20, x21, [x24]
	bl	__CPU_ISR_Restore
	mov	x0, x21
	mov	x1, x19
	bl	___lwp_threadqueue_enqueue
LBB0_4:
	ldr	x0, [x23]
LBB0_5:
	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
LBB0_6:
	bl	__CPU_ISR_Restore
Lloh5:
	adrp	x8, _LWP_SEMA_UNSATISFIED_NOWAIT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LWP_SEMA_UNSATISFIED_NOWAIT@GOTPAGEOFF]
Lloh7:
	ldr	x0, [x8]
	str	x0, [x24, #16]
	b	LBB0_5
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	__thr_executing,8,3             ; @_thr_executing
	.comm	_LWP_SEMA_SUCCESSFUL,8,3        ; @LWP_SEMA_SUCCESSFUL
	.comm	_LWP_SEMA_UNSATISFIED_NOWAIT,8,3 ; @LWP_SEMA_UNSATISFIED_NOWAIT
.subsections_via_symbols
