	.file	"extr_socket.c_j1939_sk_connect.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	j1939_sk_connect, @function
j1939_sk_connect:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	edi, DWORD PTR [rdi]
	call	j1939_sk@PLT
	mov	esi, r12d
	mov	rdi, rbp
	mov	r13, rax
	call	j1939_sk_sanity_check@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L14
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	edi, DWORD PTR [rbx]
	call	lock_sock@PLT
	mov	eax, DWORD PTR 0[r13]
	test	DWORD PTR J1939_SOCK_BOUND[rip], eax
	je	.L5
	mov	rax, QWORD PTR 0[rbp]
	cmp	QWORD PTR 8[r13], rax
	jne	.L5
	mov	rax, QWORD PTR 16[rbp]
	mov	edx, DWORD PTR 12[rbp]
	test	rax, rax
	jne	.L6
	cmp	DWORD PTR J1939_NO_ADDR[rip], edx
	je	.L15
.L6:
	mov	QWORD PTR 24[r13], rax
	mov	edi, DWORD PTR 8[rbp]
	mov	DWORD PTR 20[r13], edx
	call	j1939_pgn_is_valid@PLT
	test	rax, rax
	je	.L8
	mov	eax, DWORD PTR 8[rbp]
	mov	DWORD PTR 16[r13], eax
.L8:
	mov	eax, DWORD PTR J1939_SOCK_CONNECTED[rip]
	or	DWORD PTR 0[r13], eax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L4:
	mov	edi, DWORD PTR [rbx]
	call	release_sock@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	esi, DWORD PTR SOCK_BROADCAST[rip]
	lea	rdi, 32[r13]
	call	sock_flag@PLT
	test	eax, eax
	je	.L7
	mov	rax, QWORD PTR 16[rbp]
	mov	edx, DWORD PTR 12[rbp]
	jmp	.L6
.L7:
	mov	r12d, DWORD PTR EACCES[rip]
	neg	r12d
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	j1939_sk_connect, .-j1939_sk_connect
	.comm	SOCK_BROADCAST,4,4
	.comm	J1939_SOCK_CONNECTED,4,4
	.comm	J1939_SOCK_BOUND,4,4
	.comm	J1939_NO_ADDR,4,4
	.comm	EINVAL,4,4
	.comm	EACCES,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_socket.c_j1939_sk_connect.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	j1939_sk_connect, %function
j1939_sk_connect:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	ldr	r0, [r0]
	mov	r4, r2
	mov	r6, r1
	bl	j1939_sk
	mov	r1, r4
	mov	r7, r0
	mov	r0, r6
	bl	j1939_sk_sanity_check
	subs	r4, r0, #0
	beq	.L14
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L14:
	ldr	r0, [r5]
	bl	lock_sock
	ldr	r2, .L16
	ldr	r1, [r7]
	ldr	r2, [r2]
	tst	r1, r2
	beq	.L5
	ldr	r2, [r7, #4]
	ldr	r3, [r6]
	cmp	r2, r3
	bne	.L5
	ldr	r3, [r6, #12]
	ldr	r2, [r6, #8]
	cmp	r3, #0
	bne	.L6
	ldr	r1, .L16+4
	ldr	r1, [r1]
	cmp	r1, r2
	beq	.L15
.L6:
	str	r3, [r7, #16]
	str	r2, [r7, #12]
	ldr	r0, [r6, #4]
	bl	j1939_pgn_is_valid
	cmp	r0, #0
	ldrne	r3, [r6, #4]
	ldr	r2, .L16+8
	strne	r3, [r7, #8]
	ldr	r2, [r2]
	ldr	r3, [r7]
	orr	r3, r3, r2
	str	r3, [r7]
	b	.L4
.L5:
	ldr	r3, .L16+12
	ldr	r0, [r3]
	rsb	r4, r0, #0
.L4:
	ldr	r0, [r5]
	bl	release_sock
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L15:
	ldr	r3, .L16+16
	add	r0, r7, #20
	ldr	r1, [r3]
	bl	sock_flag
	cmp	r0, #0
	ldrne	r3, [r6, #12]
	ldrne	r2, [r6, #8]
	bne	.L6
.L7:
	ldr	r3, .L16+20
	ldr	r0, [r3]
	rsb	r4, r0, #0
	b	.L4
.L17:
	.align	2
.L16:
	.word	J1939_SOCK_BOUND
	.word	J1939_NO_ADDR
	.word	J1939_SOCK_CONNECTED
	.word	EINVAL
	.word	SOCK_BROADCAST
	.word	EACCES
	.size	j1939_sk_connect, .-j1939_sk_connect
	.comm	SOCK_BROADCAST,4,4
	.comm	J1939_SOCK_CONNECTED,4,4
	.comm	J1939_SOCK_BOUND,4,4
	.comm	J1939_NO_ADDR,4,4
	.comm	EINVAL,4,4
	.comm	EACCES,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
