	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_local_id_by_legacy_id      ## -- Begin function get_local_id_by_legacy_id
	.p2align	4, 0x90
_get_local_id_by_legacy_id:             ## @get_local_id_by_legacy_id
	.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
	movq	%rsi, %r15
	movl	%edi, %r12d
	callq	_get_user
	xorl	%r14d, %r14d
	testq	%r15, %r15
	je	LBB0_29
## %bb.1:
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movl	8(%rbx), %edi
	movq	%r15, %rsi
	callq	_ltree_lookup_legacy
	testq	%rax, %rax
	je	LBB0_3
LBB0_28:
	movl	(%rax), %r14d
	jmp	LBB0_29
LBB0_5:
	movl	%r12d, %edi
	callq	_lookup_user_directory
	testq	%rax, %rax
	je	LBB0_29
LBB0_6:
	movl	%r12d, %edi
	callq	_load_user_metafile
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	(%rax), %rax
	jmp	LBB0_9
LBB0_3:
	movq	(%rbx), %r13
	movq	%rbx, %rdi
	callq	_get_user_metafile
	testq	%r13, %r13
	je	LBB0_29
## %bb.4:
	testq	%rax, %rax
	je	LBB0_6
LBB0_9:
	movq	_index_long_legacy_id@GOTPCREL(%rip), %rcx
	movq	_UserHdr@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movslq	(%rdx), %rsi
	addq	%rsi, %rax
	movl	4(%rdx), %edx
	subl	%esi, %edx
	cmpl	$0, (%rcx)
	je	LBB0_10
## %bb.19:
	cmpl	$12, %edx
	jl	LBB0_29
## %bb.20:
	movl	%edx, %ecx
	movl	$2863311531, %edx               ## imm = 0xAAAAAAAB
	imulq	%rcx, %rdx
	shrq	$35, %rdx
	movl	$-1, %ecx
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_21 Depth=1
	movl	%esi, %ecx
LBB0_24:                                ##   in Loop: Header=BB0_21 Depth=1
	movl	%edx, %esi
	subl	%ecx, %esi
	cmpl	$1, %esi
	jle	LBB0_25
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	leal	(%rdx,%rcx), %esi
	sarl	%esi
	leal	(%rsi,%rsi,2), %edi
	movslq	%edi, %rdi
	cmpq	%r15, (%rax,%rdi,4)
	jle	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	movl	%esi, %edx
	jmp	LBB0_24
LBB0_7:
	movl	$-2, %r14d
	jmp	LBB0_29
LBB0_10:
	cmpl	$8, %edx
	jl	LBB0_29
## %bb.11:
	shrl	$3, %edx
	movl	$-1, %ecx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	%esi, %ecx
LBB0_15:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	%edx, %esi
	subl	%ecx, %esi
	cmpl	$1, %esi
	jle	LBB0_16
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	leal	(%rdx,%rcx), %edi
	movl	%edi, %esi
	sarl	%esi
	andl	$-2, %edi
	movslq	%edi, %rdi
	movslq	(%rax,%rdi,4), %rdi
	cmpq	%r15, %rdi
	jle	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	%esi, %edx
	jmp	LBB0_15
LBB0_25:
	testl	%ecx, %ecx
	js	LBB0_29
## %bb.26:
	leal	(%rcx,%rcx,2), %ecx
	movslq	%ecx, %rcx
	cmpq	%r15, (%rax,%rcx,4)
	jne	LBB0_29
## %bb.27:
	leaq	(%rax,%rcx,4), %rax
	addq	$8, %rax
	jmp	LBB0_28
LBB0_16:
	testl	%ecx, %ecx
	js	LBB0_29
## %bb.17:
	addl	%ecx, %ecx
	movslq	%ecx, %rdx
	movslq	(%rax,%rdx,4), %rdx
	cmpq	%r15, %rdx
	jne	LBB0_29
## %bb.18:
	orl	$1, %ecx
	movslq	%ecx, %rcx
	leaq	(%rax,%rcx,4), %rax
	jmp	LBB0_28
