	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grub_dl_load_core              ## -- Begin function grub_dl_load_core
	.p2align	4, 0x90
_grub_dl_load_core:                     ## @grub_dl_load_core
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rcx
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_grub_dprintf
	movq	(%rbx), %rax
	movq	_GRUB_OBJ_HEADER_MAGIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	8(%rbx), %rax
	movq	_GRUB_OBJ_HEADER_VERSION@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.3:
	movl	$48, %edi
	callq	_grub_malloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:
	movq	%rax, %r14
	movslq	16(%rbx), %r15
	addq	%rbx, %r15
	movq	%r15, %rdi
	callq	_grub_strdup
	movq	%rax, 16(%r14)
	movl	$1, (%r14)
	movq	$0, 8(%r14)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%r14)
	movq	$0, 40(%r14)
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_grub_dprintf
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_grub_dl_resolve_dependencies
	testq	%rax, %rax
	jne	LBB0_7
## %bb.5:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_grub_dl_load_segments
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_grub_dl_resolve_symbols
	testq	%rax, %rax
	je	LBB0_8
LBB0_7:
	movq	$0, 24(%r14)
LBB0_9:
	movq	%r14, %rdi
	callq	_grub_dl_unload
	jmp	LBB0_10
LBB0_2:
	movq	_GRUB_ERR_BAD_OS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_grub_error
LBB0_10:
	xorl	%r14d, %r14d
LBB0_11:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r14, %rdi
	callq	_grub_dl_flush_cache
	movq	16(%r14), %rdx
	leaq	L_.str(%rip), %rbx
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_grub_dprintf
	movq	8(%r14), %rdx
	leaq	L_.str.5(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_grub_dprintf
	movq	%r14, %rdi
	callq	_grub_dl_call_init
	movq	%r14, %rdi
	callq	_grub_dl_add
	testq	%rax, %rax
	jne	LBB0_9
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"modules"

L_.str.1:                               ## @.str.1
	.asciz	"module at %p, size 0x%lx\n"

	.comm	_GRUB_OBJ_HEADER_MAGIC,8,3      ## @GRUB_OBJ_HEADER_MAGIC
	.comm	_GRUB_OBJ_HEADER_VERSION,8,3    ## @GRUB_OBJ_HEADER_VERSION
	.comm	_GRUB_ERR_BAD_OS,4,2            ## @GRUB_ERR_BAD_OS
L_.str.2:                               ## @.str.2
	.asciz	"invalid object file"

L_.str.3:                               ## @.str.3
	.asciz	"relocating to %p\n"

L_.str.4:                               ## @.str.4
	.asciz	"module name: %s\n"

L_.str.5:                               ## @.str.5
	.asciz	"init function: %p\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grub_dl_load_core              ; -- Begin function grub_dl_load_core
	.p2align	2
_grub_dl_load_core:                     ; @grub_dl_load_core
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	str	x1, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_grub_dprintf
	ldr	x8, [x20]
Lloh4:
	adrp	x9, _GRUB_OBJ_HEADER_MAGIC@GOTPAGE
Lloh5:
	ldr	x9, [x9, _GRUB_OBJ_HEADER_MAGIC@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.1:
	ldr	x8, [x20, #8]
Lloh7:
	adrp	x9, _GRUB_OBJ_HEADER_VERSION@GOTPAGE
Lloh8:
	ldr	x9, [x9, _GRUB_OBJ_HEADER_VERSION@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.2:
	mov	w0, #48
	bl	_grub_malloc
	mov	x19, x0
	cbz	x0, LBB0_10
; %bb.3:
	ldrsw	x8, [x20, #16]
	add	x21, x20, x8
	mov	x0, x21
	bl	_grub_strdup
	mov	w8, #1
	str	w8, [x19]
	stp	xzr, x0, [x19, #8]
	stp	xzr, xzr, [x19, #32]
	str	xzr, [x19, #24]
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x19
	bl	_grub_dprintf
	mov	x0, x19
	mov	x1, x21
	bl	_grub_dl_resolve_dependencies
	cbnz	x0, LBB0_6
; %bb.4:
	mov	x0, x19
	mov	x1, x20
	bl	_grub_dl_load_segments
	cbnz	x0, LBB0_6
; %bb.5:
	mov	x0, x19
	mov	x1, x20
	bl	_grub_dl_resolve_symbols
	cbz	x0, LBB0_11
LBB0_6:
	str	xzr, [x19, #24]
LBB0_7:
	mov	x0, x19
	bl	_grub_dl_unload
	b	LBB0_9
LBB0_8:
Lloh14:
	adrp	x8, _GRUB_ERR_BAD_OS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GRUB_ERR_BAD_OS@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_grub_error
LBB0_9:
	mov	x19, #0
LBB0_10:
	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
	add	sp, sp, #64
	ret
LBB0_11:
	mov	x0, x19
	bl	_grub_dl_flush_cache
	ldr	x2, [x19, #16]
Lloh19:
	adrp	x20, l_.str@PAGE
Lloh20:
	add	x20, x20, l_.str@PAGEOFF
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_grub_dprintf
	ldr	x2, [x19, #8]
Lloh23:
	adrp	x1, l_.str.5@PAGE
Lloh24:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_grub_dprintf
	mov	x0, x19
	bl	_grub_dl_call_init
	mov	x0, x19
	bl	_grub_dl_add
	cbnz	x0, LBB0_7
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"modules"

l_.str.1:                               ; @.str.1
	.asciz	"module at %p, size 0x%lx\n"

	.comm	_GRUB_OBJ_HEADER_MAGIC,8,3      ; @GRUB_OBJ_HEADER_MAGIC
	.comm	_GRUB_OBJ_HEADER_VERSION,8,3    ; @GRUB_OBJ_HEADER_VERSION
	.comm	_GRUB_ERR_BAD_OS,4,2            ; @GRUB_ERR_BAD_OS
l_.str.2:                               ; @.str.2
	.asciz	"invalid object file"

l_.str.3:                               ; @.str.3
	.asciz	"relocating to %p\n"

l_.str.4:                               ; @.str.4
	.asciz	"module name: %s\n"

l_.str.5:                               ; @.str.5
	.asciz	"init function: %p\n"

.subsections_via_symbols
