	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grab_file                      ## -- Begin function grab_file
	.p2align	4, 0x90
_grab_file:                             ## @grab_file
	.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, %r14
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_open
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	movl	%eax, %r15d
	leaq	-32(%rbp), %rsi
	movl	%eax, %edi
	callq	_fstat
	testq	%rax, %rax
	je	LBB0_4
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_4:
	movq	-32(%rbp), %rsi
	movq	%rsi, (%r14)
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	movq	_PROT_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_MAP_PRIVATE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	movl	%r15d, %r8d
	xorl	%r9d, %r9d
	callq	_mmap
	movq	%rax, %rbx
	movl	%r15d, %edi
	callq	_close
	movq	_MAP_FAILED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	cmoveq	%r14, %rbx
LBB0_5:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_PROT_WRITE,4,2                 ## @PROT_WRITE
	.comm	_MAP_PRIVATE,4,2                ## @MAP_PRIVATE
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_grab_file                      ; -- Begin function grab_file
	.p2align	2
_grab_file:                             ; @grab_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x1
Lloh0:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_open
	tbnz	w0, #31, LBB0_2
; %bb.1:
	mov	x19, x0
	add	x1, sp, #8
	bl	_fstat
	cbz	x0, LBB0_3
LBB0_2:
	mov	x0, #0
	b	LBB0_4
LBB0_3:
	ldr	x1, [sp, #8]
	str	x1, [x20]
Lloh3:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh5:
	adrp	x9, _PROT_WRITE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PROT_WRITE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh9:
	adrp	x8, _MAP_PRIVATE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MAP_PRIVATE@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	mov	x4, x19
	mov	w5, #0
	bl	_mmap
	mov	x20, x0
	mov	x0, x19
	bl	_close
Lloh12:
	adrp	x8, _MAP_FAILED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MAP_FAILED@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x20, x8
	csel	x0, xzr, x20, eq
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_PROT_WRITE,4,2                 ; @PROT_WRITE
	.comm	_MAP_PRIVATE,4,2                ; @MAP_PRIVATE
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
.subsections_via_symbols
