	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LWP_CreateThread               ## -- Begin function LWP_CreateThread
	.p2align	4, 0x90
_LWP_CreateThread:                      ## @LWP_CreateThread
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$-1, %ebx
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	movq	%rsi, %r13
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.2:
	movl	%r9d, %r15d
	movq	%rdi, %r14
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	___lwp_cntrl_allocate
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movq	%rax, %r12
	movl	%r15d, %edi
	callq	___lwp_priotocore
	movq	_TRUE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movq	%r12, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, %ecx
	xorl	%r8d, %r8d
	callq	___lwp_thread_init
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	___lwp_thread_start
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	movq	_LWP_OBJTYPE_THREAD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_LWP_OBJMASKTYPE
	movl	%eax, %ebx
	movl	(%r12), %edi
	callq	_LWP_OBJMASKID
	orl	%ebx, %eax
	cltq
	movq	%rax, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_4:
	movq	%r12, %rdi
	callq	___lwp_cntrl_free
	movl	$-1, %ebx
LBB0_7:
	xorl	%eax, %eax
	callq	___lwp_thread_dispatchenable
LBB0_8:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_LWP_OBJTYPE_THREAD,4,2         ## @LWP_OBJTYPE_THREAD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LWP_CreateThread               ; -- Begin function LWP_CreateThread
	.p2align	2
_LWP_CreateThread:                      ; @LWP_CreateThread
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	w20, #-1
	cbz	x0, LBB0_9
; %bb.1:
	mov	x22, x1
	cbz	x1, LBB0_9
; %bb.2:
	mov	x25, x5
	mov	x23, x4
	mov	x24, x3
	mov	x21, x2
	mov	x19, x0
	bl	___lwp_cntrl_allocate
	cbz	x0, LBB0_6
; %bb.3:
	mov	x20, x0
	mov	x0, x25
	bl	___lwp_priotocore
	mov	x3, x0
Lloh0:
	adrp	x8, _TRUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh2:
	ldr	w5, [x8]
	mov	x0, x20
	mov	x1, x24
	mov	x2, x23
	mov	w4, #0
	bl	___lwp_thread_init
	cbz	x0, LBB0_7
; %bb.4:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x21
	bl	___lwp_thread_start
	cbz	x0, LBB0_7
; %bb.5:
Lloh3:
	adrp	x8, _LWP_OBJTYPE_THREAD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LWP_OBJTYPE_THREAD@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_LWP_OBJMASKTYPE
	mov	x21, x0
	ldr	w0, [x20]
	bl	_LWP_OBJMASKID
	mov	w20, #0
	orr	w8, w0, w21
	sxtw	x8, w8
	str	x8, [x19]
	b	LBB0_8
LBB0_6:
	mov	w20, #-1
	b	LBB0_9
LBB0_7:
	mov	x0, x20
	bl	___lwp_cntrl_free
	mov	w20, #-1
LBB0_8:
	bl	___lwp_thread_dispatchenable
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_LWP_OBJTYPE_THREAD,4,2         ; @LWP_OBJTYPE_THREAD
.subsections_via_symbols
