	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function move_log
_move_log:                              ## @move_log
	.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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_PATH_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	leaq	L_.str(%rip), %r12
	movq	_O_EXCL@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_arc4random
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	%r12, %rdx
	movq	%r14, %rcx
	movl	%eax, %r8d
	callq	_snprintf
	cltq
	cmpq	%rbx, %rax
	jae	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r13), %esi
	movq	_O_CREAT@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_open
	testl	%eax, %eax
	jns	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_EEXIST@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	je	LBB0_1
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_EINTR@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	je	LBB0_1
## %bb.6:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	callq	_strerror
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_logmsg
	movl	$1, %ebx
	jmp	LBB0_10
LBB0_2:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_logmsg
	movl	$1, %ebx
	jmp	LBB0_10
LBB0_7:
	movl	%eax, %edi
	callq	_close
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_rename
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_strerror
	leaq	L_.str.3(%rip), %rsi
	movl	%ebx, %edi
	movq	%r14, %rdx
	movq	%r15, %rcx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_logmsg
	movl	$1, %ebx
	jmp	LBB0_10
LBB0_9:
	movq	_LOG_NOTICE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdx
	movq	%r15, %rcx
	xorl	%eax, %eax
	callq	_logmsg
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PATH_MAX,4,2                   ## @PATH_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s.bad.%08x"

	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
L_.str.1:                               ## @.str.1
	.asciz	"[priv] new name too long"

	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_EXCL,4,2                     ## @O_EXCL
	.comm	_errno,8,3                      ## @errno
	.comm	_EEXIST,8,3                     ## @EEXIST
	.comm	_EINTR,8,3                      ## @EINTR
L_.str.2:                               ## @.str.2
	.asciz	"[priv] failed to create new name: %s"

L_.str.3:                               ## @.str.3
	.asciz	"[priv] failed to rename %s to %s: %s"

	.comm	_LOG_NOTICE,4,2                 ## @LOG_NOTICE
L_.str.4:                               ## @.str.4
	.asciz	"[priv]: log file %s moved to %s"

	.no_dead_strip	_move_log
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function move_log
_move_log:                              ; @move_log
	.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
	sub	sp, sp, #16
	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, #-88]
Lloh3:
	adrp	x8, _PATH_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PATH_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	mov	x9, x21
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x21, #15
	and	x9, x9, #0x1fffffff0
	sub	x20, x8, x9
	mov	sp, x20
Lloh8:
	adrp	x22, l_.str@PAGE
Lloh9:
	add	x22, x22, l_.str@PAGEOFF
Lloh10:
	adrp	x24, _O_CREAT@GOTPAGE
Lloh11:
	ldr	x24, [x24, _O_CREAT@GOTPAGEOFF]
Lloh12:
	adrp	x25, _O_EXCL@GOTPAGE
Lloh13:
	ldr	x25, [x25, _O_EXCL@GOTPAGEOFF]
Lloh14:
	adrp	x23, _errno@GOTPAGE
Lloh15:
	ldr	x23, [x23, _errno@GOTPAGEOFF]
Lloh16:
	adrp	x26, _EEXIST@GOTPAGE
Lloh17:
	ldr	x26, [x26, _EEXIST@GOTPAGEOFF]
Lloh18:
	adrp	x27, _EINTR@GOTPAGE
Lloh19:
	ldr	x27, [x27, _EINTR@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	bl	_arc4random
	mov	x4, x0
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	mov	x3, x19
	bl	_snprintf
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	cmp	x8, x21
	b.hs	LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x24]
	ldr	w9, [x25]
	orr	w1, w9, w8
	mov	x0, x20
	mov	w2, #0
	bl	_open
	tbz	w0, #31, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x0, [x23]
	ldr	x8, [x26]
	ldr	x9, [x27]
	cmp	x0, x8
	ccmp	x0, x9, #4, ne
	b.eq	LBB0_1
; %bb.4:
Lloh20:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh22:
	ldr	w19, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp, #-16]!
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_logmsg
	add	sp, sp, #16
	mov	w0, #1
	b	LBB0_9
LBB0_5:
Lloh25:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
Lloh28:
	adrp	x1, l_.str.1@PAGE
Lloh29:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_logmsg
	mov	w0, #1
	b	LBB0_9
LBB0_6:
	bl	_close
	mov	x0, x19
	mov	x1, x20
	bl	_rename
	cbz	x0, LBB0_8
; %bb.7:
Lloh30:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh31:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh32:
	ldr	w21, [x8]
	ldr	x0, [x23]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	sub	sp, sp, #32
	stp	x20, x0, [sp, #8]
	str	x19, [sp]
Lloh33:
	adrp	x1, l_.str.3@PAGE
Lloh34:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_logmsg
	add	sp, sp, #32
	mov	w0, #1
	b	LBB0_9
LBB0_8:
Lloh35:
	adrp	x8, _LOG_NOTICE@GOTPAGE
Lloh36:
	ldr	x8, [x8, _LOG_NOTICE@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
	stp	x19, x20, [sp, #-16]!
Lloh38:
	adrp	x1, l_.str.4@PAGE
Lloh39:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_logmsg
	add	sp, sp, #16
	mov	w0, #0
LBB0_9:
	ldur	x8, [x29, #-88]
Lloh40:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh41:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh42:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	sub	sp, x29, #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 AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_PATH_MAX,4,2                   ; @PATH_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s.bad.%08x"

	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
l_.str.1:                               ; @.str.1
	.asciz	"[priv] new name too long"

	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_EXCL,4,2                     ; @O_EXCL
	.comm	_errno,8,3                      ; @errno
	.comm	_EEXIST,8,3                     ; @EEXIST
	.comm	_EINTR,8,3                      ; @EINTR
l_.str.2:                               ; @.str.2
	.asciz	"[priv] failed to create new name: %s"

l_.str.3:                               ; @.str.3
	.asciz	"[priv] failed to rename %s to %s: %s"

	.comm	_LOG_NOTICE,4,2                 ; @LOG_NOTICE
l_.str.4:                               ; @.str.4
	.asciz	"[priv]: log file %s moved to %s"

	.no_dead_strip	_move_log
.subsections_via_symbols
