	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PrepareAdapterForService       ## -- Begin function PrepareAdapterForService
	.p2align	4, 0x90
_PrepareAdapterForService:              ## @PrepareAdapterForService
	.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
	movq	%rdi, %rbx
	movl	$4, -24(%rbp)
	leaq	40(%rdi), %rax
	movq	%rax, 24(%rdi)
	movl	8(%rdi), %edi
	movq	32(%rbx), %rsi
	movl	$4, %edx
	callq	_strncpy
	movq	%rbx, %rdi
	callq	_FindAdapterKey
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %r14
	leaq	-20(%rbp), %r8
	leaq	L_.str(%rip), %rsi
	leaq	-24(%rbp), %r9
	movq	%rax, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
                                        ## kill: def $r8d killed $r8d killed $r8
	callq	_RegQueryValueEx
	movq	_ERROR_SUCCESS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_3
## %bb.2:
	cmpl	$4, -24(%rbp)
	je	LBB0_4
LBB0_3:
	movl	$1, -20(%rbp)
LBB0_4:
	movq	%r14, %rdi
	callq	_CloseHandle
	cmpl	$0, -20(%rbp)
	jne	LBB0_7
## %bb.5:
	movl	8(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_DbgPrint
	movq	_S_STATIC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	jmp	LBB0_8
LBB0_6:
	movl	$1, -20(%rbp)
LBB0_7:
	movl	8(%rbx), %esi
	leaq	L_.str.2(%rip), %rdi
	callq	_DbgPrint
	movq	_S_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%rbx), %rcx
	movl	%eax, (%rcx)
LBB0_8:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ERROR_SUCCESS,4,2              ## @ERROR_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EnableDHCP"

L_.str.1:                               ## @.str.1
	.asciz	"DHCPCSVC: Adapter Name: [%s] (static)\n"

	.comm	_S_STATIC,4,2                   ## @S_STATIC
L_.str.2:                               ## @.str.2
	.asciz	"DHCPCSVC: Adapter Name: [%s] (dynamic)\n"

	.comm	_S_INIT,4,2                     ## @S_INIT
	.comm	_TRUE,4,2                       ## @TRUE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PrepareAdapterForService       ; -- Begin function PrepareAdapterForService
	.p2align	2
_PrepareAdapterForService:              ; @PrepareAdapterForService
	.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
	mov	x19, x0
	mov	w8, #4
	str	w8, [sp, #8]
	add	x8, x0, #40
	str	x8, [x0, #24]
	ldr	w0, [x0, #8]
	ldr	x1, [x19, #32]
	mov	w2, #4
	bl	_strncpy
	mov	x0, x19
	bl	_FindAdapterKey
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x4, sp, #12
	add	x5, sp, #8
	mov	x2, #0
	mov	x3, #0
	bl	_RegQueryValueEx
Lloh2:
	adrp	x8, _ERROR_SUCCESS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ERROR_SUCCESS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [sp, #8]
	cmp	w0, w8
	ccmp	w9, #4, #0, eq
	b.eq	LBB0_3
; %bb.2:
	mov	w8, #1
	str	w8, [sp, #12]
LBB0_3:
	mov	x0, x20
	bl	_CloseHandle
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_6
; %bb.4:
	ldr	w1, [x19, #8]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DbgPrint
Lloh7:
	adrp	x8, _S_STATIC@GOTPAGE
Lloh8:
	ldr	x8, [x8, _S_STATIC@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	b	LBB0_7
LBB0_5:
	mov	w8, #1
	str	w8, [sp, #12]
LBB0_6:
	ldr	w1, [x19, #8]
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DbgPrint
Lloh12:
	adrp	x8, _S_INIT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _S_INIT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	x9, [x19]
	str	w8, [x9]
LBB0_7:
Lloh15:
	adrp	x8, _TRUE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh17:
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ERROR_SUCCESS,4,2              ; @ERROR_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EnableDHCP"

l_.str.1:                               ; @.str.1
	.asciz	"DHCPCSVC: Adapter Name: [%s] (static)\n"

	.comm	_S_STATIC,4,2                   ; @S_STATIC
l_.str.2:                               ; @.str.2
	.asciz	"DHCPCSVC: Adapter Name: [%s] (dynamic)\n"

	.comm	_S_INIT,4,2                     ; @S_INIT
	.comm	_TRUE,4,2                       ; @TRUE
.subsections_via_symbols
