	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grub_dl_load                   ## -- Begin function grub_dl_load
	.p2align	4, 0x90
_grub_dl_load:                          ## @grub_dl_load
	.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	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	callq	_grub_env_get
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_grub_dl_get
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_10
## %bb.1:
	testq	%r15, %r15
	je	LBB0_6
## %bb.2:
	leaq	L_.str.2(%rip), %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_grub_xasprintf
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_grub_dl_load_file
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_grub_free
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.4:
	movl	(%rbx), %edi
	movq	%r14, %rsi
	callq	_grub_strcmp
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:
	leaq	L_.str.3(%rip), %rsi
	movq	_GRUB_ERR_BAD_MODULE@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
	movq	_GRUB_ERR_FILE_NOT_FOUND@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_7:
	movl	(%rax), %edi
	callq	_grub_error
	jmp	LBB0_10
LBB0_9:
	xorl	%ebx, %ebx
LBB0_10:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"prefix"

	.comm	_GRUB_ERR_FILE_NOT_FOUND,4,2    ## @GRUB_ERR_FILE_NOT_FOUND
L_.str.1:                               ## @.str.1
	.asciz	"\"prefix\" is not set"

L_.str.2:                               ## @.str.2
	.asciz	"%s/%s.mod"

	.comm	_GRUB_ERR_BAD_MODULE,4,2        ## @GRUB_ERR_BAD_MODULE
L_.str.3:                               ## @.str.3
	.asciz	"mismatched names"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grub_dl_load                   ; -- Begin function grub_dl_load
	.p2align	2
_grub_dl_load:                          ; @grub_dl_load
	.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, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_grub_env_get
	mov	x21, x0
	mov	x0, x20
	bl	_grub_dl_get
	mov	x19, x0
	cbnz	x0, LBB0_9
; %bb.1:
	cbz	x21, LBB0_6
; %bb.2:
Lloh2:
	adrp	x0, l_.str.2@PAGE
Lloh3:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	mov	x2, x20
	bl	_grub_xasprintf
	cbz	x0, LBB0_8
; %bb.3:
	mov	x21, x0
	bl	_grub_dl_load_file
	mov	x19, x0
	mov	x0, x21
	bl	_grub_free
	cbz	x19, LBB0_9
; %bb.4:
	ldr	w0, [x19]
	mov	x1, x20
	bl	_grub_strcmp
	cbz	x0, LBB0_9
; %bb.5:
Lloh4:
	adrp	x1, l_.str.3@PAGE
Lloh5:
	add	x1, x1, l_.str.3@PAGEOFF
Lloh6:
	adrp	x8, _GRUB_ERR_BAD_MODULE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GRUB_ERR_BAD_MODULE@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
	mov	x19, #0
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
Lloh10:
	adrp	x8, _GRUB_ERR_FILE_NOT_FOUND@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GRUB_ERR_FILE_NOT_FOUND@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
	bl	_grub_error
	b	LBB0_9
LBB0_8:
	mov	x19, #0
LBB0_9:
	mov	x0, x19
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"prefix"

	.comm	_GRUB_ERR_FILE_NOT_FOUND,4,2    ; @GRUB_ERR_FILE_NOT_FOUND
l_.str.1:                               ; @.str.1
	.asciz	"\"prefix\" is not set"

l_.str.2:                               ; @.str.2
	.asciz	"%s/%s.mod"

	.comm	_GRUB_ERR_BAD_MODULE,4,2        ; @GRUB_ERR_BAD_MODULE
l_.str.3:                               ; @.str.3
	.asciz	"mismatched names"

.subsections_via_symbols
