	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_inode
_get_inode:                             ## @get_inode
	.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
	movq	%rsi, %r13
	movl	%edi, %r15d
	movq	_get_inode.ipbuf(%rip), %rdi
	testl	%r15d, %r15d
	js	LBB0_25
## %bb.1:
	movq	%rdx, %r14
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.2:
	movq	_get_inode.last(%rip), %rbx
	cmpq	%r14, %rbx
	ja	LBB0_4
## %bb.3:
	movq	%r13, %rdi
	callq	_INOCNT
	addq	%rbx, %rax
	cmpq	%r14, %rax
	ja	LBB0_22
LBB0_4:
	movq	(%r13), %rax
	movq	_FS_UFS2_MAGIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.5:
	cmpq	$0, _get_inode.cgp(%rip)
	je	LBB0_7
## %bb.6:
	movl	_get_inode.cg(%rip), %ebx
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_ino_to_cg
	cmpl	%eax, %ebx
	je	LBB0_16
LBB0_7:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_ino_to_cg
	movl	%eax, %r12d
	movl	%eax, _get_inode.cg(%rip)
	cmpq	$0, _get_inode.cgp(%rip)
	jne	LBB0_10
## %bb.8:
	movq	8(%r13), %rdi
	callq	_malloc
	movq	%rax, _get_inode.cgp(%rip)
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_errx
	movl	_get_inode.cg(%rip), %r12d
LBB0_10:
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_cgtod
	movb	16(%r13), %cl
	shlq	%cl, %rax
	movl	%r15d, %edi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_lseek
	testq	%rax, %rax
	jns	LBB0_12
## %bb.11:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_12:
	movq	_get_inode.cgp(%rip), %rsi
	movq	8(%r13), %rdx
	movl	%r15d, %edi
	callq	_read
	cmpq	8(%r13), %rax
	je	LBB0_14
## %bb.13:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_14:
	movq	_get_inode.cgp(%rip), %rdi
	callq	_cg_chkmagic
	testl	%eax, %eax
	jne	LBB0_16
## %bb.15:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	callq	_errx
LBB0_16:
	cmpq	$0, _get_inode.ipbuf(%rip)
	jne	LBB0_19
## %bb.17:
	movq	%r13, %rdi
	callq	_INOSZ
	movq	%rax, %rdi
	callq	_malloc
	movq	%rax, _get_inode.ipbuf(%rip)
	testq	%rax, %rax
	jne	LBB0_19
## %bb.18:
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	callq	_errx
LBB0_19:
	movq	%r13, %rdi
	callq	_INOCNT
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_rounddown
	movq	%rax, _get_inode.last(%rip)
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_ino_to_fsba
	movb	16(%r13), %cl
	shlq	%cl, %rax
	movl	%r15d, %edi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_lseek
	testq	%rax, %rax
	js	LBB0_21
## %bb.20:
	movq	_get_inode.ipbuf(%rip), %r12
	movq	%r13, %rdi
	callq	_INOSZ
	movl	%r15d, %edi
	movq	%r12, %rsi
	movq	%rax, %rdx
	callq	_read
	movq	%rax, %r15
	movq	%r13, %rdi
	callq	_INOSZ
	cmpq	%rax, %r15
	je	LBB0_22
