	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grub_jfs_opendir
_grub_jfs_opendir:                      ## @grub_jfs_opendir
	.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, %rbx
	movq	%rdi, %r14
	movq	16(%rsi), %r12
	movl	28(%rsi), %edi
	callq	_grub_le_to_cpu32
	movq	_GRUB_JFS_FILETYPE_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_GRUB_JFS_FILETYPE_DIR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
## %bb.1:
	movl	$88, %edi
	callq	_grub_zalloc
	testq	%rax, %rax
	je	LBB0_14
## %bb.2:
	movq	%rax, %r15
	movq	%r14, 80(%rax)
	movq	%rbx, 72(%rax)
	movq	_GRUB_JFS_TREE_LEAF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 24(%rbx)
	je	LBB0_7
## %bb.3:
	movq	16(%rbx), %rax
	movq	%rax, 64(%r15)
	movq	%r12, 48(%r15)
	movq	(%rbx), %rax
	movq	%rax, (%r15)
	movl	8(%rbx), %eax
LBB0_4:
	movl	%eax, 32(%r15)
	jmp	LBB0_15
LBB0_5:
	movq	_GRUB_ERR_BAD_FILE_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_grub_error
LBB0_14:
	xorl	%r15d, %r15d
LBB0_15:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	4(%r14), %edi
	callq	_grub_le_to_cpu32
	movl	%eax, %edi
	callq	_grub_malloc
	movq	%rax, 24(%r15)
	testq	%rax, %rax
	je	LBB0_13
## %bb.8:
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movl	(%r12,%rax,4), %edi
	callq	_grub_le_to_cpu32
	movl	%eax, %ebx
	movl	(%r14), %edi
	callq	_grub_le_to_cpu16
	movq	_GRUB_DISK_SECTOR_BITS@GOTPCREL(%rip), %r13
	subl	(%r13), %eax
	movl	%eax, %ecx
	shll	%cl, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r14), %edi
	movl	8(%r14), %r12d
	callq	_grub_le_to_cpu32
	movq	24(%r15), %rcx
	movq	(%rcx), %r8
	movl	%r12d, %edi
	movl	%ebx, %esi
	xorl	%edx, %edx
	movl	%eax, %ecx
	callq	_grub_disk_read
	movq	24(%r15), %rdi
	testq	%rax, %rax
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	(%rdi), %rax
	movq	56(%rdi), %rcx
	movslq	12(%rdi), %rdx
	shlq	$5, %rdx
	movsbq	(%rax,%rdx), %rax
	movl	(%rcx,%rax,4), %edi
	callq	_grub_le_to_cpu32
	movl	%eax, %ebx
	movl	(%r14), %edi
	callq	_grub_le_to_cpu16
	subl	(%r13), %eax
	movl	%eax, %ecx
	shll	%cl, %ebx
	movq	24(%r15), %rax
	movq	_GRUB_JFS_TREE_LEAF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 8(%rax)
	je	LBB0_9
## %bb.11:
	movq	56(%rax), %rcx
	movq	%rcx, 64(%r15)
	movq	40(%rax), %rcx
	movq	%rcx, 48(%r15)
	movslq	12(%rax), %rcx
	shlq	$5, %rcx
	addq	(%rax), %rcx
	movq	%rcx, (%r15)
	movl	16(%rax), %eax
	jmp	LBB0_4
LBB0_12:
	callq	_grub_free
LBB0_13:
	movq	%r15, %rdi
	callq	_grub_free
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_GRUB_JFS_FILETYPE_MASK,4,2     ## @GRUB_JFS_FILETYPE_MASK
	.comm	_GRUB_JFS_FILETYPE_DIR,4,2      ## @GRUB_JFS_FILETYPE_DIR
	.comm	_GRUB_ERR_BAD_FILE_TYPE,4,2     ## @GRUB_ERR_BAD_FILE_TYPE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"not a directory"

	.comm	_GRUB_JFS_TREE_LEAF,4,2         ## @GRUB_JFS_TREE_LEAF
	.comm	_GRUB_DISK_SECTOR_BITS,4,2      ## @GRUB_DISK_SECTOR_BITS
	.no_dead_strip	_grub_jfs_opendir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grub_jfs_opendir
