	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ScmLoadDriver
_ScmLoadDriver:                         ## @ScmLoadDriver
	.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	%rdi, %r14
	movq	_FALSE@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	movl	%eax, -36(%rbp)
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %r15d
	movq	_HEAP_ZERO_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	(%r14), %edi
	callq	_wcslen
                                        ## kill: def $eax killed $eax def $rax
	leal	212(,%rax,4), %edx
	movl	%r15d, %edi
	movl	%ebx, %esi
	callq	_HeapAlloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	leaq	l_.str(%rip), %rsi
	movq	%rax, %rdi
	callq	_wcscpy
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_wcscat
	leaq	-40(%rbp), %rbx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_RtlInitUnicodeString
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	callq	_DPRINT
	movq	_SE_LOAD_DRIVER_PRIVILEGE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	leaq	-36(%rbp), %rcx
	callq	_RtlAdjustPrivilege
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_NT_SUCCESS
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	leaq	-40(%rbp), %rdi
	callq	_NtLoadDriver
	movl	%eax, %r14d
	movl	(%rbx), %edi
	movl	-36(%rbp), %esi
	movl	(%r12), %edx
	leaq	-36(%rbp), %rcx
	callq	_RtlAdjustPrivilege
	jmp	LBB0_5
LBB0_1:
	movq	_ERROR_NOT_ENOUGH_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_6
LBB0_3:
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %esi
	callq	_DPRINT1
LBB0_5:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r15, %rdx
	callq	_HeapFree
	movl	%r14d, %edi
	callq	_RtlNtStatusToDosError
LBB0_6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STATUS_SUCCESS,4,2             ## @STATUS_SUCCESS
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_HEAP_ZERO_MEMORY,4,2           ## @HEAP_ZERO_MEMORY
	.comm	_ERROR_NOT_ENOUGH_MEMORY,4,2    ## @ERROR_NOT_ENOUGH_MEMORY
	.section	__TEXT,__const
	.p2align	2                               ## @.str
l_.str:
	.long	92                              ## 0x5c
	.long	82                              ## 0x52
	.long	101                             ## 0x65
	.long	103                             ## 0x67
	.long	105                             ## 0x69
	.long	115                             ## 0x73
	.long	116                             ## 0x74
	.long	114                             ## 0x72
	.long	121                             ## 0x79
	.long	92                              ## 0x5c
	.long	77                              ## 0x4d
	.long	97                              ## 0x61
	.long	99                              ## 0x63
	.long	104                             ## 0x68
	.long	105                             ## 0x69
	.long	110                             ## 0x6e
	.long	101                             ## 0x65
	.long	92                              ## 0x5c
	.long	83                              ## 0x53
	.long	121                             ## 0x79
	.long	115                             ## 0x73
	.long	116                             ## 0x74
	.long	101                             ## 0x65
	.long	109                             ## 0x6d
	.long	92                              ## 0x5c
	.long	67                              ## 0x43
	.long	117                             ## 0x75
	.long	114                             ## 0x72
	.long	114                             ## 0x72
	.long	101                             ## 0x65
	.long	110                             ## 0x6e
	.long	116                             ## 0x74
	.long	67                              ## 0x43
	.long	111                             ## 0x6f
	.long	110                             ## 0x6e
	.long	116                             ## 0x74
	.long	114                             ## 0x72
	.long	111                             ## 0x6f
	.long	108                             ## 0x6c
	.long	83                              ## 0x53
	.long	101                             ## 0x65
	.long	116                             ## 0x74
	.long	92                              ## 0x5c
	.long	83                              ## 0x53
	.long	101                             ## 0x65
	.long	114                             ## 0x72
	.long	118                             ## 0x76
	.long	105                             ## 0x69
	.long	99                              ## 0x63
	.long	101                             ## 0x65
	.long	115                             ## 0x73
	.long	92                              ## 0x5c
	.long	0                               ## 0x0

	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"  Path: %wZ\n"

	.comm	_SE_LOAD_DRIVER_PRIVILEGE,4,2   ## @SE_LOAD_DRIVER_PRIVILEGE
	.comm	_TRUE,4,2                       ## @TRUE
L_.str.2:                               ## @.str.2
	.asciz	"SERVICES: Cannot acquire driver-loading privilege, Status = 0x%08lx\n"

	.no_dead_strip	_ScmLoadDriver
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ScmLoadDriver
_ScmLoadDriver:                         ; @ScmLoadDriver
	.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	x20, x0
Lloh0:
	adrp	x22, _FALSE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _FALSE@GOTPAGEOFF]
	ldr	w8, [x22]
	str	w8, [sp, #12]
	bl	_GetProcessHeap
	mov	x19, x0
Lloh2:
	adrp	x8, _HEAP_ZERO_MEMORY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HEAP_ZERO_MEMORY@GOTPAGEOFF]
