	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__citrus_db_lookup              ## -- Begin function _citrus_db_lookup
	.p2align	4, 0x90
__citrus_db_lookup:                     ## @_citrus_db_lookup
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, %r14
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	leaq	8(%rdi), %rsi
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	callq	__memstream_bind
	movl	$32, %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	__memstream_getregion
	movq	%rax, %rbx
	movl	28(%rax), %edi
	callq	_be32toh
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %r13
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	testq	%r12, %r12
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_5
## %bb.2:
	movq	(%r12), %r14
	testq	%r14, %r14
	je	LBB0_5
## %bb.3:
	movq	8(%r12), %r15
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	__region_size
	cmpq	%rax, %r14
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	jb	LBB0_10
LBB0_4:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_5:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	*(%r15)
	movq	%rax, %rcx
	orq	%r13, %rcx
	shrq	$32, %rcx
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rcx
	xorl	%edx, %edx
	divq	%r13
	movq	%rdx, %r15
	jmp	LBB0_8
LBB0_7:
	movq	%rbx, %rcx
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r13d
	movl	%edx, %r15d
LBB0_8:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movl	24(%rcx), %edi
	callq	_be32toh
	movq	__CITRUS_DB_ENTRY_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r14
	imulq	%r15, %r14
	addq	%rax, %r14
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.9:
	movq	%r15, 8(%rbx)
LBB0_10:
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_12 Depth=1
	testq	%r14, %r14
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_4
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	__citrus_memory_stream_seek
	testq	%rax, %rax
	jne	LBB0_23
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	__CITRUS_DB_ENTRY_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	__memstream_getregion
	testq	%rax, %rax
	je	LBB0_23
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%rax, %r13
	movl	20(%rax), %edi
	callq	_be32toh
	movq	%rax, %r14
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%r14, (%rax)
	testq	%r14, %r14
	jne	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	__region_size
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
LBB0_17:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	16(%r13), %edi
	callq	_be32toh
	cmpq	%r15, %rax
	jne	LBB0_4
## %bb.18:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	12(%r13), %edi
	callq	_be32toh
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	__region_size
	cmpq	%rax, %rbx
	jne	LBB0_11
## %bb.19:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	8(%r13), %edi
	callq	_be32toh
	movq	_SEEK_SET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	__memstream_seek
	testq	%rax, %rax
	jne	LBB0_23
## %bb.20:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%r12, %rdi
	callq	__region_size
	movq	%rbx, %rdi
	leaq	-96(%rbp), %rbx
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	__memstream_getregion
	testq	%rax, %rax
	je	LBB0_23
## %bb.21:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%rbx, %rdi
	callq	__region_head
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	__region_head
	movl	%eax, %r15d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	__region_size
	movl	%ebx, %edi
	movl	%r15d, %esi
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%rax, %rdx
	callq	_memcmp
	testq	%rax, %rax
	jne	LBB0_11
## %bb.22:
	movl	4(%r13), %edi
	callq	_be32toh
	movq	_SEEK_SET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	leaq	-48(%rbp), %rdi
	movq	%rax, %rsi
	callq	__memstream_seek
	testq	%rax, %rax
	jne	LBB0_23
## %bb.26:
	movl	(%r13), %edi
	callq	_be32toh
	leaq	-48(%rbp), %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	%rax, %rdx
	callq	__memstream_getregion
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_25
LBB0_23:
	movq	_EFTYPE@GOTPCREL(%rip), %rax
LBB0_24:
	movl	(%rax), %eax
LBB0_25:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	__CITRUS_DB_ENTRY_SIZE,8,3      ## @_CITRUS_DB_ENTRY_SIZE
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_EFTYPE,4,2                     ## @EFTYPE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__citrus_db_lookup              ; -- Begin function _citrus_db_lookup
	.p2align	2
