	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_conf_write                     ## -- Begin function conf_write
	.p2align	4, 0x90
_conf_write:                            ## @conf_write
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_PATH_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	incl	%ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movb	$0, (%r14)
	testq	%r12, %r12
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_7
## %bb.1:
	cmpb	$0, (%r12)
	je	LBB0_7
## %bb.2:
	leaq	-72(%rbp), %rsi
	movq	%r12, %rdi
	callq	_stat
	testl	%eax, %eax
	je	LBB0_8
LBB0_3:
	movq	%r12, %rdi
	movl	$47, %esi
	callq	_strrchr
	testq	%rax, %rax
	je	LBB0_11
## %bb.4:
	movq	%rax, %r14
	movl	%r14d, %ebx
	subl	%r12d, %ebx
	incl	%ebx
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_memcpy
	movslq	%ebx, %rax
	movb	$0, (%r13,%rax)
	cmpb	$0, 1(%r14)
	je	LBB0_10
## %bb.5:
	incq	%r14
	movq	%r14, %r12
	jmp	LBB0_11
LBB0_7:
	xorl	%eax, %eax
	callq	_conf_get_configname
	movq	%rax, %r12
	jmp	LBB0_12
LBB0_8:
	movl	-72(%rbp), %edi
	callq	_S_ISDIR
	testq	%rax, %rax
	je	LBB0_3
## %bb.9:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_strcpy
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_strcat
LBB0_10:
	xorl	%eax, %eax
	callq	_conf_get_configname
	movq	%rax, %r12
