	.file	"extr_bearer.c___tipc_nl_media_set.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	__tipc_nl_media_set
	.type	__tipc_nl_media_set, @function
__tipc_nl_media_set:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 16
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR TIPC_NLA_BEARER_MAX[rip]
	mov	rcx, rsp
	add	eax, 1
	cdqe
	lea	rax, 15[0+rax*8]
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L39:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L39
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L40
.L4:
	mov	rax, QWORD PTR 8[rsi]
	mov	rdx, QWORD PTR TIPC_NLA_MEDIA[rip]
	mov	r12, rsp
	mov	edx, DWORD PTR [rax+rdx*4]
	test	edx, edx
	jne	.L5
.L37:
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L1:
	mov	rax, QWORD PTR -40[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L41
	lea	rsp, -32[rbp]
	mov	eax, r12d
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	r8d, DWORD PTR [rsi]
	mov	ecx, DWORD PTR tipc_nl_media_policy[rip]
	mov	rdi, r12
	mov	esi, DWORD PTR TIPC_NLA_MEDIA_MAX[rip]
	call	nla_parse_nested_deprecated@PLT
	mov	rax, QWORD PTR TIPC_NLA_MEDIA_NAME[rip]
	mov	rdi, QWORD PTR [r12+rax*8]
	test	rdi, rdi
	je	.L37
	call	nla_data@PLT
	mov	rdi, rax
	call	tipc_media_find@PLT
	mov	rbx, rax
	test	rax, rax
	je	.L37
	mov	rax, QWORD PTR TIPC_NLA_MEDIA_PROP[rip]
	mov	rdi, QWORD PTR [r12+rax*8]
	xor	r12d, r12d
	test	rdi, rdi
	je	.L1
	mov	eax, DWORD PTR TIPC_NLA_PROP_MAX[rip]
	mov	rcx, rsp
	mov	r14, rsp
	add	eax, 1
	cdqe
	lea	rax, 15[0+rax*8]
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L10
.L42:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L42
.L10:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	je	.L11
	or	QWORD PTR -8[rsp+rdx], 0
.L11:
	mov	r13, rsp
	mov	rsi, r13
	call	tipc_nl_parse_link_prop@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L12
	mov	rax, QWORD PTR TIPC_NLA_PROP_TOL[rip]
	mov	rdi, QWORD PTR 0[r13+rax*8]
	test	rdi, rdi
	je	.L13
	call	nla_get_u32@PLT
	mov	QWORD PTR 32[rbx], rax
.L13:
	mov	rax, QWORD PTR TIPC_NLA_PROP_PRIO[rip]
	mov	rdi, QWORD PTR 0[r13+rax*8]
	test	rdi, rdi
	je	.L14
	call	nla_get_u32@PLT
	mov	QWORD PTR 24[rbx], rax
.L14:
	mov	rax, QWORD PTR TIPC_NLA_PROP_WIN[rip]
	mov	rdi, QWORD PTR 0[r13+rax*8]
	test	rdi, rdi
	je	.L15
	call	nla_get_u32@PLT
	mov	QWORD PTR 16[rbx], rax
.L15:
	mov	rax, QWORD PTR TIPC_NLA_PROP_MTU[rip]
	cmp	QWORD PTR 0[r13+rax*8], 0
	je	.L12
	mov	rax, QWORD PTR TIPC_MEDIA_TYPE_UDP[rip]
	cmp	QWORD PTR [rbx], rax
	je	.L12
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L12:
	mov	rsp, r14
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L40:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L41:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	__tipc_nl_media_set, .-__tipc_nl_media_set
	.comm	tipc_nl_media_policy,4,4
	.comm	TIPC_NLA_PROP_WIN,8,8
	.comm	TIPC_NLA_PROP_TOL,8,8
	.comm	TIPC_NLA_PROP_PRIO,8,8
	.comm	TIPC_NLA_PROP_MTU,8,8
	.comm	TIPC_NLA_PROP_MAX,4,4
	.comm	TIPC_NLA_MEDIA_PROP,8,8
	.comm	TIPC_NLA_MEDIA_NAME,8,8
	.comm	TIPC_NLA_MEDIA_MAX,4,4
	.comm	TIPC_NLA_MEDIA,8,8
	.comm	TIPC_NLA_BEARER_MAX,4,4
	.comm	TIPC_MEDIA_TYPE_UDP,8,8
	.comm	EINVAL,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_bearer.c___tipc_nl_media_set.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	__tipc_nl_media_set
	.syntax unified
	.arm
	.fpu softvfp
	.type	__tipc_nl_media_set, %function
__tipc_nl_media_set:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #16
	ldr	r3, .L30
	ldr	r0, .L30+4
	ldr	r3, [r3]
	ldr	r2, [r1, #4]
	ldr	r0, [r0]
	lsl	r3, r3, #2
	add	r3, r3, #11
	bic	r3, r3, #7
	ldr	r2, [r2, r0, lsl #2]
	sub	sp, sp, r3
	ldr	r3, .L30+8
	cmp	r2, #0
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	bne	.L2
.L27:
	ldr	r3, .L30+12
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	ldr	r3, .L30+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L29
	mov	r0, r4
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L2:
	ldr	r0, [r1]
	ldr	ip, .L30+16
	ldr	r3, .L30+20
	add	r4, sp, #8
	ldr	r3, [r3]
	ldr	r1, [ip]
	str	r0, [sp]
	mov	r0, r4
	bl	nla_parse_nested_deprecated
	ldr	r3, .L30+24
	ldr	r3, [r3]
	ldr	r0, [r4, r3, lsl #2]
	cmp	r0, #0
	beq	.L27
	bl	nla_data
	bl	tipc_media_find
	subs	r5, r0, #0
	beq	.L27
	ldr	r3, .L30+28
	ldr	r3, [r3]
	ldr	r0, [r4, r3, lsl #2]
	cmp	r0, #0
	moveq	r4, r0
	beq	.L1
	ldr	r3, .L30+32
	mov	r6, sp
	ldr	r3, [r3]
	lsl	r3, r3, #2
	add	r3, r3, #11
	bic	r3, r3, #7
	sub	sp, sp, r3
	add	r7, sp, #8
	mov	r1, r7
	bl	tipc_nl_parse_link_prop
	subs	r4, r0, #0
	bne	.L6
	ldr	r3, .L30+36
	ldr	r3, [r3]
	ldr	r0, [r7, r3, lsl #2]
	cmp	r0, #0
	beq	.L7
	bl	nla_get_u32
	str	r0, [r5, #16]
.L7:
	ldr	r3, .L30+40
	ldr	r3, [r3]
	ldr	r0, [r7, r3, lsl #2]
	cmp	r0, #0
	beq	.L8
	bl	nla_get_u32
	str	r0, [r5, #12]
.L8:
	ldr	r3, .L30+44
	ldr	r3, [r3]
	ldr	r0, [r7, r3, lsl #2]
	cmp	r0, #0
	beq	.L9
	bl	nla_get_u32
	str	r0, [r5, #8]
.L9:
	ldr	r3, .L30+48
	ldr	r3, [r3]
	ldr	r3, [r7, r3, lsl #2]
	cmp	r3, #0
	beq	.L6
	ldr	r3, .L30+52
	ldr	r2, [r5]
	ldr	r3, [r3]
	cmp	r2, r3
	ldrne	r3, .L30+12
	ldrne	r4, [r3]
	rsbne	r4, r4, #0
.L6:
	mov	sp, r6
	b	.L1
.L29:
	bl	__stack_chk_fail
.L31:
	.align	2
.L30:
	.word	TIPC_NLA_BEARER_MAX
	.word	TIPC_NLA_MEDIA
	.word	.LC0
	.word	EINVAL
	.word	TIPC_NLA_MEDIA_MAX
	.word	tipc_nl_media_policy
	.word	TIPC_NLA_MEDIA_NAME
	.word	TIPC_NLA_MEDIA_PROP
	.word	TIPC_NLA_PROP_MAX
	.word	TIPC_NLA_PROP_TOL
	.word	TIPC_NLA_PROP_PRIO
	.word	TIPC_NLA_PROP_WIN
	.word	TIPC_NLA_PROP_MTU
	.word	TIPC_MEDIA_TYPE_UDP
	.size	__tipc_nl_media_set, .-__tipc_nl_media_set
	.comm	tipc_nl_media_policy,4,4
	.comm	TIPC_NLA_PROP_WIN,4,4
	.comm	TIPC_NLA_PROP_TOL,4,4
	.comm	TIPC_NLA_PROP_PRIO,4,4
	.comm	TIPC_NLA_PROP_MTU,4,4
	.comm	TIPC_NLA_PROP_MAX,4,4
	.comm	TIPC_NLA_MEDIA_PROP,4,4
	.comm	TIPC_NLA_MEDIA_NAME,4,4
	.comm	TIPC_NLA_MEDIA_MAX,4,4
	.comm	TIPC_NLA_MEDIA,4,4
	.comm	TIPC_NLA_BEARER_MAX,4,4
	.comm	TIPC_MEDIA_TYPE_UDP,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
