	.file	"extr_af_ax25.c_ax25_bind.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ax25_bind, @function
ax25_bind:
.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
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	ebx, edx
	cmp	edx, 4
	je	.L2
	cmp	edx, 24
	je	.L2
.L4:
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
.L2:
	.cfi_restore_state
	mov	rax, QWORD PTR AF_AX25[rip]
	cmp	QWORD PTR [r12], rax
	jne	.L4
	xor	eax, eax
	mov	rbp, QWORD PTR [rdi]
	call	current_euid@PLT
	mov	edi, eax
	call	ax25_findbyuid@PLT
	mov	rdi, rax
	test	rax, rax
	je	.L5
	mov	r14d, DWORD PTR [rax]
	call	ax25_uid_put@PLT
.L6:
	mov	rdi, rbp
	call	lock_sock@PLT
	mov	rdi, rbp
	call	sk_to_ax25@PLT
	mov	esi, DWORD PTR SOCK_ZAPPED[rip]
	mov	rdi, rbp
	mov	r13, rax
	call	sock_flag@PLT
	test	eax, eax
	je	.L26
	cmp	QWORD PTR 0[r13], 0
	mov	DWORD PTR 8[r13], r14d
	je	.L27
.L13:
	mov	rdi, r13
	xor	r12d, r12d
	call	ax25_cb_add@PLT
	mov	esi, DWORD PTR SOCK_ZAPPED[rip]
	mov	rdi, rbp
	call	sock_reset_flag@PLT
.L9:
	mov	rdi, rbp
	call	release_sock@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
	cmp	QWORD PTR ax25_uid_policy[rip], 0
	jne	.L28
.L7:
	mov	r14d, DWORD PTR 12[r12]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L26:
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L27:
	cmp	ebx, 4
	jbe	.L11
	cmp	DWORD PTR 8[r12], 1
	jne	.L11
	mov	rdi, QWORD PTR 16[r12]
	lea	rsi, null_ax25_address[rip]
	call	ax25cmp@PLT
	test	rax, rax
	je	.L13
	mov	rdi, QWORD PTR 16[r12]
	call	ax25_addr_ax25dev@PLT
	mov	rsi, rax
	test	rax, rax
	jne	.L12
	.p2align 4,,10
	.p2align 3
.L24:
	mov	r12d, DWORD PTR EADDRNOTAVAIL[rip]
	neg	r12d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L11:
	lea	rdi, 12[r12]
	call	ax25_addr_ax25dev@PLT
	mov	rsi, rax
	test	rax, rax
	je	.L24
.L12:
	mov	rdi, r13
	call	ax25_fillin_cb@PLT
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L28:
	mov	edi, DWORD PTR CAP_NET_ADMIN[rip]
	call	capable@PLT
	test	eax, eax
	jne	.L7
	mov	r12d, DWORD PTR EACCES[rip]
	neg	r12d
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	ax25_bind, .-ax25_bind
	.comm	null_ax25_address,4,4
	.comm	ax25_uid_policy,8,8
	.comm	SOCK_ZAPPED,4,4
	.comm	EINVAL,4,4
	.comm	EADDRNOTAVAIL,4,4
	.comm	EACCES,4,4
	.comm	CAP_NET_ADMIN,4,4
	.comm	AF_AX25,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_af_ax25.c_ax25_bind.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ax25_bind, %function
ax25_bind:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r2, #4
	cmpne	r2, #16
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	bne	.L4
	ldr	r3, .L27
	mov	r4, r2
	ldr	r3, [r3]
	ldr	r2, [r1]
	mov	r5, r1
	cmp	r2, r3
	beq	.L23
.L4:
	ldr	r3, .L27+4
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L23:
	ldr	r6, [r0]
	bl	current_euid
	bl	ax25_findbyuid
	subs	r3, r0, #0
	beq	.L5
	ldr	r9, [r3]
	bl	ax25_uid_put
.L6:
	mov	r0, r6
	bl	lock_sock
	mov	r0, r6
	bl	sk_to_ax25
	ldr	r8, .L27+8
	mov	r7, r0
	ldr	r1, [r8]
	mov	r0, r6
	bl	sock_flag
	cmp	r0, #0
	beq	.L24
	ldr	r3, [r7]
	str	r9, [r7, #4]
	cmp	r3, #0
	beq	.L25
.L13:
	mov	r0, r7
	bl	ax25_cb_add
	mov	r0, r6
	ldr	r1, [r8]
	bl	sock_reset_flag
	mov	r4, #0
.L9:
	mov	r0, r6
	bl	release_sock
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L5:
	ldr	r3, .L27+12
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L26
.L7:
	ldr	r9, [r5, #8]
	b	.L6
.L24:
	ldr	r3, .L27+4
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L9
.L25:
	cmp	r4, #4
	bls	.L11
	ldr	r3, [r5, #4]
	cmp	r3, #1
	bne	.L11
	ldr	r1, .L27+16
	ldr	r0, [r5, #12]
	bl	ax25cmp
	cmp	r0, #0
	beq	.L13
	ldr	r0, [r5, #12]
	bl	ax25_addr_ax25dev
	subs	r1, r0, #0
	bne	.L12
.L21:
	ldr	r3, .L27+20
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L9
.L11:
	add	r0, r5, #8
	bl	ax25_addr_ax25dev
	subs	r1, r0, #0
	beq	.L21
.L12:
	mov	r0, r7
	bl	ax25_fillin_cb
	b	.L13
.L26:
	ldr	r3, .L27+24
	ldr	r0, [r3]
	bl	capable
	cmp	r0, #0
	bne	.L7
	ldr	r3, .L27+28
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L28:
	.align	2
.L27:
	.word	AF_AX25
	.word	EINVAL
	.word	SOCK_ZAPPED
	.word	ax25_uid_policy
	.word	null_ax25_address
	.word	EADDRNOTAVAIL
	.word	CAP_NET_ADMIN
	.word	EACCES
	.size	ax25_bind, .-ax25_bind
	.comm	null_ax25_address,4,4
	.comm	ax25_uid_policy,4,4
	.comm	SOCK_ZAPPED,4,4
	.comm	EINVAL,4,4
	.comm	EADDRNOTAVAIL,4,4
	.comm	EACCES,4,4
	.comm	CAP_NET_ADMIN,4,4
	.comm	AF_AX25,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