Lloh4:
	ldr	w21, [x8]
	ldr	w0, [x20]
	bl	_wcslen
	lsl	w8, w0, #2
	add	w2, w8, #212
	mov	x0, x19
	mov	x1, x21
	bl	_HeapAlloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wcscpy
	ldr	w1, [x20]
	mov	x0, x19
	bl	_wcscat
	add	x0, sp, #8
	mov	x1, x19
	bl	_RtlInitUnicodeString
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	add	x1, sp, #8
	bl	_DPRINT
Lloh9:
	adrp	x21, _SE_LOAD_DRIVER_PRIVILEGE@GOTPAGE
Lloh10:
	ldr	x21, [x21, _SE_LOAD_DRIVER_PRIVILEGE@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh11:
	adrp	x8, _TRUE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldr	w2, [x22]
	add	x3, sp, #12
	bl	_RtlAdjustPrivilege
	mov	x20, x0
	bl	_NT_SUCCESS
	cbz	w0, LBB0_4
; %bb.2:
	add	x0, sp, #8
	bl	_NtLoadDriver
	mov	x20, x0
	ldr	w0, [x21]
	ldr	w1, [sp, #12]
	ldr	w2, [x22]
	add	x3, sp, #12
	bl	_RtlAdjustPrivilege
	b	LBB0_5
LBB0_3:
Lloh14:
	adrp	x8, _ERROR_NOT_ENOUGH_MEMORY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ERROR_NOT_ENOUGH_MEMORY@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	b	LBB0_6
LBB0_4:
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	bl	_DPRINT1
LBB0_5:
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x19
	bl	_HeapFree
	mov	x0, x20
	bl	_RtlNtStatusToDosError
LBB0_6:
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_STATUS_SUCCESS,4,2             ; @STATUS_SUCCESS
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_HEAP_ZERO_MEMORY,4,2           ; @HEAP_ZERO_MEMORY
	.comm	_ERROR_NOT_ENOUGH_MEMORY,4,2    ; @ERROR_NOT_ENOUGH_MEMORY
	.section	__TEXT,__const
	.p2align	2                               ; @.str
l_.str:
	.long	92                              ; 0x5c
	.long	82                              ; 0x52
	.long	101                             ; 0x65
	.long	103                             ; 0x67
	.long	105                             ; 0x69
	.long	115                             ; 0x73
	.long	116                             ; 0x74
	.long	114                             ; 0x72
	.long	121                             ; 0x79
	.long	92                              ; 0x5c
	.long	77                              ; 0x4d
	.long	97                              ; 0x61
	.long	99                              ; 0x63
	.long	104                             ; 0x68
	.long	105                             ; 0x69
	.long	110                             ; 0x6e
	.long	101                             ; 0x65
	.long	92                              ; 0x5c
	.long	83                              ; 0x53
	.long	121                             ; 0x79
	.long	115                             ; 0x73
	.long	116                             ; 0x74
	.long	101                             ; 0x65
	.long	109                             ; 0x6d
	.long	92                              ; 0x5c
	.long	67                              ; 0x43
	.long	117                             ; 0x75
	.long	114                             ; 0x72
	.long	114                             ; 0x72
	.long	101                             ; 0x65
	.long	110                             ; 0x6e
	.long	116                             ; 0x74
	.long	67                              ; 0x43
	.long	111                             ; 0x6f
	.long	110                             ; 0x6e
	.long	116                             ; 0x74
	.long	114                             ; 0x72
	.long	111                             ; 0x6f
	.long	108                             ; 0x6c
	.long	83                              ; 0x53
	.long	101                             ; 0x65
	.long	116                             ; 0x74
	.long	92                              ; 0x5c
	.long	83                              ; 0x53
	.long	101                             ; 0x65
	.long	114                             ; 0x72
	.long	118                             ; 0x76
	.long	105                             ; 0x69
	.long	99                              ; 0x63
	.long	101                             ; 0x65
	.long	115                             ; 0x73
	.long	92                              ; 0x5c
	.long	0                               ; 0x0

	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"  Path: %wZ\n"

	.comm	_SE_LOAD_DRIVER_PRIVILEGE,4,2   ; @SE_LOAD_DRIVER_PRIVILEGE
	.comm	_TRUE,4,2                       ; @TRUE
l_.str.2:                               ; @.str.2
	.asciz	"SERVICES: Cannot acquire driver-loading privilege, Status = 0x%08lx\n"

	.no_dead_strip	_ScmLoadDriver
.subsections_via_symbols
