	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_uip_ipinput                    ## -- Begin function uip_ipinput
	.p2align	4, 0x90
_uip_ipinput:                           ## @uip_ipinput
	.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	%rsi, %r15
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	movq	%r12, %rdi
	callq	_UIP_IPH_V
	cmpl	$4, %eax
	jne	LBB0_3
## %bb.1:
	movq	%r12, %rdi
	callq	_UIP_IPH_HL
	shll	$2, %eax
	cmpl	(%r14), %eax
	jle	LBB0_4
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_16
LBB0_3:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_16
LBB0_4:
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_uip_ipchksum
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_uip_stat@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	incl	%edi
	movl	%edi, (%rbx)
	callq	_UIP_STAT
	movl	4(%rbx), %edi
	incl	%edi
	movl	%edi, 4(%rbx)
	callq	_UIP_STAT
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_16
LBB0_6:
	movq	%r12, %rdi
	callq	_UIP_IPH_LEN
	movl	%eax, %edi
	callq	_ntohs
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_uip_pbuf_realloc
	movq	_uip_netif_list@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_8 Depth=1
	movq	8(%rbx), %rbx
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	testq	%rbx, %rbx
	je	LBB0_15
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, %rdi
	callq	_uip_netif_isup
	testq	%rax, %rax
	je	LBB0_7
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, %rdi
	callq	_ip_addr_isany
	testl	%eax, %eax
	jne	LBB0_7
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ip_addr_cmp
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ip_addr_isbroadcast
	testq	%rax, %rax
	je	LBB0_7
LBB0_13:
	movq	%r12, %rdi
	callq	_UIP_IPH_OFFSET
	movl	%eax, %ebx
	movq	_UIP_IP_OFFMASK@GOTPCREL(%rip), %rax
	movq	_UIP_IP_MF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	callq	_htons
	testl	%ebx, %eax
	je	LBB0_19
## %bb.14:
	movq	%r14, %rdi
	callq	_uip_pbuf_free
	movq	_uip_stat@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	incl	%edi
	movl	%edi, (%rax)
	callq	_UIP_STAT
	leaq	L_.str.4(%rip), %rdi
	callq	_UIP_ERROR
	jmp	LBB0_18
LBB0_15:
	leaq	L_.str.3(%rip), %rdi
LBB0_16:
	callq	_UIP_ERROR
LBB0_17:
	movq	%r14, %rdi
	callq	_uip_pbuf_free
LBB0_18:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movq	%r12, %rdi
	callq	_UIP_IPH_PROTO
	cmpl	$129, %eax
	je	LBB0_22
## %bb.20:
	cmpl	$128, %eax
	jne	LBB0_23
## %bb.21:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_uip_tcpinput
	jmp	LBB0_18
LBB0_22:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_uip_icmpinput
	jmp	LBB0_18
LBB0_23:
	leaq	L_.str.5(%rip), %rdi
	callq	_UIP_LOG
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_ip_addr_isbroadcast
	testq	%rax, %rax
	jne	LBB0_17
## %bb.24:
	movq	%r12, %rdi
	callq	_ip_addr_ismulticast
	testl	%eax, %eax
	jne	LBB0_17
## %bb.25:
	movq	%r12, 8(%r14)
	movq	_UIP_ICMP_DUR_PROTO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_uip_icmp_destunreach
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"uip_ipinput: ip packet dropped due to bad version number.\n"

L_.str.1:                               ## @.str.1
	.asciz	"uip_ipinput: ip packet dropped due to too small packet size.\n"

	.comm	_uip_stat,8,2                   ## @uip_stat
L_.str.2:                               ## @.str.2
	.asciz	"uip_ipinput: bad checksum.\n"

	.comm	_uip_netif_list,8,3             ## @uip_netif_list
L_.str.3:                               ## @.str.3
	.asciz	"uip_ipinput: no route found.\n"

	.comm	_UIP_IP_OFFMASK,4,2             ## @UIP_IP_OFFMASK
	.comm	_UIP_IP_MF,4,2                  ## @UIP_IP_MF
L_.str.4:                               ## @.str.4
	.asciz	"ip: fragment dropped.\n"

L_.str.5:                               ## @.str.5
	.asciz	"uip_ipinput: Unsupported protocol.\n"

	.comm	_UIP_ICMP_DUR_PROTO,4,2         ## @UIP_ICMP_DUR_PROTO
	.comm	_UIP_ERR_OK,4,2                 ## @UIP_ERR_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_uip_ipinput                    ; -- Begin function uip_ipinput
	.p2align	2
