	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_set_cur_database_dump          ## -- Begin function set_cur_database_dump
	.p2align	4, 0x90
_set_cur_database_dump:                 ## @set_cur_database_dump
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	testl	%edi, %edi
	setns	%al
	movq	_engine_n@GOTPCREL(%rip), %rcx
	cmpl	%edi, (%rcx)
	setg	%cl
	andb	%al, %cl
	movq	_database_dump_prefix@GOTPCREL(%rip), %r15
	cmpq	$0, (%r15)
	setne	%al
	andb	%cl, %al
	movzbl	%al, %edi
	callq	_assert
	movq	_fd@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_dump_fd@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	cmpl	$-1, (%rax,%rdi,4)
	je	LBB0_2
## %bb.1:
	callq	_dl_close_file
LBB0_2:
	movq	_verbosity@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_4
## %bb.3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	xorl	%eax, %eax
	callq	_dl_get_memory_used
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_fprintf
LBB0_4:
	movq	_dump_name@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	(%r15), %rcx
	leaq	L_.str.1(%rip), %rdx
	movl	$100, %esi
	movl	%ebx, %r8d
	callq	_snprintf
	movq	(%r12), %rdi
	movl	(%r14), %esi
	movl	$-1, %edx
	callq	_dl_open_file
	shrq	$63, %rax
	xorl	$1, %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_engine_n,4,2                   ## @engine_n
	.comm	_database_dump_prefix,8,3       ## @database_dump_prefix
	.comm	_fd,8,3                         ## @fd
	.comm	_dump_fd,8,3                    ## @dump_fd
	.comm	_verbosity,8,3                  ## @verbosity
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\nSwitching to database dump %d, memory_used = %lld\n"

	.comm	_dump_name,4,2                  ## @dump_name
L_.str.1:                               ## @.str.1
	.asciz	"%s%03d.dump"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_set_cur_database_dump          ; -- Begin function set_cur_database_dump
	.p2align	2
_set_cur_database_dump:                 ; @set_cur_database_dump
	.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, x0
	cmp	w0, #0
Lloh0:
	adrp	x8, _engine_n@GOTPAGE
Lloh1:
	ldr	x8, [x8, _engine_n@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ccmp	w8, w0, #4, ge
Lloh3:
	adrp	x22, _database_dump_prefix@GOTPAGE
Lloh4:
	ldr	x22, [x22, _database_dump_prefix@GOTPAGEOFF]
	ldr	x8, [x22]
	ccmp	x8, #0, #4, gt
	cset	w0, ne
	bl	_assert
Lloh5:
	adrp	x8, _fd@GOTPAGE
Lloh6:
	ldr	x8, [x8, _fd@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
Lloh8:
	adrp	x21, _dump_fd@GOTPAGE
Lloh9:
	ldr	x21, [x21, _dump_fd@GOTPAGEOFF]
	ldr	x0, [x21]
	ldr	w8, [x8, x0, lsl #2]
	cmn	w8, #1
	b.eq	LBB0_2
; %bb.1:
	bl	_dl_close_file
LBB0_2:
Lloh10:
	adrp	x8, _verbosity@GOTPAGE
Lloh11:
	ldr	x8, [x8, _verbosity@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x8, #1
	b.lt	LBB0_4
; %bb.3:
Lloh13:
	adrp	x8, _stderr@GOTPAGE
Lloh14:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh15:
	ldr	w20, [x8]
	bl	_dl_get_memory_used
	mov	x3, x0
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_fprintf
LBB0_4:
Lloh18:
	adrp	x20, _dump_name@GOTPAGE
Lloh19:
	ldr	x20, [x20, _dump_name@GOTPAGEOFF]
	ldr	w0, [x20]
	ldr	x3, [x22]
Lloh20:
	adrp	x2, l_.str.1@PAGE
Lloh21:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w1, #100
	mov	x4, x19
	bl	_snprintf
	ldr	x0, [x21]
	ldr	w1, [x20]
	mov	w2, #-1
	bl	_dl_open_file
	lsr	x8, x0, #63
	eor	w0, w8, #0x1
	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 AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_engine_n,4,2                   ; @engine_n
	.comm	_database_dump_prefix,8,3       ; @database_dump_prefix
	.comm	_fd,8,3                         ; @fd
	.comm	_dump_fd,8,3                    ; @dump_fd
	.comm	_verbosity,8,3                  ; @verbosity
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\nSwitching to database dump %d, memory_used = %lld\n"

	.comm	_dump_name,4,2                  ; @dump_name
l_.str.1:                               ; @.str.1
	.asciz	"%s%03d.dump"

.subsections_via_symbols
