	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_make_empty_binlogs             ## -- Begin function make_empty_binlogs
	.p2align	4, 0x90
_make_empty_binlogs:                    ## @make_empty_binlogs
	.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
	movl	$65608, %eax                    ## imm = 0x10048
	callq	____chkstk_darwin
	subq	%rax, %rsp
	popq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movq	%rsi, -65648(%rbp)              ## 8-byte Spill
	movl	%edi, %r12d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	%edx, -65620(%rbp)
	leal	-1(%r12), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	leaq	-80(%rbp), %r14
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_sprintf
	movq	%r14, %rdi
	callq	_strlen
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_sprintf
	imull	$1000, %ebx, %eax               ## imm = 0x3E8
	cltq
	movq	%rax, -65632(%rbp)
	testl	%r12d, %r12d
	jle	LBB0_9
## %bb.1:
	movq	_LEV_STORAGE_START_SIZE@GOTPCREL(%rip), %rbx
	xorl	%r15d, %r15d
	movq	%r12, -65640(%rbp)              ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leaq	-65616(%rbp), %r14
	movq	%r14, %rdi
	leaq	-80(%rbp), %rsi
	movq	-65648(%rbp), %rdx              ## 8-byte Reload
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_sprintf
	movq	%r14, %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_strcat
	movq	(%rbx), %rdi
	callq	_malloc
	movq	%rax, %r13
	movq	_LEV_START@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%r13)
	movq	_STORAGE_SCHEMA_V1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r13)
	movl	$12, (%r13)
	movl	%r12d, 4(%r13)
	movl	%r15d, 8(%r13)
	incl	%r15d
	movl	%r15d, 12(%r13)
	movq	%rbx, %r12
	movq	16(%r13), %rbx
	movq	%rbx, %rdi
	leaq	-65632(%rbp), %rsi
	movl	$8, %edx
	xorl	%eax, %eax
	callq	_memcpy
	addq	$32, %rbx
	movq	%rbx, %rdi
	leaq	-65620(%rbp), %rsi
	movl	$4, %edx
	xorl	%eax, %eax
	callq	_memcpy
	movq	%r14, %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r14
	movq	(%r12), %rdx
	movq	%r13, %rdi
	movl	$1, %esi
	movq	%rax, %rcx
	callq	_fwrite
	cmpq	(%r12), %rax
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rbx
	movq	%r13, %rdi
	callq	_free
	movq	%r14, %rdi
	callq	_fclose
	incq	-65632(%rbp)
	movq	-65640(%rbp), %r12              ## 8-byte Reload
	cmpl	%r15d, %r12d
	jne	LBB0_2
## %bb.8:
	xorl	%r15d, %r15d
	jmp	LBB0_9
LBB0_3:
	movl	$-2, %r15d
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_4
LBB0_6:
	movl	$-3, %r15d
	leaq	L_.str.5(%rip), %rdi
LBB0_4:
	leaq	-65616(%rbp), %rsi
	callq	_kprintf
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	movl	%r15d, %eax
	addq	$65608, %rsp                    ## imm = 0x10048
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d"

L_.str.1:                               ## @.str.1
	.asciz	"%%s%%0%dd"

L_.str.2:                               ## @.str.2
	.asciz	".bin"

	.comm	_LEV_STORAGE_START_SIZE,8,3     ## @LEV_STORAGE_START_SIZE
	.comm	_LEV_START,4,2                  ## @LEV_START
	.comm	_STORAGE_SCHEMA_V1,4,2          ## @STORAGE_SCHEMA_V1
L_.str.3:                               ## @.str.3
	.asciz	"wb"

L_.str.4:                               ## @.str.4
	.asciz	"fopen (%s, \"wb\") failed\n"

L_.str.5:                               ## @.str.5
	.asciz	"writing to %s failed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_make_empty_binlogs             ; -- Begin function make_empty_binlogs
	.p2align	2
