	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fopen                          ## -- Begin function fopen
	.p2align	4, 0x90
_fopen:                                 ## @fopen
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	leaq	_fopen(%rip), %rdi
	callq	_GET_REAL
	movq	_fail_close@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_fail_write@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_fail_read@GOTPCREL(%rip), %r12
	movq	$0, (%r12)
	movq	_fail@GOTPCREL(%rip), %r13
	movq	$0, (%r13)
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_real_fopen
	movq	%rax, %r14
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_error@GOTPCREL(%rip), %rbx
	movl	%eax, (%rbx)
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	$10, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	movl	$10, %edx
	callq	_strncmp
	testq	%rax, %rax
	jne	LBB0_8
## %bb.5:
	movq	_fail_close@GOTPCREL(%rip), %rax
	movq	%r14, (%rax)
	movq	%r14, (%r13)
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_6
LBB0_1:
	movq	%r14, (%r12)
	movq	%r14, (%r13)
	jmp	LBB0_8
LBB0_3:
	movq	_fail_write@GOTPCREL(%rip), %rax
	movq	%r14, (%rax)
	movq	%r14, (%r13)
	leaq	L_.str.2(%rip), %rsi
LBB0_6:
	movq	%r15, %rdi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
LBB0_8:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_fail_close,8,3                 ## @fail_close
	.comm	_fail_write,8,3                 ## @fail_write
	.comm	_fail_read,8,3                  ## @fail_read
	.comm	_fail,8,3                       ## @fail
	.comm	_EIO,4,2                        ## @EIO
	.comm	_error,4,2                      ## @error
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fail_read"

L_.str.1:                               ## @.str.1
	.asciz	"fail_write"

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

	.comm	_ENOSPC,4,2                     ## @ENOSPC
L_.str.3:                               ## @.str.3
	.asciz	"fail_close"

L_.str.4:                               ## @.str.4
	.asciz	"fail_close_enospc"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fopen                          ; -- Begin function fopen
	.p2align	2
_fopen:                                 ; @fopen
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x0, _fopen@PAGE
Lloh1:
	add	x0, x0, _fopen@PAGEOFF
	bl	_GET_REAL
Lloh2:
	adrp	x22, _fail_close@GOTPAGE
Lloh3:
	ldr	x22, [x22, _fail_close@GOTPAGEOFF]
	str	xzr, [x22]
Lloh4:
	adrp	x24, _fail_write@GOTPAGE
Lloh5:
	ldr	x24, [x24, _fail_write@GOTPAGEOFF]
	str	xzr, [x24]
Lloh6:
	adrp	x25, _fail_read@GOTPAGE
Lloh7:
	ldr	x25, [x25, _fail_read@GOTPAGEOFF]
	str	xzr, [x25]
Lloh8:
	adrp	x23, _fail@GOTPAGE
Lloh9:
	ldr	x23, [x23, _fail@GOTPAGEOFF]
	str	xzr, [x23]
	mov	x0, x20
	mov	x1, x19
	bl	_real_fopen
	mov	x19, x0
Lloh10:
	adrp	x8, _EIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x21, _error@GOTPAGE
Lloh14:
	ldr	x21, [x21, _error@GOTPAGEOFF]
	str	w8, [x21]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_strcmp
	cbz	x0, LBB0_4
; %bb.1:
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	w2, #10
	bl	_strncmp
	cbz	x0, LBB0_5
; %bb.2:
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	w2, #10
	bl	_strncmp
	cbnz	x0, LBB0_8
; %bb.3:
	str	x19, [x22]
	str	x19, [x23]
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_6
LBB0_4:
	str	x19, [x25]
	str	x19, [x23]
	b	LBB0_8
LBB0_5:
	str	x19, [x24]
	str	x19, [x23]
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_6:
	mov	x0, x20
	bl	_strcmp
	cbnz	x0, LBB0_8
; %bb.7:
Lloh25:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	str	w8, [x21]
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_fail_close,8,3                 ; @fail_close
	.comm	_fail_write,8,3                 ; @fail_write
	.comm	_fail_read,8,3                  ; @fail_read
	.comm	_fail,8,3                       ; @fail
	.comm	_EIO,4,2                        ; @EIO
	.comm	_error,4,2                      ; @error
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fail_read"

l_.str.1:                               ; @.str.1
	.asciz	"fail_write"

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

	.comm	_ENOSPC,4,2                     ; @ENOSPC
l_.str.3:                               ; @.str.3
	.asciz	"fail_close"

l_.str.4:                               ; @.str.4
	.asciz	"fail_close_enospc"

.subsections_via_symbols
