	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_fw
_write_fw:                              ## @write_fw
	.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
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_ofname@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	_errno@GOTPCREL(%rip), %r13
	movq	$0, (%r13)
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	$1, %edx
	movq	%rax, %rcx
	callq	_fwrite
	cmpq	$0, (%r13)
	je	LBB0_4
## %bb.3:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_ERRS
	jmp	LBB0_5
LBB0_1:
	movl	(%r13), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_ERRS
	jmp	LBB0_7
LBB0_4:
	movq	_EXIT_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_5:
	movq	%rbx, %rdi
	callq	_fflush
	movq	%rbx, %rdi
	callq	_fclose
	movq	_EXIT_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	movq	_ofname@GOTPCREL(%rip), %rax
	je	LBB0_7
## %bb.6:
	movl	(%rax), %edi
	callq	_unlink
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.comm	_ofname,4,2                     ## @ofname
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"w"

L_.str.1:                               ## @.str.1
	.asciz	"could not open \"%s\" for writing"

	.comm	_errno,8,3                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"unable to write output file"

	.comm	_EXIT_SUCCESS,4,2               ## @EXIT_SUCCESS
	.no_dead_strip	_write_fw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_fw
_write_fw:                              ; @write_fw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
Lloh3:
	adrp	x23, _ofname@GOTPAGE
Lloh4:
	ldr	x23, [x23, _ofname@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
Lloh7:
	adrp	x24, _errno@GOTPAGE
Lloh8:
	ldr	x24, [x24, _errno@GOTPAGEOFF]
	str	xzr, [x24]
	mov	x0, x22
	mov	x1, x21
	mov	w2, #1
	mov	x3, x20
	bl	_fwrite
	ldr	x8, [x24]
Lloh9:
	adrp	x21, _EXIT_SUCCESS@GOTPAGE
Lloh10:
	ldr	x21, [x21, _EXIT_SUCCESS@GOTPAGEOFF]
	cbz	x8, LBB0_4
; %bb.2:
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_ERRS
	b	LBB0_5
LBB0_3:
	ldr	w8, [x23]
	str	x8, [sp]
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ERRS
	b	LBB0_7
LBB0_4:
	ldr	w19, [x21]
LBB0_5:
	mov	x0, x20
	bl	_fflush
	mov	x0, x20
	bl	_fclose
	ldr	w8, [x21]
	cmp	w19, w8
	b.eq	LBB0_7
; %bb.6:
	ldr	w0, [x23]
	bl	_unlink
LBB0_7:
	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
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.comm	_ofname,4,2                     ; @ofname
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"w"

l_.str.1:                               ; @.str.1
	.asciz	"could not open \"%s\" for writing"

	.comm	_errno,8,3                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"unable to write output file"

	.comm	_EXIT_SUCCESS,4,2               ; @EXIT_SUCCESS
	.no_dead_strip	_write_fw
.subsections_via_symbols
