	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kvp_file_init
_kvp_file_init:                         ## @kvp_file_init
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_ENTRIES_PER_BLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_POOL_DIR@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_POOL_DIR_MODE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_mkdir
	testq	%rax, %rax
	jns	LBB0_5
## %bb.1:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EEXIST@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.2:
	movq	_EISDIR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
LBB0_5:
	movl	(%r14), %edi
	movl	(%r15), %esi
	callq	_chmod
	movq	_HV_KVP_POOL_COUNT@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_18
## %bb.6:
	leal	(,%rbx,4), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	shll	$3, %ebx
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	movq	_kvp_pools@GOTPCREL(%rip), %rbx
	movq	_MAX_FILE_NAME@GOTPCREL(%rip), %rcx
	leaq	L_.str.1(%rip), %rdx
	movq	_O_CREAT@GOTPCREL(%rip), %r14
	movq	_POOL_FILE_MODE@GOTPCREL(%rip), %r15
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	movq	(%rbx), %rax
	movq	%r13, %rsi
	shlq	$5, %rsi
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	(%rax,%rsi), %r12
	movl	(%rcx), %esi
	movq	%r12, %rdi
	movl	%r13d, %ecx
	callq	_snprintf
	movl	(%r14), %esi
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	(%r15), %edx
	movq	%r12, %rdi
	callq	_open
	movl	$1, %r14d
	cmpl	$-1, %eax
	je	LBB0_19
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	%eax, %ebx
	movl	(%r15), %esi
	movl	%eax, %edi
	callq	_fchmod
	movq	%r12, %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_fopen
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_20
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%rax, %r12
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movl	$1, %ebx
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, %r14d
	xorl	%r15d, %r15d
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%ebx, -56(%rbp)                 ## 4-byte Spill
	leaq	(%r12,%r15,4), %rdi
	movq	_ENTRIES_PER_BLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$4, %esi
	movq	%r13, %rcx
	callq	_fread
	movq	%r13, %rbx
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_ferror
	testq	%rax, %rax
	jne	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=2
	addq	%r13, %r15
	movq	%rbx, %rdi
	callq	_feof
	testl	%eax, %eax
	movq	%rbx, %r13
	jne	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=2
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	incl	%ebx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_realloc
	movq	%rax, %r12
	addl	-60(%rbp), %r14d                ## 4-byte Folded Reload
	testq	%rax, %rax
	jne	LBB0_12
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	_kvp_pools@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, 8(%rax,%rcx)
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, 12(%rax,%rcx)
	movq	%r12, 24(%rax,%rcx)
	movq	(%rbx), %rax
	movq	%r15, 16(%rax,%rcx)
	movq	%r13, %rdi
	callq	_fclose
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	incq	%r13
	movq	_HV_KVP_POOL_COUNT@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r13
	movq	_MAX_FILE_NAME@GOTPCREL(%rip), %rcx
	leaq	L_.str.1(%rip), %rdx
	movq	_O_CREAT@GOTPCREL(%rip), %r14
	movq	_POOL_FILE_MODE@GOTPCREL(%rip), %r15
	jl	LBB0_7
LBB0_18:
	xorl	%r14d, %r14d
	jmp	LBB0_19
LBB0_16:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_close
	movq	%r13, %rdi
	callq	_fclose
	movl	$1, %r14d
LBB0_19:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	%ebx, %edi
	callq	_close
	jmp	LBB0_19
LBB0_20:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_close
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_fclose
	jmp	LBB0_19
LBB0_13:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_KVP_LOG
LBB0_4:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_exit
LBB0_3:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_KVP_LOG
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_ENTRIES_PER_BLOCK,4,2          ## @ENTRIES_PER_BLOCK
	.comm	_POOL_DIR,4,2                   ## @POOL_DIR
	.comm	_POOL_DIR_MODE,4,2              ## @POOL_DIR_MODE
	.comm	_errno,8,3                      ## @errno
	.comm	_EEXIST,8,3                     ## @EEXIST
	.comm	_EISDIR,8,3                     ## @EISDIR
	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	" Failed to create /var/db/hyperv/pool\n"

	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.comm	_HV_KVP_POOL_COUNT,4,2          ## @HV_KVP_POOL_COUNT
	.comm	_kvp_pools,8,3                  ## @kvp_pools
	.comm	_MAX_FILE_NAME,4,2              ## @MAX_FILE_NAME
