	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_efi_setenv_freebsd_wcs         ## -- Begin function efi_setenv_freebsd_wcs
	.p2align	4, 0x90
_efi_setenv_freebsd_wcs:                ## @efi_setenv_freebsd_wcs
	.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	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	$0, -40(%rbp)
	leaq	-40(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	callq	_utf8_to_ucs2
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EFI_OUT_OF_RESOURCES@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_3
LBB0_2:
	movq	_RS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %r12
	movq	-40(%rbp), %r14
	movq	_EFI_VARIABLE_BOOTSERVICE_ACCESS@GOTPCREL(%rip), %rax
	movq	_EFI_VARIABLE_RUNTIME_ACCESS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_ucs2len
                                        ## kill: def $eax killed $eax def $rax
	leal	4(,%rax,4), %ecx
	movq	_FreeBSDBootVarGUID@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	movq	%r15, %r8
	callq	*%r12
	movl	%eax, %ebx
	movq	-40(%rbp), %rdi
	callq	_free
LBB0_3:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EFI_OUT_OF_RESOURCES,4,2       ## @EFI_OUT_OF_RESOURCES
	.comm	_RS,8,3                         ## @RS
	.comm	_FreeBSDBootVarGUID,4,2         ## @FreeBSDBootVarGUID
	.comm	_EFI_VARIABLE_BOOTSERVICE_ACCESS,4,2 ## @EFI_VARIABLE_BOOTSERVICE_ACCESS
	.comm	_EFI_VARIABLE_RUNTIME_ACCESS,4,2 ## @EFI_VARIABLE_RUNTIME_ACCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_efi_setenv_freebsd_wcs         ; -- Begin function efi_setenv_freebsd_wcs
	.p2align	2
_efi_setenv_freebsd_wcs:                ; @efi_setenv_freebsd_wcs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	str	xzr, [sp, #8]
	add	x1, sp, #8
	mov	x2, sp
	bl	_utf8_to_ucs2
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EFI_OUT_OF_RESOURCES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EFI_OUT_OF_RESOURCES@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	b	LBB0_3
LBB0_2:
Lloh3:
	adrp	x8, _RS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RS@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	x22, [x8]
Lloh6:
	adrp	x8, _EFI_VARIABLE_BOOTSERVICE_ACCESS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EFI_VARIABLE_BOOTSERVICE_ACCESS@GOTPAGEOFF]
	ldr	x20, [sp, #8]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _EFI_VARIABLE_RUNTIME_ACCESS@GOTPAGE
Lloh10:
	ldr	x9, [x9, _EFI_VARIABLE_RUNTIME_ACCESS@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w21, w9, w8
	mov	x0, x19
	bl	_ucs2len
	lsl	w8, w0, #2
	add	w3, w8, #4
Lloh12:
	adrp	x1, _FreeBSDBootVarGUID@GOTPAGE
Lloh13:
	ldr	x1, [x1, _FreeBSDBootVarGUID@GOTPAGEOFF]
	mov	x0, x20
	mov	x2, x21
	mov	x4, x19
	blr	x22
	mov	x19, x0
	ldr	x0, [sp, #8]
	bl	_free
LBB0_3:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EFI_OUT_OF_RESOURCES,4,2       ; @EFI_OUT_OF_RESOURCES
	.comm	_RS,8,3                         ; @RS
	.comm	_FreeBSDBootVarGUID,4,2         ; @FreeBSDBootVarGUID
	.comm	_EFI_VARIABLE_BOOTSERVICE_ACCESS,4,2 ; @EFI_VARIABLE_BOOTSERVICE_ACCESS
	.comm	_EFI_VARIABLE_RUNTIME_ACCESS,4,2 ; @EFI_VARIABLE_RUNTIME_ACCESS
.subsections_via_symbols
