	.file	"extr_filter.c_add_nat.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	add_nat
	.type	add_nat, @function
add_nat:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	test	rsi, rsi
	je	.L2
	mov	r10, rdx
	test	rdx, rdx
	je	.L2
	test	rcx, rcx
	mov	rbp, r8
	sete	dl
	test	r8, r8
	sete	al
	or	dl, al
	jne	.L2
	mov	rbx, r9
	test	r9, r9
	je	.L2
	mov	rax, QWORD PTR [r8]
	cmp	QWORD PTR [rsi], rax
	jne	.L2
	mov	rdx, rsi
	mov	esi, DWORD PTR PF_RULESET_NAT[rip]
	mov	r8, rcx
	mov	rcx, r10
	call	prepare_rule@PLT
	cmp	eax, -1
	je	.L8
	mov	rax, QWORD PTR AF_INET[rip]
	mov	rdi, rbp
	cmp	QWORD PTR 0[rbp], rax
	je	.L14
	call	satosin6@PLT
	mov	edx, 16
	lea	rdi, pfp[rip+12]
	mov	rsi, rax
	call	memcpy@PLT
	mov	edx, 16
	mov	esi, 255
	lea	rdi, pfp[rip+8]
	call	memset@PLT
.L7:
	mov	esi, DWORD PTR DIOCADDADDR[rip]
	mov	edi, DWORD PTR dev[rip]
	lea	rdx, pfp[rip]
	call	ioctl@PLT
	cmp	eax, -1
	je	.L8
	mov	rax, QWORD PTR pfr[rip]
	mov	rdx, QWORD PTR 32[rsp]
	mov	esi, DWORD PTR DIOCADDRULE[rip]
	mov	edi, DWORD PTR dev[rip]
	mov	QWORD PTR [rax], rbx
	mov	rax, QWORD PTR pfr[rip]
	mov	QWORD PTR 8[rax], rdx
	lea	rdx, pfr[rip]
	call	ioctl@PLT
	cmp	eax, -1
	sete	al
	movzx	eax, al
	neg	eax
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	call	satosin@PLT
	mov	edx, 4
	lea	rdi, pfp[rip+16]
	mov	rsi, rax
	call	memcpy@PLT
	mov	edx, 4
	mov	esi, 255
	lea	rdi, pfp[rip+8]
	call	memset@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L2:
	mov	eax, DWORD PTR EINVAL[rip]
	mov	DWORD PTR errno[rip], eax
	mov	eax, -1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L8:
	mov	eax, -1
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	add_nat, .-add_nat
	.comm	pfr,24,16
	.comm	pfp,24,16
	.comm	errno,4,4
	.comm	dev,4,4
	.comm	PF_RULESET_NAT,4,4
	.comm	EINVAL,4,4
	.comm	DIOCADDRULE,4,4
	.comm	DIOCADDADDR,4,4
	.comm	AF_INET,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_filter.c_add_nat.c"
	.text
	.align	2
	.global	add_nat
	.syntax unified
	.arm
	.fpu softvfp
	.type	add_nat, %function
add_nat:
	@ args = 12, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r2, #0
	cmpne	r1, #0
	push	{r4, r5, lr}
	sub	sp, sp, #12
	ldr	r5, [sp, #24]
	ldr	r4, [sp, #28]
	beq	.L2
	clz	ip, r5
	cmp	r3, #0
	lsr	ip, ip, #5
	moveq	ip, #1
	cmp	r4, #0
	moveq	ip, #1
	cmp	ip, #0
	bne	.L2
	ldr	ip, [r1]
	mov	lr, r2
	mov	r2, r1
	ldr	r1, [r5]
	cmp	ip, r1
	bne	.L2
	ldr	r1, .L15
	str	r3, [sp]
	ldr	r1, [r1]
	mov	r3, lr
	bl	prepare_rule
	cmn	r0, #1
	beq	.L8
	ldr	r3, .L15+4
	ldr	r2, [r5]
	ldr	r3, [r3]
	mov	r0, r5
	cmp	r2, r3
	beq	.L14
	bl	satosin6
	ldr	r5, .L15+8
	add	r1, r0, #12
	mov	r2, #4
	mov	r0, r5
	bl	memcpy
	mvn	r3, #0
	str	r3, [r5, #-16]
	str	r3, [r5, #-12]
	str	r3, [r5, #-8]
	str	r3, [r5, #-4]
.L7:
	ldr	r3, .L15+12
	ldr	r5, .L15+16
	ldr	r1, [r3]
	ldr	r0, [r5]
	ldr	r2, .L15+20
	bl	ioctl
	cmn	r0, #1
	beq	.L8
	ldr	r2, .L15+24
	ldr	r0, [r5]
	ldr	r1, [r2]
	ldr	r3, .L15+28
	str	r4, [r1]
	ldr	r1, [r2]
	ldr	ip, [sp, #32]
	str	ip, [r1, #4]
	ldr	r1, [r3]
	bl	ioctl
	cmn	r0, #1
	movne	r0, #0
	moveq	r0, #1
	rsb	r0, r0, #0
.L1:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L14:
	bl	satosin
	mov	r2, #4
	mov	r1, r0
	ldr	r0, .L15+32
	bl	memcpy
	mvn	r2, #0
	ldr	r3, .L15+20
	str	r2, [r3, #4]
	b	.L7
.L2:
	ldr	r2, .L15+36
	ldr	r3, .L15+40
	ldr	r2, [r2]
	mvn	r0, #0
	str	r2, [r3]
	b	.L1
.L8:
	mvn	r0, #0
	b	.L1
.L16:
	.align	2
.L15:
	.word	PF_RULESET_NAT
	.word	AF_INET
	.word	pfp+20
	.word	DIOCADDADDR
	.word	dev
	.word	pfp
	.word	pfr
	.word	DIOCADDRULE
	.word	pfp+12
	.word	EINVAL
	.word	errno
	.size	add_nat, .-add_nat
	.comm	pfr,16,4
	.comm	pfp,16,4
	.comm	errno,4,4
	.comm	dev,4,4
	.comm	PF_RULESET_NAT,4,4
	.comm	EINVAL,4,4
	.comm	DIOCADDRULE,4,4
	.comm	DIOCADDADDR,4,4
	.comm	AF_INET,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
