	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grub_jfs_open
_grub_jfs_open:                         ## @grub_jfs_open
	.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	%rsi, %r15
	movq	%rdi, %r14
	movq	_my_mod@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_grub_dl_ref
	movq	16(%r14), %rax
	movl	(%rax), %edi
	callq	_grub_jfs_mount
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_grub_jfs_find_file
	movq	_grub_errno@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_4
## %bb.2:
	movl	4(%rbx), %edi
	callq	_grub_le_to_cpu32
	movq	_GRUB_JFS_FILETYPE_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_GRUB_JFS_FILETYPE_REG@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_3
## %bb.6:
	movq	%rbx, 8(%r14)
	movl	(%rbx), %edi
	callq	_grub_le_to_cpu64
	movl	%eax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_3:
	movq	_GRUB_ERR_BAD_FILE_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_grub_error
LBB0_4:
	movl	(%r12), %edi
	callq	_grub_dl_unref
	movq	%rbx, %rdi
	callq	_grub_free
	movq	_grub_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_my_mod,4,2                     ## @my_mod
	.comm	_grub_errno,8,3                 ## @grub_errno
	.comm	_GRUB_JFS_FILETYPE_MASK,4,2     ## @GRUB_JFS_FILETYPE_MASK
	.comm	_GRUB_JFS_FILETYPE_REG,4,2      ## @GRUB_JFS_FILETYPE_REG
	.comm	_GRUB_ERR_BAD_FILE_TYPE,4,2     ## @GRUB_ERR_BAD_FILE_TYPE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"not a regular file"

	.no_dead_strip	_grub_jfs_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grub_jfs_open
_grub_jfs_open:                         ; @grub_jfs_open
	.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	x19, x0
Lloh0:
	adrp	x22, _my_mod@GOTPAGE
Lloh1:
	ldr	x22, [x22, _my_mod@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_grub_dl_ref
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	bl	_grub_jfs_mount
	mov	x20, x0
Lloh2:
	adrp	x23, _grub_errno@GOTPAGE
Lloh3:
	ldr	x23, [x23, _grub_errno@GOTPAGEOFF]
	cbz	x0, LBB0_5
; %bb.1:
	mov	x0, x20
	mov	x1, x21
	bl	_grub_jfs_find_file
	ldr	x8, [x23]
	cbnz	x8, LBB0_5
; %bb.2:
	ldr	w0, [x20, #4]
	bl	_grub_le_to_cpu32
Lloh4:
	adrp	x8, _GRUB_JFS_FILETYPE_MASK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GRUB_JFS_FILETYPE_MASK@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh7:
	adrp	x9, _GRUB_JFS_FILETYPE_REG@GOTPAGE
Lloh8:
	ldr	x9, [x9, _GRUB_JFS_FILETYPE_REG@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.3:
	str	x20, [x19, #8]
	ldr	w0, [x20]
	bl	_grub_le_to_cpu64
	mov	x8, x0
	mov	x0, #0
	str	w8, [x19]
	b	LBB0_6
LBB0_4:
Lloh10:
	adrp	x8, _GRUB_ERR_BAD_FILE_TYPE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GRUB_ERR_BAD_FILE_TYPE@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_grub_error
LBB0_5:
	ldr	w0, [x22]
	bl	_grub_dl_unref
	mov	x0, x20
	bl	_grub_free
	ldr	x0, [x23]
LBB0_6:
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_my_mod,4,2                     ; @my_mod
	.comm	_grub_errno,8,3                 ; @grub_errno
	.comm	_GRUB_JFS_FILETYPE_MASK,4,2     ; @GRUB_JFS_FILETYPE_MASK
	.comm	_GRUB_JFS_FILETYPE_REG,4,2      ; @GRUB_JFS_FILETYPE_REG
	.comm	_GRUB_ERR_BAD_FILE_TYPE,4,2     ; @GRUB_ERR_BAD_FILE_TYPE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"not a regular file"

	.no_dead_strip	_grub_jfs_open
.subsections_via_symbols
