	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_getsockname                ## -- Begin function sys_getsockname
	.p2align	4, 0x90
_sys_getsockname:                       ## @sys_getsockname
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %r15d
	movl	%edi, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	movl	%r12d, %ecx
	callq	_STRACE
	movl	%ebx, %edi
	callq	_sock_getfd
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %rbx
	movl	%r12d, %edi
	callq	_user_get
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	__EFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_11
LBB0_3:
	movq	__EBADF@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_11
LBB0_4:
	movq	%rsp, %r13
	movl	(%rbx), %edi
	leaq	-48(%rbp), %rsi
	leaq	-52(%rbp), %rdx
	callq	_getsockname
	testl	%eax, %eax
	js	LBB0_8
## %bb.5:
	movl	%eax, %r14d
	leaq	-48(%rbp), %rsi
	leaq	-52(%rbp), %rcx
	movl	%r15d, %edi
	callq	_sockaddr_write
	testl	%eax, %eax
	js	LBB0_9
## %bb.6:
	movl	-52(%rbp), %esi
	movl	%r12d, %edi
	callq	_user_put
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	movq	__EFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_10
LBB0_8:
	xorl	%eax, %eax
	callq	_errno_map
LBB0_9:
	movl	%eax, %r14d
LBB0_10:
	movq	%r13, %rsp
LBB0_11:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"getsockname(%d, 0x%x, 0x%x)"

	.comm	__EBADF,4,2                     ## @_EBADF
	.comm	__EFAULT,4,2                    ## @_EFAULT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_getsockname                ; -- Begin function sys_getsockname
	.p2align	2
_sys_getsockname:                       ; @sys_getsockname
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	bl	_STRACE
	mov	x0, x21
	bl	_sock_getfd
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x0
	mov	x0, x19
	bl	_user_get
	cbz	x0, LBB0_4
; %bb.2:
Lloh2:
	adrp	x8, __EFAULT@GOTPAGE
Lloh3:
	ldr	x8, [x8, __EFAULT@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	b	LBB0_9
LBB0_3:
Lloh5:
	adrp	x8, __EBADF@GOTPAGE
Lloh6:
	ldr	x8, [x8, __EBADF@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	b	LBB0_9
LBB0_4:
	mov	x22, sp
	ldr	w0, [x21]
	add	x1, sp, #15
	add	x2, sp, #8
	bl	_getsockname
	tbnz	w0, #31, LBB0_7
; %bb.5:
	mov	x21, x0
	add	x1, sp, #15
	add	x3, sp, #8
	mov	x0, x20
	bl	_sockaddr_write
	tbnz	w0, #31, LBB0_8
; %bb.6:
	ldr	w1, [sp, #8]
	mov	x0, x19
	bl	_user_put
Lloh8:
	adrp	x8, __EFAULT@GOTPAGE
Lloh9:
	ldr	x8, [x8, __EFAULT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w0, w21, w8, eq
	b	LBB0_8
LBB0_7:
	bl	_errno_map
LBB0_8:
	mov	sp, x22
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"getsockname(%d, 0x%x, 0x%x)"

	.comm	__EBADF,4,2                     ; @_EBADF
	.comm	__EFAULT,4,2                    ; @_EFAULT
.subsections_via_symbols