L_.str.1:                               ## @.str.1
	.asciz	"/var/db/hyperv/pool/.kvp_pool_%d"

	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_POOL_FILE_MODE,4,2             ## @POOL_FILE_MODE
L_.str.2:                               ## @.str.2
	.asciz	"r"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to read file, pool: %d\n"

	.no_dead_strip	_kvp_file_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kvp_file_init
_kvp_file_init:                         ; @kvp_file_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
Lloh0:
	adrp	x28, _ENTRIES_PER_BLOCK@GOTPAGE
Lloh1:
	ldr	x28, [x28, _ENTRIES_PER_BLOCK@GOTPAGEOFF]
	ldr	w19, [x28]
Lloh2:
	adrp	x20, _POOL_DIR@GOTPAGE
Lloh3:
	ldr	x20, [x20, _POOL_DIR@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh4:
	adrp	x21, _POOL_DIR_MODE@GOTPAGE
Lloh5:
	ldr	x21, [x21, _POOL_DIR_MODE@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_mkdir
	tbz	x0, #63, LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _errno@GOTPAGE
Lloh7:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _EEXIST@GOTPAGE
Lloh10:
	ldr	x9, [x9, _EEXIST@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
Lloh12:
	adrp	x10, _EISDIR@GOTPAGE
Lloh13:
	ldr	x10, [x10, _EISDIR@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_19
LBB0_2:
	ldr	w0, [x20]
	ldr	w1, [x21]
	bl	_chmod
Lloh15:
	adrp	x8, _HV_KVP_POOL_COUNT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HV_KVP_POOL_COUNT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.3:
	mov	x22, #0
	lsl	w20, w19, #2
	lsl	w26, w19, #3
Lloh18:
	adrp	x27, _kvp_pools@GOTPAGE
Lloh19:
	ldr	x27, [x27, _kvp_pools@GOTPAGEOFF]
Lloh20:
	adrp	x9, _MAX_FILE_NAME@GOTPAGE
Lloh21:
	ldr	x9, [x9, _MAX_FILE_NAME@GOTPAGEOFF]
Lloh22:
	adrp	x2, l_.str.1@PAGE
Lloh23:
	add	x2, x2, l_.str.1@PAGEOFF
Lloh24:
	adrp	x19, _O_RDWR@GOTPAGE
Lloh25:
	ldr	x19, [x19, _O_RDWR@GOTPAGEOFF]
Lloh26:
	adrp	x23, _O_CREAT@GOTPAGE
Lloh27:
	ldr	x23, [x23, _O_CREAT@GOTPAGEOFF]
Lloh28:
	adrp	x25, _POOL_FILE_MODE@GOTPAGE
Lloh29:
	ldr	x25, [x25, _POOL_FILE_MODE@GOTPAGEOFF]
	str	w26, [sp, #20]                  ; 4-byte Folded Spill
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	ldr	x8, [x27]
	lsl	x21, x22, #5
	ldr	x24, [x8, x21]
	ldr	w1, [x9]
	mov	x0, x24
	mov	x3, x22
	bl	_snprintf
	ldr	w8, [x19]
	ldr	w9, [x23]
	orr	w1, w9, w8
	ldr	w2, [x25]
	mov	x0, x24
	bl	_open
	cmn	w0, #1
	b.eq	LBB0_14
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x23, x0
	ldr	w1, [x25]
	bl	_fchmod
	mov	x0, x24
Lloh30:
	adrp	x1, l_.str.2@PAGE
Lloh31:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_16
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x24, x0
	mov	x0, x20
	bl	_malloc
	cbz	x0, LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x25, x0
	str	x22, [sp, #24]                  ; 8-byte Folded Spill
	mov	x22, #0
	mov	w19, #1
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x0, x25, x22, lsl #2
	ldr	w2, [x28]
	mov	w1, #4
	mov	x3, x24
	bl	_fread
	mov	x27, x0
	mov	x0, x24
	bl	_ferror
	cbnz	x0, LBB0_17
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	add	x22, x27, x22
	mov	x0, x24
	bl	_feof
	cbnz	w0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=2
	add	w19, w19, #1
	mov	x0, x25
	mov	x1, x26
	bl	_realloc
	mov	x25, x0
	add	w26, w26, w20
	cbnz	x0, LBB0_8
	b	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh32:
	adrp	x27, _kvp_pools@GOTPAGE
Lloh33:
	ldr	x27, [x27, _kvp_pools@GOTPAGEOFF]
	ldr	x8, [x27]
	add	x8, x8, x21
	stp	w23, w19, [x8, #8]
	str	x25, [x8, #24]
	ldr	x8, [x27]
	add	x8, x8, x21
	str	x22, [x8, #16]
	mov	x0, x24
	bl	_fclose
	ldr	x22, [sp, #24]                  ; 8-byte Folded Reload
	add	x22, x22, #1
Lloh34:
	adrp	x8, _HV_KVP_POOL_COUNT@GOTPAGE
Lloh35:
	ldr	x8, [x8, _HV_KVP_POOL_COUNT@GOTPAGEOFF]
Lloh36:
	ldrsw	x8, [x8]
	cmp	x22, x8
	ldr	w26, [sp, #20]                  ; 4-byte Folded Reload
Lloh37:
	adrp	x9, _MAX_FILE_NAME@GOTPAGE
Lloh38:
	ldr	x9, [x9, _MAX_FILE_NAME@GOTPAGEOFF]
Lloh39:
	adrp	x2, l_.str.1@PAGE
Lloh40:
	add	x2, x2, l_.str.1@PAGEOFF
Lloh41:
	adrp	x19, _O_RDWR@GOTPAGE
Lloh42:
	ldr	x19, [x19, _O_RDWR@GOTPAGEOFF]
Lloh43:
	adrp	x23, _O_CREAT@GOTPAGE
Lloh44:
	ldr	x23, [x23, _O_CREAT@GOTPAGEOFF]
Lloh45:
	adrp	x25, _POOL_FILE_MODE@GOTPAGE
Lloh46:
	ldr	x25, [x25, _POOL_FILE_MODE@GOTPAGEOFF]
	b.lt	LBB0_4
LBB0_12:
	mov	w0, #0
	b	LBB0_15
LBB0_13:
	mov	x0, x23
	bl	_close
	mov	x0, x24
	bl	_fclose
LBB0_14:
	mov	w0, #1
LBB0_15:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_16:
	mov	x0, x23
	bl	_close
	b	LBB0_14
LBB0_17:
Lloh47:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh48:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh49:
	ldr	w0, [x8]
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	str	x8, [sp]
Lloh50:
	adrp	x1, l_.str.3@PAGE
Lloh51:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_18:
	bl	_KVP_LOG
Lloh52:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh53:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh54:
	ldr	w0, [x8]
	bl	_exit
LBB0_19:
Lloh55:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh56:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh57:
	ldr	w0, [x8]
Lloh58:
	adrp	x1, l_.str@PAGE
Lloh59:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_18
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.cfi_endproc
                                        ; -- End function
	.comm	_ENTRIES_PER_BLOCK,4,2          ; @ENTRIES_PER_BLOCK
	.comm	_POOL_DIR,4,2                   ; @POOL_DIR
	.comm	_POOL_DIR_MODE,4,2              ; @POOL_DIR_MODE
	.comm	_errno,8,3                      ; @errno
	.comm	_EEXIST,8,3                     ; @EEXIST
	.comm	_EISDIR,8,3                     ; @EISDIR
	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	" Failed to create /var/db/hyperv/pool\n"

	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.comm	_HV_KVP_POOL_COUNT,4,2          ; @HV_KVP_POOL_COUNT
	.comm	_kvp_pools,8,3                  ; @kvp_pools
	.comm	_MAX_FILE_NAME,4,2              ; @MAX_FILE_NAME
l_.str.1:                               ; @.str.1
	.asciz	"/var/db/hyperv/pool/.kvp_pool_%d"

	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_POOL_FILE_MODE,4,2             ; @POOL_FILE_MODE
l_.str.2:                               ; @.str.2
	.asciz	"r"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to read file, pool: %d\n"

	.no_dead_strip	_kvp_file_init
.subsections_via_symbols
