	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function deduceDatabaseType
LCPI0_0:
	.long	80                              ## 0x50
	.long	75                              ## 0x4b
	.long	5                               ## 0x5
	.long	6                               ## 0x6
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_deduceDatabaseType
	.p2align	4, 0x90
_deduceDatabaseType:                    ## @deduceDatabaseType
	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	L_.str(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_1
## %bb.4:
	movq	%rax, %rbx
	movq	_SHELL_OPEN_UNSPEC@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	leaq	-160(%rbp), %rdi
	movl	$16, %esi
	movl	$1, %edx
	movq	%rbx, %rcx
	callq	_fread
	cmpq	$1, %rax
	jne	LBB0_8
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	leaq	-160(%rbp), %rdi
	movl	$16, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_6
LBB0_8:
	movq	_SEEK_END@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%rbx, %rdi
	movl	$-25, %esi
	callq	_fseek
	leaq	-160(%rbp), %rdi
	movl	$25, %esi
	movl	$1, %edx
	movq	%rbx, %rcx
	callq	_fread
	cmpq	$1, %rax
	jne	LBB0_11
## %bb.9:
	leaq	L_.str.3(%rip), %rsi
	leaq	-160(%rbp), %rdi
	movl	$17, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_10
LBB0_11:
	movl	(%r13), %edx
	movq	%rbx, %rdi
	movl	$-22, %esi
	callq	_fseek
	leaq	-160(%rbp), %rdi
	movl	$22, %esi
	movl	$1, %edx
	movq	%rbx, %rcx
	callq	_fread
	cmpq	$1, %rax
	jne	LBB0_16
## %bb.12:
	pmovzxbd	-160(%rbp), %xmm0               ## xmm0 = mem[0],zero,zero,zero,mem[1],zero,zero,zero,mem[2],zero,zero,zero,mem[3],zero,zero,zero
	pcmpeqd	LCPI0_0(%rip), %xmm0
	movmskps	%xmm0, %ecx
	testb	$1, %cl
	je	LBB0_16
## %bb.13:
	movl	%ecx, %edx
	andb	$2, %dl
	shrb	%dl
	je	LBB0_16
## %bb.14:
	movl	%ecx, %edx
	andb	$4, %dl
	shrb	$2, %dl
	je	LBB0_16
## %bb.15:
	shrb	$3, %cl
	jne	LBB0_19
LBB0_16:
	testl	%r12d, %r12d
	je	LBB0_21
## %bb.17:
	testq	%rax, %rax
	jne	LBB0_21
## %bb.18:
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_sqlite3_strlike
	testq	%rax, %rax
	jne	LBB0_21
LBB0_19:
	movq	_SHELL_OPEN_ZIPFILE@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_1:
	testl	%r12d, %r12d
	je	LBB0_7
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_sqlite3_strlike
	testq	%rax, %rax
	jne	LBB0_7
## %bb.3:
	movq	_SHELL_OPEN_ZIPFILE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_22
LBB0_6:
	movq	%rbx, %rdi
	callq	_fclose
LBB0_7:
	movq	_SHELL_OPEN_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_22
LBB0_10:
	movq	_SHELL_OPEN_APPENDVFS@GOTPCREL(%rip), %rax
LBB0_20:
	movl	(%rax), %r14d
LBB0_21:
	movq	%rbx, %rdi
	callq	_fclose
LBB0_22:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_24
## %bb.23:
	movl	%r14d, %eax
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rb"

	.comm	_SHELL_OPEN_UNSPEC,4,2          ## @SHELL_OPEN_UNSPEC
L_.str.1:                               ## @.str.1
	.asciz	"%.zip"

	.comm	_SHELL_OPEN_ZIPFILE,4,2         ## @SHELL_OPEN_ZIPFILE
	.comm	_SHELL_OPEN_NORMAL,4,2          ## @SHELL_OPEN_NORMAL
L_.str.2:                               ## @.str.2
	.asciz	"SQLite format 3"

	.comm	_SEEK_END,4,2                   ## @SEEK_END
L_.str.3:                               ## @.str.3
	.asciz	"Start-Of-SQLite3-"

	.comm	_SHELL_OPEN_APPENDVFS,4,2       ## @SHELL_OPEN_APPENDVFS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_deduceDatabaseType             ; -- Begin function deduceDatabaseType
	.p2align	2
_deduceDatabaseType:                    ; @deduceDatabaseType
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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	x22, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_11
; %bb.1:
	mov	x20, x0
Lloh5:
	adrp	x8, _SHELL_OPEN_UNSPEC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SHELL_OPEN_UNSPEC@GOTPAGEOFF]
