	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_json_serialize_to_file         ## -- Begin function json_serialize_to_file
	.p2align	4, 0x90
_json_serialize_to_file:                ## @json_serialize_to_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	%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	_JSONSuccess@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	callq	_json_serialize_to_string
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rbx
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_fputs
	movq	_EOF@GOTPCREL(%rip), %r13
	movq	_JSONFailure@GOTPCREL(%rip), %r12
	cmpq	(%r13), %rax
	jne	LBB0_6
## %bb.5:
	movl	(%r12), %r14d
LBB0_6:
	movq	%rbx, %rdi
	callq	_fclose
	cmpq	(%r13), %rax
	jne	LBB0_8
## %bb.7:
	movl	(%r12), %r14d
LBB0_8:
	movq	%r15, %rdi
	callq	_json_free_serialized_string
	jmp	LBB0_9
LBB0_3:
	movq	%r15, %rdi
	callq	_json_free_serialized_string
LBB0_1:
	movq	_JSONFailure@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_9:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_JSONSuccess,4,2                ## @JSONSuccess
	.comm	_JSONFailure,4,2                ## @JSONFailure
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"w"

	.comm	_EOF,8,3                        ## @EOF
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_json_serialize_to_file         ; -- Begin function json_serialize_to_file
	.p2align	2
_json_serialize_to_file:                ; @json_serialize_to_file
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
Lloh0:
	adrp	x8, _JSONSuccess@GOTPAGE
Lloh1:
	ldr	x8, [x8, _JSONSuccess@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	bl	_json_serialize_to_string
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_fopen
	cbz	x0, LBB0_3
; %bb.2:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_fputs
Lloh5:
	adrp	x22, _EOF@GOTPAGE
Lloh6:
	ldr	x22, [x22, _EOF@GOTPAGEOFF]
	ldr	x8, [x22]
Lloh7:
	adrp	x23, _JSONFailure@GOTPAGE
Lloh8:
	ldr	x23, [x23, _JSONFailure@GOTPAGEOFF]
	ldr	w9, [x23]
	cmp	x0, x8
	csel	w21, w9, w21, eq
	mov	x0, x20
	bl	_fclose
	ldr	x8, [x22]
	ldr	w9, [x23]
	cmp	x0, x8
	csel	w20, w9, w21, eq
	mov	x0, x19
	bl	_json_free_serialized_string
	b	LBB0_5
LBB0_3:
	mov	x0, x19
	bl	_json_free_serialized_string
LBB0_4:
Lloh9:
	adrp	x8, _JSONFailure@GOTPAGE
Lloh10:
	ldr	x8, [x8, _JSONFailure@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x8]
LBB0_5:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_JSONSuccess,4,2                ; @JSONSuccess
	.comm	_JSONFailure,4,2                ; @JSONFailure
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"w"

	.comm	_EOF,8,3                        ; @EOF
.subsections_via_symbols
