	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_bridge_resource_split
_do_bridge_resource_split:              ## @do_bridge_resource_split
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_cpqhp_resource_sort_and_combine
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	movq	(%rbx), %rdi
	movq	8(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rax, %rbx
	callq	_kfree
	movq	8(%rbx), %rax
	movq	%rbx, %rdi
	testq	%rax, %rax
	jne	LBB0_3
	jmp	LBB0_4
LBB0_2:
	movq	%rdi, %rbx
LBB0_4:
	movl	(%rbx), %edx
	cmpl	%r14d, %edx
	jl	LBB0_10
## %bb.5:
	movl	4(%rbx), %eax
	leal	-1(%r14), %ecx
	testl	%ecx, %eax
	je	LBB0_6
## %bb.7:
	movl	%eax, %esi
	orl	%ecx, %esi
	incl	%esi
	subl	%esi, %eax
	addl	%edx, %eax
	cmpl	%r14d, %eax
	jl	LBB0_10
## %bb.8:
	movl	%eax, (%rbx)
	movl	%esi, 4(%rbx)
	testl	%ecx, %eax
	jne	LBB0_10
	jmp	LBB0_12
LBB0_6:
	movl	%edx, %eax
	testl	%ecx, %eax
	je	LBB0_12
LBB0_10:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_11:
	xorl	%ebx, %ebx
LBB0_12:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_do_bridge_resource_split
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_bridge_resource_split
_do_bridge_resource_split:              ; @do_bridge_resource_split
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_cpqhp_resource_sort_and_combine
	cbnz	w0, LBB0_10
; %bb.1:
	ldr	x0, [x19]
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_3
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x19, x8
	bl	_kfree
	ldr	x8, [x19, #8]
	mov	x0, x19
	cbnz	x8, LBB0_2
	b	LBB0_4
LBB0_3:
	mov	x19, x0
LBB0_4:
	ldr	w8, [x19]
	cmp	w8, w20
	b.lt	LBB0_9
; %bb.5:
	ldr	w11, [x19, #4]
	sub	w9, w20, #1
	tst	w11, w9
	b.eq	LBB0_8
; %bb.6:
	orr	w10, w11, w9
	add	w10, w10, #1
	sub	w11, w11, w10
	add	w8, w11, w8
	cmp	w8, w20
	b.lt	LBB0_9
; %bb.7:
	stp	w8, w10, [x19]
LBB0_8:
	tst	w8, w9
	b.eq	LBB0_11
LBB0_9:
	mov	x0, x19
	bl	_kfree
LBB0_10:
	mov	x19, #0
LBB0_11:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_do_bridge_resource_split
.subsections_via_symbols
