	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rotate_serial                  ## -- Begin function rotate_serial
	.p2align	4, 0x90
_rotate_serial:                         ## @rotate_serial
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_BSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	addq	%rax, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_strlen
	movl	%eax, %r14d
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_strlen
	movl	%eax, %r15d
	addl	%r14d, %r15d
	movq	%r13, %rdi
	callq	_strlen
	movl	%eax, %ebx
	movq	%r12, %r14
	movq	%r12, %rdi
	callq	_strlen
	addl	%ebx, %eax
	cmpl	%eax, %r15d
	cmovgl	%r15d, %eax
	incl	%eax
	movq	_BSIZE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_1
## %bb.2:
	leaq	L_.str.1(%rip), %rdx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movl	%r12d, %esi
	movq	%r13, %rcx
	movq	%r14, %r8
	callq	_BIO_snprintf
	movq	%r15, %rbx
	addq	%r12, %rbx
	movq	%rbx, %rdi
	movl	%r12d, %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r13, %rcx
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	callq	_BIO_snprintf
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_rename
	testq	%rax, %rax
	jns	LBB0_5
## %bb.3:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
LBB0_5:
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_rename
	movl	$1, %r14d
	testq	%rax, %rax
	jns	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_rotate_serial.cold.1
	xorl	%r14d, %r14d
	jmp	LBB0_7
LBB0_1:
	movq	_bio_err@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_BIO_printf
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	movl	%r14d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_bio_err@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%r13, %rdx
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_BIO_printf
	leaq	L_.str.3(%rip), %rdi
	callq	_perror
	jmp	LBB0_7
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function rotate_serial.cold.1
_rotate_serial.cold.1:                  ## @rotate_serial.cold.1
	.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	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %rdx
	movq	_bio_err@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_BIO_printf
	leaq	L_.str.3(%rip), %rdi
	callq	_perror
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_rename
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BSIZE,4,2                      ## @BSIZE
	.comm	_bio_err,4,2                    ## @bio_err
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"file name too long\n"

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

	.comm	_errno,8,3                      ## @errno
	.comm	_ENOENT,8,3                     ## @ENOENT
L_.str.2:                               ## @.str.2
	.asciz	"unable to rename %s to %s\n"

L_.str.3:                               ## @.str.3
	.asciz	"reason"

	.comm	_ENOTDIR,8,3                    ## @ENOTDIR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rotate_serial                  ; -- Begin function rotate_serial
	.p2align	2
_rotate_serial:                         ; @rotate_serial
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	sub	sp, sp, #16
	mov	x21, x2
	mov	x23, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x25, _BSIZE@GOTPAGE
Lloh4:
	ldr	x25, [x25, _BSIZE@GOTPAGEOFF]
	ldr	w22, [x25]
	lsl	x8, x22, #1
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x3fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	bl	_strlen
	mov	x24, x0
	mov	x0, x21
	bl	_strlen
	add	w26, w0, w24
	mov	x0, x19
	bl	_strlen
	mov	x24, x0
	mov	x0, x23
	bl	_strlen
	add	w8, w0, w24
	cmp	w26, w8
	csel	w8, w26, w8, gt
	add	w8, w8, #1
	ldr	w9, [x25]
	cmp	w8, w9
	b.ge	LBB0_5
; %bb.1:
Lloh7:
	adrp	x24, l_.str.1@PAGE
Lloh8:
	add	x24, x24, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x1, x22
	mov	x2, x24
	mov	x3, x19
	mov	x4, x23
	bl	_BIO_snprintf
	add	x23, x20, x22
	mov	x0, x23
	mov	x1, x22
	mov	x2, x24
	mov	x3, x19
	mov	x4, x21
	bl	_BIO_snprintf
	mov	x0, x19
	mov	x1, x23
	bl	_rename
	tbz	x0, #63, LBB0_3
; %bb.2:
Lloh9:
	adrp	x8, _errno@GOTPAGE
Lloh10:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
Lloh12:
	adrp	x9, _ENOENT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ENOENT@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
LBB0_3:
	mov	x0, x20
	mov	x1, x19
	bl	_rename
	tbnz	x0, #63, LBB0_9
; %bb.4:
	mov	w0, #1
	b	LBB0_7
LBB0_5:
Lloh15:
	adrp	x8, _bio_err@GOTPAGE
Lloh16:
	ldr	x8, [x8, _bio_err@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_BIO_printf
LBB0_6:
	mov	w0, #0
LBB0_7:
	ldur	x8, [x29, #-72]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.8:
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_9:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x23
	bl	_rotate_serial.cold.1
	b	LBB0_6
LBB0_10:
Lloh23:
	adrp	x8, _bio_err@GOTPAGE
Lloh24:
	ldr	x8, [x8, _bio_err@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	stp	x19, x23, [sp, #-16]!
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_BIO_printf
	add	sp, sp, #16
Lloh28:
	adrp	x0, l_.str.3@PAGE
Lloh29:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_perror
	b	LBB0_6
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function rotate_serial.cold.1
_rotate_serial.cold.1:                  ; @rotate_serial.cold.1
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x2
	mov	x20, x1
Lloh30:
	adrp	x8, _bio_err@GOTPAGE
Lloh31:
	ldr	x8, [x8, _bio_err@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	stp	x0, x1, [sp]
Lloh33:
	adrp	x1, l_.str.2@PAGE
Lloh34:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x8
	bl	_BIO_printf
Lloh35:
	adrp	x0, l_.str.3@PAGE
Lloh36:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_perror
	mov	x0, x19
	mov	x1, x20
	bl	_rename
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_BSIZE,4,2                      ; @BSIZE
	.comm	_bio_err,4,2                    ; @bio_err
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"file name too long\n"

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

	.comm	_errno,8,3                      ; @errno
	.comm	_ENOENT,8,3                     ; @ENOENT
l_.str.2:                               ; @.str.2
	.asciz	"unable to rename %s to %s\n"

l_.str.3:                               ; @.str.3
	.asciz	"reason"

	.comm	_ENOTDIR,8,3                    ; @ENOTDIR
.subsections_via_symbols