Lloh7:
	ldr	w19, [x8]
	add	x0, sp, #4
	mov	w1, #16
	mov	w2, #1
	mov	x3, x20
	bl	_fread
	cmp	x0, #1
	b.ne	LBB0_3
; %bb.2:
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x0, sp, #4
	mov	w2, #16
	bl	_memcmp
	cbz	x0, LBB0_17
LBB0_3:
Lloh10:
	adrp	x23, _SEEK_END@GOTPAGE
Lloh11:
	ldr	x23, [x23, _SEEK_END@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x20
	mov	w1, #-25
	bl	_fseek
	add	x0, sp, #4
	mov	w1, #25
	mov	w2, #1
	mov	x3, x20
	bl	_fread
	cmp	x0, #1
	b.ne	LBB0_5
; %bb.4:
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	add	x0, sp, #4
	mov	w2, #17
	bl	_memcmp
	cbz	x0, LBB0_19
LBB0_5:
	ldr	w2, [x23]
	mov	x0, x20
	mov	w1, #-22
	bl	_fseek
	add	x0, sp, #4
	mov	w1, #22
	mov	w2, #1
	mov	x3, x20
	bl	_fread
	cmp	x0, #1
	b.ne	LBB0_14
; %bb.6:
	ldrb	w8, [sp, #4]
	cmp	w8, #80
	b.ne	LBB0_14
; %bb.7:
	ldrb	w8, [sp, #5]
	cmp	w8, #75
	b.ne	LBB0_14
; %bb.8:
	ldrb	w8, [sp, #6]
	cmp	w8, #5
	b.ne	LBB0_14
; %bb.9:
	ldrb	w8, [sp, #7]
	cmp	w8, #6
	b.ne	LBB0_14
; %bb.10:
Lloh14:
	adrp	x8, _SHELL_OPEN_ZIPFILE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SHELL_OPEN_ZIPFILE@GOTPAGEOFF]
	b	LBB0_20
LBB0_11:
	cbz	w22, LBB0_18
; %bb.12:
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	mov	w2, #0
	bl	_sqlite3_strlike
	cbnz	x0, LBB0_18
; %bb.13:
Lloh18:
	adrp	x8, _SHELL_OPEN_ZIPFILE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SHELL_OPEN_ZIPFILE@GOTPAGEOFF]
Lloh20:
	ldr	w19, [x8]
	b	LBB0_22
LBB0_14:
	cbz	w22, LBB0_21
; %bb.15:
	cbnz	x0, LBB0_21
; %bb.16:
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	mov	w2, #0
	bl	_sqlite3_strlike
Lloh23:
	adrp	x8, _SHELL_OPEN_ZIPFILE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SHELL_OPEN_ZIPFILE@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w19, w8, w19, eq
	b	LBB0_21
LBB0_17:
	mov	x0, x20
	bl	_fclose
LBB0_18:
Lloh26:
	adrp	x8, _SHELL_OPEN_NORMAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _SHELL_OPEN_NORMAL@GOTPAGEOFF]
Lloh28:
	ldr	w19, [x8]
	b	LBB0_22
LBB0_19:
Lloh29:
	adrp	x8, _SHELL_OPEN_APPENDVFS@GOTPAGE
Lloh30:
	ldr	x8, [x8, _SHELL_OPEN_APPENDVFS@GOTPAGEOFF]
LBB0_20:
	ldr	w19, [x8]
LBB0_21:
	mov	x0, x20
	bl	_fclose
LBB0_22:
	ldur	x8, [x29, #-56]
Lloh31:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh32:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_24
; %bb.23:
	mov	x0, x19
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_24:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rb"

	.comm	_SHELL_OPEN_UNSPEC,4,2          ; @SHELL_OPEN_UNSPEC
l_.str.1:                               ; @.str.1
	.asciz	"%.zip"

	.comm	_SHELL_OPEN_ZIPFILE,4,2         ; @SHELL_OPEN_ZIPFILE
	.comm	_SHELL_OPEN_NORMAL,4,2          ; @SHELL_OPEN_NORMAL
l_.str.2:                               ; @.str.2
	.asciz	"SQLite format 3"

	.comm	_SEEK_END,4,2                   ; @SEEK_END
l_.str.3:                               ; @.str.3
	.asciz	"Start-Of-SQLite3-"

	.comm	_SHELL_OPEN_APPENDVFS,4,2       ; @SHELL_OPEN_APPENDVFS
.subsections_via_symbols
