	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_foo_main                       ## -- Begin function foo_main
	.p2align	4, 0x90
_foo_main:                              ## @foo_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	%r14
	pushq	%rbx
	subq	$1040, %rsp                     ## imm = 0x410
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	_grub_ext2_fs@GOTPCREL(%rip), %rdi
	xorl	%esi, %esi
	callq	_grubfs_new
	movq	%rax, %rbx
	movq	(%rax), %rdi
	movq	8(%rdi), %rax
	leaq	L_.str(%rip), %rsi
	callq	*24(%rax)
	movq	(%rbx), %rdi
	movq	8(%rdi), %rax
	movq	16(%rdi), %rdx
	leaq	-1056(%rbp), %r14
	movq	%r14, %rsi
	callq	*16(%rax)
	movq	(%rbx), %rax
	movl	16(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_printf
	movq	(%rbx), %rax
	movq	16(%rax), %rdx
	movl	$1, %edi
	movq	%r14, %rsi
	callq	_write
	movq	(%rbx), %rdi
	movq	8(%rdi), %rax
	callq	*8(%rax)
	movq	(%rbx), %rax
	movq	8(%rax), %r8
	movl	(%rax), %edi
	movq	_dirhook@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	xorl	%ecx, %ecx
	callq	*(%r8)
	movq	%rbx, %rdi
	callq	_grubfs_free
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	addq	$1040, %rsp                     ## imm = 0x410
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_grub_ext2_fs,4,2               ## @grub_ext2_fs
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/test"

L_.str.1:                               ## @.str.1
	.asciz	"fs = %d\n"

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

	.comm	_dirhook,4,2                    ## @dirhook
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_foo_main                       ; -- Begin function foo_main
	.p2align	2
_foo_main:                              ; @foo_main
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	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, #-24]
Lloh3:
	adrp	x0, _grub_ext2_fs@GOTPAGE
Lloh4:
	ldr	x0, [x0, _grub_ext2_fs@GOTPAGEOFF]
	mov	x1, #0
	bl	_grubfs_new
	mov	x19, x0
	ldr	x0, [x0]
	ldr	x8, [x0, #8]
	ldr	x8, [x8, #24]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	blr	x8
	ldr	x0, [x19]
	ldp	x8, x2, [x0, #8]
	ldr	x8, [x8, #16]
	add	x1, sp, #8
	blr	x8
	ldr	x8, [x19]
	ldr	w1, [x8, #16]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
	ldr	x8, [x19]
	ldr	x2, [x8, #16]
	add	x1, sp, #8
	mov	w0, #1
	bl	_write
	ldr	x0, [x19]
	ldr	x8, [x0, #8]
	ldr	x8, [x8, #8]
	blr	x8
	ldr	x8, [x19]
	ldr	x9, [x8, #8]
	ldr	x9, [x9]
	ldr	w0, [x8]
Lloh9:
	adrp	x8, _dirhook@GOTPAGE
Lloh10:
	ldr	x8, [x8, _dirhook@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w3, #0
	blr	x9
	mov	x0, x19
	bl	_grubfs_free
	ldur	x8, [x29, #-24]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	add	sp, sp, #1040
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_grub_ext2_fs,4,2               ; @grub_ext2_fs
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/test"

l_.str.1:                               ; @.str.1
	.asciz	"fs = %d\n"

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

	.comm	_dirhook,4,2                    ; @dirhook
.subsections_via_symbols