LBB0_11:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
LBB0_12:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movq	%r14, %rdx
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_sprintf
	leaq	L_.str.2(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_15
## %bb.13:
	cmpb	$0, (%rax)
	je	LBB0_15
## %bb.14:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movb	$0, (%rax)
	movq	%r15, %rdi
	jmp	LBB0_16
LBB0_15:
	xorl	%eax, %eax
	callq	_getpid
	leaq	L_.str.3(%rip), %rsi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r14, %rdx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_sprintf
	movq	%rbx, %rdi
LBB0_16:
	leaq	L_.str.4(%rip), %rsi
	callq	_fopen
	movl	$1, %ebx
	testq	%rax, %rax
	je	LBB0_33
## %bb.17:
	movq	%rax, %r14
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movq	_kconfig_printer_cb@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	xorl	%edx, %edx
	callq	_conf_write_heading
	xorl	%eax, %eax
	callq	_conf_get_changed
	testl	%eax, %eax
	jne	LBB0_19
## %bb.18:
	xorl	%eax, %eax
	callq	_sym_clear_all_valid
LBB0_19:
	movq	_rootmenu@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_30
## %bb.20:
	movq	_SYMBOL_CHOICE@GOTPCREL(%rip), %rbx
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_22 Depth=1
	movq	16(%r15), %rax
	testq	%rax, %rax
	je	LBB0_27
LBB0_22:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_27 Depth 2
	movq	%rax, %r15
	movq	24(%rax), %r13
	testq	%r13, %r13
	je	LBB0_28
## %bb.23:                              ##   in Loop: Header=BB0_22 Depth=1
	movl	(%rbx), %eax
	testl	%eax, (%r13)
	jne	LBB0_21
## %bb.24:                              ##   in Loop: Header=BB0_22 Depth=1
	movq	%r13, %rdi
	callq	_sym_calc_value
	movl	(%r13), %eax
	movq	_SYMBOL_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_21
## %bb.25:                              ##   in Loop: Header=BB0_22 Depth=1
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, (%r13)
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	_kconfig_printer_cb@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	callq	_conf_write_symbol
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_27 Depth=2
	movq	8(%r15), %r15
	testq	%r15, %r15
	je	LBB0_30
LBB0_27:                                ##   Parent Loop BB0_22 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_26
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_28:                                ##   in Loop: Header=BB0_22 Depth=1
	movq	%r15, %rdi
	callq	_menu_is_visible
	testl	%eax, %eax
	je	LBB0_21
## %bb.29:                              ##   in Loop: Header=BB0_22 Depth=1
	movq	%r15, %rdi
	callq	_menu_get_prompt
	movq	%r14, %rdi
	leaq	L_.str.5(%rip), %rsi
	movq	%rax, %rdx
	callq	_fprintf
	jmp	LBB0_21
LBB0_30:
	movq	%r14, %rdi
	callq	_fclose
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	cmpb	$0, (%r15)
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_32
## %bb.31:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_strcat
	leaq	L_.str.6(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcat
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$1, %ebx
	callq	_rename
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_rename
	testq	%rax, %rax
	jne	LBB0_33
LBB0_32:
	leaq	L_.str.7(%rip), %rdi
	callq	__
	movl	%eax, %edi
	movq	%r14, %rsi
	callq	_conf_message
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_sym_set_change_count
LBB0_33:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_35
## %bb.34:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_35:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PATH_MAX,4,2                   ## @PATH_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/"

L_.str.1:                               ## @.str.1
	.asciz	"%s%s"

L_.str.2:                               ## @.str.2
	.asciz	"KCONFIG_OVERWRITECONFIG"

L_.str.3:                               ## @.str.3
	.asciz	"%s.tmpconfig.%d"

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

	.comm	_kconfig_printer_cb,4,2         ## @kconfig_printer_cb
	.comm	_rootmenu,8,3                   ## @rootmenu
L_.str.5:                               ## @.str.5
	.asciz	"\n#\n# %s\n#\n"

	.comm	_SYMBOL_CHOICE,4,2              ## @SYMBOL_CHOICE
	.comm	_SYMBOL_WRITE,4,2               ## @SYMBOL_WRITE
L_.str.6:                               ## @.str.6
	.asciz	".old"

L_.str.7:                               ## @.str.7
	.asciz	"configuration written to %s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_conf_write                     ; -- Begin function conf_write
	.p2align	2
_conf_write:                            ; @conf_write
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #16
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _PATH_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PATH_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	add	w8, w8, #1
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x12, x10, #0x1fffffff0
	sub	x20, x9, x12
	mov	sp, x20
	mov	x9, x8
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x21, x9, x12
	mov	sp, x21
	mov	x9, x8
Lloh10:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh11:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x19, x8, x12
	mov	sp, x19
	strb	wzr, [x20]
	cbz	x0, LBB0_8
; %bb.1:
	ldrb	w8, [x22]
	cbz	w8, LBB0_8
; %bb.2:
	sub	x1, x29, #96
	mov	x0, x22
	bl	_stat
	cbz	w0, LBB0_6
LBB0_3:
	mov	x0, x22
	mov	w1, #47
	bl	_strrchr
	cbz	x0, LBB0_9
; %bb.4:
	mov	x23, x0
	sub	w8, w23, w22
	add	w24, w8, #1
	mov	x0, x20
	mov	x1, x22
	mov	x2, x24
	bl	_memcpy
	strb	wzr, [x20, w24, sxtw]
	ldrb	w8, [x23, #1]!
	cbz	w8, LBB0_8
; %bb.5:
	mov	x22, x23
	b	LBB0_9
LBB0_6:
	ldur	w0, [x29, #-96]
	bl	_S_ISDIR
	cbz	x0, LBB0_3
; %bb.7:
	mov	x0, x20
	mov	x1, x22
	bl	_strcpy
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_strcat
LBB0_8:
	bl	_conf_get_configname
	mov	x22, x0
LBB0_9:
	str	x22, [sp, #-16]!
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_sprintf
	add	sp, sp, #16
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_12
; %bb.10:
	ldrb	w8, [x0]
	cbz	w8, LBB0_12
; %bb.11:
	strb	wzr, [x21]
	mov	x0, x19
	b	LBB0_13
LBB0_12:
	bl	_getpid
	str	x0, [sp, #-16]!
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_sprintf
	add	sp, sp, #16
	mov	x0, x21
LBB0_13:
Lloh20:
	adrp	x1, l_.str.4@PAGE
Lloh21:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_29
; %bb.14:
	mov	x23, x0
Lloh22:
	adrp	x1, _kconfig_printer_cb@GOTPAGE
Lloh23:
	ldr	x1, [x1, _kconfig_printer_cb@GOTPAGEOFF]
	mov	x2, #0
	bl	_conf_write_heading
	bl	_conf_get_changed
	cbnz	w0, LBB0_16
; %bb.15:
	bl	_sym_clear_all_valid
LBB0_16:
Lloh24:
	adrp	x8, _rootmenu@GOTPAGE
Lloh25:
	ldr	x8, [x8, _rootmenu@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	cbz	x8, LBB0_27
; %bb.17:
Lloh27:
	adrp	x24, l_.str.5@PAGE
Lloh28:
	add	x24, x24, l_.str.5@PAGEOFF
Lloh29:
	adrp	x28, _SYMBOL_CHOICE@GOTPAGE
Lloh30:
	ldr	x28, [x28, _SYMBOL_CHOICE@GOTPAGEOFF]
Lloh31:
	adrp	x25, _SYMBOL_WRITE@GOTPAGE
Lloh32:
	ldr	x25, [x25, _SYMBOL_WRITE@GOTPAGEOFF]
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=1
	ldr	x8, [x26, #16]
	cbz	x8, LBB0_24
LBB0_19:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_24 Depth 2
	mov	x26, x8
	ldr	x27, [x8, #24]
	cbz	x27, LBB0_25
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	ldr	w8, [x27]
	ldr	w9, [x28]
	tst	w9, w8
	b.ne	LBB0_18
; %bb.21:                               ;   in Loop: Header=BB0_19 Depth=1
	mov	x0, x27
	bl	_sym_calc_value
	ldr	w8, [x27]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_18
; %bb.22:                               ;   in Loop: Header=BB0_19 Depth=1
	bic	w8, w8, w9
	str	w8, [x27]
	mov	x0, x23
	mov	x1, x27
Lloh33:
	adrp	x2, _kconfig_printer_cb@GOTPAGE
Lloh34:
	ldr	x2, [x2, _kconfig_printer_cb@GOTPAGEOFF]
	mov	x3, #0
	bl	_conf_write_symbol
	b	LBB0_18
LBB0_23:                                ;   in Loop: Header=BB0_24 Depth=2
	ldr	x26, [x26, #8]
	cbz	x26, LBB0_27
LBB0_24:                                ;   Parent Loop BB0_19 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x26]
	cbz	x8, LBB0_23
	b	LBB0_19
LBB0_25:                                ;   in Loop: Header=BB0_19 Depth=1
	mov	x0, x26
	bl	_menu_is_visible
	cbz	w0, LBB0_18
; %bb.26:                               ;   in Loop: Header=BB0_19 Depth=1
	mov	x0, x26
	bl	_menu_get_prompt
	mov	x2, x0
	mov	x0, x23
	mov	x1, x24
	bl	_fprintf
	b	LBB0_18
LBB0_27:
	mov	x0, x23
	bl	_fclose
	ldrb	w8, [x21]
	cbz	w8, LBB0_30
; %bb.28:
	mov	x0, x20
	mov	x1, x22
	bl	_strcat
Lloh35:
	adrp	x1, l_.str.6@PAGE
Lloh36:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x20
	bl	_strcat
	mov	x0, x19
	mov	x1, x20
	bl	_rename
	mov	x0, x21
	mov	x1, x19
	bl	_rename
	cbz	x0, LBB0_30
LBB0_29:
	mov	w0, #1
	b	LBB0_31
LBB0_30:
Lloh37:
	adrp	x0, l_.str.7@PAGE
Lloh38:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	__
	mov	x1, x19
	bl	_conf_message
	mov	w0, #0
	bl	_sym_set_change_count
	mov	w0, #0
LBB0_31:
	ldur	x8, [x29, #-88]
Lloh39:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh40:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh41:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_33
; %bb.32:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_33:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_PATH_MAX,4,2                   ; @PATH_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/"

l_.str.1:                               ; @.str.1
	.asciz	"%s%s"

l_.str.2:                               ; @.str.2
	.asciz	"KCONFIG_OVERWRITECONFIG"

l_.str.3:                               ; @.str.3
	.asciz	"%s.tmpconfig.%d"

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

	.comm	_kconfig_printer_cb,4,2         ; @kconfig_printer_cb
	.comm	_rootmenu,8,3                   ; @rootmenu
l_.str.5:                               ; @.str.5
	.asciz	"\n#\n# %s\n#\n"

	.comm	_SYMBOL_CHOICE,4,2              ; @SYMBOL_CHOICE
	.comm	_SYMBOL_WRITE,4,2               ; @SYMBOL_WRITE
l_.str.6:                               ; @.str.6
	.asciz	".old"

l_.str.7:                               ; @.str.7
	.asciz	"configuration written to %s"

.subsections_via_symbols
