	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_inet_diag_register             ## -- Begin function inet_diag_register
	.p2align	4, 0x90
_inet_diag_register:                    ## @inet_diag_register
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rbx
	xorl	%r15d, %r15d
	movq	_INET_DIAG_GETSOCK_MAX@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jae	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	movq	_inet_diag_table_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	_inet_diag_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax,%rbx,8)
	je	LBB0_4
## %bb.3:
	movq	_EEXIST@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_6
LBB0_4:
	movq	%r14, (%rax,%rbx,8)
	xorl	%r15d, %r15d
LBB0_5:
	movq	_inet_diag_table_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_INET_DIAG_GETSOCK_MAX,8,3      ## @INET_DIAG_GETSOCK_MAX
	.comm	_inet_diag_table_mutex,4,2      ## @inet_diag_table_mutex
	.comm	_EEXIST,4,2                     ## @EEXIST
	.comm	_inet_diag_table,8,3            ## @inet_diag_table
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_inet_diag_register             ; -- Begin function inet_diag_register
	.p2align	2
_inet_diag_register:                    ; @inet_diag_register
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x21, [x0]
Lloh0:
	adrp	x8, _INET_DIAG_GETSOCK_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INET_DIAG_GETSOCK_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x21, x8
	b.hs	LBB0_3
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x0, _inet_diag_table_mutex@GOTPAGE
Lloh4:
	ldr	x0, [x0, _inet_diag_table_mutex@GOTPAGEOFF]
	bl	_mutex_lock
Lloh5:
	adrp	x8, _inet_diag_table@GOTPAGE
Lloh6:
	ldr	x8, [x8, _inet_diag_table@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	x9, [x8, x21, lsl #3]
	cbz	x9, LBB0_4
; %bb.2:
Lloh8:
	adrp	x8, _EEXIST@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EEXIST@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_5
LBB0_3:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_6
LBB0_4:
	mov	w19, #0
	str	x20, [x8, x21, lsl #3]
LBB0_5:
Lloh14:
	adrp	x0, _inet_diag_table_mutex@GOTPAGE
Lloh15:
	ldr	x0, [x0, _inet_diag_table_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_INET_DIAG_GETSOCK_MAX,8,3      ; @INET_DIAG_GETSOCK_MAX
	.comm	_inet_diag_table_mutex,4,2      ; @inet_diag_table_mutex
	.comm	_EEXIST,4,2                     ; @EEXIST
	.comm	_inet_diag_table,8,3            ; @inet_diag_table
.subsections_via_symbols
