	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grub_udf_read_block
_grub_udf_read_block:                   ## @grub_udf_read_block
	.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	%esi, %r12d
	movq	%rdi, %r14
	movl	32(%rdi), %edi
	callq	_U16
	movq	_GRUB_UDF_TAG_IDENT_FE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_2
## %bb.1:
	movq	24(%r14), %rbx
	movl	16(%r14), %edi
	callq	_U32
	movslq	%eax, %r13
	addq	%rbx, %r13
	leaq	12(%r14), %rbx
	jmp	LBB0_3
LBB0_2:
	leaq	40(%r14), %rbx
	movq	48(%r14), %r15
	movl	44(%r14), %edi
	callq	_U32
	movslq	%eax, %r13
	addq	%r15, %r13
LBB0_3:
	movl	(%rbx), %edi
	callq	_U32
	movl	%eax, %ebx
	movl	8(%r14), %edi
	callq	_U16
	movq	_GRUB_UDF_ICBTAG_FLAG_AD_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_GRUB_UDF_ICBTAG_FLAG_AD_SHORT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_10
## %bb.4:
	xorl	%r15d, %r15d
	cmpl	$8, %ebx
	jl	LBB0_17
## %bb.5:
	movq	_GRUB_UDF_BLKSZ@GOTPCREL(%rip), %rax
	imull	(%rax), %r12d
	shrl	$3, %ebx
	addq	$4, %r13
	incl	%ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	-4(%r13), %edi
	callq	_U32
	cmpl	%eax, %r12d
	jl	LBB0_7
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	-4(%r13), %edi
	callq	_U32
	subl	%eax, %r12d
	addq	$8, %r13
	decl	%ebx
	cmpl	$1, %ebx
	jg	LBB0_6
	jmp	LBB0_17
LBB0_10:
	movslq	%ebx, %rax
	movabsq	$-6148914691236517205, %rcx     ## imm = 0xAAAAAAAAAAAAAAAB
	mulq	%rcx
	movq	%rdx, %rbx
	shrq	$3, %rbx
	xorl	%r15d, %r15d
	testl	%ebx, %ebx
	jle	LBB0_17
## %bb.11:
	movq	_GRUB_UDF_BLKSZ@GOTPCREL(%rip), %rax
	imull	(%rax), %r12d
	addq	$4, %r13
	incl	%ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	-4(%r13), %edi
	callq	_U32
	cmpl	%eax, %r12d
	jl	LBB0_13
## %bb.16:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	-4(%r13), %edi
	callq	_U32
	subl	%eax, %r12d
	addq	$12, %r13
	decl	%ebx
	cmpl	$1, %ebx
	jg	LBB0_12
	jmp	LBB0_17
LBB0_13:
	movl	(%r13), %edi
	callq	_U32
	movq	_GRUB_UDF_EXT_MASK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_17
## %bb.14:
	movq	%r13, %rax
	addq	$4, %rax
	jmp	LBB0_15
LBB0_7:
	movl	(%r13), %edi
	callq	_U32
	movq	_GRUB_UDF_EXT_MASK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_17
## %bb.8:
	leaq	4(%r14), %rax
LBB0_15:
	movl	(%r14), %edi
	movl	(%rax), %esi
	movl	(%r13), %edx
	callq	_grub_udf_get_block
	movl	%eax, %ecx
	movq	_GRUB_UDF_BLKSZ@GOTPCREL(%rip), %rsi
	movl	%r12d, %eax
	cltd
	idivl	(%rsi)
	movl	%eax, %r15d
	addl	%ecx, %r15d
LBB0_17:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GRUB_UDF_TAG_IDENT_FE,4,2      ## @GRUB_UDF_TAG_IDENT_FE
	.comm	_GRUB_UDF_ICBTAG_FLAG_AD_MASK,4,2 ## @GRUB_UDF_ICBTAG_FLAG_AD_MASK
	.comm	_GRUB_UDF_ICBTAG_FLAG_AD_SHORT,4,2 ## @GRUB_UDF_ICBTAG_FLAG_AD_SHORT
	.comm	_GRUB_UDF_BLKSZ,4,2             ## @GRUB_UDF_BLKSZ
	.comm	_GRUB_UDF_EXT_MASK,4,2          ## @GRUB_UDF_EXT_MASK
	.no_dead_strip	_grub_udf_read_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grub_udf_read_block
_grub_udf_read_block:                   ; @grub_udf_read_block
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #32]
	bl	_U16
