	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cd9660_rename_filename
_cd9660_rename_filename:                ## @cd9660_rename_filename
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r14
	movq	%rdi, %rbx
	cmpq	$0, (%rdi)
	jle	LBB0_2
## %bb.1:
	leaq	L_str(%rip), %rdi
	callq	_puts
LBB0_2:
	movl	8(%rbx), %eax
	decl	%eax
	xorl	%edi, %edi
	cmpl	$2, %eax
	setb	%dil
	callq	_assert
	movl	8(%rbx), %eax
	cmpl	$1, %eax
	je	LBB0_3
## %bb.4:
	cmpl	$2, %eax
	jne	LBB0_6
## %bb.5:
	movl	$31, %ebx
	jmp	LBB0_7
LBB0_3:
	movl	$8, %ebx
	jmp	LBB0_7
LBB0_6:
	movq	_ISO_FILENAME_MAXLENGTH_BEFORE_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_7:
	movq	_ISO_FILENAME_MAXLENGTH_WITH_PADDING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_emalloc
	movq	%rax, %r15
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_30
## %bb.8:
	testq	%r14, %r14
	je	LBB0_30
## %bb.9:
	movl	%ebx, %r12d
	leal	-1(%r12), %eax
	incq	%rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movslq	%r12d, %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movslq	-44(%rbp), %rax                 ## 4-byte Folded Reload
	movq	%r15, %rcx
	subq	%rax, %rcx
	movq	%rcx, -120(%rbp)                ## 8-byte Spill
	movl	$1, %ecx
	subl	%eax, %ecx
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	xorl	%ecx, %ecx
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, -128(%rbp)                ## 8-byte Spill
	.p2align	4, 0x90
LBB0_10:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
                                        ##     Child Loop BB0_16 Depth 2
                                        ##     Child Loop BB0_21 Depth 2
                                        ##     Child Loop BB0_26 Depth 2
	movl	$1, %edi
	movl	$1, %ebx
	cmpl	$10, %ecx
	jb	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	$1, %ebx
	movl	$1, %edi
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_10 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	incl	%edi
	addl	%ebx, %ebx
	leal	(%rbx,%rbx,4), %ebx
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%ebx
	cmpl	$9, %eax
	ja	LBB0_12
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	(%r14), %rsi
	testl	%r12d, %r12d
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	jle	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	-112(%rbp), %rax                ## 8-byte Reload
	leaq	(%rsi,%rax), %r13
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_16:                                ##   Parent Loop BB0_10 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpb	$59, (%rsi,%rax)
	je	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=2
	incq	%rax
	cmpl	%eax, %r12d
	jne	LBB0_16
## %bb.18:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	%r12d, %eax
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	xorl	%eax, %eax
	movq	%rsi, %r13
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_10 Depth=1
	leaq	(%rsi,%rax), %r13
LBB0_20:                                ##   in Loop: Header=BB0_10 Depth=1
	leal	(%rax,%rdi), %ecx
	movl	%r12d, %r14d
	subl	%edi, %r14d
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	cmpl	%r12d, %ecx
	cmovll	%eax, %r14d
	movl	%r14d, %edx
	subl	-44(%rbp), %edx                 ## 4-byte Folded Reload
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	callq	_memcpy
	movslq	%r14d, %r12
	addq	-120(%rbp), %r12                ## 8-byte Folded Reload
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
	movq	%rax, -136(%rbp)                ## 8-byte Spill
	xorl	%eax, %eax
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movl	%ecx, %r15d
	.p2align	4, 0x90
LBB0_21:                                ##   Parent Loop BB0_10 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rax, %r14
	movl	%r15d, %eax
	cltd
	idivl	%ebx
	movl	%edx, %r15d
	movq	%r12, %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	callq	_sprintf
	movslq	%ebx, %rax
	imulq	$1717986919, %rax, %rbx         ## imm = 0x66666667
	movq	%rbx, %rax
	shrq	$63, %rax
	sarq	$34, %rbx
	addl	%eax, %ebx
	incq	%r12
	leaq	-1(%r14), %rax
	movq	-136(%rbp), %rcx                ## 8-byte Reload
	addl	%eax, %ecx
	cmpl	$1, %ecx
	jg	LBB0_21
## %bb.22:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	subq	%rax, %rcx
	movb	(%r13), %al
	cmpb	$59, %al
	movq	-128(%rbp), %r12                ## 8-byte Reload
	je	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpl	%ecx, %r12d
	jle	LBB0_24
## %bb.25:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, %r12d
	cmovll	%r12d, %ecx
	addl	-52(%rbp), %ecx                 ## 4-byte Folded Reload
	subl	-88(%rbp), %ecx                 ## 4-byte Folded Reload
	subl	%r14d, %ecx
	movslq	%ecx, %rdx
	incq	%rdx
	incq	%r13
                                        ## kill: def $ecx killed $ecx def $rcx
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_26:                                ##   Parent Loop BB0_10 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movb	%al, -1(%r15,%rdx)
	movzbl	(%r13), %eax
	incl	%ecx
	cmpb	$59, %al
	je	LBB0_28