__citrus_db_lookup:                     ; @_citrus_db_lookup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x3
	mov	x19, x2
	mov	x21, x1
	mov	x24, x0
	add	x22, x0, #8
	add	x0, sp, #16
	mov	x1, x22
	bl	__memstream_bind
	add	x0, sp, #16
	mov	x1, #0
	mov	w2, #32
	bl	__memstream_getregion
	mov	x25, x0
	ldr	w0, [x0, #28]
	bl	_be32toh
	cbz	x0, LBB0_21
; %bb.1:
	mov	x26, x0
Lloh0:
	adrp	x27, __CITRUS_DB_ENTRY_SIZE@GOTPAGE
Lloh1:
	ldr	x27, [x27, __CITRUS_DB_ENTRY_SIZE@GOTPAGEOFF]
	cbz	x20, LBB0_5
; %bb.2:
	ldr	x23, [x20]
	cbz	x23, LBB0_5
; %bb.3:
	ldr	x28, [x20, #8]
	mov	x0, x22
	bl	__region_size
	cmp	x23, x0
	b.hs	LBB0_21
; %bb.4:
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
	b	LBB0_7
LBB0_5:
	ldr	x8, [x24]
	mov	x0, x21
	blr	x8
	udiv	x8, x0, x26
	msub	x28, x8, x26, x0
	ldr	w0, [x25, #24]
	bl	_be32toh
	ldr	x8, [x27]
	madd	x23, x8, x28, x0
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
	cbz	x20, LBB0_7
; %bb.6:
	str	x28, [x20, #8]
LBB0_7:
Lloh2:
	adrp	x19, _SEEK_SET@GOTPAGE
Lloh3:
	ldr	x19, [x19, _SEEK_SET@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	cbz	x23, LBB0_21
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x19]
	add	x0, sp, #16
	mov	x1, x23
	bl	__citrus_memory_stream_seek
	cbnz	x0, LBB0_20
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x2, [x27]
	add	x0, sp, #16
	mov	x1, #0
	bl	__memstream_getregion
	cbz	x0, LBB0_20
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x24, x0
	ldr	w0, [x0, #20]
	bl	_be32toh
	mov	x23, x0
	cbz	x20, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	str	x23, [x20]
	cbnz	x23, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x22
	bl	__region_size
	str	x0, [x20]
LBB0_14:                                ;   in Loop: Header=BB0_9 Depth=1
	ldr	w0, [x24, #16]
	bl	_be32toh
	cmp	x0, x28
	b.ne	LBB0_21
; %bb.15:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w0, [x24, #12]
	bl	_be32toh
	mov	x25, x0
	mov	x0, x21
	bl	__region_size
	cmp	x25, x0
	b.ne	LBB0_8
; %bb.16:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w0, [x24, #8]
	bl	_be32toh
	mov	x1, x0
	ldr	w2, [x19]
	add	x0, sp, #16
	bl	__memstream_seek
	cbnz	x0, LBB0_20
; %bb.17:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x21
	bl	__region_size
	mov	x2, x0
	add	x0, sp, #16
	add	x1, sp, #24
	bl	__memstream_getregion
	cbz	x0, LBB0_20
; %bb.18:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x0, sp, #24
	bl	__region_head
	mov	x25, x0
	mov	x0, x21
	bl	__region_head
	mov	x26, x0
	mov	x0, x21
	bl	__region_size
	mov	x2, x0
	mov	x0, x25
	mov	x1, x26
	bl	_memcmp
	cbnz	x0, LBB0_8
; %bb.19:
	ldr	w0, [x24, #4]
	bl	_be32toh
	mov	x1, x0
	ldr	w2, [x19]
	add	x0, sp, #16
	bl	__memstream_seek
	cbz	x0, LBB0_24
LBB0_20:
Lloh4:
	adrp	x8, _EFTYPE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EFTYPE@GOTPAGEOFF]
	b	LBB0_22
LBB0_21:
Lloh6:
	adrp	x8, _ENOENT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_22:
	ldr	w0, [x8]
LBB0_23:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_24:
	ldr	w0, [x24]
	bl	_be32toh
	mov	x2, x0
	add	x0, sp, #16
	ldr	x1, [sp, #8]                    ; 8-byte Folded Reload
	bl	__memstream_getregion
Lloh8:
	adrp	x8, _EFTYPE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EFTYPE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w0, w8, wzr, eq
	b	LBB0_23
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	__CITRUS_DB_ENTRY_SIZE,8,3      ; @_CITRUS_DB_ENTRY_SIZE
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_EFTYPE,4,2                     ; @EFTYPE
.subsections_via_symbols
