	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grub_dl_load_segments
_grub_dl_load_segments:                 ## @grub_dl_load_segments
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	16(%rsi), %r13
	movq	(%r13), %rax
	movq	_GRUB_OBJ_SEGMENT_END@GOTPCREL(%rip), %r15
	movq	_GRUB_ERR_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%r15), %rax
	jne	LBB0_2
## %bb.1:
	movq	%rcx, %rax
	jmp	LBB0_15
LBB0_2:
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	addq	$8, %r13
	xorl	%r14d, %r14d
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	incl	%r14d
	movq	16(%r13), %rax
	addq	$24, %r13
	cmpq	(%r15), %rax
	je	LBB0_11
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	$32, %edi
	callq	_grub_malloc
	testq	%rax, %rax
	je	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %rbx
	movl	4(%r13), %esi
	movl	8(%r13), %edi
	callq	_grub_memalign
	testq	%rax, %rax
	je	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %r12
	movl	4(%r13), %edx
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_grub_memset
	movslq	(%r13), %rsi
	movl	24(%r13), %edx
	subl	%esi, %edx
	addq	-48(%rbp), %rsi                 ## 8-byte Folded Reload
	movq	%r12, %rdi
	callq	_grub_memcpy
	movq	%r12, 24(%rbx)
	movl	4(%r13), %eax
	movl	%eax, 16(%rbx)
	movl	%r14d, (%rbx)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	16(%rdi), %rax
	movq	%rax, 8(%rbx)
	movq	%rbx, 16(%rdi)
	testl	%r14d, %r14d
	jne	LBB0_3
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx), %rcx
	movq	_GRUB_OBJ_FUNC_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rcx
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	addq	%r12, %rcx
	movq	%rcx, (%rdi)
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%rdx), %rcx
	cmpq	%rax, %rcx
	je	LBB0_3
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	addq	%rcx, %r12
	movq	%r12, 8(%rdi)
	jmp	LBB0_3
LBB0_11:
	movq	_GRUB_ERR_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_13:
	movq	%rbx, %rdi
	callq	_grub_free
LBB0_14:
	movq	_grub_errno@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GRUB_OBJ_SEGMENT_END,8,3       ## @GRUB_OBJ_SEGMENT_END
	.comm	_grub_errno,4,2                 ## @grub_errno
	.comm	_GRUB_OBJ_FUNC_NONE,8,3         ## @GRUB_OBJ_FUNC_NONE
	.comm	_GRUB_ERR_NONE,4,2              ## @GRUB_ERR_NONE
	.no_dead_strip	_grub_dl_load_segments
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grub_dl_load_segments
_grub_dl_load_segments:                 ; @grub_dl_load_segments
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x8, [x1, #16]
	ldr	x9, [x8]
Lloh0:
	adrp	x24, _GRUB_OBJ_SEGMENT_END@GOTPAGE
Lloh1:
	ldr	x24, [x24, _GRUB_OBJ_SEGMENT_END@GOTPAGEOFF]
	ldr	x10, [x24]
	cmp	x9, x10
	b.ne	LBB0_2
; %bb.1:
Lloh2:
	adrp	x23, _GRUB_ERR_NONE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _GRUB_ERR_NONE@GOTPAGEOFF]
	b	LBB0_13
LBB0_2:
	mov	x19, x1
	mov	x20, x0
	mov	w25, #0
	add	x26, x8, #16
Lloh4:
	adrp	x23, _grub_errno@GOTPAGE
Lloh5:
	ldr	x23, [x23, _grub_errno@GOTPAGEOFF]
Lloh6:
	adrp	x28, _GRUB_OBJ_FUNC_NONE@GOTPAGE
Lloh7:
	ldr	x28, [x28, _GRUB_OBJ_FUNC_NONE@GOTPAGEOFF]
Lloh8:
	adrp	x27, _GRUB_ERR_NONE@GOTPAGE
Lloh9:
	ldr	x27, [x27, _GRUB_ERR_NONE@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w25, w25, #1
	ldr	x8, [x26, #8]
	ldr	x9, [x24]
	add	x26, x26, #24
	cmp	x8, x9
	b.eq	LBB0_11
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #32
	bl	_grub_malloc
	cbz	x0, LBB0_13
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x22, x0
	ldp	w1, w0, [x26, #-4]
	bl	_grub_memalign
	cbz	x0, LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x21, x0
	ldur	w2, [x26, #-4]
	mov	w1, #0
	bl	_grub_memset
	ldursw	x8, [x26, #-8]
	add	x1, x19, x8
	ldr	w9, [x26, #16]
	sub	w2, w9, w8
	mov	x0, x21
	bl	_grub_memcpy
	str	x21, [x22, #24]
	ldur	w8, [x26, #-4]
	str	w8, [x22, #16]
	str	w25, [x22]
	ldr	x8, [x20, #16]
	str	x8, [x22, #8]
	str	x22, [x20, #16]
	cbnz	w25, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x19]
	ldr	x8, [x28]
	cmp	x9, x8
	b.eq	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x21, x9
	str	x9, [x20]
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x19, #8]
	cmp	x9, x8
	b.eq	LBB0_3
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x21, x9
	str	x8, [x20, #8]
	b	LBB0_3
LBB0_11:
	mov	x23, x27
	b	LBB0_13
LBB0_12:
	mov	x0, x22
	bl	_grub_free
Lloh10:
	adrp	x23, _grub_errno@GOTPAGE
Lloh11:
	ldr	x23, [x23, _grub_errno@GOTPAGEOFF]
LBB0_13:
	ldr	w0, [x23]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_GRUB_OBJ_SEGMENT_END,8,3       ; @GRUB_OBJ_SEGMENT_END
	.comm	_grub_errno,4,2                 ; @grub_errno
	.comm	_GRUB_OBJ_FUNC_NONE,8,3         ; @GRUB_OBJ_FUNC_NONE
	.comm	_GRUB_ERR_NONE,4,2              ; @GRUB_ERR_NONE
	.no_dead_strip	_grub_dl_load_segments
.subsections_via_symbols
