	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sm_find_cis
_sm_find_cis:                           ## @sm_find_cis
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %eax
	cmpl	4(%rdi), %eax
	jle	LBB0_10
## %bb.1:
	movq	%rdi, %r14
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	movl	(%r14), %eax
	subl	4(%r14), %eax
	cmpl	%eax, %ebx
	jge	LBB0_10
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movq	%r15, %r9
	callq	_sm_read_sector
	testq	%rax, %rax
	jne	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_sm_block_valid
	testl	%eax, %eax
	je	LBB0_9
## %bb.4:
	movl	8(%r14), %eax
	xorl	%r15d, %r15d
	testl	%eax, %eax
	jle	LBB0_12
## %bb.5:
	leaq	-48(%rbp), %r12
	movq	_SM_SECTOR_SIZE@GOTPCREL(%rip), %r13
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	addl	(%r13), %r15d
	movl	8(%r14), %eax
	cmpl	%eax, %r15d
	jge	LBB0_12
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	movl	%r15d, %ecx
	xorl	%r8d, %r8d
	movq	%r12, %r9
	callq	_sm_read_sector
	testq	%rax, %rax
	jne	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r12, %rdi
	callq	_sm_sector_valid
	testl	%eax, %eax
	je	LBB0_11
## %bb.8:
	movl	8(%r14), %eax
LBB0_12:
	cmpl	%eax, %r15d
	je	LBB0_10
## %bb.13:
	movl	%ebx, 12(%r14)
	movl	%r15d, 16(%r14)
	movq	$0, 24(%r14)
	movq	%r14, %rdi
	callq	_sm_read_cis
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	movq	_SM_SMALL_PAGE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%r14)
	movq	%r14, %rdi
	callq	_sm_read_cis
	testl	%eax, %eax
	je	LBB0_15
LBB0_10:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	imull	8(%r14), %ebx
	addl	%r15d, %ebx
	movslq	%ebx, %rsi
	addq	24(%r14), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_dbg
	xorl	%eax, %eax
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_SM_SECTOR_SIZE,8,3             ## @SM_SECTOR_SIZE
	.comm	_SM_SMALL_PAGE,8,3              ## @SM_SMALL_PAGE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CIS block found at offset %x"

	.no_dead_strip	_sm_find_cis
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sm_find_cis
_sm_find_cis:                           ; @sm_find_cis
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldp	w8, w9, [x0]
	cmp	w8, w9
	b.le	LBB0_15
; %bb.1:
	mov	x19, x0
	mov	w20, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w20, w20, #1
	ldp	w8, w9, [x19]
	sub	w8, w8, w9
	cmp	w20, w8
	b.ge	LBB0_15
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x5, sp, #8
	mov	x0, x19
	mov	w1, #0
	mov	x2, x20
	mov	w3, #0
	mov	x4, #0
	bl	_sm_read_sector
	cbnz	x0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x0, sp, #8
	bl	_sm_block_valid
	cbz	w0, LBB0_2
; %bb.5:
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.6:
	mov	w21, #0
Lloh0:
	adrp	x22, _SM_SECTOR_SIZE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SM_SECTOR_SIZE@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	w9, [x22]
	ldr	w8, [x19, #8]
	add	w21, w21, w9
	cmp	w21, w8
	b.ge	LBB0_11
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	x5, sp, #8
	mov	x0, x19
	mov	w1, #0
	mov	x2, x20
	mov	x3, x21
	mov	x4, #0
	bl	_sm_read_sector
	cbnz	x0, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x0, sp, #8
	bl	_sm_sector_valid
	cbz	w0, LBB0_7
; %bb.10:
	ldr	w8, [x19, #8]
LBB0_11:
	cmp	w21, w8
	b.ne	LBB0_13
	b	LBB0_15
LBB0_12:
	mov	w21, #0
	cmp	w21, w8
	b.eq	LBB0_15
LBB0_13:
	stp	w20, w21, [x19, #12]
	str	xzr, [x19, #24]
	mov	x0, x19
	bl	_sm_read_cis
	cbz	w0, LBB0_17
; %bb.14:
Lloh2:
	adrp	x8, _SM_SMALL_PAGE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SM_SMALL_PAGE@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	str	x8, [x19, #24]
	mov	x0, x19
	bl	_sm_read_cis
	cbz	w0, LBB0_17
LBB0_15:
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_16:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_17:
	ldr	w8, [x19, #8]
	madd	w8, w8, w20, w21
	ldr	x9, [x19, #24]
	add	x1, x9, w8, sxtw
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dbg
	mov	w0, #0
	b	LBB0_16
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_SM_SECTOR_SIZE,8,3             ; @SM_SECTOR_SIZE
	.comm	_SM_SMALL_PAGE,8,3              ; @SM_SMALL_PAGE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CIS block found at offset %x"

	.no_dead_strip	_sm_find_cis
.subsections_via_symbols
