	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function resource_register
_resource_register:                     ## @resource_register
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r15d
	movl	%ecx, %r14d
	movl	%edx, %ebx
	movq	%rdi, %r12
	movq	_LOAD_LIBRARY_AS_DATAFILE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%esi, %edi
	xorl	%esi, %esi
	callq	_LoadLibraryExW
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	%rax, %r13
	movq	%rax, %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	callq	_FindResourceW
	testl	%eax, %eax
	je	LBB0_5
## %bb.2:
	movl	%eax, %ebx
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_LoadResource
	movl	%eax, %r12d
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_SizeofResource
	testl	%r12d, %r12d
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	movq	_CP_ACP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	movl	%r12d, %edx
	movl	%ebx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_MultiByteToWideChar
	movl	%eax, %r14d
	leal	1(%r14), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	_HEAP_ZERO_MEMORY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leal	4(,%r14,4), %edx
	movl	%eax, %edi
	callq	_HeapAlloc
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	%rax, %r15
	movq	_CP_ACP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	movl	%r12d, %edx
	movl	%ebx, %ecx
	movq	%r15, %r8
	movl	-48(%rbp), %r9d                 ## 4-byte Reload
	callq	_MultiByteToWideChar
	movslq	%r14d, %rax
	movb	$0, (%r15,%rax)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_string_register
	movl	%eax, %r14d
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r15, %rdx
	callq	_HeapFree
	jmp	LBB0_7
LBB0_8:
	leaq	L_.str.2(%rip), %rdi
	callq	_WARN
	xorl	%eax, %eax
	callq	_GetLastError
	movl	%eax, %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_HRESULT_FROM_WIN32             ## TAILCALL
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_6
LBB0_4:
	leaq	L_.str(%rip), %rdi
LBB0_6:
	callq	_WARN
	xorl	%eax, %eax
	callq	_GetLastError
	movl	%eax, %edi
	callq	_HRESULT_FROM_WIN32
	movl	%eax, %r14d
LBB0_7:
	movq	%r13, %rdi
	callq	_FreeLibrary
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LOAD_LIBRARY_AS_DATAFILE,4,2   ## @LOAD_LIBRARY_AS_DATAFILE
	.comm	_CP_ACP,4,2                     ## @CP_ACP
	.comm	_HEAP_ZERO_MEMORY,4,2           ## @HEAP_ZERO_MEMORY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not load resource\n"

L_.str.1:                               ## @.str.1
	.asciz	"Could not find source\n"

L_.str.2:                               ## @.str.2
	.asciz	"Could not load resource file\n"

	.no_dead_strip	_resource_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function resource_register
_resource_register:                     ; @resource_register
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x4
	mov	x22, x3
	mov	x23, x2
	mov	x21, x0
Lloh0:
	adrp	x8, _LOAD_LIBRARY_AS_DATAFILE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LOAD_LIBRARY_AS_DATAFILE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x1
	mov	x1, #0
	bl	_LoadLibraryExW
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	mov	x1, x23
	mov	x2, x22
	bl	_FindResourceW
	cbz	w0, LBB0_5
; %bb.2:
	mov	x23, x0
	mov	x0, x19
	mov	x1, x23
	bl	_LoadResource
	mov	x22, x0
	mov	x0, x19
	mov	x1, x23
	bl	_SizeofResource
	cbz	w22, LBB0_6
; %bb.3:
	mov	x23, x0
Lloh3:
	adrp	x27, _CP_ACP@GOTPAGE
Lloh4:
	ldr	x27, [x27, _CP_ACP@GOTPAGEOFF]
	ldr	w0, [x27]
	mov	w1, #0
	mov	x2, x22
	mov	x3, x23
	mov	x4, #0
	mov	w5, #0
	bl	_MultiByteToWideChar
	mov	x24, x0
	add	w25, w0, #1
	bl	_GetProcessHeap
Lloh5:
	adrp	x8, _HEAP_ZERO_MEMORY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HEAP_ZERO_MEMORY@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	lsl	w2, w25, #2
	bl	_HeapAlloc
	mov	x26, x0
	ldr	w0, [x27]
	mov	w1, #0
	mov	x2, x22
	mov	x3, x23
	mov	x4, x26
	mov	x5, x25
	bl	_MultiByteToWideChar
	strb	wzr, [x26, w24, sxtw]
	mov	x0, x21
	mov	x1, x26
	mov	x2, x20
	bl	_string_register
	mov	x20, x0
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x26
	bl	_HeapFree
	b	LBB0_8
LBB0_4:
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_WARN
	bl	_GetLastError
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_HRESULT_FROM_WIN32
LBB0_5:
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_6:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
LBB0_7:
	bl	_WARN
	bl	_GetLastError
	bl	_HRESULT_FROM_WIN32
	mov	x20, x0
LBB0_8:
	mov	x0, x19
	bl	_FreeLibrary
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_LOAD_LIBRARY_AS_DATAFILE,4,2   ; @LOAD_LIBRARY_AS_DATAFILE
	.comm	_CP_ACP,4,2                     ; @CP_ACP
	.comm	_HEAP_ZERO_MEMORY,4,2           ; @HEAP_ZERO_MEMORY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not load resource\n"

l_.str.1:                               ; @.str.1
	.asciz	"Could not find source\n"

l_.str.2:                               ; @.str.2
	.asciz	"Could not load resource file\n"

	.no_dead_strip	_resource_register
.subsections_via_symbols