_make_empty_binlogs:                    ; @make_empty_binlogs
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	w9, #80
	movk	w9, #1, lsl #16
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #16, lsl #12            ; =65536
	sub	sp, sp, #80
	mov	x21, x3
	mov	x19, x1
	mov	x20, x0
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
	str	w2, [sp, #28]
	subs	w8, w0, #1
	str	x8, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	sub	x0, x29, #128
	bl	_sprintf
	sub	x0, x29, #128
	bl	_strlen
	str	x0, [sp]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	sub	x0, x29, #128
	bl	_sprintf
	mov	w8, #1000
	mul	w8, w21, w8
	sxtw	x8, w8
	str	x8, [sp, #16]
	cmp	w20, #1
	b.lt	LBB0_5
; %bb.1:
	mov	w26, #0
Lloh9:
	adrp	x27, _LEV_STORAGE_START_SIZE@GOTPAGE
Lloh10:
	ldr	x27, [x27, _LEV_STORAGE_START_SIZE@GOTPAGEOFF]
	add	x21, sp, #16
	mov	w22, #4
	add	x28, sp, #28
Lloh11:
	adrp	x23, l_.str.3@PAGE
Lloh12:
	add	x23, x23, l_.str.3@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	stp	x19, x26, [sp]
	add	x0, sp, #32
	sub	x1, x29, #128
	bl	_sprintf
	add	x0, sp, #32
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_strcat
	ldr	x0, [x27]
	bl	_malloc
	mov	x24, x0
Lloh15:
	adrp	x8, _LEV_START@GOTPAGE
Lloh16:
	ldr	x8, [x8, _LEV_START@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _STORAGE_SCHEMA_V1@GOTPAGE
Lloh19:
	ldr	x9, [x9, _STORAGE_SCHEMA_V1@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #24]
	mov	w8, #12
	stp	w8, w20, [x0]
	str	w26, [x0, #8]
	add	w26, w26, #1
	str	w26, [x0, #12]
	ldr	x25, [x0, #16]
	mov	w8, #8
	stp	x21, x8, [sp]
	mov	x0, x25
	bl	_memcpy
	add	x0, x25, #32
	stp	x28, x22, [sp]
	bl	_memcpy
	add	x0, sp, #32
	mov	x1, x23
	bl	_fopen
	cbz	x0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x25, x0
	ldr	x2, [x27]
	mov	x0, x24
	mov	w1, #1
	mov	x3, x25
	bl	_fwrite
	ldr	x8, [x27]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x24
	bl	_free
	mov	x0, x25
	bl	_fclose
	ldr	x8, [sp, #16]
	add	x8, x8, #1
	str	x8, [sp, #16]
	cmp	w20, w26
	b.ne	LBB0_2
LBB0_5:
	mov	w19, #0
	b	LBB0_9
LBB0_6:
	mov	w19, #-2
Lloh21:
	adrp	x0, l_.str.4@PAGE
Lloh22:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_8
LBB0_7:
	mov	w19, #-3
Lloh23:
	adrp	x0, l_.str.5@PAGE
Lloh24:
	add	x0, x0, l_.str.5@PAGEOFF
LBB0_8:
	add	x1, sp, #32
	bl	_kprintf
LBB0_9:
	ldur	x8, [x29, #-96]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	mov	x0, x19
	add	sp, sp, #16, lsl #12            ; =65536
	add	sp, sp, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d"

l_.str.1:                               ; @.str.1
	.asciz	"%%s%%0%dd"

l_.str.2:                               ; @.str.2
	.asciz	".bin"

	.comm	_LEV_STORAGE_START_SIZE,8,3     ; @LEV_STORAGE_START_SIZE
	.comm	_LEV_START,4,2                  ; @LEV_START
	.comm	_STORAGE_SCHEMA_V1,4,2          ; @STORAGE_SCHEMA_V1
l_.str.3:                               ; @.str.3
	.asciz	"wb"

l_.str.4:                               ; @.str.4
	.asciz	"fopen (%s, \"wb\") failed\n"

l_.str.5:                               ; @.str.5
	.asciz	"writing to %s failed\n"

.subsections_via_symbols
