	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function Screen_SetScreenshotFilenamePattern
_Screen_SetScreenshotFilenamePattern:   ## @Screen_SetScreenshotFilenamePattern
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_screenshot_filename_format@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	_screenshot_no_max@GOTPCREL(%rip), %r14
	movl	$1, (%r14)
	movq	_FILENAME_MAX@GOTPCREL(%rip), %r8
	movslq	(%r8), %rcx
	addq	%rax, %rcx
	addq	$-9, %rcx
	cmpq	%rcx, %rax
	jae	LBB0_14
## %bb.1:
	movb	$48, %dl
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
                                        ##     Child Loop BB0_7 Depth 2
	leaq	1(%rdi), %rsi
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	(%rdi), %ecx
	cmpb	$37, %cl
	je	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	cmpb	$35, %cl
	jne	LBB0_12
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=2
	movb	$37, (%rax)
	incq	%rax
	movzbl	(%rdi), %ecx
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=2
	movb	%cl, (%rax)
	cmpb	$0, (%rdi)
	je	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=2
	incq	%rax
	incq	%rdi
	movq	(%r15), %rcx
	movslq	(%r8), %rbx
	addq	%rbx, %rcx
	addq	$-9, %rcx
	incq	%rsi
	cmpq	%rcx, %rax
	jb	LBB0_3
	jmp	LBB0_14
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$48, %dl
	jg	LBB0_14
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %ecx
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rsi, %rdi
	addl	%ecx, %ecx
	leal	(%rcx,%rcx,4), %ecx
	movl	%ecx, (%r14)
	cmpb	$56, %dl
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=2
	incb	%dl
	leaq	1(%rdi), %rsi
	cmpb	$35, (%rdi)
	je	LBB0_7
	jmp	LBB0_10
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movb	$57, %dl
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movw	$12325, (%rax)                  ## imm = 0x3025
	movb	%dl, 2(%rax)
	movb	$100, 3(%rax)
	addq	$4, %rax
	movq	(%r15), %rcx
	movslq	(%r8), %rsi
	addq	%rsi, %rcx
	addq	$-9, %rcx
	cmpq	%rcx, %rax
	jb	LBB0_2
LBB0_14:
	leaq	L_.str(%rip), %rdi
	callq	_Log_print
	movq	(%r15), %rdi
	movq	_DEFAULT_SCREENSHOT_FILENAME_FORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_strcpy
	movl	$1000, (%r14)                   ## imm = 0x3E8
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_screenshot_filename_format,8,3 ## @screenshot_filename_format
	.comm	_screenshot_no_max,4,2          ## @screenshot_no_max
	.comm	_FILENAME_MAX,4,2               ## @FILENAME_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid filename pattern for screenshots, using default."

	.comm	_DEFAULT_SCREENSHOT_FILENAME_FORMAT,4,2 ## @DEFAULT_SCREENSHOT_FILENAME_FORMAT
	.no_dead_strip	_Screen_SetScreenshotFilenamePattern
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function Screen_SetScreenshotFilenamePattern
_Screen_SetScreenshotFilenamePattern:   ; @Screen_SetScreenshotFilenamePattern
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x20, _screenshot_filename_format@GOTPAGE
Lloh1:
	ldr	x20, [x20, _screenshot_filename_format@GOTPAGEOFF]
	ldr	x15, [x20]
Lloh2:
	adrp	x19, _screenshot_no_max@GOTPAGE
Lloh3:
	ldr	x19, [x19, _screenshot_no_max@GOTPAGEOFF]
	mov	w8, #1
	str	w8, [x19]
Lloh4:
	adrp	x8, _FILENAME_MAX@GOTPAGE
Lloh5:
	ldr	x8, [x8, _FILENAME_MAX@GOTPAGEOFF]
	ldrsw	x9, [x8]
	add	x9, x15, x9
	sub	x9, x9, #9
	cmp	x15, x9
	b.hs	LBB0_14
; %bb.1:
	mov	w9, #48
	mov	w10, #37
	mov	w11, #56
	mov	w12, #12325
	mov	w13, #100
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
                                        ;     Child Loop BB0_10 Depth 2
	mov	x14, x15
LBB0_3:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w15, [x0]
	cmp	w15, #37
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=2
	cmp	w15, #35
	b.ne	LBB0_6
	b	LBB0_8
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=2
	strb	w10, [x14], #1
	ldrb	w15, [x0]
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=2
	strb	w15, [x14]
	ldrb	w15, [x0]
	cbz	w15, LBB0_15
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=2
	add	x14, x14, #1
	add	x0, x0, #1
	ldr	x15, [x20]
	ldrsw	x16, [x8]
	add	x15, x15, x16
	sub	x15, x15, #9
	cmp	x14, x15
	b.lo	LBB0_3
	b	LBB0_14
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=1
	sxtb	w15, w9
	cmp	w15, #48
	b.gt	LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	w15, w11, w9
	add	x15, x0, w15, uxtb
	add	x15, x15, #1
	ldr	w16, [x19]
LBB0_10:                                ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w16, w16, w16, lsl #2
	lsl	w16, w16, #1
	str	w16, [x19]
	sxtb	w17, w9
	cmp	w17, #55
	b.gt	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	add	w9, w9, #1
	ldrb	w17, [x0, #1]!
	cmp	w17, #35
	b.eq	LBB0_10
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w9, #57
	mov	x0, x15
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=1
	strh	w12, [x14]
	strb	w9, [x14, #2]
	add	x15, x14, #4
	strb	w13, [x14, #3]
	ldr	x14, [x20]
	ldrsw	x16, [x8]
	add	x14, x14, x16
	sub	x14, x14, #9
	cmp	x15, x14
	b.lo	LBB0_2
LBB0_14:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Log_print
	ldr	x0, [x20]
Lloh8:
	adrp	x8, _DEFAULT_SCREENSHOT_FILENAME_FORMAT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DEFAULT_SCREENSHOT_FILENAME_FORMAT@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_strcpy
	mov	w8, #1000
	str	w8, [x19]
LBB0_15:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_screenshot_filename_format,8,3 ; @screenshot_filename_format
	.comm	_screenshot_no_max,4,2          ; @screenshot_no_max
	.comm	_FILENAME_MAX,4,2               ; @FILENAME_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid filename pattern for screenshots, using default."

	.comm	_DEFAULT_SCREENSHOT_FILENAME_FORMAT,4,2 ; @DEFAULT_SCREENSHOT_FILENAME_FORMAT
	.no_dead_strip	_Screen_SetScreenshotFilenamePattern
.subsections_via_symbols
