	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_storage_reoder_binlog_files    ## -- Begin function storage_reoder_binlog_files
	.p2align	4, 0x90
_storage_reoder_binlog_files:           ## @storage_reoder_binlog_files
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	(%rdi), %esi
	movq	8(%rdi), %rdi
	testl	%esi, %esi
	jle	LBB0_1
## %bb.2:
	leaq	-1(%rsi), %rax
	movl	%esi, %r8d
	andl	$3, %r8d
	cmpq	$3, %rax
	jae	LBB0_4
## %bb.3:
	movq	$-1, %rbx
	xorl	%ecx, %ecx
LBB0_12:
	testq	%r8, %r8
	je	LBB0_15
## %bb.13:
	leaq	(%rdi,%rcx,8), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdx,8), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rbx
	cmovleq	%rax, %rbx
	incq	%rdx
	cmpq	%rdx, %r8
	jne	LBB0_14
	jmp	LBB0_15
LBB0_1:
	movq	$-1, %rbx
LBB0_15:
	movq	_cmp_storage_binlog_file@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
                                        ## kill: def $esi killed $esi killed $rsi
	movl	$8, %edx
	callq	_qsort
	cmpl	$0, (%r14)
	jle	LBB0_25
## %bb.16:
	movq	8(%r14), %rax
	movq	(%rax), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_25
## %bb.17:
	movq	%r14, %rdi
	callq	_storage_open_binlogs
	movq	8(%r14), %rcx
	movq	(%rcx), %rdi
	movl	$1, 8(%rdi)
	cmpl	$2, (%r14)
	jl	LBB0_24
## %bb.18:
	movl	$2, %ebx
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	-8(%rcx,%rbx,8), %rsi
	callq	_binlog_check
	movq	8(%r14), %rcx
	movq	-8(%rcx,%rbx,8), %rdx
	testl	%eax, %eax
	je	LBB0_20
## %bb.21:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	$0, 8(%rdx)
	movl	12(%rdx), %edi
	callq	_close
	movq	8(%r14), %rcx
	movq	-8(%rcx,%rbx,8), %rax
	movl	$-1, 12(%rax)
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_19 Depth=1
	movl	$1, 8(%rdx)
LBB0_22:                                ##   in Loop: Header=BB0_19 Depth=1
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jge	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	(%rcx), %rdi
	incq	%rbx
	jmp	LBB0_19
LBB0_24:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	movl	%esi, %r9d
	andl	$-4, %r9d
	movq	$-1, %rax
	xorl	%ecx, %ecx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	addq	$4, %rcx
	movq	%rbx, %rax
	cmpq	%rcx, %r9
	je	LBB0_12
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdi,%rcx,8), %rbx
	movq	8(%rdi,%rcx,8), %rdx
	movq	(%rbx), %rbx
	cmpq	%rbx, %rax
	cmovgq	%rax, %rbx
	movq	(%rdx), %rax
	cmpq	%rax, %rbx
	jg	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %rbx
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	16(%rdi,%rcx,8), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rbx
	jg	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %rbx
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	24(%rdi,%rcx,8), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rbx
	jg	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %rbx
	jmp	LBB0_11
LBB0_25:
	movl	16(%r14), %esi
	leaq	L_.str(%rip), %rdi
	callq	_kprintf
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_cmp_storage_binlog_file,4,2    ## @cmp_storage_binlog_file
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"volume %lld: Can't select binlog.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_storage_reoder_binlog_files    ; -- Begin function storage_reoder_binlog_files
	.p2align	2
_storage_reoder_binlog_files:           ; @storage_reoder_binlog_files
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
	ldr	w1, [x0]
	ldr	x0, [x0, #8]
	cmp	w1, #1
	b.lt	LBB0_3
; %bb.1:
	cmp	w1, #4
	b.hs	LBB0_4
; %bb.2:
	mov	x8, #0
	mov	x20, #-1
	b	LBB0_7
LBB0_3:
	mov	x20, #-1
	b	LBB0_9
LBB0_4:
	and	x8, x1, #0xfffffffc
	add	x10, x0, #16
	mov	x9, #-1
	mov	x13, x8
	mov	x14, #-1
	mov	x12, #-1
	mov	x11, #-1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x15, x16, [x10, #-16]
	ldp	x17, x2, [x10], #32
	ldr	x15, [x15]
	ldr	x16, [x16]
	ldr	x17, [x17]
	cmp	x9, x15
	csel	x9, x9, x15, gt
	cmp	x14, x16
	csel	x14, x14, x16, gt
	cmp	x12, x17
	csel	x12, x12, x17, gt
	ldr	x15, [x2]
	cmp	x11, x15
	csel	x11, x11, x15, gt
	subs	x13, x13, #4
	b.ne	LBB0_5
; %bb.6:
	cmp	x9, x14
	csel	x9, x9, x14, gt
	cmp	x9, x12
	csel	x9, x9, x12, gt
	cmp	x9, x11
	csel	x20, x9, x11, gt
	cmp	x8, x1
	b.eq	LBB0_9
LBB0_7:
	add	x9, x0, x8, lsl #3
	sub	x8, x1, x8
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9], #8
	ldr	x10, [x10]
	cmp	x20, x10
	csel	x20, x20, x10, gt
	subs	x8, x8, #1
	b.ne	LBB0_8
LBB0_9:
Lloh0:
	adrp	x8, _cmp_storage_binlog_file@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cmp_storage_binlog_file@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
                                        ; kill: def $w1 killed $w1 killed $x1
	mov	w2, #8
	bl	_qsort
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_19
; %bb.10:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	cmp	x20, x8
	b.ne	LBB0_19
; %bb.11:
	mov	x0, x19
	bl	_storage_open_binlogs
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	mov	w20, #1
	str	w20, [x0, #8]
	ldr	w9, [x19]
	cmp	w9, #2
	b.lt	LBB0_18
; %bb.12:
	mov	w21, #-1
	mov	w22, #1
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	lsl	x23, x22, #3
	ldr	x1, [x8, x23]
	bl	_binlog_check
	ldr	x8, [x19, #8]
	ldr	x9, [x8, x23]
	cbz	w0, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	str	wzr, [x9, #8]
	ldr	w0, [x9, #12]
	bl	_close
	ldr	x8, [x19, #8]
	ldr	x9, [x8, x22, lsl #3]
	str	w21, [x9, #12]
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_13 Depth=1
	str	w20, [x9, #8]
LBB0_16:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x22, x22, #1
	ldrsw	x9, [x19]
	cmp	x22, x9
	b.ge	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x0, [x8]
	b	LBB0_13
LBB0_18:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_19:
	ldr	w1, [x19, #16]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_kprintf
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_cmp_storage_binlog_file,4,2    ; @cmp_storage_binlog_file
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"volume %lld: Can't select binlog.\n"

.subsections_via_symbols
