	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function store_restart_layout
_store_restart_layout:                  ## @store_restart_layout
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_LC_NUMERIC@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_setlocale
	xorl	%edi, %edi
	callq	_yajl_gen_alloc
	movq	_croot@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	movl	$1, %edx
	callq	_dump_node
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_setlocale
	movq	_get_buf@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdi
	leaq	-40(%rbp), %rsi
	leaq	-32(%rbp), %rdx
	xorl	%eax, %eax
	callq	_y
	movq	_config@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_resolve_tilde
	movq	%rax, %r14
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str.2(%rip), %rdi
	callq	_get_process_filename
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_13
LBB0_3:
	movq	%r14, %rdi
	callq	_sstrdup
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_dirname
	movq	%rax, %rbx
	leaq	L_.str.3(%rip), %rdi
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_DLOG
	movq	_DEFAULT_DIR_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mkdirp
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.4(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_ELOG
LBB0_5:
	movq	%r15, %rdi
	callq	_free
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	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	%r14, %rdi
	callq	_open
	cmpl	$-1, %eax
	je	LBB0_12
## %bb.6:
	movl	%eax, %ebx
	movq	-40(%rbp), %rsi
	movq	-32(%rbp), %rdx
	movl	%eax, %edi
	callq	_writeall
	cmpl	$-1, %eax
	je	LBB0_10
## %bb.7:
	movl	%ebx, %edi
	callq	_close
	movq	-32(%rbp), %rsi
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.8:
	movq	-40(%rbp), %rdx
	leaq	L_.str.7(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_DLOG
LBB0_9:
	movq	_free@GOTPCREL(%rip), %rdi
	xorl	%eax, %eax
	callq	_y
	jmp	LBB0_14
LBB0_10:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.6(%rip), %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_ELOG
	movq	%r14, %rdi
	callq	_free
	movl	%ebx, %edi
	callq	_close
LBB0_13:
	xorl	%r14d, %r14d
LBB0_14:
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	leaq	L_.str.5(%rip), %rdi
	callq	_perror
	movq	%r14, %rdi
	callq	_free
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_LC_NUMERIC,4,2                 ## @LC_NUMERIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"C"

	.comm	_croot,4,2                      ## @croot
L_.str.1:                               ## @.str.1
	.space	1

	.comm	_get_buf,4,2                    ## @get_buf
	.comm	_config,8,3                     ## @config
L_.str.2:                               ## @.str.2
	.asciz	"restart-state"

L_.str.3:                               ## @.str.3
	.asciz	"Creating \"%s\" for storing the restart layout\n"

	.comm	_DEFAULT_DIR_MODE,4,2           ## @DEFAULT_DIR_MODE
L_.str.4:                               ## @.str.4
	.asciz	"Could not create \"%s\" for storing the restart layout, layout will be lost.\n"

	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_TRUNC,4,2                    ## @O_TRUNC
	.comm	_S_IRUSR,4,2                    ## @S_IRUSR
	.comm	_S_IWUSR,4,2                    ## @S_IWUSR
L_.str.5:                               ## @.str.5
	.asciz	"open()"

L_.str.6:                               ## @.str.6
	.asciz	"Could not write restart layout to \"%s\", layout will be lost: %s\n"

	.comm	_errno,4,2                      ## @errno
L_.str.7:                               ## @.str.7
	.asciz	"layout: %.*s\n"

	.no_dead_strip	_store_restart_layout
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function store_restart_layout
_store_restart_layout:                  ; @store_restart_layout
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
Lloh0:
	adrp	x19, _LC_NUMERIC@GOTPAGE
Lloh1:
	ldr	x19, [x19, _LC_NUMERIC@GOTPAGEOFF]
	ldr	w0, [x19]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_setlocale
	mov	x0, #0
	bl	_yajl_gen_alloc
Lloh4:
	adrp	x8, _croot@GOTPAGE
Lloh5:
	ldr	x8, [x8, _croot@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	w2, #1
	bl	_dump_node
	ldr	w0, [x19]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_setlocale
Lloh9:
	adrp	x8, _get_buf@GOTPAGE
Lloh10:
	ldr	x8, [x8, _get_buf@GOTPAGEOFF]
Lloh11:
	ldrsw	x0, [x8]
	add	x8, sp, #16
	add	x9, sp, #24
	stp	x9, x8, [sp]
	bl	_y
Lloh12:
	adrp	x8, _config@GOTPAGE
Lloh13:
	ldr	x8, [x8, _config@GOTPAGEOFF]
Lloh14:
	ldr	x0, [x8]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_resolve_tilde
	mov	x19, x0
	b	LBB0_3
LBB0_2:
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_get_process_filename
	mov	x19, x0
	cbz	x0, LBB0_12
LBB0_3:
	mov	x0, x19
	bl	_sstrdup
	mov	x20, x0
	bl	_dirname
	mov	x21, x0
	str	x0, [sp]
Lloh17:
	adrp	x0, l_.str.3@PAGE
Lloh18:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DLOG
Lloh19:
	adrp	x8, _DEFAULT_DIR_MODE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _DEFAULT_DIR_MODE@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_mkdirp
	cbz	x0, LBB0_5
; %bb.4:
Lloh22:
	adrp	x0, l_.str.4@PAGE
Lloh23:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x21
	bl	_ELOG
LBB0_5:
	mov	x0, x20
	bl	_free
Lloh24:
	adrp	x8, _O_WRONLY@GOTPAGE
Lloh25:
	ldr	x8, [x8, _O_WRONLY@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
Lloh27:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh28:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh30:
	adrp	x9, _O_TRUNC@GOTPAGE
Lloh31:
	ldr	x9, [x9, _O_TRUNC@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
Lloh33:
	adrp	x10, _S_IRUSR@GOTPAGE
Lloh34:
	ldr	x10, [x10, _S_IRUSR@GOTPAGEOFF]
	orr	w1, w8, w9
Lloh35:
	ldr	w8, [x10]
Lloh36:
	adrp	x9, _S_IWUSR@GOTPAGE
Lloh37:
	ldr	x9, [x9, _S_IWUSR@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_open
	cmn	w0, #1
	b.eq	LBB0_13
; %bb.6:
	mov	x20, x0
	ldp	x2, x1, [sp, #16]
	bl	_writeall
	cmn	w0, #1
	b.eq	LBB0_10
; %bb.7:
	mov	x0, x20
	bl	_close
	ldr	x8, [sp, #16]
	cbz	x8, LBB0_9
; %bb.8:
	ldr	x9, [sp, #24]
	stp	x8, x9, [sp]
Lloh39:
	adrp	x0, l_.str.7@PAGE
Lloh40:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_DLOG
LBB0_9:
Lloh41:
	adrp	x0, _free@GOTPAGE
Lloh42:
	ldr	x0, [x0, _free@GOTPAGEOFF]
	bl	_y
	b	LBB0_12
LBB0_10:
Lloh43:
	adrp	x8, _errno@GOTPAGE
Lloh44:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh45:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh46:
	adrp	x0, l_.str.6@PAGE
Lloh47:
	add	x0, x0, l_.str.6@PAGEOFF
	mov	x1, x19
	bl	_ELOG
	mov	x0, x19
	bl	_free
	mov	x0, x20
	bl	_close
LBB0_11:
	mov	x19, #0
LBB0_12:
	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
	add	sp, sp, #80
	ret
LBB0_13:
Lloh48:
	adrp	x0, l_.str.5@PAGE
Lloh49:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_perror
	mov	x0, x19
	bl	_free
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpAdd	Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_LC_NUMERIC,4,2                 ; @LC_NUMERIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"C"

	.comm	_croot,4,2                      ; @croot
l_.str.1:                               ; @.str.1
	.space	1

	.comm	_get_buf,4,2                    ; @get_buf
	.comm	_config,8,3                     ; @config
l_.str.2:                               ; @.str.2
	.asciz	"restart-state"

l_.str.3:                               ; @.str.3
	.asciz	"Creating \"%s\" for storing the restart layout\n"

	.comm	_DEFAULT_DIR_MODE,4,2           ; @DEFAULT_DIR_MODE
l_.str.4:                               ; @.str.4
	.asciz	"Could not create \"%s\" for storing the restart layout, layout will be lost.\n"

	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_TRUNC,4,2                    ; @O_TRUNC
	.comm	_S_IRUSR,4,2                    ; @S_IRUSR
	.comm	_S_IWUSR,4,2                    ; @S_IWUSR
l_.str.5:                               ; @.str.5
	.asciz	"open()"

l_.str.6:                               ; @.str.6
	.asciz	"Could not write restart layout to \"%s\", layout will be lost: %s\n"

	.comm	_errno,4,2                      ; @errno
l_.str.7:                               ; @.str.7
	.asciz	"layout: %.*s\n"

	.no_dead_strip	_store_restart_layout
.subsections_via_symbols