LBB0_29:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_index_long_legacy_id,4,2       ## @index_long_legacy_id
	.comm	_UserHdr,8,3                    ## @UserHdr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_local_id_by_legacy_id      ; -- Begin function get_local_id_by_legacy_id
	.p2align	2
_get_local_id_by_legacy_id:             ; @get_local_id_by_legacy_id
	.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	x19, x1
	mov	x20, x0
	bl	_get_user
	cbz	x19, LBB0_23
; %bb.1:
	mov	x21, x0
	cbz	x0, LBB0_4
; %bb.2:
	ldr	w0, [x21, #8]
	mov	x1, x19
	bl	_ltree_lookup_legacy
	cbz	x0, LBB0_7
LBB0_3:
	ldr	w0, [x0]
	b	LBB0_24
LBB0_4:
	mov	x0, x20
	bl	_lookup_user_directory
	cbz	x0, LBB0_24
LBB0_5:
	mov	x0, x20
	bl	_load_user_metafile
	cbz	x0, LBB0_16
; %bb.6:
	ldr	x0, [x0]
	b	LBB0_9
LBB0_7:
	ldr	x22, [x21]
	mov	x0, x21
	bl	_get_user_metafile
	cbz	x22, LBB0_23
; %bb.8:
	cbz	x0, LBB0_5
LBB0_9:
Lloh0:
	adrp	x8, _index_long_legacy_id@GOTPAGE
Lloh1:
	ldr	x8, [x8, _index_long_legacy_id@GOTPAGEOFF]
Lloh2:
	adrp	x9, _UserHdr@GOTPAGE
Lloh3:
	ldr	x9, [x9, _UserHdr@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x8]
Lloh5:
	ldr	x8, [x9]
	ldp	w9, w11, [x8]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	add	x8, x0, x9
	sub	w9, w11, w9
	cbz	w10, LBB0_17
; %bb.10:
	cmp	w9, #12
	b.lt	LBB0_23
; %bb.11:
	mov	w10, #43691
	movk	w10, #43690, lsl #16
	umull	x9, w9, w10
	lsr	x10, x9, #35
	mov	w9, #-1
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	add	w11, w10, w9
	asr	w12, w11, #1
	and	w11, w11, #0xfffffffe
	add	w11, w11, w12
	sbfiz	x11, x11, #2, #32
	ldr	x11, [x8, x11]
	cmp	x11, x19
	csel	w9, w9, w12, gt
	csel	w10, w12, w10, gt
	sub	w11, w10, w9
	cmp	w11, #1
	b.gt	LBB0_12
; %bb.13:
	tbnz	w9, #31, LBB0_23
; %bb.14:
	sxtw	x10, w9
	add	x9, x10, w9, sxtw #1
	sxtw	x10, w9
	lsl	x10, x10, #2
	ldr	x10, [x8, x10]
	cmp	x10, x19
	b.ne	LBB0_23
; %bb.15:
	add	x8, x8, x9, lsl #2
	add	x0, x8, #8
	b	LBB0_3
LBB0_16:
	mov	w0, #-2
	b	LBB0_24
LBB0_17:
	cmp	w9, #8
	b.lt	LBB0_23
; %bb.18:
	lsr	w10, w9, #3
	mov	w9, #-1
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	add	w11, w10, w9
	and	w12, w11, #0xfffffffe
	ldrsw	x12, [x8, w12, sxtw #2]
	asr	w11, w11, #1
	cmp	x12, x19
	csel	w9, w9, w11, gt
	csel	w10, w11, w10, gt
	sub	w11, w10, w9
	cmp	w11, #1
	b.gt	LBB0_19
; %bb.20:
	tbnz	w9, #31, LBB0_23
; %bb.21:
	sbfiz	x9, x9, #1, #32
	ldrsw	x10, [x8, w9, sxtw #2]
	cmp	x10, x19
	b.ne	LBB0_23
; %bb.22:
	lsl	x9, x9, #2
	orr	x9, x9, #0x4
	add	x0, x8, x9
	b	LBB0_3
LBB0_23:
	mov	w0, #0
LBB0_24:
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_index_long_legacy_id,4,2       ; @index_long_legacy_id
	.comm	_UserHdr,8,3                    ; @UserHdr
.subsections_via_symbols
