	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_IPCDhcpAllocateIP              ## -- Begin function IPCDhcpAllocateIP
	.p2align	4, 0x90
_IPCDhcpAllocateIP:                     ## @IPCDhcpAllocateIP
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r12
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_Rand32
	testq	%r12, %r12
	je	LBB0_19
## %bb.1:
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	testq	%rbx, %rbx
	je	LBB0_19
## %bb.2:
	movl	%eax, %r13d
	leaq	-80(%rbp), %r15
	movq	%r15, %rdi
	movl	$24, %esi
	callq	_Zero
	movq	$0, -80(%rbp)
	movq	_DHCP_DISCOVER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)
	movl	-64(%rbp), %edi
	movl	(%r12), %edx
	movl	$4, %esi
	callq	_StrCpy
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_IPCDhcpSetConditionalUserClass
	movq	_DHCP_OFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_IPC_DHCP_TIMEOUT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r9d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rsp)
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	%r13d, %edx
	movq	%r15, %rcx
	callq	_IPCSendDhcpRequest
	testq	%rax, %rax
	je	LBB0_19
## %bb.3:
	movq	%rax, %r15
	movq	(%rax), %rax
	movq	24(%rax), %rdi
	callq	_IsValidUnicastIPAddressUINT4
	testl	%eax, %eax
	sete	%r14b
	movq	(%r15), %rax
	movq	16(%rax), %rdi
	callq	_IsValidUnicastIPAddressUINT4
	testl	%eax, %eax
	sete	%dl
	movq	(%r15), %rcx
	cmpq	$0, (%rcx)
	sete	%al
	orb	%dl, %al
	movq	8(%rcx), %rdx
	testq	%rdx, %rdx
	jne	LBB0_5
## %bb.4:
	movq	_IPC_DHCP_DEFAULT_LEASE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rdx, 8(%rcx)
LBB0_5:
	orb	%r14b, %al
	movq	_IPC_DHCP_MIN_LEASE@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	cmpq	%rsi, %rdx
	jg	LBB0_7
## %bb.6:
	movq	%rsi, 8(%rcx)
LBB0_7:
	xorl	%r14d, %r14d
	testb	%al, %al
	jne	LBB0_17
## %bb.9:
	leaq	-80(%rbp), %rdi
	movq	%rbx, %r14
	movq	%rdi, %rbx
	movl	$24, %esi
	callq	_Zero
	movq	_DHCP_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)
	movl	-64(%rbp), %edi
	movl	(%r12), %edx
	movl	$4, %esi
	callq	_StrCpy
	movq	(%r15), %rax
	movdqu	16(%rax), %xmm0
	pshufd	$78, %xmm0, %xmm0               ## xmm0 = xmm0[2,3,0,1]
	movdqa	%xmm0, -80(%rbp)
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_IPCDhcpSetConditionalUserClass
	movq	_DHCP_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	(%r14), %r9d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rsp)
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	%r13d, %edx
	movq	%rbx, %rcx
	callq	_IPCSendDhcpRequest
	testq	%rax, %rax
	je	LBB0_17
## %bb.10:
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	24(%rax), %rdi
	callq	_IsValidUnicastIPAddressUINT4
	testl	%eax, %eax
	sete	%r14b
	movq	(%rbx), %rax
	movq	16(%rax), %rdi
	callq	_IsValidUnicastIPAddressUINT4
	testl	%eax, %eax
	sete	%cl
	movq	(%rbx), %rsi
	cmpq	$0, (%rsi)
	sete	%al
	orb	%cl, %al
	movq	8(%rsi), %rcx
	testq	%rcx, %rcx
	jne	LBB0_12
## %bb.11:
	movq	_IPC_DHCP_DEFAULT_LEASE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 8(%rsi)
LBB0_12:
	orb	%r14b, %al
	movq	_IPC_DHCP_MIN_LEASE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	%rdx, %rcx
	jg	LBB0_14
## %bb.13:
	movq	%rdx, 8(%rsi)
LBB0_14:
	xorl	%r14d, %r14d
	testb	%al, %al
	jne	LBB0_16
## %bb.15:
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movl	$24, %edx
	callq	_Copy
	movl	$1, %r14d
LBB0_16:
	movq	%r15, %rdi
	callq	_FreeDHCPv4Data
	jmp	LBB0_18
LBB0_17:
	movq	%r15, %rbx
LBB0_18:
	movq	%rbx, %rdi
	callq	_FreeDHCPv4Data
LBB0_19:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DHCP_DISCOVER,4,2              ## @DHCP_DISCOVER
	.comm	_DHCP_OFFER,4,2                 ## @DHCP_OFFER
	.comm	_IPC_DHCP_TIMEOUT,4,2           ## @IPC_DHCP_TIMEOUT
	.comm	_IPC_DHCP_DEFAULT_LEASE,8,3     ## @IPC_DHCP_DEFAULT_LEASE
	.comm	_IPC_DHCP_MIN_LEASE,8,3         ## @IPC_DHCP_MIN_LEASE
	.comm	_DHCP_REQUEST,4,2               ## @DHCP_REQUEST
	.comm	_DHCP_ACK,4,2                   ## @DHCP_ACK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_IPCDhcpAllocateIP              ; -- Begin function IPCDhcpAllocateIP
	.p2align	2
_IPCDhcpAllocateIP:                     ; @IPCDhcpAllocateIP
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x21, x2
	mov	x19, x1
	mov	x22, x0
	bl	_Rand32
	mov	w24, #0
	cbz	x22, LBB0_20
; %bb.1:
	cbz	x19, LBB0_20
; %bb.2:
	mov	x23, x0
	mov	x0, sp
	mov	w1, #24
	bl	_Zero
	str	xzr, [sp]