## %bb.27:                              ##   in Loop: Header=BB0_26 Depth=2
	leaq	1(%rdx), %rsi
	incq	%r13
	cmpq	%rdi, %rdx
	movq	%rsi, %rdx
	jl	LBB0_26
	jmp	LBB0_28
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	-72(%rbp), %r15                 ## 8-byte Reload
LBB0_28:                                ##   in Loop: Header=BB0_10 Depth=1
	movslq	%ecx, %rdx
	movw	$12603, (%r15,%rdx)             ## imm = 0x313B
	movb	$0, 2(%r15,%rdx)
	movq	8(%rbx), %rax
	movq	(%rax), %rdi
	addl	$3, %edx
	movq	%r15, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	movq	_cn_next_child@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_TAILQ_NEXT
	movq	%rax, %r14
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	incl	%ecx
	cmpl	-48(%rbp), %ecx                 ## 4-byte Folded Reload
	jge	LBB0_30
## %bb.29:                              ##   in Loop: Header=BB0_10 Depth=1
	testq	%r14, %r14
	jne	LBB0_10
LBB0_30:
	movq	%r15, %rdi
	callq	_free
	movq	%r14, %rax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ISO_FILENAME_MAXLENGTH_BEFORE_VERSION,4,2 ## @ISO_FILENAME_MAXLENGTH_BEFORE_VERSION
	.comm	_ISO_FILENAME_MAXLENGTH_WITH_PADDING,4,2 ## @ISO_FILENAME_MAXLENGTH_WITH_PADDING
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"%d"

	.comm	_cn_next_child,4,2              ## @cn_next_child
	.comm	_dot,4,2                        ## @dot
