	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grub_file_get_device_name      ## -- Begin function grub_file_get_device_name
	.p2align	4, 0x90
_grub_file_get_device_name:             ## @grub_file_get_device_name
	.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
	cmpb	$40, (%rdi)
	jne	LBB0_6
## %bb.1:
	movq	%rdi, %rbx
	movl	$41, %esi
	callq	_grub_strchr
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	%rax, %r15
	subq	%rbx, %r15
	movl	%r15d, %edi
	callq	_grub_malloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	%rax, %r14
	incq	%rbx
	leaq	-1(%r15), %rdx
	movq	%rax, %rdi
	movq	%rbx, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_grub_memcpy
	movb	$0, -1(%r14,%r15)
	jmp	LBB0_7
LBB0_5:
	movq	_GRUB_ERR_BAD_FILENAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_grub_error
LBB0_6:
	xorl	%r14d, %r14d
LBB0_7:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GRUB_ERR_BAD_FILENAME,4,2      ## @GRUB_ERR_BAD_FILENAME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"missing `)'"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grub_file_get_device_name      ; -- Begin function grub_file_get_device_name
	.p2align	2
_grub_file_get_device_name:             ; @grub_file_get_device_name
	.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
	ldrb	w8, [x0]
	cmp	w8, #40
	b.ne	LBB0_5
; %bb.1:
	mov	x19, x0
	mov	w1, #41
	bl	_grub_strchr
	cbz	x0, LBB0_4
; %bb.2:
	sub	x21, x0, x19
	mov	x0, x21
	bl	_grub_malloc
	mov	x20, x0
	cbz	x0, LBB0_6
; %bb.3:
	add	x1, x19, #1
	sub	x19, x21, #1
	mov	x0, x20
	mov	x2, x19
	bl	_grub_memcpy
	strb	wzr, [x20, x19]
	b	LBB0_6
LBB0_4:
Lloh0:
	adrp	x8, _GRUB_ERR_BAD_FILENAME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GRUB_ERR_BAD_FILENAME@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_grub_error
LBB0_5:
	mov	x20, #0
LBB0_6:
	mov	x0, x20
	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	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_GRUB_ERR_BAD_FILENAME,4,2      ; @GRUB_ERR_BAD_FILENAME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"missing `)'"

.subsections_via_symbols
