	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function OpenOutputFile
_OpenOutputFile:                        ## @OpenOutputFile
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	$0, (%rsi)
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	movq	_O_CREAT@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	testq	%rdx, %rdx
	jne	LBB0_4
## %bb.3:
	movq	_O_EXCL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
LBB0_4:
	orl	(%rax), %esi
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_O_TRUNC@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_S_IRUSR@GOTPCREL(%rip), %rax
	movq	_S_IWUSR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_open
	testl	%eax, %eax
	js	LBB0_7
## %bb.5:
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_fdopen
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_BROTLI_TRUE@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_1:
	movq	_STDOUT_FILENO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MAKE_BINARY
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_fdopen
	movq	%rax, (%r14)
	movq	_BROTLI_TRUE@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_7:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	callq	_PrintablePath
	movq	%rax, %rbx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	movq	%rbx, %rdx
	movq	%rax, %rcx
	callq	_fprintf
	movq	_BROTLI_FALSE@GOTPCREL(%rip), %rax
LBB0_8:
	movq	(%rax), %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STDOUT_FILENO,4,2              ## @STDOUT_FILENO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wb"

	.comm	_BROTLI_TRUE,8,3                ## @BROTLI_TRUE
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_EXCL,4,2                     ## @O_EXCL
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_O_TRUNC,4,2                    ## @O_TRUNC
	.comm	_S_IRUSR,4,2                    ## @S_IRUSR
	.comm	_S_IWUSR,4,2                    ## @S_IWUSR
	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"failed to open output file [%s]: %s\n"

	.comm	_errno,4,2                      ## @errno
	.comm	_BROTLI_FALSE,8,3               ## @BROTLI_FALSE
	.no_dead_strip	_OpenOutputFile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function OpenOutputFile
_OpenOutputFile:                        ; @OpenOutputFile
	.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
	mov	x19, x1
	str	xzr, [x1]
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x8, _O_CREAT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_CREAT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _O_EXCL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _O_EXCL@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	x2, #0
	csel	w9, w9, wzr, eq
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _O_WRONLY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _O_WRONLY@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh9:
	adrp	x9, _O_TRUNC@GOTPAGE
Lloh10:
	ldr	x9, [x9, _O_TRUNC@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _S_IRUSR@GOTPAGE
Lloh13:
	ldr	x10, [x10, _S_IRUSR@GOTPAGEOFF]
	orr	w1, w8, w9
Lloh14:
	ldr	w8, [x10]
Lloh15:
	adrp	x9, _S_IWUSR@GOTPAGE
Lloh16:
	ldr	x9, [x9, _S_IWUSR@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w2, w9, w8
	bl	_open
	tbnz	w0, #31, LBB0_3
; %bb.2:
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fdopen
	str	x0, [x19]
	cbnz	x0, LBB0_5
LBB0_3:
Lloh20:
	adrp	x8, _stderr@GOTPAGE
Lloh21:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh22:
	ldr	w19, [x8]
	mov	x0, x20
	bl	_PrintablePath
	mov	x20, x0
Lloh23:
	adrp	x8, _errno@GOTPAGE
Lloh24:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	bl	_strerror
	mov	x3, x0
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_fprintf
Lloh28:
	adrp	x8, _BROTLI_FALSE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _BROTLI_FALSE@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh30:
	adrp	x8, _STDOUT_FILENO@GOTPAGE
Lloh31:
	ldr	x8, [x8, _STDOUT_FILENO@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	bl	_MAKE_BINARY
Lloh33:
	adrp	x1, l_.str@PAGE
Lloh34:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fdopen
	str	x0, [x19]
LBB0_5:
Lloh35:
	adrp	x8, _BROTLI_TRUE@GOTPAGE
Lloh36:
	ldr	x8, [x8, _BROTLI_TRUE@GOTPAGEOFF]
LBB0_6:
	ldr	x0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_STDOUT_FILENO,4,2              ; @STDOUT_FILENO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wb"

	.comm	_BROTLI_TRUE,8,3                ; @BROTLI_TRUE
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_EXCL,4,2                     ; @O_EXCL
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_O_TRUNC,4,2                    ; @O_TRUNC
	.comm	_S_IRUSR,4,2                    ; @S_IRUSR
	.comm	_S_IWUSR,4,2                    ; @S_IWUSR
	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"failed to open output file [%s]: %s\n"

	.comm	_errno,4,2                      ; @errno
	.comm	_BROTLI_FALSE,8,3               ; @BROTLI_FALSE
	.no_dead_strip	_OpenOutputFile
.subsections_via_symbols
