	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_osal_dynlib_close              ## -- Begin function osal_dynlib_close
	.p2align	4, 0x90
_osal_dynlib_close:                     ## @osal_dynlib_close
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	callq	_FreeLibrary
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_M64ERR_SUCCESS@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	xorl	%eax, %eax
	callq	_GetLastError
	movl	%eax, %r14d
	movq	_FORMAT_MESSAGE_ALLOCATE_BUFFER@GOTPCREL(%rip), %rax
	movq	_FORMAT_MESSAGE_FROM_SYSTEM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	movq	_LANG_NEUTRAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SUBLANG_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MAKELANGID
	leaq	-24(%rbp), %r8
	movq	$0, (%rsp)
	movl	%ebx, %edi
	xorl	%esi, %esi
	movl	%r14d, %edx
	movl	%eax, %ecx
                                        ## kill: def $r8d killed $r8d killed $r8
	xorl	%r9d, %r9d
	callq	_FormatMessage
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-24(%rbp), %rdx
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
	movq	-24(%rbp), %rdi
	callq	_LocalFree
	movq	_M64ERR_INTERNAL@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FORMAT_MESSAGE_ALLOCATE_BUFFER,4,2 ## @FORMAT_MESSAGE_ALLOCATE_BUFFER
	.comm	_FORMAT_MESSAGE_FROM_SYSTEM,4,2 ## @FORMAT_MESSAGE_FROM_SYSTEM
	.comm	_LANG_NEUTRAL,4,2               ## @LANG_NEUTRAL
	.comm	_SUBLANG_DEFAULT,4,2            ## @SUBLANG_DEFAULT
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FreeLibrary() error: %s\n"

	.comm	_M64ERR_INTERNAL,4,2            ## @M64ERR_INTERNAL
	.comm	_M64ERR_SUCCESS,4,2             ## @M64ERR_SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_osal_dynlib_close              ; -- Begin function osal_dynlib_close
	.p2align	2
_osal_dynlib_close:                     ; @osal_dynlib_close
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	bl	_FreeLibrary
	cbz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _M64ERR_SUCCESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _M64ERR_SUCCESS@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
	bl	_GetLastError
	mov	x19, x0
Lloh2:
	adrp	x8, _FORMAT_MESSAGE_ALLOCATE_BUFFER@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FORMAT_MESSAGE_ALLOCATE_BUFFER@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _FORMAT_MESSAGE_FROM_SYSTEM@GOTPAGE
Lloh6:
	ldr	x9, [x9, _FORMAT_MESSAGE_FROM_SYSTEM@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w20, w9, w8
Lloh8:
	adrp	x8, _LANG_NEUTRAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LANG_NEUTRAL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x8, _SUBLANG_DEFAULT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SUBLANG_DEFAULT@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_MAKELANGID
	mov	x3, x0
	add	x4, sp, #8
	mov	x0, x20
	mov	x1, #0
	mov	x2, x19
	mov	w5, #0
	mov	x6, #0
	bl	_FormatMessage
Lloh14:
	adrp	x8, _stderr@GOTPAGE
Lloh15:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldr	x2, [sp, #8]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
	ldr	x0, [sp, #8]
	bl	_LocalFree
Lloh19:
	adrp	x8, _M64ERR_INTERNAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _M64ERR_INTERNAL@GOTPAGEOFF]
LBB0_3:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_FORMAT_MESSAGE_ALLOCATE_BUFFER,4,2 ; @FORMAT_MESSAGE_ALLOCATE_BUFFER
	.comm	_FORMAT_MESSAGE_FROM_SYSTEM,4,2 ; @FORMAT_MESSAGE_FROM_SYSTEM
	.comm	_LANG_NEUTRAL,4,2               ; @LANG_NEUTRAL
	.comm	_SUBLANG_DEFAULT,4,2            ; @SUBLANG_DEFAULT
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FreeLibrary() error: %s\n"

	.comm	_M64ERR_INTERNAL,4,2            ; @M64ERR_INTERNAL
	.comm	_M64ERR_SUCCESS,4,2             ; @M64ERR_SUCCESS
.subsections_via_symbols