L_str:                                  ## @str
	.asciz	"Rename_filename called"

	.no_dead_strip	_cd9660_rename_filename
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cd9660_rename_filename
_cd9660_rename_filename:                ; @cd9660_rename_filename
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	stp	w3, w2, [sp, #40]               ; 8-byte Folded Spill
	mov	x24, x1
	mov	x22, x0
	ldr	x8, [x0]
	cmp	x8, #1
	b.lt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_str@PAGE
Lloh1:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
LBB0_2:
	ldr	w8, [x22, #8]
	sub	w8, w8, #1
	cmp	w8, #2
	cset	w0, lo
	bl	_assert
	ldr	w8, [x22, #8]
	cmp	w8, #1
	b.eq	LBB0_5
; %bb.3:
	cmp	w8, #2
	b.ne	LBB0_6
; %bb.4:
	mov	w19, #31
	b	LBB0_7
LBB0_5:
	mov	w19, #8
	b	LBB0_7
LBB0_6:
Lloh2:
	adrp	x8, _ISO_FILENAME_MAXLENGTH_BEFORE_VERSION@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ISO_FILENAME_MAXLENGTH_BEFORE_VERSION@GOTPAGEOFF]
Lloh4:
	ldr	w19, [x8]
LBB0_7:
Lloh5:
	adrp	x8, _ISO_FILENAME_MAXLENGTH_WITH_PADDING@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ISO_FILENAME_MAXLENGTH_WITH_PADDING@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_emalloc
	mov	x22, x0
	ldr	w8, [sp, #44]                   ; 4-byte Folded Reload
	cmp	w8, #1
	b.lt	LBB0_29
; %bb.8:
	cbz	x24, LBB0_29
; %bb.9:
	mov	w21, #0
	mov	w23, w19
	sub	w8, w23, #1
	add	x9, x8, #1
	sxtw	x8, w23
	stp	x9, x8, [sp, #8]                ; 16-byte Folded Spill
	ldr	w9, [sp, #40]                   ; 4-byte Folded Reload
	neg	w8, w9
	str	w8, [sp, #36]                   ; 4-byte Folded Spill
	mov	w8, #1
	sub	w8, w8, w9
	str	w8, [sp, #32]                   ; 4-byte Folded Spill
	str	x23, [sp, #24]                  ; 8-byte Folded Spill
Lloh8:
	adrp	x26, l_.str.1@PAGE
Lloh9:
	add	x26, x26, l_.str.1@PAGEOFF
LBB0_10:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
                                        ;     Child Loop BB0_16 Depth 2
                                        ;     Child Loop BB0_22 Depth 2
                                        ;     Child Loop BB0_26 Depth 2
	cmp	w21, #10
	b.lo	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	w20, #1
	mov	w27, #1
LBB0_12:                                ;   Parent Loop BB0_10 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w27, w27, #1
	add	w8, w20, w20, lsl #2
	lsl	w20, w8, #1
	udiv	w8, w21, w20
	cmp	w8, #9
	b.hi	LBB0_12
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	w27, #1
	mov	w20, #1
LBB0_14:                                ;   in Loop: Header=BB0_10 Depth=1
	ldr	x1, [x24]
	cmp	w23, #1
	str	x24, [sp, #56]                  ; 8-byte Folded Spill
	b.lt	LBB0_19
; %bb.15:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x8, #0
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	add	x10, x1, x9
LBB0_16:                                ;   Parent Loop BB0_10 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w9, [x1, x8]
	cmp	w9, #59
	b.eq	LBB0_20
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=2
	add	x8, x8, #1
	cmp	w23, w8
	b.ne	LBB0_16
; %bb.18:                               ;   in Loop: Header=BB0_10 Depth=1
	str	x10, [sp, #48]                  ; 8-byte Folded Spill
	mov	x8, x23
	b	LBB0_21
LBB0_19:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	w8, #0
	str	x1, [sp, #48]                   ; 8-byte Folded Spill
	b	LBB0_21
LBB0_20:                                ;   in Loop: Header=BB0_10 Depth=1
	add	x9, x1, x8
	str	x9, [sp, #48]                   ; 8-byte Folded Spill
LBB0_21:                                ;   in Loop: Header=BB0_10 Depth=1
	sub	w9, w23, w27
	add	w19, w8, w27
	cmp	w19, w23
	csel	w8, w8, w9, lt
	ldr	w9, [sp, #40]                   ; 4-byte Folded Reload
	sub	w24, w8, w9
	mov	x0, x22
	mov	x2, x24
	bl	_memcpy
	sxtw	x24, w24
	cmp	w23, w19
	csel	w8, w23, w19, lt
	ldr	w9, [sp, #32]                   ; 4-byte Folded Reload
	add	w8, w9, w8
	sub	w8, w8, w27
	mov	x25, x21
	mov	w23, #26215
	movk	w23, #26214, lsl #16
LBB0_22:                                ;   Parent Loop BB0_10 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x28, x8
	sdiv	w2, w25, w20
	msub	w25, w2, w20, w25
	add	x0, x22, x24
	mov	x1, x26
	bl	_sprintf
	add	x24, x24, #1
	smull	x8, w20, w23
	lsr	x9, x8, #63
	asr	x8, x8, #34
	add	w20, w8, w9
	add	w8, w28, #1
	subs	w27, w27, #1
	b.gt	LBB0_22
; %bb.23:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x23, [sp, #24]                  ; 8-byte Folded Reload
	cmp	w23, w19
	csel	w8, w23, w19, lt
	ldr	w9, [sp, #36]                   ; 4-byte Folded Reload
	add	w8, w9, w8
	sub	w8, w8, w27
	ldr	x11, [sp, #48]                  ; 8-byte Folded Reload
	ldrb	w9, [x11]
	cmp	w9, #59
	b.eq	LBB0_27
; %bb.24:                               ;   in Loop: Header=BB0_10 Depth=1
	cmp	w23, w8
	ldr	x12, [sp, #16]                  ; 8-byte Folded Reload
	b.le	LBB0_27
; %bb.25:                               ;   in Loop: Header=BB0_10 Depth=1
	sxtw	x10, w24
	add	x11, x11, #1
	mov	x8, x28
LBB0_26:                                ;   Parent Loop BB0_10 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	strb	w9, [x22, x10]
	add	x10, x10, #1
	ldrb	w9, [x11], #1
	add	w8, w8, #1
	cmp	w9, #59
	ccmp	x10, x12, #0, ne
	b.lt	LBB0_26
LBB0_27:                                ;   in Loop: Header=BB0_10 Depth=1
	add	x9, x22, w8, sxtw
	mov	w10, #12603
	strh	w10, [x9]
	strb	wzr, [x9, #2]
	ldr	x19, [sp, #56]                  ; 8-byte Folded Reload
	ldr	x9, [x19, #8]
	ldr	x0, [x9]
	add	w2, w8, #3
	mov	x1, x22
	bl	_memcpy
Lloh10:
	adrp	x8, _cn_next_child@GOTPAGE
Lloh11:
	ldr	x8, [x8, _cn_next_child@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_TAILQ_NEXT
	mov	x24, x0
	add	w21, w21, #1
	ldr	w8, [sp, #44]                   ; 4-byte Folded Reload
	cmp	w21, w8
	b.ge	LBB0_29
; %bb.28:                               ;   in Loop: Header=BB0_10 Depth=1
	cbnz	x24, LBB0_10
LBB0_29:
	mov	x0, x22
	bl	_free
	mov	x0, x24
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_ISO_FILENAME_MAXLENGTH_BEFORE_VERSION,4,2 ; @ISO_FILENAME_MAXLENGTH_BEFORE_VERSION
	.comm	_ISO_FILENAME_MAXLENGTH_WITH_PADDING,4,2 ; @ISO_FILENAME_MAXLENGTH_WITH_PADDING
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"%d"

	.comm	_cn_next_child,4,2              ; @cn_next_child
	.comm	_dot,4,2                        ; @dot
l_str:                                  ; @str
	.asciz	"Rename_filename called"

	.no_dead_strip	_cd9660_rename_filename
.subsections_via_symbols
