	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_uboot_env_var
_handle_uboot_env_var:                  ## @handle_uboot_env_var
	.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	%r12
	pushq	%rbx
	subq	$144, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movl	%edi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_UBENV_IMPORT@GOTPCREL(%rip), %r12
	cmpl	%edi, (%r12)
	jne	LBB0_7
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_strcspn
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:
	movslq	%eax, %rcx
	cmpb	$0, (%r15,%rcx)
	je	LBB0_5
## %bb.6:
	movl	%eax, %edi
	movl	$127, %esi
	callq	_MIN
	movl	%eax, %ebx
	leaq	-176(%rbp), %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_strncpy
	movslq	%ebx, %rax
	movb	$0, -176(%rbp,%rax)
	addq	%rax, %r15
	incq	%r15
	jmp	LBB0_7
LBB0_2:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_18
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rsi
	xorl	%eax, %eax
	addq	$144, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_printf                         ## TAILCALL
LBB0_5:
	leaq	L_.str.2(%rip), %rsi
	leaq	-176(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_strcpy
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	$121, %edx
	callq	_strncat
LBB0_7:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movl	$6, %edx
	callq	_strncmp
	leaq	6(%r15), %rbx
	testq	%rax, %rax
	cmovneq	%r15, %rbx
	cmpb	$0, (%rbx)
	je	LBB0_8
## %bb.9:
	movq	%rbx, %rdi
	callq	_ub_env_get
	movq	_UBENV_SHOW@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	jne	LBB0_13
## %bb.10:
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	leaq	L_.str.5(%rip), %rdi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_16
LBB0_8:
	leaq	L_str(%rip), %rdi
	callq	_puts
	jmp	LBB0_16
LBB0_13:
	cmpl	%r14d, (%r12)
	jne	LBB0_16
## %bb.14:
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	leaq	-176(%rbp), %rdi
	movq	%rax, %rsi
	movl	$1, %edx
	callq	_setenv
	jmp	LBB0_16
LBB0_11:
	leaq	L_.str.4(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_printf
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_18
## %bb.17:
	addq	$144, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_UBENV_IMPORT,4,2               ## @UBENV_IMPORT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"="

L_.str.1:                               ## @.str.1
	.asciz	"name cannot start with '=': '%s'\n"

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

	.comm	_UBENV_SHOW,4,2                 ## @UBENV_SHOW
L_.str.4:                               ## @.str.4
	.asciz	"uboot.%s is not set\n"

L_.str.5:                               ## @.str.5
	.asciz	"uboot.%s=%s\n"

L_str:                                  ## @str
	.asciz	"empty variable name"

	.no_dead_strip	_handle_uboot_env_var
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_uboot_env_var
_handle_uboot_env_var:                  ; @handle_uboot_env_var
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #224
	.cfi_def_cfa_offset 224
	stp	x24, x23, [sp, #160]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #176]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #192]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #208]            ; 16-byte Folded Spill
	add	x29, sp, #208
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x22, _UBENV_IMPORT@GOTPAGE
Lloh4:
	ldr	x22, [x22, _UBENV_IMPORT@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, w0
	b.ne	LBB0_6
; %bb.1:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_strcspn
	cbz	w0, LBB0_4
; %bb.2:
	ldrb	w8, [x20, w0, sxtw]
	cbz	w8, LBB0_5
; %bb.3:
	mov	w1, #127
	bl	_MIN
	mov	x21, x0
	add	x23, sp, #24
	add	x0, sp, #24
	mov	x1, x20
	mov	x2, x21
	bl	_strncpy
	sxtw	x8, w21
	strb	wzr, [x23, x8]
	add	x8, x8, x20
	add	x20, x8, #1
	b	LBB0_6
LBB0_4:
	str	x20, [sp]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_5:
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x0, sp, #24
	bl	_strcpy
	add	x0, sp, #24
	mov	x1, x20
	mov	w2, #121
	bl	_strncat
LBB0_6:
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w21, #6
	mov	x0, x20
	mov	w2, #6
	bl	_strncmp
	cmp	x0, #0
	csel	x8, x21, xzr, eq
	add	x20, x20, x8
	ldrb	w8, [x20]
	cbz	w8, LBB0_10
; %bb.7:
	mov	x0, x20
	bl	_ub_env_get
	mov	x1, x0
Lloh13:
	adrp	x8, _UBENV_SHOW@GOTPAGE
Lloh14:
	ldr	x8, [x8, _UBENV_SHOW@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_11
; %bb.8:
	cbz	x1, LBB0_13
; %bb.9:
	stp	x20, x1, [sp]
Lloh16:
	adrp	x0, l_.str.5@PAGE
Lloh17:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_14
LBB0_10:
Lloh18:
	adrp	x0, l_str@PAGE
Lloh19:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	b	LBB0_15
LBB0_11:
	ldr	w8, [x22]
	cmp	w8, w19
	ccmp	x1, #0, #4, eq
	b.eq	LBB0_15
; %bb.12:
	add	x0, sp, #24
	mov	w2, #1
	bl	_setenv
	b	LBB0_15
LBB0_13:
	str	x20, [sp]
Lloh20:
	adrp	x0, l_.str.4@PAGE
Lloh21:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_14:
	bl	_printf
LBB0_15:
	ldur	x8, [x29, #-56]
Lloh22:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh23:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	ldp	x29, x30, [sp, #208]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #192]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #176]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #160]            ; 16-byte Folded Reload
	add	sp, sp, #224
	ret
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_UBENV_IMPORT,4,2               ; @UBENV_IMPORT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"="

l_.str.1:                               ; @.str.1
	.asciz	"name cannot start with '=': '%s'\n"

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

	.comm	_UBENV_SHOW,4,2                 ; @UBENV_SHOW
l_.str.4:                               ; @.str.4
	.asciz	"uboot.%s is not set\n"

l_.str.5:                               ; @.str.5
	.asciz	"uboot.%s=%s\n"

l_str:                                  ; @str
	.asciz	"empty variable name"

	.no_dead_strip	_handle_uboot_env_var
.subsections_via_symbols