_uip_ipinput:                           ; @uip_ipinput
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x1
	mov	x19, x0
	ldr	x20, [x0, #8]
	mov	x0, x20
	bl	_UIP_IPH_V
	cmp	w0, #4
	b.ne	LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_UIP_IPH_HL
	lsl	w1, w0, #2
	ldr	w8, [x19]
	cmp	w1, w8
	b.le	LBB0_4
; %bb.2:
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_3:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_8
LBB0_4:
	mov	x0, x20
	bl	_uip_ipchksum
	cbz	x0, LBB0_6
; %bb.5:
Lloh4:
	adrp	x20, _uip_stat@GOTPAGE
Lloh5:
	ldr	x20, [x20, _uip_stat@GOTPAGEOFF]
	ldr	w8, [x20]
	add	w0, w8, #1
	str	w0, [x20]
	bl	_UIP_STAT
	ldr	w8, [x20, #4]
	add	w0, w8, #1
	str	w0, [x20, #4]
	bl	_UIP_STAT
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_6:
	mov	x0, x20
	bl	_UIP_IPH_LEN
	bl	_ntohs
	mov	x1, x0
	mov	x0, x19
	bl	_uip_pbuf_realloc
Lloh8:
	adrp	x8, _uip_netif_list@GOTPAGE
Lloh9:
	ldr	x8, [x8, _uip_netif_list@GOTPAGEOFF]
Lloh10:
	ldr	x22, [x8]
	cbnz	x22, LBB0_12
LBB0_7:
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_8:
	bl	_UIP_ERROR
LBB0_9:
	mov	x0, x19
	bl	_uip_pbuf_free
LBB0_10:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	x22, [x22, #8]
	cbz	x22, LBB0_7
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_uip_netif_isup
	cbz	x0, LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x22
	bl	_ip_addr_isany
	cbnz	w0, LBB0_11
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_ip_addr_cmp
	cbnz	x0, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_ip_addr_isbroadcast
	cbz	x0, LBB0_11
LBB0_16:
	mov	x0, x20
	bl	_UIP_IPH_OFFSET
	mov	x22, x0
Lloh13:
	adrp	x8, _UIP_IP_OFFMASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _UIP_IP_OFFMASK@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _UIP_IP_MF@GOTPAGE
Lloh17:
	ldr	x9, [x9, _UIP_IP_MF@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_htons
	tst	w0, w22
	b.eq	LBB0_18
; %bb.17:
	mov	x0, x19
	bl	_uip_pbuf_free
Lloh19:
	adrp	x8, _uip_stat@GOTPAGE
Lloh20:
	ldr	x8, [x8, _uip_stat@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w0, w9, #1
	str	w0, [x8]
	bl	_UIP_STAT
Lloh21:
	adrp	x0, l_.str.4@PAGE
Lloh22:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_UIP_ERROR
	b	LBB0_10
LBB0_18:
	mov	x0, x20
	bl	_UIP_IPH_PROTO
	cmp	w0, #129
	b.eq	LBB0_21
; %bb.19:
	cmp	w0, #128
	b.ne	LBB0_22
; %bb.20:
	mov	x0, x19
	mov	x1, x21
	bl	_uip_tcpinput
	b	LBB0_10
LBB0_21:
	mov	x0, x19
	mov	x1, x21
	bl	_uip_icmpinput
	b	LBB0_10
LBB0_22:
Lloh23:
	adrp	x0, l_.str.5@PAGE
Lloh24:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_UIP_LOG
	mov	x0, x20
	mov	x1, x21
	bl	_ip_addr_isbroadcast
	cbnz	x0, LBB0_9
; %bb.23:
	mov	x0, x20
	bl	_ip_addr_ismulticast
	cbnz	w0, LBB0_9
; %bb.24:
	str	x20, [x19, #8]
Lloh25:
	adrp	x8, _UIP_ICMP_DUR_PROTO@GOTPAGE
Lloh26:
	ldr	x8, [x8, _UIP_ICMP_DUR_PROTO@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_uip_icmp_destunreach
	b	LBB0_9
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"uip_ipinput: ip packet dropped due to bad version number.\n"

l_.str.1:                               ; @.str.1
	.asciz	"uip_ipinput: ip packet dropped due to too small packet size.\n"

	.comm	_uip_stat,8,2                   ; @uip_stat
l_.str.2:                               ; @.str.2
	.asciz	"uip_ipinput: bad checksum.\n"

	.comm	_uip_netif_list,8,3             ; @uip_netif_list
l_.str.3:                               ; @.str.3
	.asciz	"uip_ipinput: no route found.\n"

	.comm	_UIP_IP_OFFMASK,4,2             ; @UIP_IP_OFFMASK
	.comm	_UIP_IP_MF,4,2                  ; @UIP_IP_MF
l_.str.4:                               ; @.str.4
	.asciz	"ip: fragment dropped.\n"

l_.str.5:                               ; @.str.5
	.asciz	"uip_ipinput: Unsupported protocol.\n"

	.comm	_UIP_ICMP_DUR_PROTO,4,2         ; @UIP_ICMP_DUR_PROTO
	.comm	_UIP_ERR_OK,4,2                 ; @UIP_ERR_OK
.subsections_via_symbols
