	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_packet_to_lease                ## -- Begin function packet_to_lease
	.p2align	4, 0x90
_packet_to_lease:                       ## @packet_to_lease
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	$56, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	xorl	%ebx, %ebx
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$56, %edx
	callq	_memset
	xorl	%r12d, %r12d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%r12
	addq	$16, %rbx
	cmpq	$256, %r12                      ## imm = 0x100
	je	LBB0_11
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movl	(%rax,%rbx), %edi
	testl	%edi, %edi
	je	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%edi
	callq	_malloc
	movq	48(%r14), %rcx
	movq	%rax, (%rcx,%rbx)
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r15), %rcx
	movq	8(%rcx,%rbx), %rsi
	movl	(%rcx,%rbx), %edx
	movq	%rax, %rdi
	callq	_memcpy
	movq	8(%r15), %rax
	movslq	(%rax,%rbx), %rax
	movq	48(%r14), %rcx
	movq	%rax, 8(%rcx,%rbx)
	movq	(%rcx,%rbx), %rcx
	movb	$0, (%rcx,%rax)
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_check_option
	testl	%eax, %eax
	jne	LBB0_10
## %bb.7:
	leaq	L_.str.2(%rip), %rdi
LBB0_8:
	xorl	%eax, %eax
	callq	_warning
	jmp	LBB0_9
LBB0_1:
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_warning
	jmp	LBB0_24
LBB0_11:
	movl	$4, 16(%r14)
	movq	24(%r14), %rdi
	movq	(%r15), %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	8(%r15), %rax
	movq	_DHO_DHCP_OPTION_OVERLOAD@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movq	%rcx, %rsi
	shlq	$4, %rsi
	movl	(%rax,%rsi), %edx
	testl	%edx, %edx
	je	LBB0_13
## %bb.12:
	movq	8(%rax,%rsi), %rsi
	testb	$2, (%rsi)
	jne	LBB0_19
LBB0_13:
	movq	(%r15), %rsi
	movq	8(%rsi), %rsi
	cmpl	$0, (%rsi)
	je	LBB0_18
## %bb.14:
	movq	_DHCP_SNAME_LEN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	incl	%edi
	callq	_malloc
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_15
## %bb.16:
	movq	(%r15), %rcx
	movq	8(%rcx), %rsi
	movl	(%rbx), %edx
	movq	%rax, %rdi
	callq	_memcpy
	movq	(%r14), %rax
	movslq	(%rbx), %rcx
	movb	$0, (%rax,%rcx)
	movq	(%r14), %rdi
	callq	_res_hnok
	testl	%eax, %eax
	je	LBB0_25
## %bb.17:
	movq	8(%r15), %rax
	movq	(%r12), %rcx
	movq	%rcx, %rdx
	shlq	$4, %rdx
	movl	(%rax,%rdx), %edx
LBB0_18:
	testl	%edx, %edx
	je	LBB0_20
LBB0_19:
	shlq	$4, %rcx
	movq	8(%rax,%rcx), %rax
	testb	$1, (%rax)
	jne	LBB0_24
LBB0_20:
	movq	(%r15), %rax
	movq	16(%rax), %rax
	cmpl	$0, (%rax)
	je	LBB0_24
## %bb.21:
	movq	_DHCP_FILE_LEN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	incl	%edi
	callq	_malloc
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_22
## %bb.23:
	movq	(%r15), %rcx
	movq	16(%rcx), %rsi
	movl	(%rbx), %edx
	movq	%rax, %rdi
	callq	_memcpy
	movq	8(%r14), %rax
	movslq	(%rbx), %rcx
	movb	$0, (%rax,%rcx)
	jmp	LBB0_24
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	movl	%r12d, %esi
	xorl	%eax, %eax
	callq	_warning
LBB0_9:
	movq	%r14, %rdi
	callq	_free_client_lease
	xorl	%r14d, %r14d
LBB0_24:
	movq	%r14, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_8
LBB0_25:
	movq	(%r14), %rsi
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_warning
	jmp	LBB0_9
LBB0_22:
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dhcpoffer: no memory to record lease."

L_.str.1:                               ## @.str.1
	.asciz	"dhcpoffer: no memory for option %d"

L_.str.2:                               ## @.str.2
	.asciz	"Invalid lease option - ignoring offer"

	.comm	_DHO_DHCP_OPTION_OVERLOAD,8,3   ## @DHO_DHCP_OPTION_OVERLOAD
	.comm	_DHCP_SNAME_LEN,4,2             ## @DHCP_SNAME_LEN
L_.str.3:                               ## @.str.3
	.asciz	"dhcpoffer: no memory for server name."

L_.str.4:                               ## @.str.4
	.asciz	"Bogus server name %s"

	.comm	_DHCP_FILE_LEN,4,2              ## @DHCP_FILE_LEN
L_.str.5:                               ## @.str.5
	.asciz	"dhcpoffer: no memory for filename."

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_packet_to_lease                ; -- Begin function packet_to_lease
	.p2align	2
_packet_to_lease:                       ; @packet_to_lease
	.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
	mov	w0, #56
	bl	_malloc
	mov	x19, x0
	cbz	x0, LBB0_7
