	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_value
_encode_value:                          ## @encode_value
	.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	%r8, -80(%rbp)                  ## 8-byte Spill
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movl	%edx, %ebx
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	cmpq	$0, 8(%rdi)
	je	LBB0_2
## %bb.1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_2:
	movb	$37, -43(%rbp)
	movl	(%r13), %eax
	testb	%al, %al
	movl	$100, %ecx
	cmovnel	%eax, %ecx
	movb	%cl, -42(%rbp)
	movb	$0, -41(%rbp)
	testl	%ebx, %ebx
	jle	LBB0_3
## %bb.4:
	xorl	%r12d, %r12d
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	xorl	%ecx, %ecx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	cmpb	$115, %al
	jne	LBB0_7
	.p2align	4, 0x90
LBB0_6:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	callq	_strlen
	movl	%eax, %r14d
	incl	%r14d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_7:
	movl	4(%r13), %r14d
	cmpl	$-1, %r14d
	movl	$4, %eax
	cmovel	%eax, %r14d
LBB0_8:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leal	(%r14,%r12), %r15d
	cmpl	-52(%rbp), %r15d                ## 4-byte Folded Reload
	jle	LBB0_10
## %bb.9:
	leal	500(%r15), %esi
	movq	%rax, %rdi
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	callq	_xrealloc
LBB0_10:
	movslq	%r12d, %r12
	movq	%rax, %rcx
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	addq	%rax, %r12
	cmpb	$115, (%r13)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rsi
	jne	LBB0_13
## %bb.11:
	movq	%r12, %rdi
	movl	%r14d, %edx
	callq	_memcpy
	cmpq	$0, 8(%r13)
	je	LBB0_18
## %bb.12:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_13:
	movq	%rsi, %rdi
	leaq	-43(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	callq	_sscanf
	cmpl	$4, %r14d
	jne	LBB0_15
## %bb.14:
	movl	-48(%rbp), %edi
	callq	_cpu_to_fdt32
	movl	%eax, (%r12)
	cmpq	$0, 8(%r13)
	jne	LBB0_17
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_15:
	movb	-48(%rbp), %al
	movb	%al, (%r12)
	cmpq	$0, 8(%r13)
	je	LBB0_18
LBB0_17:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%r13), %eax
	cmpl	$2, %eax
	leaq	L_.str.5(%rip), %rdx
	leaq	L_.str.4(%rip), %rcx
	cmoveq	%rcx, %rdx
	cmpl	$1, %eax
	leaq	L_.str.3(%rip), %rax
	cmoveq	%rax, %rdx
	movl	-48(%rbp), %ecx
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_18:
	cmpl	$2, %ebx
	jl	LBB0_19
## %bb.23:
	decl	%ebx
	addq	$8, -72(%rbp)                   ## 8-byte Folded Spill
	movb	(%r13), %al
	movl	%r15d, %r12d
	cmpb	$115, %al
	jne	LBB0_7
	jmp	LBB0_6
LBB0_19:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	jmp	LBB0_20
LBB0_3:
	xorl	%ecx, %ecx
	xorl	%r15d, %r15d
LBB0_20:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	%r15d, (%rax)
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%rcx, (%rax)
	cmpq	$0, 8(%r13)
	je	LBB0_22
## %bb.21:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.6(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_22:
	xorl	%eax, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Decoding value:\n"

L_.str.1:                               ## @.str.1
	.asciz	"\tstring: '%s'\n"

L_.str.2:                               ## @.str.2
	.asciz	"\t%s: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"byte"

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

L_.str.5:                               ## @.str.5
	.asciz	"int"

L_.str.6:                               ## @.str.6
	.asciz	"Value size %d\n"

	.no_dead_strip	_encode_value
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_value
_encode_value:                          ; @encode_value
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x25, x4
	mov	x19, x3
	mov	x22, x2
	mov	x23, x1
	mov	x21, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x20, _stderr@GOTPAGE
Lloh1:
	ldr	x20, [x20, _stderr@GOTPAGEOFF]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x20]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