LBB0_21:
	leaq	L_.str.5(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_22:
	movq	(%r13), %rax
	movq	_FS_UFS1_MAGIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_29
## %bb.23:
	movq	_get_inode.ipbuf(%rip), %r15
	movq	%r13, %rdi
	callq	_INOCNT
	movq	%rax, %rcx
	orq	%r14, %rax
	shrq	$32, %rax
	je	LBB0_32
## %bb.24:
	movq	%r14, %rax
	xorl	%edx, %edx
	divq	%rcx
	leaq	(%r15,%rdx,4), %rbx
	jmp	LBB0_41
LBB0_25:
	testq	%rdi, %rdi
	je	LBB0_40
## %bb.26:
	callq	_free
	movq	$0, _get_inode.ipbuf(%rip)
	testq	%r13, %r13
	je	LBB0_40
## %bb.27:
	movq	(%r13), %rax
	movq	_FS_UFS2_MAGIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_40
## %bb.28:
	movq	_get_inode.cgp(%rip), %rdi
	callq	_free
	movq	$0, _get_inode.cgp(%rip)
LBB0_40:
	xorl	%ebx, %ebx
	jmp	LBB0_41
LBB0_29:
	movq	_get_inode.ipbuf(%rip), %r12
	movq	%r13, %rdi
	callq	_INOCNT
	movq	%rax, %rcx
	orq	%r14, %rax
	shrq	$32, %rax
	je	LBB0_33
## %bb.30:
	movq	%r14, %rax
	xorl	%edx, %edx
	divq	%rcx
	movq	%rdx, %r15
	jmp	LBB0_34
LBB0_32:
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	leaq	(%r15,%rdx,4), %rbx
	jmp	LBB0_41
LBB0_33:
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%edx, %r15d
LBB0_34:
	movq	_get_inode.cgp(%rip), %rdi
	callq	_cg_inosused
	movl	%eax, %edi
	movq	24(%r13), %rcx
	movq	%r14, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_36
## %bb.35:
	movq	%r14, %rax
	xorl	%edx, %edx
	divq	%rcx
	movq	%rdx, %rsi
	jmp	LBB0_37
LBB0_36:
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%edx, %esi
LBB0_37:
	leaq	(%r12,%r15,4), %rbx
	callq	_isclr
	testq	%rax, %rax
	je	LBB0_41
## %bb.38:
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_bzero
LBB0_41:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_get_inode.ipbuf,8,3 ## @get_inode.ipbuf
.zerofill __DATA,__bss,_get_inode.cgp,8,3 ## @get_inode.cgp
.zerofill __DATA,__bss,_get_inode.last,8,3 ## @get_inode.last
.zerofill __DATA,__bss,_get_inode.cg,4,2 ## @get_inode.cg
	.comm	_FS_UFS2_MAGIC,8,3              ## @FS_UFS2_MAGIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"allocate cg"

L_.str.1:                               ## @.str.1
	.asciz	"lseek cg"

L_.str.2:                               ## @.str.2
	.asciz	"read cg"

L_.str.3:                               ## @.str.3
	.asciz	"cg has bad magic"

L_.str.4:                               ## @.str.4
	.asciz	"allocate inodes"

L_.str.5:                               ## @.str.5
	.asciz	"read inodes"

	.comm	_FS_UFS1_MAGIC,8,3              ## @FS_UFS1_MAGIC
	.no_dead_strip	_get_inode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_inode
_get_inode:                             ; @get_inode
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	mov	x21, x0
	adrp	x23, _get_inode.ipbuf@PAGE
	ldr	x0, [x23, _get_inode.ipbuf@PAGEOFF]
	tbnz	w21, #31, LBB0_24
; %bb.1:
	mov	x20, x2
	adrp	x24, _get_inode.last@PAGE
	cbz	x0, LBB0_4
; %bb.2:
	ldr	x22, [x24, _get_inode.last@PAGEOFF]
	cmp	x22, x20
	b.hi	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_INOCNT
	add	x8, x0, x22
	cmp	x8, x20
	b.hi	LBB0_22
LBB0_4:
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _FS_UFS2_MAGIC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FS_UFS2_MAGIC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.5:
	adrp	x25, _get_inode.cgp@PAGE
	ldr	x8, [x25, _get_inode.cgp@PAGEOFF]
	adrp	x26, _get_inode.cg@PAGE
	cbz	x8, LBB0_7
; %bb.6:
	ldr	w22, [x26, _get_inode.cg@PAGEOFF]
	mov	x0, x19
	mov	x1, x20
	bl	_ino_to_cg
	cmp	w22, w0
	b.eq	LBB0_16
LBB0_7:
	mov	x0, x19
	mov	x1, x20
	bl	_ino_to_cg
	mov	x22, x0
	str	w0, [x26, _get_inode.cg@PAGEOFF]
	ldr	x8, [x25, _get_inode.cgp@PAGEOFF]
	cbnz	x8, LBB0_10
; %bb.8:
	ldr	x0, [x19, #8]
	bl	_malloc
	str	x0, [x25, _get_inode.cgp@PAGEOFF]
	cbnz	x0, LBB0_10
; %bb.9:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_errx
	ldr	w22, [x26, _get_inode.cg@PAGEOFF]
LBB0_10:
	mov	x0, x19
	mov	x1, x22
	bl	_cgtod
	ldr	x8, [x19, #16]
	lsl	x1, x0, x8
	mov	x0, x21
	mov	w2, #0
	bl	_lseek
	tbz	x0, #63, LBB0_12
; %bb.11:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_12:
	ldr	x1, [x25, _get_inode.cgp@PAGEOFF]
	ldr	x2, [x19, #8]
	mov	x0, x21
	bl	_read
	ldr	x8, [x19, #8]
	cmp	x0, x8
	b.eq	LBB0_14
; %bb.13:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_14:
	ldr	x0, [x25, _get_inode.cgp@PAGEOFF]
	bl	_cg_chkmagic
	cbnz	w0, LBB0_16
; %bb.15:
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_16:
	ldr	x8, [x23, _get_inode.ipbuf@PAGEOFF]
	cbnz	x8, LBB0_19
; %bb.17:
	mov	x0, x19
	bl	_INOSZ
	bl	_malloc
	str	x0, [x23, _get_inode.ipbuf@PAGEOFF]
	cbnz	x0, LBB0_19
; %bb.18:
Lloh11:
	adrp	x1, l_.str.4@PAGE
Lloh12:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_19:
	mov	x0, x19
	bl	_INOCNT
	mov	x1, x0
	mov	x0, x20
	bl	_rounddown
	mov	x1, x0
	str	x0, [x24, _get_inode.last@PAGEOFF]
	mov	x0, x19
	bl	_ino_to_fsba
	ldr	x8, [x19, #16]
	lsl	x1, x0, x8
	mov	x0, x21
	mov	w2, #0
	bl	_lseek
	tbnz	x0, #63, LBB0_21
; %bb.20:
	ldr	x22, [x23, _get_inode.ipbuf@PAGEOFF]
	mov	x0, x19
	bl	_INOSZ
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_read
	mov	x21, x0
	mov	x0, x19
	bl	_INOSZ
	cmp	x21, x0
	b.eq	LBB0_22
LBB0_21:
Lloh13:
	adrp	x1, l_.str.5@PAGE
Lloh14:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_22:
	ldr	x8, [x19]
Lloh15:
	adrp	x9, _FS_UFS1_MAGIC@GOTPAGE
Lloh16:
	ldr	x9, [x9, _FS_UFS1_MAGIC@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_28
; %bb.23:
	ldr	x21, [x23, _get_inode.ipbuf@PAGEOFF]
	mov	x0, x19
	bl	_INOCNT
	udiv	x8, x20, x0
	msub	x8, x8, x0, x20
	add	x21, x21, x8, lsl #2
	b	LBB0_31
LBB0_24:
	cbz	x0, LBB0_30
; %bb.25:
	bl	_free
	str	xzr, [x23, _get_inode.ipbuf@PAGEOFF]
	cbz	x19, LBB0_30
; %bb.26:
	ldr	x8, [x19]
Lloh18:
	adrp	x9, _FS_UFS2_MAGIC@GOTPAGE
Lloh19:
	ldr	x9, [x9, _FS_UFS2_MAGIC@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_30
; %bb.27:
	adrp	x19, _get_inode.cgp@PAGE
	ldr	x0, [x19, _get_inode.cgp@PAGEOFF]
	bl	_free
	mov	x21, #0
	str	xzr, [x19, _get_inode.cgp@PAGEOFF]
	b	LBB0_31
LBB0_28:
	ldr	x21, [x23, _get_inode.ipbuf@PAGEOFF]
	mov	x0, x19
	bl	_INOCNT
	udiv	x8, x20, x0
	msub	x8, x8, x0, x20
	add	x21, x21, x8, lsl #2
Lloh21:
	adrp	x8, _get_inode.cgp@PAGE
Lloh22:
	ldr	x0, [x8, _get_inode.cgp@PAGEOFF]
	bl	_cg_inosused
	ldr	x8, [x19, #24]
	udiv	x9, x20, x8
	msub	x1, x9, x8, x20
	bl	_isclr
	cbz	x0, LBB0_31
; %bb.29:
	mov	x0, x21
	mov	w1, #4
	bl	_bzero
	b	LBB0_31
LBB0_30:
	mov	x21, #0
LBB0_31:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdr	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_get_inode.ipbuf,8,3 ; @get_inode.ipbuf
.zerofill __DATA,__bss,_get_inode.cgp,8,3 ; @get_inode.cgp
.zerofill __DATA,__bss,_get_inode.last,8,3 ; @get_inode.last
.zerofill __DATA,__bss,_get_inode.cg,4,2 ; @get_inode.cg
	.comm	_FS_UFS2_MAGIC,8,3              ; @FS_UFS2_MAGIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"allocate cg"

l_.str.1:                               ; @.str.1
	.asciz	"lseek cg"

l_.str.2:                               ; @.str.2
	.asciz	"read cg"

l_.str.3:                               ; @.str.3
	.asciz	"cg has bad magic"

l_.str.4:                               ; @.str.4
	.asciz	"allocate inodes"

l_.str.5:                               ; @.str.5
	.asciz	"read inodes"

	.comm	_FS_UFS1_MAGIC,8,3              ; @FS_UFS1_MAGIC
	.no_dead_strip	_get_inode
.subsections_via_symbols
