	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_unit_by_fd
_find_unit_by_fd:                       ## @find_unit_by_fd
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_MAX_CHASSIS@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	testl	%r9d, %r9d
	js	LBB0_14
## %bb.1:
	movq	_MAX_GEOSLOT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_units@GOTPCREL(%rip), %rax
	movq	(%rax), %r10
	leal	1(%r8), %ebx
	incq	%r9
	xorl	%r14d, %r14d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	cmpq	%r9, %r14
	je	LBB0_14
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	testl	%r8d, %r8d
	js	LBB0_13
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r10,%r14,8), %r11
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	%edi, (%r11)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	cmpl	%edi, 4(%r11)
	je	LBB0_6
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=2
	incq	%rax
	addq	$8, %r11
	cmpq	%rax, %rbx
	jne	LBB0_4
	jmp	LBB0_13
LBB0_6:
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.7:
	movl	%r14d, (%rsi)
LBB0_8:
	testq	%rdx, %rdx
	je	LBB0_10
## %bb.9:
	movl	%eax, (%rdx)
LBB0_10:
	movl	$1, %eax
	testq	%rcx, %rcx
	je	LBB0_15
## %bb.11:
	movq	%r11, (%rcx)
	jmp	LBB0_15
LBB0_14:
	xorl	%eax, %eax
LBB0_15:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_CHASSIS,4,2                ## @MAX_CHASSIS
	.comm	_MAX_GEOSLOT,4,2                ## @MAX_GEOSLOT
	.comm	_units,8,3                      ## @units
	.no_dead_strip	_find_unit_by_fd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_unit_by_fd
_find_unit_by_fd:                       ; @find_unit_by_fd
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _MAX_CHASSIS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_CHASSIS@GOTPAGEOFF]
Lloh2:
	ldr	w12, [x8]
	tbnz	w12, #31, LBB0_14
; %bb.1:
	mov	x8, #0
Lloh3:
	adrp	x9, _MAX_GEOSLOT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MAX_GEOSLOT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _units@GOTPAGE
Lloh7:
	ldr	x10, [x10, _units@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	add	w11, w9, #1
	add	x12, x12, #1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x8, #1
	cmp	x8, x12
	b.eq	LBB0_14
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	tbnz	w9, #31, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x14, #0
	ldr	x13, [x10, x8, lsl #3]
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w15, [x13]
	cmp	w15, w0
	b.eq	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	ldr	w15, [x13, #4]
	cmp	w15, w0
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=2
	add	x14, x14, #1
	add	x13, x13, #8
	cmp	x11, x14
	b.ne	LBB0_5
	b	LBB0_2
LBB0_8:
	cbz	x1, LBB0_10
; %bb.9:
	str	w8, [x1]
LBB0_10:
	cbz	x2, LBB0_12
; %bb.11:
	str	w14, [x2]
LBB0_12:
	cbz	x3, LBB0_15
; %bb.13:
	str	x13, [x3]
	mov	w0, #1
	ret
LBB0_14:
	mov	w0, #0
	ret
LBB0_15:
	mov	w0, #1
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_CHASSIS,4,2                ; @MAX_CHASSIS
	.comm	_MAX_GEOSLOT,4,2                ; @MAX_GEOSLOT
	.comm	_units,8,3                      ; @units
	.no_dead_strip	_find_unit_by_fd
.subsections_via_symbols