_grub_jfs_opendir:                      ; @grub_jfs_opendir
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	mov	x20, x0
	ldr	x22, [x1, #16]
	ldr	w0, [x1, #28]
	bl	_grub_le_to_cpu32
Lloh0:
	adrp	x8, _GRUB_JFS_FILETYPE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GRUB_JFS_FILETYPE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh3:
	adrp	x9, _GRUB_JFS_FILETYPE_DIR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _GRUB_JFS_FILETYPE_DIR@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.1:
	mov	w0, #88
	bl	_grub_zalloc
	mov	x19, x0
	cbz	x0, LBB0_7
; %bb.2:
	stp	x21, x20, [x19, #72]
	ldr	w8, [x21, #24]
Lloh6:
	adrp	x23, _GRUB_JFS_TREE_LEAF@GOTPAGE
Lloh7:
	ldr	x23, [x23, _GRUB_JFS_TREE_LEAF@GOTPAGEOFF]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.3:
	ldr	x8, [x21, #16]
	str	x8, [x19, #64]
	str	x22, [x19, #48]
	ldr	x8, [x21]
	str	x8, [x19]
	ldr	w8, [x21, #8]
LBB0_4:
	str	w8, [x19, #32]
	b	LBB0_7
LBB0_5:
Lloh8:
	adrp	x8, _GRUB_ERR_BAD_FILE_TYPE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GRUB_ERR_BAD_FILE_TYPE@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_grub_error
LBB0_6:
	mov	x19, #0
LBB0_7:
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_8:
	ldr	w0, [x20, #4]
	bl	_grub_le_to_cpu32
	bl	_grub_malloc
	str	x0, [x19, #24]
	cbz	x0, LBB0_14
; %bb.9:
	ldr	x8, [x21]
	ldr	x8, [x8]
	ldr	w0, [x22, x8, lsl #2]
	bl	_grub_le_to_cpu32
	mov	x21, x0
	ldr	w0, [x20]
	bl	_grub_le_to_cpu16
Lloh13:
	adrp	x24, _GRUB_DISK_SECTOR_BITS@GOTPAGE
Lloh14:
	ldr	x24, [x24, _GRUB_DISK_SECTOR_BITS@GOTPAGEOFF]
	ldr	w8, [x24]
	sub	w8, w0, w8
	lsl	w21, w21, w8
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldp	w0, w22, [x20, #4]
	bl	_grub_le_to_cpu32
	mov	x3, x0
	ldr	x8, [x19, #24]
	ldr	x4, [x8]
	mov	x0, x22
	mov	x1, x21
	mov	w2, #0
	bl	_grub_disk_read
	mov	x8, x0
	ldr	x0, [x19, #24]
	cbnz	x8, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x8, [x0, #56]
	ldr	x9, [x0]
	ldrsw	x10, [x0, #12]
	lsl	x10, x10, #5
	ldrsb	x9, [x9, x10]
	ldr	w0, [x8, x9, lsl #2]
	bl	_grub_le_to_cpu32
	mov	x21, x0
	ldr	w0, [x20]
	bl	_grub_le_to_cpu16
	ldr	w8, [x24]
	sub	w8, w0, w8
	lsl	w21, w21, w8
	ldr	x8, [x19, #24]
	ldr	w9, [x8, #8]
	ldr	w10, [x23]
	tst	w10, w9
	b.eq	LBB0_10
; %bb.12:
	ldr	x9, [x8, #56]
	str	x9, [x19, #64]
	ldr	x9, [x8, #40]
	str	x9, [x19, #48]
	ldr	x9, [x8]
	ldp	w10, w8, [x8, #12]
                                        ; kill: def $w10 killed $w10 def $x10
	sxtw	x10, w10
	add	x9, x9, x10, lsl #5
	str	x9, [x19]
	b	LBB0_4
LBB0_13:
	bl	_grub_free
LBB0_14:
	mov	x0, x19
	bl	_grub_free
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_GRUB_JFS_FILETYPE_MASK,4,2     ; @GRUB_JFS_FILETYPE_MASK
	.comm	_GRUB_JFS_FILETYPE_DIR,4,2      ; @GRUB_JFS_FILETYPE_DIR
	.comm	_GRUB_ERR_BAD_FILE_TYPE,4,2     ; @GRUB_ERR_BAD_FILE_TYPE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"not a directory"

	.comm	_GRUB_JFS_TREE_LEAF,4,2         ; @GRUB_JFS_TREE_LEAF
	.comm	_GRUB_DISK_SECTOR_BITS,4,2      ; @GRUB_DISK_SECTOR_BITS
	.no_dead_strip	_grub_jfs_opendir
.subsections_via_symbols