Lloh0:
	adrp	x8, _DHCP_DISCOVER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DHCP_DISCOVER@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #20]
	ldr	w0, [sp, #16]
	ldr	w2, [x22]
	mov	w1, #4
	bl	_StrCpy
	mov	x1, sp
	mov	x0, x22
	bl	_IPCDhcpSetConditionalUserClass
Lloh3:
	adrp	x8, _DHCP_OFFER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DHCP_OFFER@GOTPAGEOFF]
Lloh5:
	ldr	w4, [x8]
Lloh6:
	adrp	x25, _IPC_DHCP_TIMEOUT@GOTPAGE
Lloh7:
	ldr	x25, [x25, _IPC_DHCP_TIMEOUT@GOTPAGEOFF]
	ldr	w5, [x25]
	mov	x3, sp
	mov	x0, x22
	mov	x1, #0
	mov	x2, x23
	mov	x6, x21
	bl	_IPCSendDhcpRequest
	cbz	x0, LBB0_16
; %bb.3:
	mov	x20, x0
	ldr	x8, [x0]
	ldr	x0, [x8, #24]
	bl	_IsValidUnicastIPAddressUINT4
	mov	x24, x0
	ldr	x8, [x20]
	ldr	x0, [x8, #16]
	bl	_IsValidUnicastIPAddressUINT4
	ldr	x8, [x20]
	ldp	x9, x10, [x8]
	cmp	x9, #0
	ccmp	w0, #0, #4, ne
	ccmp	w24, #0, #4, ne
	cset	w9, eq
	cbnz	x10, LBB0_5
; %bb.4:
Lloh8:
	adrp	x10, _IPC_DHCP_DEFAULT_LEASE@GOTPAGE
Lloh9:
	ldr	x10, [x10, _IPC_DHCP_DEFAULT_LEASE@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	str	x10, [x8, #8]
LBB0_5:
Lloh11:
	adrp	x24, _IPC_DHCP_MIN_LEASE@GOTPAGE
Lloh12:
	ldr	x24, [x24, _IPC_DHCP_MIN_LEASE@GOTPAGEOFF]
	ldr	x11, [x24]
	cmp	x10, x11
	b.gt	LBB0_7
; %bb.6:
	str	x11, [x8, #8]
LBB0_7:
	tbnz	w9, #0, LBB0_15
; %bb.8:
	mov	x0, sp
	mov	w1, #24
	bl	_Zero
Lloh13:
	adrp	x8, _DHCP_REQUEST@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DHCP_REQUEST@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [sp, #20]
	ldr	w0, [sp, #16]
	ldr	w2, [x22]
	mov	w1, #4
	bl	_StrCpy
	ldr	x8, [x20]
	ldr	q0, [x8, #16]
	ext.16b	v0, v0, v0, #8
	str	q0, [sp]
	mov	x1, sp
	mov	x0, x22
	bl	_IPCDhcpSetConditionalUserClass
Lloh16:
	adrp	x8, _DHCP_ACK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DHCP_ACK@GOTPAGEOFF]
Lloh18:
	ldr	w4, [x8]
	ldr	w5, [x25]
	mov	x3, sp
	mov	x0, x22
	mov	x1, #0
	mov	x2, x23
	mov	x6, x21
	bl	_IPCSendDhcpRequest
	cbz	x0, LBB0_15
; %bb.9:
	mov	x21, x0
	ldr	x8, [x0]
	ldr	x0, [x8, #24]
	bl	_IsValidUnicastIPAddressUINT4
	mov	x22, x0
	ldr	x8, [x21]
	ldr	x0, [x8, #16]
	bl	_IsValidUnicastIPAddressUINT4
	ldr	x1, [x21]
	ldp	x8, x9, [x1]
	cmp	x8, #0
	ccmp	w0, #0, #4, ne
	ccmp	w22, #0, #4, ne
	cset	w8, eq
	cbnz	x9, LBB0_11
; %bb.10:
Lloh19:
	adrp	x9, _IPC_DHCP_DEFAULT_LEASE@GOTPAGE
Lloh20:
	ldr	x9, [x9, _IPC_DHCP_DEFAULT_LEASE@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	str	x9, [x1, #8]
LBB0_11:
	ldr	x10, [x24]
	cmp	x9, x10
	b.gt	LBB0_13
; %bb.12:
	str	x10, [x1, #8]
LBB0_13:
	tbz	w8, #0, LBB0_17
; %bb.14:
	mov	w24, #0
	b	LBB0_18
LBB0_15:
	mov	w24, #0
	mov	x21, x20
	b	LBB0_19
LBB0_16:
	mov	w24, #0
	b	LBB0_20
LBB0_17:
	mov	x0, x19
	mov	w2, #24
	bl	_Copy
	mov	w24, #1
LBB0_18:
	mov	x0, x20
	bl	_FreeDHCPv4Data
LBB0_19:
	mov	x0, x21
	bl	_FreeDHCPv4Data
LBB0_20:
	mov	x0, x24
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_DHCP_DISCOVER,4,2              ; @DHCP_DISCOVER
	.comm	_DHCP_OFFER,4,2                 ; @DHCP_OFFER
	.comm	_IPC_DHCP_TIMEOUT,4,2           ; @IPC_DHCP_TIMEOUT
	.comm	_IPC_DHCP_DEFAULT_LEASE,8,3     ; @IPC_DHCP_DEFAULT_LEASE
	.comm	_IPC_DHCP_MIN_LEASE,8,3         ; @IPC_DHCP_MIN_LEASE
	.comm	_DHCP_REQUEST,4,2               ; @DHCP_REQUEST
	.comm	_DHCP_ACK,4,2                   ; @DHCP_ACK
.subsections_via_symbols