; %bb.1:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #56
	bl	_memset
	mov	x22, #0
	mov	x21, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	add	x22, x22, #16
	cmp	x21, #256
	b.eq	LBB0_8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	w8, [x8, x22]
	cbz	w8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w0, w8, #1
	bl	_malloc
	ldr	x8, [x19, #48]
	str	x0, [x8, x22]
	cbz	x0, LBB0_19
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x20, #8]
	add	x8, x8, x22
	ldr	x1, [x8, #8]
	ldr	w2, [x8]
	bl	_memcpy
	ldr	x8, [x20, #8]
	ldrsw	x8, [x8, x22]
	ldr	x9, [x19, #48]
	add	x9, x9, x22
	str	x8, [x9, #8]
	ldr	x9, [x9]
	strb	wzr, [x9, x8]
	mov	x0, x19
	mov	x1, x21
	bl	_check_option
	cbnz	w0, LBB0_2
; %bb.6:
Lloh0:
	adrp	x0, l_.str.2@PAGE
Lloh1:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_20
LBB0_7:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warning
	b	LBB0_21
LBB0_8:
	mov	w8, #4
	str	w8, [x19, #16]
	ldr	x0, [x19, #24]
	ldr	x1, [x20]
	mov	w2, #4
	bl	_memcpy
	ldr	x8, [x20, #8]
Lloh4:
	adrp	x21, _DHO_DHCP_OPTION_OVERLOAD@GOTPAGE
Lloh5:
	ldr	x21, [x21, _DHO_DHCP_OPTION_OVERLOAD@GOTPAGEOFF]
	ldr	x9, [x21]
	lsl	x10, x9, #4
	ldr	w10, [x8, x10]
	cbz	w10, LBB0_10
; %bb.9:
	add	x11, x8, x9, lsl #4
	ldr	x11, [x11, #8]
	ldrb	w11, [x11]
	tbnz	w11, #1, LBB0_15
LBB0_10:
	ldr	x11, [x20]
	ldr	x11, [x11, #8]
	ldr	w11, [x11]
	cbz	w11, LBB0_14
; %bb.11:
Lloh6:
	adrp	x22, _DHCP_SNAME_LEN@GOTPAGE
Lloh7:
	ldr	x22, [x22, _DHCP_SNAME_LEN@GOTPAGEOFF]
	ldr	w8, [x22]
	add	w0, w8, #1
	bl	_malloc
	str	x0, [x19]
	cbz	x0, LBB0_22
; %bb.12:
	ldr	x8, [x20]
	ldr	x1, [x8, #8]
	ldr	w2, [x22]
	bl	_memcpy
	ldr	x8, [x19]
	ldrsw	x9, [x22]
	strb	wzr, [x8, x9]
	ldr	x0, [x19]
	bl	_res_hnok
	cbz	w0, LBB0_23
; %bb.13:
	ldr	x8, [x20, #8]
	ldr	x9, [x21]
	lsl	x10, x9, #4
	ldr	w10, [x8, x10]
LBB0_14:
	cbz	w10, LBB0_16
LBB0_15:
	add	x8, x8, x9, lsl #4
	ldr	x8, [x8, #8]
	ldrb	w8, [x8]
	tbnz	w8, #0, LBB0_21
LBB0_16:
	ldr	x8, [x20]
	ldr	x8, [x8, #16]
	ldr	w8, [x8]
	cbz	w8, LBB0_21
; %bb.17:
Lloh8:
	adrp	x21, _DHCP_FILE_LEN@GOTPAGE
Lloh9:
	ldr	x21, [x21, _DHCP_FILE_LEN@GOTPAGEOFF]
	ldr	w8, [x21]
	add	w0, w8, #1
	bl	_malloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_24
; %bb.18:
	ldr	x8, [x20]
	ldr	x1, [x8, #16]
	ldr	w2, [x21]
	bl	_memcpy
	ldr	x8, [x19, #8]
	ldrsw	x9, [x21]
	strb	wzr, [x8, x9]
	b	LBB0_21
LBB0_19:
	str	x21, [sp]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_20:
	bl	_warning
	mov	x0, x19
	bl	_free_client_lease
	mov	x19, #0
LBB0_21:
	mov	x0, x19
	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
LBB0_22:
Lloh12:
	adrp	x0, l_.str.3@PAGE
Lloh13:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_20
LBB0_23:
	ldr	x8, [x19]
	str	x8, [sp]
Lloh14:
	adrp	x0, l_.str.4@PAGE
Lloh15:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_20
LBB0_24:
Lloh16:
	adrp	x0, l_.str.5@PAGE
Lloh17:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_20
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dhcpoffer: no memory to record lease."

l_.str.1:                               ; @.str.1
	.asciz	"dhcpoffer: no memory for option %d"

l_.str.2:                               ; @.str.2
	.asciz	"Invalid lease option - ignoring offer"

	.comm	_DHO_DHCP_OPTION_OVERLOAD,8,3   ; @DHO_DHCP_OPTION_OVERLOAD
	.comm	_DHCP_SNAME_LEN,4,2             ; @DHCP_SNAME_LEN
l_.str.3:                               ; @.str.3
	.asciz	"dhcpoffer: no memory for server name."

l_.str.4:                               ; @.str.4
	.asciz	"Bogus server name %s"

	.comm	_DHCP_FILE_LEN,4,2              ; @DHCP_FILE_LEN
l_.str.5:                               ; @.str.5
	.asciz	"dhcpoffer: no memory for filename."

.subsections_via_symbols
