	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pdc_sata_ata_port_to_ata_no
_pdc_sata_ata_port_to_ata_no:           ## @pdc_sata_ata_port_to_ata_no
	.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	%rdi, %r14
	movq	8(%rdi), %rbx
	callq	_pdc_sata_nr_ports
	movl	%eax, %ecx
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	(%rbx), %rax
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r14, (%rax,%rbx,8)
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	cmpq	%rbx, %rcx
	jne	LBB0_3
## %bb.5:
	movl	%ecx, %ebx
	jmp	LBB0_6
LBB0_1:
	xorl	%ebx, %ebx
LBB0_6:
	xorl	%edi, %edi
	cmpl	%ecx, %ebx
	setae	%dil
	callq	_BUG_ON
	movl	(%r14), %edi
	callq	_pdc_is_sataii_tx4
	movl	%ebx, %edi
	movl	%eax, %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_pdc_port_no_to_ata_no          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_pdc_sata_ata_port_to_ata_no
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pdc_sata_ata_port_to_ata_no
_pdc_sata_ata_port_to_ata_no:           ; @pdc_sata_ata_port_to_ata_no
	.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
	mov	x19, x0
	ldr	x21, [x0, #8]
	bl	_pdc_sata_nr_ports
	mov	w8, w0
	cbz	w0, LBB0_5
; %bb.1:
	mov	x20, #0
	ldr	x9, [x21]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9, x20, lsl #3]
	cmp	x10, x19
	b.eq	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x20, x20, #1
	cmp	x8, x20
	b.ne	LBB0_2
; %bb.4:
	mov	x20, x8
	b	LBB0_6
LBB0_5:
	mov	w20, #0
LBB0_6:
	cmp	w20, w8
	cset	w0, hs
	bl	_BUG_ON
	ldr	w0, [x19]
	bl	_pdc_is_sataii_tx4
	mov	x1, x0
	mov	x0, x20
	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
	b	_pdc_port_no_to_ata_no
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_pdc_sata_ata_port_to_ata_no
.subsections_via_symbols