LBB0_2:
	mov	w8, #37
	strb	w8, [sp, #41]
	ldrb	w8, [x21]
	mov	w9, #100
	cmp	w8, #0
	csel	w9, w9, w8, eq
	strb	w9, [sp, #42]
	strb	wzr, [sp, #43]
	cmp	w22, #1
	b.lt	LBB0_19
; %bb.3:
	stp	x25, x19, [sp, #24]             ; 16-byte Folded Spill
	mov	w19, #0
	mov	w25, #0
	mov	x24, #0
	mov	w26, #4
	cmp	w8, #115
	b.ne	LBB0_5
LBB0_4:
	ldr	x0, [x23]
	bl	_strlen
	add	w28, w0, #1
	b	LBB0_6
LBB0_5:
	ldr	w8, [x21, #4]
	cmn	w8, #1
	csel	w28, w26, w8, eq
LBB0_6:
	add	w27, w28, w19
	cmp	w27, w25
	b.le	LBB0_8
; %bb.7:
	add	w25, w27, #500
	mov	x0, x24
	mov	x1, x25
	bl	_xrealloc
	mov	x24, x0
LBB0_8:
	add	x19, x24, w19, sxtw
	ldrb	w9, [x21]
	ldr	x8, [x23]
	cmp	w9, #115
	b.ne	LBB0_11
; %bb.9:
	mov	x0, x19
	mov	x1, x8
	mov	x2, x28
	bl	_memcpy
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_16
; %bb.10:
	ldr	w0, [x20]
	str	x19, [sp]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_15
LBB0_11:
	add	x1, sp, #41
	add	x2, sp, #44
	mov	x0, x8
	bl	_sscanf
	cmp	w28, #4
	b.ne	LBB0_13
; %bb.12:
	ldr	w0, [sp, #44]
	bl	_cpu_to_fdt32
	str	w0, [x19]
	ldr	x8, [x21, #8]
	cbnz	x8, LBB0_14
	b	LBB0_16
LBB0_13:
	ldr	w8, [sp, #44]
	strb	w8, [x19]
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_16
LBB0_14:
	ldr	w0, [x20]
	ldr	w8, [x21, #4]
	cmp	w8, #2
Lloh6:
	adrp	x9, l_.str.5@PAGE
Lloh7:
	add	x9, x9, l_.str.5@PAGEOFF
Lloh8:
	adrp	x10, l_.str.4@PAGE
Lloh9:
	add	x10, x10, l_.str.4@PAGEOFF
	csel	x9, x10, x9, eq
	cmp	w8, #1
Lloh10:
	adrp	x8, l_.str.3@PAGE
Lloh11:
	add	x8, x8, l_.str.3@PAGEOFF
	csel	x8, x8, x9, eq
	ldr	w9, [sp, #44]
	stp	x8, x9, [sp]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_15:
	bl	_fprintf
LBB0_16:
	cmp	w22, #2
	b.lt	LBB0_18
; %bb.17:
	sub	w22, w22, #1
	add	x23, x23, #8
	ldrb	w8, [x21]
	mov	x19, x27
	cmp	w8, #115
	b.ne	LBB0_5
	b	LBB0_4
LBB0_18:
	ldp	x25, x19, [sp, #24]             ; 16-byte Folded Reload
	b	LBB0_20
LBB0_19:
	mov	x24, #0
	mov	w27, #0
LBB0_20:
	str	w27, [x25]
	str	x24, [x19]
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_22
; %bb.21:
	ldr	w0, [x20]
	str	x27, [sp]
Lloh14:
	adrp	x1, l_.str.6@PAGE
Lloh15:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_fprintf
LBB0_22:
	mov	w0, #0
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Decoding value:\n"

l_.str.1:                               ; @.str.1
	.asciz	"\tstring: '%s'\n"

l_.str.2:                               ; @.str.2
	.asciz	"\t%s: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"byte"

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

l_.str.5:                               ; @.str.5
	.asciz	"int"

l_.str.6:                               ; @.str.6
	.asciz	"Value size %d\n"

	.no_dead_strip	_encode_value
.subsections_via_symbols
