	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cd9660_handle_collisions
_cd9660_handle_collisions:              ## @cd9660_handle_collisions
	.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
	movl	%edx, %r12d
	movq	%rdi, %r13
	leaq	8(%rsi), %rdi
	callq	_TAILQ_FIRST
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r14
	leal	1(%r12), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	xorl	%ebx, %ebx
	movq	_cn_next_child@GOTPCREL(%rip), %r15
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
                                        ##     Child Loop BB0_12 Depth 2
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_TAILQ_NEXT
	testq	%rax, %rax
	je	LBB0_2
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r14), %rcx
	movl	(%rcx), %edi
	movq	(%rax), %rax
	movl	(%rax), %esi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_TAILQ_NEXT
	movq	%rax, %r14
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	testq	%rax, %rax
	jne	LBB0_4
	jmp	LBB0_2
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_cd9660_count_collisions
                                        ## kill: def $eax killed $eax def $rax
	movq	%r14, %r12
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testl	%eax, %eax
	jle	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leal	1(%rax), %ebx
	movq	%r14, %r12
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_TAILQ_NEXT
	movq	%rax, %r12
	decl	%ebx
	cmpl	$1, %ebx
	ja	LBB0_10
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	-48(%rbp), %r13d                ## 4-byte Reload
	cmpl	$0, -64(%rbp)                   ## 4-byte Folded Reload
	movq	_cd9660_children_head@GOTPCREL(%rip), %rbx
	jg	LBB0_12
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	addl	%r12d, %edx
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movq	%r14, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_cd9660_rename_filename
	movq	%rax, %r14
	movl	$1, %ebx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=2
	movl	(%rbx), %esi
	movl	(%r15), %edx
	movq	%r14, %rdi
	callq	_TAILQ_PREV
	xorl	%ecx, %ecx
	testq	%rax, %rax
	sete	%cl
	cmovneq	%rax, %r14
	addl	%ecx, -44(%rbp)                 ## 4-byte Folded Spill
LBB0_15:                                ##   in Loop: Header=BB0_12 Depth=2
	decl	%r13d
	cmpl	$1, %r13d
	jle	LBB0_16
LBB0_12:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_TAILQ_NEXT
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=2
	movq	%rax, %r12
	jmp	LBB0_15
LBB0_1:
	xorl	%ebx, %ebx
LBB0_2:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cn_next_child,4,2              ## @cn_next_child
	.comm	_cd9660_children_head,4,2       ## @cd9660_children_head
	.no_dead_strip	_cd9660_handle_collisions
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cd9660_handle_collisions
_cd9660_handle_collisions:              ; @cd9660_handle_collisions
	.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
	mov	x19, x2
	mov	x20, x0
	add	x0, x1, #8
	bl	_TAILQ_FIRST
	cbz	x0, LBB0_14
; %bb.1:
	mov	x22, x0
	mov	w23, #0
	mov	w21, #0
	add	w25, w19, #1
Lloh0:
	adrp	x26, _cn_next_child@GOTPAGE
Lloh1:
	ldr	x26, [x26, _cn_next_child@GOTPAGEOFF]
Lloh2:
	adrp	x27, _cd9660_children_head@GOTPAGE
Lloh3:
	ldr	x27, [x27, _cd9660_children_head@GOTPAGEOFF]
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
                                        ;     Child Loop BB0_12 Depth 2
	ldr	w1, [x26]
	mov	x0, x22
	bl	_TAILQ_NEXT
	cbz	x0, LBB0_15
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x22]
	ldr	w8, [x8]
	ldr	x9, [x0]
	ldr	w1, [x9]
	mov	x0, x8
	bl	_strcmp
	cbz	x0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x26]
	mov	x0, x22
	bl	_TAILQ_NEXT
	mov	x22, x0
	cbnz	x0, LBB0_2
	b	LBB0_15
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x22
	bl	_cd9660_count_collisions
	mov	x23, x0
	mov	x24, x22
	cmp	w0, #1
	b.lt	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w28, w23, #1
	mov	x24, x22
LBB0_7:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w1, [x26]
	mov	x0, x24
	bl	_TAILQ_NEXT
	mov	x24, x0
	sub	w28, w28, #1
	cmp	w28, #1
	b.hi	LBB0_7
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x28, x25
	cmp	w19, #1
	b.ge	LBB0_12
LBB0_9:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	w2, w23, w19
	mov	x0, x20
	mov	x1, x22
	mov	x3, x21
	bl	_cd9660_rename_filename
	mov	x22, x0
	mov	w23, #1
	cbnz	x0, LBB0_2
	b	LBB0_15
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=2
	ldr	w1, [x27]
	ldr	w2, [x26]
	mov	x0, x22
	bl	_TAILQ_PREV
	cmp	x0, #0
	csel	x22, x22, x0, eq
	cinc	w21, w21, eq
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=2
	sub	w28, w28, #1
	cmp	w28, #1
	b.le	LBB0_9
LBB0_12:                                ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w1, [x26]
	mov	x0, x24
	bl	_TAILQ_NEXT
	cbz	x0, LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=2
	mov	x24, x0
	b	LBB0_11
LBB0_14:
	mov	w23, #0
LBB0_15:
	mov	x0, x23
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_cn_next_child,4,2              ; @cn_next_child
	.comm	_cd9660_children_head,4,2       ; @cd9660_children_head
	.no_dead_strip	_cd9660_handle_collisions
.subsections_via_symbols
