	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function flexrm_spu_sanity_check
_flexrm_spu_sanity_check:               ## @flexrm_spu_sanity_check
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rax
	xorl	%r14d, %r14d
	testq	%rax, %rax
	je	LBB0_14
## %bb.1:
	movq	%rdi, %rbx
	cmpq	$0, (%rdi)
	je	LBB0_14
## %bb.2:
	movq	_MSRC_LENGTH_MASK@GOTPCREL(%rip), %r15
	movq	_SRC_LENGTH_MASK@GOTPCREL(%rip), %r12
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r15), %edx
	shll	$4, %edx
	cmpl	%edx, %ecx
	jg	LBB0_14
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rdi
	callq	_sg_next
	testq	%rax, %rax
	je	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rax), %ecx
	testb	$15, %cl
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	(%r12), %ecx
	jle	LBB0_6
	jmp	LBB0_14
LBB0_7:
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.8:
	movq	_MDST_LENGTH_MASK@GOTPCREL(%rip), %r15
	movq	_DST_LENGTH_MASK@GOTPCREL(%rip), %rbx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	(%r15), %edx
	shll	$4, %edx
	cmpl	%edx, %ecx
	jg	LBB0_14
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	%rax, %rdi
	callq	_sg_next
	testq	%rax, %rax
	je	LBB0_13
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rax), %ecx
	testb	$15, %cl
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpl	(%rbx), %ecx
	jle	LBB0_12
	jmp	LBB0_14
LBB0_13:
	movl	$1, %r14d
LBB0_14:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SRC_LENGTH_MASK,4,2            ## @SRC_LENGTH_MASK
	.comm	_MSRC_LENGTH_MASK,4,2           ## @MSRC_LENGTH_MASK
	.comm	_DST_LENGTH_MASK,4,2            ## @DST_LENGTH_MASK
	.comm	_MDST_LENGTH_MASK,4,2           ## @MDST_LENGTH_MASK
	.no_dead_strip	_flexrm_spu_sanity_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function flexrm_spu_sanity_check
_flexrm_spu_sanity_check:               ; @flexrm_spu_sanity_check
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x0, [x0, #8]
	cbz	x0, LBB0_15
; %bb.1:
	ldr	x8, [x19]
	cbz	x8, LBB0_13
; %bb.2:
Lloh0:
	adrp	x20, _MSRC_LENGTH_MASK@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MSRC_LENGTH_MASK@GOTPAGEOFF]
Lloh2:
	adrp	x21, _SRC_LENGTH_MASK@GOTPAGE
Lloh3:
	ldr	x21, [x21, _SRC_LENGTH_MASK@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x20]
	cmp	w8, w9, lsl #4
	b.gt	LBB0_13
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	bl	_sg_next
	cbz	x0, LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x0]
	tst	w8, #0xf
	b.eq	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x21]
	cmp	w8, w9
	b.le	LBB0_4
	b	LBB0_13
LBB0_7:
	ldr	x0, [x19]
	cbz	x0, LBB0_14
; %bb.8:
Lloh4:
	adrp	x19, _MDST_LENGTH_MASK@GOTPAGE
Lloh5:
	ldr	x19, [x19, _MDST_LENGTH_MASK@GOTPAGEOFF]
Lloh6:
	adrp	x20, _DST_LENGTH_MASK@GOTPAGE
Lloh7:
	ldr	x20, [x20, _DST_LENGTH_MASK@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	ldr	w9, [x19]
	cmp	w8, w9, lsl #4
	b.gt	LBB0_13
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	bl	_sg_next
	cbz	x0, LBB0_14
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x0]
	tst	w8, #0xf
	b.eq	LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w9, [x20]
	cmp	w8, w9
	b.le	LBB0_10
LBB0_13:
	mov	w0, #0
	b	LBB0_15
LBB0_14:
	mov	w0, #1
LBB0_15:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SRC_LENGTH_MASK,4,2            ; @SRC_LENGTH_MASK
	.comm	_MSRC_LENGTH_MASK,4,2           ; @MSRC_LENGTH_MASK
	.comm	_DST_LENGTH_MASK,4,2            ; @DST_LENGTH_MASK
	.comm	_MDST_LENGTH_MASK,4,2           ; @MDST_LENGTH_MASK
	.no_dead_strip	_flexrm_spu_sanity_check
.subsections_via_symbols
