	.file	"extr_uipc_syscalls.c_kern_getsockname.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	kern_getsockname
	.type	kern_getsockname, @function
kern_getsockname:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rcx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	mov	edi, esi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdx
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	AUDIT_ARG_FD@PLT
	mov	esi, r12d
	mov	rcx, rsp
	xor	r9d, r9d
	xor	r8d, r8d
	lea	rdx, cap_getsockname_rights[rip]
	mov	rdi, rbp
	call	getsock_cap@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L11
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L12
	add	rsp, 24
	.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
.L11:
	.cfi_restore_state
	mov	rax, QWORD PTR [rsp]
	mov	r12, QWORD PTR [rax]
	mov	QWORD PTR [rbx], 0
	mov	edi, DWORD PTR 8[r12]
	call	CURVNET_SET@PLT
	mov	rax, QWORD PTR [r12]
	mov	rdi, r12
	mov	rsi, rbx
	mov	rax, QWORD PTR [rax]
	call	[QWORD PTR [rax]]
	mov	r12d, eax
	xor	eax, eax
	call	CURVNET_RESTORE@PLT
	test	r12d, r12d
	jne	.L3
	mov	rdx, QWORD PTR [rbx]
	xor	eax, eax
	test	rdx, rdx
	je	.L4
	mov	esi, DWORD PTR [rdx]
	mov	rdi, QWORD PTR 0[r13]
	call	MIN@PLT
.L4:
	mov	QWORD PTR 0[r13], rax
	mov	rdi, QWORD PTR [rsp]
	mov	rsi, rbp
	call	fdrop@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rdi, QWORD PTR [rsp]
	mov	rsi, rbp
	call	fdrop@PLT
	mov	rdi, QWORD PTR [rbx]
	test	rdi, rdi
	je	.L1
	mov	esi, DWORD PTR M_SONAME[rip]
	call	free@PLT
	mov	QWORD PTR [rbx], 0
	jmp	.L1
.L12:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	kern_getsockname, .-kern_getsockname
	.comm	cap_getsockname_rights,4,4
	.comm	M_SONAME,4,4
	.comm	KTR_STRUCT,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_uipc_syscalls.c_kern_getsockname.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	kern_getsockname
	.syntax unified
	.arm
	.fpu softvfp
	.type	kern_getsockname, %function
kern_getsockname:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r4, r1
	mov	r6, r0
	mov	r8, #0
	mov	r7, r3
	ldr	r3, .L12
	sub	sp, sp, #20
	mov	r0, r1
	mov	r5, r2
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	AUDIT_ARG_FD
	mov	r1, r4
	mov	r0, r6
	ldr	r2, .L12+4
	str	r8, [sp, #4]
	str	r8, [sp]
	add	r3, sp, #8
	bl	getsock_cap
	subs	r4, r0, #0
	beq	.L10
.L1:
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L11
	mov	r0, r4
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L10:
	ldr	r3, [sp, #8]
	ldr	r9, [r3]
	str	r4, [r5]
	ldr	r0, [r9, #4]
	bl	CURVNET_SET
	ldr	r3, [r9]
	mov	r1, r5
	ldr	r3, [r3]
	mov	r0, r9
	ldr	r3, [r3]
	blx	r3
	mov	r4, r0
	bl	CURVNET_RESTORE
	cmp	r4, r8
	bne	.L3
	ldr	r3, [r5]
	cmp	r3, r8
	moveq	r0, r4
	beq	.L4
	ldr	r1, [r3]
	ldr	r0, [r7]
	bl	MIN
.L4:
	str	r0, [r7]
	mov	r1, r6
	ldr	r0, [sp, #8]
	bl	fdrop
	b	.L1
.L3:
	mov	r1, r6
	ldr	r0, [sp, #8]
	bl	fdrop
	ldr	r0, [r5]
	cmp	r0, #0
	beq	.L1
	ldr	r3, .L12+8
	ldr	r1, [r3]
	bl	free
	str	r8, [r5]
	b	.L1
.L11:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	.LC0
	.word	cap_getsockname_rights
	.word	M_SONAME
	.size	kern_getsockname, .-kern_getsockname
	.comm	cap_getsockname_rights,4,4
	.comm	M_SONAME,4,4
	.comm	KTR_STRUCT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
