	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_main                        ## -- Begin function do_main
	.p2align	4, 0x90
_do_main:                               ## @do_main
	.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	%r12
	pushq	%rbx
	subq	$1040, %rsp                     ## imm = 0x410
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_IMGFILE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_grub_ext2_fs@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_openimage
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	leaq	L_.str.1(%rip), %rsi
	movq	%rax, %rdi
	callq	*(%r14)
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movq	%rax, %r12
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_grub_print_error
	leaq	L_.str.3(%rip), %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_6
LBB0_1:
	leaq	L_str(%rip), %rdi
	callq	_puts
	xorl	%r15d, %r15d
	jmp	LBB0_6
LBB0_3:
	movl	4(%rbx), %edx
	leaq	-1072(%rbp), %r12
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	*8(%r14)
	movl	4(%rbx), %edx
	movl	$1, %r15d
	movl	$1, %edi
	movq	%r12, %rsi
	callq	_write
	movq	%rbx, %rdi
	callq	*24(%r14)
	movl	(%rbx), %edi
	movq	_dirhook@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	xorl	%ecx, %ecx
	callq	*16(%r14)
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	xorl	%eax, %eax
	callq	_grub_print_error
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	movl	%r15d, %eax
	addq	$1040, %rsp                     ## imm = 0x410
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_grub_ext2_fs,32,3              ## @grub_ext2_fs
	.comm	_IMGFILE,4,2                    ## @IMGFILE
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"/test"

L_.str.2:                               ## @.str.2
	.asciz	"/"

	.comm	_dirhook,4,2                    ## @dirhook
L_.str.3:                               ## @.str.3
	.asciz	"error is : %d\n"

L_str:                                  ## @str
	.asciz	"oops"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_main                        ; -- Begin function do_main
	.p2align	2
_do_main:                               ; @do_main
	.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
	sub	sp, sp, #1040
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, _IMGFILE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IMGFILE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x19, _grub_ext2_fs@GOTPAGE
Lloh7:
	ldr	x19, [x19, _grub_ext2_fs@GOTPAGEOFF]
	mov	x0, x19
	bl	_openimage
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	ldr	x8, [x19]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	blr	x8
	cbz	x0, LBB0_5
; %bb.2:
	mov	x21, x0
	bl	_grub_print_error
	str	x21, [sp]
Lloh10:
	adrp	x0, l_.str.3@PAGE
Lloh11:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_printf
	b	LBB0_4
LBB0_3:
Lloh12:
	adrp	x0, l_str@PAGE
Lloh13:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
LBB0_4:
	mov	w0, #0
	b	LBB0_8
LBB0_5:
	ldr	x8, [x19, #8]
	ldr	w2, [x20, #4]
	add	x1, sp, #8
	mov	x0, x20
	blr	x8
	ldr	w2, [x20, #4]
	add	x1, sp, #8
	mov	w0, #1
	bl	_write
	ldr	x8, [x19, #24]
	mov	x0, x20
	blr	x8
	ldr	x8, [x19, #16]
	ldr	w0, [x20]
Lloh14:
	adrp	x9, _dirhook@GOTPAGE
Lloh15:
	ldr	x9, [x9, _dirhook@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x9]
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w3, #0
	blr	x8
	cbz	x0, LBB0_7
; %bb.6:
	bl	_grub_print_error
LBB0_7:
	mov	w0, #1
LBB0_8:
	ldur	x8, [x29, #-40]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	add	sp, sp, #1040
	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_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_grub_ext2_fs,32,3              ; @grub_ext2_fs
	.comm	_IMGFILE,4,2                    ; @IMGFILE
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"/test"

l_.str.2:                               ; @.str.2
	.asciz	"/"

	.comm	_dirhook,4,2                    ; @dirhook
l_.str.3:                               ; @.str.3
	.asciz	"error is : %d\n"

l_str:                                  ; @str
	.asciz	"oops"

.subsections_via_symbols