Lloh0:
	adrp	x8, _GRUB_UDF_TAG_IDENT_FE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GRUB_UDF_TAG_IDENT_FE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_2
; %bb.1:
	ldr	x21, [x19, #24]
	ldr	w0, [x19, #16]
	bl	_U32
	add	x22, x21, w0, sxtw
	add	x21, x19, #12
	b	LBB0_3
LBB0_2:
	add	x21, x19, #40
	ldr	x22, [x19, #48]
	ldr	w0, [x19, #44]
	bl	_U32
	add	x22, x22, w0, sxtw
LBB0_3:
	ldr	w0, [x21]
	bl	_U32
	mov	x21, x0
	ldr	w0, [x19, #8]
	bl	_U16
Lloh3:
	adrp	x8, _GRUB_UDF_ICBTAG_FLAG_AD_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GRUB_UDF_ICBTAG_FLAG_AD_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh6:
	adrp	x9, _GRUB_UDF_ICBTAG_FLAG_AD_SHORT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _GRUB_UDF_ICBTAG_FLAG_AD_SHORT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_8
; %bb.4:
	cmp	w21, #8
	b.lt	LBB0_15
; %bb.5:
Lloh9:
	adrp	x8, _GRUB_UDF_BLKSZ@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GRUB_UDF_BLKSZ@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	mul	w20, w8, w20
	lsr	w8, w21, #3
	add	x21, x22, #4
	add	w22, w8, #1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w0, [x21, #-4]
	bl	_U32
	cmp	w20, w0
	b.lt	LBB0_14
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldur	w0, [x21, #-4]
	bl	_U32
	sub	w20, w20, w0
	add	x21, x21, #8
	sub	w22, w22, #1
	cmp	w22, #1
	b.gt	LBB0_6
	b	LBB0_15
LBB0_8:
	sxtw	x8, w21
	mov	x9, #-6148914691236517206
	movk	x9, #43691
	umulh	x8, x8, x9
	lsr	x8, x8, #3
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.9:
Lloh12:
	adrp	x9, _GRUB_UDF_BLKSZ@GOTPAGE
Lloh13:
	ldr	x9, [x9, _GRUB_UDF_BLKSZ@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	mul	w20, w9, w20
	add	x21, x22, #4
	add	w22, w8, #1
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldur	w0, [x21, #-4]
	bl	_U32
	cmp	w20, w0
	b.lt	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldur	w0, [x21, #-4]
	bl	_U32
	sub	w20, w20, w0
	add	x21, x21, #12
	sub	w22, w22, #1
	cmp	w22, #1
	b.gt	LBB0_10
	b	LBB0_15
LBB0_12:
	ldr	w0, [x21]
	bl	_U32
Lloh15:
	adrp	x8, _GRUB_UDF_EXT_MASK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GRUB_UDF_EXT_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_15
; %bb.13:
	add	x8, x21, #4
	b	LBB0_18
LBB0_14:
	ldr	w0, [x21]
	bl	_U32
Lloh18:
	adrp	x8, _GRUB_UDF_EXT_MASK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _GRUB_UDF_EXT_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_17
LBB0_15:
	mov	w0, #0
LBB0_16:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_17:
	add	x8, x19, #4
LBB0_18:
	ldr	w0, [x19]
	ldr	w1, [x8]
	ldr	w2, [x21]
	bl	_grub_udf_get_block
Lloh21:
	adrp	x8, _GRUB_UDF_BLKSZ@GOTPAGE
Lloh22:
	ldr	x8, [x8, _GRUB_UDF_BLKSZ@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	sdiv	w8, w20, w8
	add	w0, w8, w0
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_GRUB_UDF_TAG_IDENT_FE,4,2      ; @GRUB_UDF_TAG_IDENT_FE
	.comm	_GRUB_UDF_ICBTAG_FLAG_AD_MASK,4,2 ; @GRUB_UDF_ICBTAG_FLAG_AD_MASK
	.comm	_GRUB_UDF_ICBTAG_FLAG_AD_SHORT,4,2 ; @GRUB_UDF_ICBTAG_FLAG_AD_SHORT
	.comm	_GRUB_UDF_BLKSZ,4,2             ; @GRUB_UDF_BLKSZ
	.comm	_GRUB_UDF_EXT_MASK,4,2          ; @GRUB_UDF_EXT_MASK
	.no_dead_strip	_grub_udf_read_block
.subsections_via_symbols
