	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function serverworks_cable_detect
_serverworks_cable_detect:              ## @serverworks_cable_detect
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movl	(%rax), %edi
	callq	_to_pci_dev
	movq	_cable_detect@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	movq	(%rax), %rdx
	movq	_PCI_ANY_ID@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	addq	$24, %rcx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rcx), %rdi
	addq	$24, %rcx
	testq	%rdi, %rdi
	je	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rdx, %rdi
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-16(%rcx), %rdi
	cmpq	8(%rax), %rdi
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rsi, %rdi
	jne	LBB0_5
LBB0_7:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmpq	*-8(%rcx)                       ## TAILCALL
LBB0_6:
	xorl	%eax, %eax
	callq	_BUG
	movl	$-1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cable_detect,8,3               ## @cable_detect
	.comm	_PCI_ANY_ID,8,3                 ## @PCI_ANY_ID
	.no_dead_strip	_serverworks_cable_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function serverworks_cable_detect
_serverworks_cable_detect:              ; @serverworks_cable_detect
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0]
	ldr	w0, [x8]
	bl	_to_pci_dev
Lloh0:
	adrp	x8, _cable_detect@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cable_detect@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x8]
	ldr	x11, [x9]
	cbz	x11, LBB0_6
; %bb.1:
	ldr	x8, [x0]
Lloh3:
	adrp	x10, _PCI_ANY_ID@GOTPAGE
Lloh4:
	ldr	x10, [x10, _PCI_ANY_ID@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	add	x9, x9, #16
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x11, [x9, #8]
	add	x9, x9, #24
	cbz	x11, LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x11, x8
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldur	x11, [x9, #-8]
	ldr	x12, [x0, #8]
	cmp	x11, x12
	ccmp	x11, x10, #4, ne
	b.ne	LBB0_2
; %bb.5:
	ldr	x1, [x9]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	br	x1
LBB0_6:
	bl	_BUG
	mov	w0, #-1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_cable_detect,8,3               ; @cable_detect
	.comm	_PCI_ANY_ID,8,3                 ; @PCI_ANY_ID
	.no_dead_strip	_serverworks_cable_detect
.subsections_via_symbols
