	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CreateLWLocks                  ## -- Begin function CreateLWLocks
	.p2align	4, 0x90
_CreateLWLocks:                         ## @CreateLWLocks
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_LW_VAL_EXCLUSIVE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_MAX_BACKENDS@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setg	%dil
	leaq	L_.str(%rip), %rsi
	callq	_StaticAssertStmt
	movq	_LWLOCK_MINIMAL_SIZE@GOTPCREL(%rip), %rax
	cmpl	$4, (%rax)
	setae	%al
	movq	_LWLOCK_PADDED_SIZE@GOTPCREL(%rip), %rbx
	cmpl	$4, (%rbx)
	setae	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_StaticAssertStmt
	movq	_IsUnderPostmaster@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_5
## %bb.1:
	xorl	%eax, %eax
	callq	_LWLockShmemSize
	movl	%eax, %edi
	callq	_ShmemAlloc
	movq	%rax, %rcx
	addq	$4, %rcx
	movslq	(%rbx), %rsi
	movq	%rcx, %rax
	orq	%rsi, %rax
	shrq	$32, %rax
	je	LBB0_2
## %bb.3:
	movq	%rcx, %rax
	xorl	%edx, %edx
	divq	%rsi
	jmp	LBB0_4
LBB0_2:
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $edx killed $edx def $rdx
LBB0_4:
	subq	%rdx, %rsi
	leaq	(%rcx,%rsi), %rax
	movq	_MainLWLockArray@GOTPCREL(%rip), %rdx
	movq	%rax, (%rdx)
	movq	_LWTRANCHE_FIRST_USER_DEFINED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rcx,%rsi)
	xorl	%eax, %eax
	callq	_InitializeLWLocks
LBB0_5:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_RegisterLWLockTranches         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_LW_VAL_EXCLUSIVE,8,3           ## @LW_VAL_EXCLUSIVE
	.comm	_MAX_BACKENDS,8,3               ## @MAX_BACKENDS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MAX_BACKENDS too big for lwlock.c"

	.comm	_LWLOCK_MINIMAL_SIZE,4,2        ## @LWLOCK_MINIMAL_SIZE
	.comm	_LWLOCK_PADDED_SIZE,4,2         ## @LWLOCK_PADDED_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"Miscalculated LWLock padding"

	.comm	_IsUnderPostmaster,4,2          ## @IsUnderPostmaster
	.comm	_MainLWLockArray,8,3            ## @MainLWLockArray
	.comm	_LWTRANCHE_FIRST_USER_DEFINED,4,2 ## @LWTRANCHE_FIRST_USER_DEFINED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CreateLWLocks                  ; -- Begin function CreateLWLocks
	.p2align	2
_CreateLWLocks:                         ; @CreateLWLocks
	.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
Lloh0:
	adrp	x8, _LW_VAL_EXCLUSIVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LW_VAL_EXCLUSIVE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _MAX_BACKENDS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MAX_BACKENDS@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, gt
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_StaticAssertStmt
Lloh8:
	adrp	x8, _LWLOCK_MINIMAL_SIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LWLOCK_MINIMAL_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w8, #3
Lloh11:
	adrp	x19, _LWLOCK_PADDED_SIZE@GOTPAGE
Lloh12:
	ldr	x19, [x19, _LWLOCK_PADDED_SIZE@GOTPAGEOFF]
	ldr	w8, [x19]
	ccmp	w8, #3, #0, hi
	cset	w0, hi
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_StaticAssertStmt
Lloh15:
	adrp	x8, _IsUnderPostmaster@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IsUnderPostmaster@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cbnz	w8, LBB0_2
; %bb.1:
	bl	_LWLockShmemSize
	bl	_ShmemAlloc
	add	x8, x0, #4
	ldrsw	x9, [x19]
	udiv	x10, x8, x9
	neg	x11, x8
	madd	x10, x10, x9, x11
Lloh18:
	adrp	x11, _MainLWLockArray@GOTPAGE
Lloh19:
	ldr	x11, [x11, _MainLWLockArray@GOTPAGEOFF]
	add	x9, x9, x10
	add	x8, x8, x9
Lloh20:
	str	x8, [x11]
Lloh21:
	adrp	x9, _LWTRANCHE_FIRST_USER_DEFINED@GOTPAGE
Lloh22:
	ldr	x9, [x9, _LWTRANCHE_FIRST_USER_DEFINED@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	stur	w9, [x8, #-4]
	bl	_InitializeLWLocks
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_RegisterLWLockTranches
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotStr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_LW_VAL_EXCLUSIVE,8,3           ; @LW_VAL_EXCLUSIVE
	.comm	_MAX_BACKENDS,8,3               ; @MAX_BACKENDS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MAX_BACKENDS too big for lwlock.c"

	.comm	_LWLOCK_MINIMAL_SIZE,4,2        ; @LWLOCK_MINIMAL_SIZE
	.comm	_LWLOCK_PADDED_SIZE,4,2         ; @LWLOCK_PADDED_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"Miscalculated LWLock padding"

	.comm	_IsUnderPostmaster,4,2          ; @IsUnderPostmaster
	.comm	_MainLWLockArray,8,3            ; @MainLWLockArray
	.comm	_LWTRANCHE_FIRST_USER_DEFINED,4,2 ; @LWTRANCHE_FIRST_USER_DEFINED
.subsections_via_symbols
