	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rarp_check
_rarp_check:                            ## @rarp_check
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	cmpl	$35, %esi
	ja	LBB0_2
## %bb.1:
	movl	%esi, %edx
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	$36, %ecx
	xorl	%eax, %eax
	callq	_logmsg
	jmp	LBB0_11
LBB0_2:
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	callq	_ntohs
	movq	_ETHERTYPE_REVARP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.3:
	movl	56(%rbx), %edi
	callq	_ntohs
	movq	_ARPHRD_ETHER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.4:
	movl	52(%rbx), %edi
	callq	_ntohs
	movq	_REVARP_REQUEST@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.5:
	movl	48(%rbx), %edi
	callq	_ntohs
	movq	_ETHERTYPE_IP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.6:
	cmpl	$6, 32(%rbx)
	jne	LBB0_8
## %bb.7:
	cmpl	$4, 36(%rbx)
	jne	LBB0_8
## %bb.9:
	movq	_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_10
LBB0_8:
	movq	_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_10:
	xorl	%eax, %eax
	callq	_logmsg
LBB0_11:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"truncated request, got %u, expected %lu"

	.comm	_ETHERTYPE_REVARP,8,3           ## @ETHERTYPE_REVARP
	.comm	_ARPHRD_ETHER,8,3               ## @ARPHRD_ETHER
	.comm	_REVARP_REQUEST,8,3             ## @REVARP_REQUEST
	.comm	_ETHERTYPE_IP,8,3               ## @ETHERTYPE_IP
	.comm	_LOG_DEBUG,4,2                  ## @LOG_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"request fails sanity check"

L_.str.2:                               ## @.str.2
	.asciz	"ether/arp sender address mismatch"

L_.str.3:                               ## @.str.3
	.asciz	"ether/arp target address mismatch"

	.no_dead_strip	_rarp_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rarp_check
_rarp_check:                            ; @rarp_check
	.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
                                        ; kill: def $w1 killed $w1 def $x1
	cmp	w1, #35
	b.hi	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w8, #36
	stp	x1, x8, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_10
LBB0_2:
	mov	x19, x0
	ldr	w0, [x0, #4]
	bl	_ntohs
Lloh5:
	adrp	x8, _ETHERTYPE_REVARP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ETHERTYPE_REVARP@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.3:
	ldr	w0, [x19, #56]
	bl	_ntohs
Lloh8:
	adrp	x8, _ARPHRD_ETHER@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ARPHRD_ETHER@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.4:
	ldr	w0, [x19, #52]
	bl	_ntohs
Lloh11:
	adrp	x8, _REVARP_REQUEST@GOTPAGE
Lloh12:
	ldr	x8, [x8, _REVARP_REQUEST@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.5:
	ldr	w0, [x19, #48]
	bl	_ntohs
Lloh14:
	adrp	x8, _ETHERTYPE_IP@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ETHERTYPE_IP@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.6:
	ldr	w8, [x19, #32]
	cmp	w8, #6
	b.ne	LBB0_9
; %bb.7:
	ldr	w8, [x19, #36]
	cmp	w8, #4
	b.ne	LBB0_9
; %bb.8:
Lloh17:
	adrp	x8, _LOG_DEBUG@GOTPAGE
Lloh18:
	ldr	x8, [x8, _LOG_DEBUG@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_9:
Lloh22:
	adrp	x8, _LOG_DEBUG@GOTPAGE
Lloh23:
	ldr	x8, [x8, _LOG_DEBUG@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
Lloh25:
	adrp	x1, l_.str.1@PAGE
Lloh26:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_10:
	bl	_logmsg
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"truncated request, got %u, expected %lu"

	.comm	_ETHERTYPE_REVARP,8,3           ; @ETHERTYPE_REVARP
	.comm	_ARPHRD_ETHER,8,3               ; @ARPHRD_ETHER
	.comm	_REVARP_REQUEST,8,3             ; @REVARP_REQUEST
	.comm	_ETHERTYPE_IP,8,3               ; @ETHERTYPE_IP
	.comm	_LOG_DEBUG,4,2                  ; @LOG_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"request fails sanity check"

l_.str.2:                               ; @.str.2
	.asciz	"ether/arp sender address mismatch"

l_.str.3:                               ; @.str.3
	.asciz	"ether/arp target address mismatch"

	.no_dead_strip	_rarp_check
.subsections_via_symbols
