	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_if_changed
_write_if_changed:                      ## @write_if_changed
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_fileno
	leaq	-40(%rbp), %rsi
	movl	%eax, %edi
	callq	_fstat
	testq	%rax, %rax
	js	LBB0_8
## %bb.2:
	movl	-40(%rbp), %edi
	cmpl	(%r15), %edi
	jne	LBB0_8
## %bb.3:
	callq	_malloc
	movl	%eax, %edi
	callq	_NOFAIL
	movq	%rax, %r12
	movl	(%r15), %edx
	movq	%rax, %rdi
	movl	$1, %esi
	movq	%rbx, %rcx
	callq	_fread
	cmpl	(%r15), %eax
	jne	LBB0_7
## %bb.4:
	movl	4(%r15), %esi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_5
LBB0_7:
	movq	%r12, %rdi
	callq	_free
LBB0_8:
	movq	%rbx, %rdi
	callq	_fclose
LBB0_9:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_10
## %bb.12:
	movq	%rax, %rbx
	movl	(%r15), %edx
	movl	4(%r15), %edi
	movl	$1, %esi
	movq	%rax, %rcx
	callq	_fwrite
	cmpl	(%r15), %eax
	jne	LBB0_13
LBB0_6:
	movq	%rbx, %rdi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fclose                         ## TAILCALL
LBB0_10:
	movq	%r14, %rdi
	callq	_write_if_changed.cold.1
	jmp	LBB0_11
LBB0_13:
	movq	%r14, %rdi
	callq	_write_if_changed.cold.2
LBB0_11:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r12, %rdi
	callq	_free
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function write_if_changed.cold.1
_write_if_changed.cold.1:               ## @write_if_changed.cold.1
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	callq	_perror
	pushq	$1
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function write_if_changed.cold.2
_write_if_changed.cold.2:               ## @write_if_changed.cold.2
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	callq	_perror
	pushq	$1
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"r"

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

	.no_dead_strip	_write_if_changed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_if_changed
_write_if_changed:                      ; @write_if_changed
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_fopen
	cbz	x0, LBB0_7
; %bb.1:
	mov	x21, x0
	bl	_fileno
	add	x1, sp, #8
	bl	_fstat
	tbnz	x0, #63, LBB0_6
; %bb.2:
	ldr	w0, [sp, #8]
	ldr	w8, [x20]
	cmp	w0, w8
	b.ne	LBB0_6
; %bb.3:
	bl	_malloc
	bl	_NOFAIL
	mov	x22, x0
	ldr	w2, [x20]
	mov	w1, #1
	mov	x3, x21
	bl	_fread
	ldr	w8, [x20]
	cmp	w0, w8
	b.ne	LBB0_5
; %bb.4:
	mov	x2, x0
	ldr	w1, [x20, #4]
	mov	x0, x22
	bl	_memcmp
	cbz	x0, LBB0_10
LBB0_5:
	mov	x0, x22
	bl	_free
LBB0_6:
	mov	x0, x21
	bl	_fclose
LBB0_7:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_fopen
	cbz	x0, LBB0_11
; %bb.8:
	mov	x21, x0
	ldp	w2, w0, [x20]
	mov	w1, #1
	mov	x3, x21
	bl	_fwrite
	ldr	w8, [x20]
	cmp	w0, w8
	b.ne	LBB0_12
LBB0_9:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_fclose
LBB0_10:
	mov	x0, x22
	bl	_free
	b	LBB0_9
LBB0_11:
	mov	x0, x19
	bl	_write_if_changed.cold.1
LBB0_12:
	mov	x0, x19
	bl	_write_if_changed.cold.2
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function write_if_changed.cold.1
_write_if_changed.cold.1:               ; @write_if_changed.cold.1
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	bl	_perror
	mov	w0, #1
	bl	_exit
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function write_if_changed.cold.2
_write_if_changed.cold.2:               ; @write_if_changed.cold.2
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	bl	_perror
	mov	w0, #1
	bl	_exit
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"r"

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

	.no_dead_strip	_write_if_changed
.subsections_via_symbols
