	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grub_reiserfs_open
_grub_reiserfs_open:                    ## @grub_reiserfs_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$168, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	$0, -56(%rbp)
	movq	_my_mod@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_grub_dl_ref
	movq	24(%r14), %rax
	movl	(%rax), %edi
	callq	_grub_reiserfs_mount
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movl	40(%r13), %edi
	callq	_grub_le_to_cpu16
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	$1, %edi
	callq	_grub_cpu_to_le32
	movq	%rax, -88(%rbp)
	movl	$2, %edi
	callq	_grub_cpu_to_le32
	movq	%rax, -96(%rbp)
	movq	$0, -80(%rbp)
	movq	_GRUB_REISERFS_DIRECTORY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-96(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$2, %edx
	callq	_grub_reiserfs_set_key_type
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_grub_reiserfs_set_key_offset
	leaq	-192(%rbp), %rdx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_grub_reiserfs_get_item
	movq	_GRUB_ERR_NONE@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	jne	LBB0_9
## %bb.2:
	cmpq	$0, -192(%rbp)
	je	LBB0_3
## %bb.4:
	movq	_grub_reiserfs_iterate_dir@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_grub_reiserfs_read_symlink@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_GRUB_FSHELP_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	leaq	-192(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	movq	%r12, %rdi
	xorl	%r8d, %r8d
	callq	_grub_fshelp_find_file
	movq	_grub_errno@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_9
## %bb.5:
	movq	-56(%rbp), %rax
	movups	24(%rax), %xmm0
	movaps	%xmm0, -96(%rbp)
	movq	_GRUB_REISERFS_STAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-96(%rbp), %r12
	movq	%r12, %rdi
	movl	$2, %edx
	callq	_grub_reiserfs_set_key_type
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_grub_reiserfs_set_key_offset
	leaq	-144(%rbp), %rdx
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_grub_reiserfs_get_item
	cmpq	(%rbx), %rax
	jne	LBB0_9
## %bb.6:
	cmpq	$0, -144(%rbp)
	je	LBB0_7
## %bb.10:
	movl	-124(%rbp), %edi
	callq	_grub_le_to_cpu16
	movq	%rax, %r12
	movl	-128(%rbp), %edi
	callq	_grub_le_to_cpu16
	movq	-144(%rbp), %r8
	movq	_GRUB_DISK_SECTOR_BITS@GOTPCREL(%rip), %rcx
	testq	%r12, %r12
	movb	(%rcx), %cl
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, %rsi
	sarq	%cl, %rsi
	movl	8(%r13), %edi
	imulq	%r8, %rsi
	imulq	%rdx, %r8
	movq	_GRUB_DISK_SECTOR_SIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rdx
	decq	%rdx
	andq	%r8, %rdx
	addq	%rax, %rdx
	leaq	-48(%rbp), %r8
	movl	$4, %ecx
	callq	_grub_disk_read
	movq	_grub_errno@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_9
## %bb.11:
	movl	-48(%rbp), %edi
	callq	_grub_le_to_cpu64
	movl	%eax, (%r14)
	leaq	L_.str.2(%rip), %rdi
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edx
	movl	%eax, %r8d
	callq	_grub_dprintf
	movq	$0, 16(%r14)
	movq	-56(%rbp), %rax
	movq	%rax, 8(%r14)
	jmp	LBB0_12
LBB0_3:
	movq	_GRUB_ERR_BAD_FS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
LBB0_8:
	callq	_grub_error
LBB0_9:
	movq	_grub_errno@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	_GRUB_ERR_NONE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_assert
	movq	-56(%rbp), %rdi
	callq	_grub_free
	movq	%r13, %rdi
	callq	_grub_free
	movl	(%r15), %edi
	callq	_grub_dl_unref
LBB0_12:
	movq	(%rbx), %rax
	addq	$168, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_GRUB_ERR_BAD_FS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_my_mod,4,2                     ## @my_mod
	.comm	_GRUB_REISERFS_DIRECTORY,4,2    ## @GRUB_REISERFS_DIRECTORY
	.comm	_GRUB_ERR_NONE,8,3              ## @GRUB_ERR_NONE
	.comm	_GRUB_ERR_BAD_FS,4,2            ## @GRUB_ERR_BAD_FS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to find root item"

	.comm	_grub_reiserfs_iterate_dir,4,2  ## @grub_reiserfs_iterate_dir
	.comm	_grub_reiserfs_read_symlink,4,2 ## @grub_reiserfs_read_symlink
	.comm	_GRUB_FSHELP_REG,4,2            ## @GRUB_FSHELP_REG
	.comm	_grub_errno,8,3                 ## @grub_errno
	.comm	_GRUB_REISERFS_STAT,4,2         ## @GRUB_REISERFS_STAT
L_.str.1:                               ## @.str.1
	.asciz	"unable to find searched item"

	.comm	_GRUB_DISK_SECTOR_BITS,8,3      ## @GRUB_DISK_SECTOR_BITS
	.comm	_GRUB_DISK_SECTOR_SIZE,4,2      ## @GRUB_DISK_SECTOR_SIZE
L_.str.2:                               ## @.str.2
	.asciz	"reiserfs"

L_.str.3:                               ## @.str.3
	.asciz	"file size : %d (%08x%08x)\n"

	.no_dead_strip	_grub_reiserfs_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grub_reiserfs_open
_grub_reiserfs_open:                    ; @grub_reiserfs_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #224
	.cfi_def_cfa_offset 224
	stp	x26, x25, [sp, #144]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #160]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #176]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #192]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #208]            ; 16-byte Folded Spill
	add	x29, sp, #208
	.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	x22, x1
	mov	x19, x0
	str	xzr, [sp, #88]
Lloh0:
	adrp	x23, _my_mod@GOTPAGE
Lloh1:
	ldr	x23, [x23, _my_mod@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_grub_dl_ref
	ldr	x8, [x19, #24]
	ldr	w0, [x8]
	bl	_grub_reiserfs_mount
	mov	x20, x0
Lloh2:
	adrp	x24, _grub_errno@GOTPAGE
Lloh3:
	ldr	x24, [x24, _grub_errno@GOTPAGEOFF]
Lloh4:
	adrp	x25, _GRUB_ERR_NONE@GOTPAGE
Lloh5:
	ldr	x25, [x25, _GRUB_ERR_NONE@GOTPAGEOFF]
	cbz	x0, LBB0_11
; %bb.1:
	ldr	w0, [x20, #40]
	bl	_grub_le_to_cpu16
	mov	x21, x0
	mov	w0, #1
	bl	_grub_cpu_to_le32
	str	x0, [sp, #24]
	mov	w0, #2
	bl	_grub_cpu_to_le32
	str	x0, [sp, #16]
	str	xzr, [sp, #32]
Lloh6:
	adrp	x8, _GRUB_REISERFS_DIRECTORY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GRUB_REISERFS_DIRECTORY@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x0, sp, #16
	mov	w2, #2
	bl	_grub_reiserfs_set_key_type
	add	x0, sp, #16
	mov	w1, #1
	bl	_grub_reiserfs_set_key_offset
	add	x1, sp, #16
	add	x2, sp, #96
	mov	x0, x20
	bl	_grub_reiserfs_get_item
	ldr	x8, [x25]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.2:
	ldr	x8, [sp, #96]
	cbz	x8, LBB0_9
; %bb.3:
Lloh9:
	adrp	x8, _grub_reiserfs_iterate_dir@GOTPAGE
Lloh10:
	ldr	x8, [x8, _grub_reiserfs_iterate_dir@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
Lloh12:
	adrp	x8, _grub_reiserfs_read_symlink@GOTPAGE
Lloh13:
	ldr	x8, [x8, _grub_reiserfs_read_symlink@GOTPAGEOFF]
Lloh14:
	ldr	w5, [x8]
Lloh15:
	adrp	x8, _GRUB_FSHELP_REG@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GRUB_FSHELP_REG@GOTPAGEOFF]
Lloh17:
	ldr	w6, [x8]
	add	x1, sp, #96
	add	x2, sp, #88
	mov	x0, x22
	mov	w4, #0
	bl	_grub_fshelp_find_file
	ldr	x8, [x24]
	cbnz	x8, LBB0_11
; %bb.4:
	ldr	x8, [sp, #88]
	ldp	x8, x9, [x8, #24]
	stp	x8, x9, [sp, #16]
Lloh18:
	adrp	x8, _GRUB_REISERFS_STAT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _GRUB_REISERFS_STAT@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	add	x0, sp, #16
	mov	w2, #2
	bl	_grub_reiserfs_set_key_type
	add	x0, sp, #16
	mov	w1, #0
	bl	_grub_reiserfs_set_key_offset
	add	x1, sp, #16
	add	x2, sp, #40
	mov	x0, x20
	bl	_grub_reiserfs_get_item
	ldr	x8, [x25]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.5:
	ldr	x8, [sp, #40]
	cbz	x8, LBB0_13
; %bb.6:
	ldr	w0, [sp, #60]
	bl	_grub_le_to_cpu16
	mov	x22, x0
	ldr	w0, [sp, #56]
	bl	_grub_le_to_cpu16
	ldr	x9, [sp, #40]
	cbz	x22, LBB0_14
; %bb.7:
	ldr	w8, [x20, #8]
Lloh21:
	adrp	x10, _GRUB_DISK_SECTOR_BITS@GOTPAGE
Lloh22:
	ldr	x10, [x10, _GRUB_DISK_SECTOR_BITS@GOTPAGEOFF]
Lloh23:
	ldr	x10, [x10]
	asr	x10, x21, x10
	mul	x1, x10, x9
	mul	x9, x9, x21
Lloh24:
	adrp	x10, _GRUB_DISK_SECTOR_SIZE@GOTPAGE
Lloh25:
	ldr	x10, [x10, _GRUB_DISK_SECTOR_SIZE@GOTPAGEOFF]
Lloh26:
	ldrsw	x10, [x10]
	sub	x10, x10, #1
	and	x9, x9, x10
	add	x2, x9, x0
	add	x4, sp, #8
	mov	x0, x8
	mov	w3, #4
	bl	_grub_disk_read
	ldr	x8, [x24]
	cbnz	x8, LBB0_11
; %bb.8:
	ldr	w0, [sp, #8]
	bl	_grub_le_to_cpu64
	str	w0, [x19]
	mov	x2, x0
	b	LBB0_16
LBB0_9:
Lloh27:
	adrp	x8, _GRUB_ERR_BAD_FS@GOTPAGE
Lloh28:
	ldr	x8, [x8, _GRUB_ERR_BAD_FS@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
Lloh30:
	adrp	x1, l_.str@PAGE
Lloh31:
	add	x1, x1, l_.str@PAGEOFF
LBB0_10:
	bl	_grub_error
LBB0_11:
	ldr	x8, [x24]
	ldr	x9, [x25]
	cmp	x8, x9
	cset	w0, ne
	bl	_assert
	ldr	x0, [sp, #88]
	bl	_grub_free
	mov	x0, x20
	bl	_grub_free
	ldr	w0, [x23]
	bl	_grub_dl_unref
LBB0_12:
	ldr	x0, [x24]
	ldp	x29, x30, [sp, #208]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #192]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #176]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #160]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #224
	ret
LBB0_13:
Lloh32:
	adrp	x8, _GRUB_ERR_BAD_FS@GOTPAGE
Lloh33:
	ldr	x8, [x8, _GRUB_ERR_BAD_FS@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
Lloh35:
	adrp	x1, l_.str.1@PAGE
Lloh36:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_14:
	ldr	w8, [x20, #8]
Lloh37:
	adrp	x10, _GRUB_DISK_SECTOR_BITS@GOTPAGE
Lloh38:
	ldr	x10, [x10, _GRUB_DISK_SECTOR_BITS@GOTPAGEOFF]
Lloh39:
	ldr	x10, [x10]
	asr	x10, x21, x10
	mul	x1, x10, x9
	mul	x9, x9, x21
Lloh40:
	adrp	x10, _GRUB_DISK_SECTOR_SIZE@GOTPAGE
Lloh41:
	ldr	x10, [x10, _GRUB_DISK_SECTOR_SIZE@GOTPAGEOFF]
Lloh42:
	ldrsw	x10, [x10]
	sub	x10, x10, #1
	and	x9, x9, x10
	add	x2, x9, x0
	add	x4, sp, #8
	mov	x0, x8
	mov	w3, #4
	bl	_grub_disk_read
	ldr	x8, [x24]
	cbnz	x8, LBB0_11
; %bb.15:
	ldr	w0, [sp, #8]
	bl	_grub_le_to_cpu64
	mov	x2, x0
	str	w2, [x19]
LBB0_16:
Lloh43:
	adrp	x0, l_.str.2@PAGE
Lloh44:
	add	x0, x0, l_.str.2@PAGEOFF
Lloh45:
	adrp	x1, l_.str.3@PAGE
Lloh46:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x4, x2
	bl	_grub_dprintf
	ldr	x8, [sp, #88]
	stp	x8, xzr, [x19, #8]
Lloh47:
	adrp	x24, _GRUB_ERR_NONE@GOTPAGE
Lloh48:
	ldr	x24, [x24, _GRUB_ERR_NONE@GOTPAGEOFF]
	b	LBB0_12
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpAdd	Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_my_mod,4,2                     ; @my_mod
	.comm	_GRUB_REISERFS_DIRECTORY,4,2    ; @GRUB_REISERFS_DIRECTORY
	.comm	_GRUB_ERR_NONE,8,3              ; @GRUB_ERR_NONE
	.comm	_GRUB_ERR_BAD_FS,4,2            ; @GRUB_ERR_BAD_FS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to find root item"

	.comm	_grub_reiserfs_iterate_dir,4,2  ; @grub_reiserfs_iterate_dir
	.comm	_grub_reiserfs_read_symlink,4,2 ; @grub_reiserfs_read_symlink
	.comm	_GRUB_FSHELP_REG,4,2            ; @GRUB_FSHELP_REG
	.comm	_grub_errno,8,3                 ; @grub_errno
	.comm	_GRUB_REISERFS_STAT,4,2         ; @GRUB_REISERFS_STAT
l_.str.1:                               ; @.str.1
	.asciz	"unable to find searched item"

	.comm	_GRUB_DISK_SECTOR_BITS,8,3      ; @GRUB_DISK_SECTOR_BITS
	.comm	_GRUB_DISK_SECTOR_SIZE,4,2      ; @GRUB_DISK_SECTOR_SIZE
l_.str.2:                               ; @.str.2
	.asciz	"reiserfs"

l_.str.3:                               ; @.str.3
	.asciz	"file size : %d (%08x%08x)\n"

	.no_dead_strip	_grub_reiserfs_open
.subsections_via_symbols
