	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function translate_hwport_to_subdevice
_translate_hwport_to_subdevice:         ## @translate_hwport_to_subdevice
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
                                        ## kill: def $esi killed $esi def $rsi
	testl	%esi, %esi
	jle	LBB0_3
## %bb.1:
	cmpl	$8, %esi
	ja	LBB0_4
## %bb.2:
	leal	-1(%rsi), %ecx
	xorl	%eax, %eax
	cmpl	%esi, (%rdi)
	cmovgel	%ecx, %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_3:
	movq	_MTPAV_PIDX_BROADCAST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	(%rdi), %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_4:
	cmpl	$16, %esi
	ja	LBB0_6
## %bb.5:
	movl	(%rdi), %eax
	leal	(%rsi,%rax), %ecx
	addl	$-9, %ecx
	leal	(%rax,%rax), %edx
	cmpl	%edx, %ecx
	cmovll	%ecx, %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_6:
	movl	(%rdi), %eax
	cmpl	$17, %esi
	jne	LBB0_8
## %bb.7:
	movq	_MTPAV_PIDX_COMPUTER@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_8:
	movq	_MTPAV_PIDX_ADAT@GOTPCREL(%rip), %rcx
LBB0_9:
	addl	(%rcx), %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MTPAV_PIDX_BROADCAST,4,2       ## @MTPAV_PIDX_BROADCAST
	.comm	_MTPAV_PIDX_COMPUTER,4,2        ## @MTPAV_PIDX_COMPUTER
	.comm	_MTPAV_PIDX_ADAT,4,2            ## @MTPAV_PIDX_ADAT
	.no_dead_strip	_translate_hwport_to_subdevice
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function translate_hwport_to_subdevice
_translate_hwport_to_subdevice:         ; @translate_hwport_to_subdevice
	.cfi_startproc
; %bb.0:
	cmp	w1, #0
	b.le	LBB0_3
; %bb.1:
	cmp	w1, #8
	b.hi	LBB0_5
; %bb.2:
	sub	w8, w1, #1
	ldr	w9, [x0]
	cmp	w9, w1
	csel	w0, wzr, w8, lt
	ret
LBB0_3:
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _MTPAV_PIDX_BROADCAST@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MTPAV_PIDX_BROADCAST@GOTPAGEOFF]
LBB0_4:
	ldr	w9, [x9]
	add	w0, w9, w8
	ret
LBB0_5:
	cmp	w1, #16
	b.hi	LBB0_7
; %bb.6:
	ldr	w8, [x0]
	add	w9, w1, w8
	sub	w9, w9, #9
	cmp	w9, w8, lsl #1
	csel	w0, w9, w8, lt
	ret
LBB0_7:
	ldr	w8, [x0]
	cmp	w1, #17
	b.ne	LBB0_9
; %bb.8:
Lloh2:
	adrp	x9, _MTPAV_PIDX_COMPUTER@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MTPAV_PIDX_COMPUTER@GOTPAGEOFF]
	b	LBB0_4
LBB0_9:
Lloh4:
	adrp	x9, _MTPAV_PIDX_ADAT@GOTPAGE
Lloh5:
	ldr	x9, [x9, _MTPAV_PIDX_ADAT@GOTPAGEOFF]
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MTPAV_PIDX_BROADCAST,4,2       ; @MTPAV_PIDX_BROADCAST
	.comm	_MTPAV_PIDX_COMPUTER,4,2        ; @MTPAV_PIDX_COMPUTER
	.comm	_MTPAV_PIDX_ADAT,4,2            ; @MTPAV_PIDX_ADAT
	.no_dead_strip	_translate_hwport_to_subdevice
.subsections_via_symbols
