	.file	"extr_route.c_rt_set_gwroute.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	rt_set_gwroute
	.type	rt_set_gwroute, @function
rt_set_gwroute:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	edi, DWORD PTR rnh_lock[rip]
	mov	esi, DWORD PTR LCK_MTX_ASSERT_OWNED[rip]
	call	LCK_MTX_ASSERT@PLT
	mov	rdi, rbp
	call	RT_LOCK_ASSERT_HELD@PLT
	test	r12, r12
	je	.L2
	mov	rdi, r12
	call	RT_ADDREF@PLT
	mov	r14, QWORD PTR 16[rbp]
	test	r14, r14
	je	.L27
	xor	edi, edi
	cmp	rbp, r14
	setne	dil
	call	VERIFY@PLT
	mov	QWORD PTR 16[rbp], 0
	mov	rdi, rbp
	call	RT_UNLOCK@PLT
	mov	rdi, r14
	call	rtfree_locked@PLT
	mov	rdi, rbp
	call	RT_LOCK@PLT
	xor	edi, edi
	cmp	QWORD PTR 16[rbp], 0
	sete	dil
	call	VERIFY@PLT
.L27:
	mov	QWORD PTR 16[rbp], r12
	mov	rdi, r12
	call	RT_ADDREF@PLT
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR RTF_WASCLONED[rip], eax
	je	.L5
	mov	rdi, QWORD PTR 8[rbp]
	test	rdi, rdi
	je	.L7
	call	rt_key@PLT
	mov	rdi, rax
	call	SA_DEFAULT@PLT
	test	rax, rax
	je	.L7
	mov	rdi, QWORD PTR 8[rbp]
	call	RT_HOST@PLT
	test	rax, rax
	jne	.L7
.L10:
	mov	rdi, r12
	call	RT_HOST@PLT
	test	rax, rax
	je	.L7
	mov	eax, DWORD PTR [r12]
	test	DWORD PTR RTF_ROUTER[rip], eax
	jne	.L7
	mov	rdi, r12
	call	RT_LOCK@PLT
	mov	eax, DWORD PTR RTF_ROUTER[rip]
	or	DWORD PTR [r12], eax
	mov	rdi, r12
	call	RT_UNLOCK@PLT
.L7:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, r12
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	RT_REMREF@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	r12, QWORD PTR 16[rbp]
	test	r12, r12
	je	.L1
	xor	edi, edi
	cmp	rbp, r12
	setne	dil
	call	VERIFY@PLT
	mov	QWORD PTR 16[rbp], 0
	mov	rdi, rbp
	call	RT_UNLOCK@PLT
	mov	rdi, r12
	call	rtfree_locked@PLT
	mov	rdi, rbp
	call	RT_LOCK@PLT
	xor	edi, edi
	cmp	QWORD PTR 16[rbp], 0
	sete	dil
	call	VERIFY@PLT
	mov	QWORD PTR 16[rbp], 0
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	rdi, r13
	call	SA_DEFAULT@PLT
	test	rax, rax
	je	.L7
	mov	rdi, rbp
	call	RT_HOST@PLT
	test	rax, rax
	je	.L10
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	rt_set_gwroute, .-rt_set_gwroute
	.comm	rnh_lock,4,4
	.comm	RTF_WASCLONED,4,4
	.comm	RTF_ROUTER,4,4
	.comm	LCK_MTX_ASSERT_OWNED,4,4
	.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_route.c_rt_set_gwroute.c"
	.text
	.align	2
	.global	rt_set_gwroute
	.syntax unified
	.arm
	.fpu softvfp
	.type	rt_set_gwroute, %function
rt_set_gwroute:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	mov	r6, r2
	ldr	ip, .L29
	mov	r5, r1
	ldr	r1, .L29+4
	ldr	r0, [ip]
	ldr	r1, [r1]
	bl	LCK_MTX_ASSERT
	mov	r0, r4
	bl	RT_LOCK_ASSERT_HELD
	cmp	r6, #0
	beq	.L2
	mov	r0, r6
	bl	RT_ADDREF
	ldr	r7, [r4, #8]
	cmp	r7, #0
	beq	.L27
	subs	r0, r4, r7
	movne	r0, #1
	bl	VERIFY
	mov	r3, #0
	mov	r0, r4
	str	r3, [r4, #8]
	bl	RT_UNLOCK
	mov	r0, r7
	bl	rtfree_locked
	mov	r0, r4
	bl	RT_LOCK
	ldr	r0, [r4, #8]
	clz	r0, r0
	lsr	r0, r0, #5
	bl	VERIFY
.L27:
	mov	r0, r6
	str	r6, [r4, #8]
	bl	RT_ADDREF
	ldr	r3, .L29+8
	ldr	r2, [r4]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L5
	ldr	r0, [r4, #4]
	cmp	r0, #0
	beq	.L7
	bl	rt_key
	bl	SA_DEFAULT
	cmp	r0, #0
	beq	.L7
	ldr	r0, [r4, #4]
	bl	RT_HOST
	cmp	r0, #0
	bne	.L7
.L10:
	mov	r0, r6
	bl	RT_HOST
	cmp	r0, #0
	beq	.L7
	ldr	r4, .L29+12
	ldr	r2, [r6]
	ldr	r3, [r4]
	tst	r2, r3
	bne	.L7
	mov	r0, r6
	bl	RT_LOCK
	ldr	r2, [r4]
	ldr	r3, [r6]
	mov	r0, r6
	orr	r3, r3, r2
	str	r3, [r6]
	bl	RT_UNLOCK
.L7:
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, lr}
	b	RT_REMREF
.L2:
	ldr	r5, [r4, #8]
	cmp	r5, #0
	popeq	{r4, r5, r6, r7, r8, pc}
	subs	r0, r4, r5
	movne	r0, #1
	bl	VERIFY
	mov	r0, r4
	str	r6, [r4, #8]
	bl	RT_UNLOCK
	mov	r0, r5
	bl	rtfree_locked
	mov	r0, r4
	bl	RT_LOCK
	ldr	r0, [r4, #8]
	clz	r0, r0
	lsr	r0, r0, #5
	bl	VERIFY
	str	r6, [r4, #8]
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	mov	r0, r5
	bl	SA_DEFAULT
	cmp	r0, #0
	beq	.L7
	mov	r0, r4
	bl	RT_HOST
	cmp	r0, #0
	beq	.L10
	b	.L7
.L30:
	.align	2
.L29:
	.word	rnh_lock
	.word	LCK_MTX_ASSERT_OWNED
	.word	RTF_WASCLONED
	.word	RTF_ROUTER
	.size	rt_set_gwroute, .-rt_set_gwroute
	.comm	rnh_lock,4,4
	.comm	RTF_WASCLONED,4,4
	.comm	RTF_ROUTER,4,4
	.comm	LCK_MTX_ASSERT_OWNED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
