	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_port_setup                     ## -- Begin function port_setup
	.p2align	4, 0x90
_port_setup:                            ## @port_setup
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %r12d
	leal	-128(%r12), %edx
	movl	$-1, %eax
	cmpl	$7, %edx
	ja	LBB0_2
## %bb.1:
	movl	%edi, %ebx
	movq	_port_sc@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movslq	%edx, %rax
	leaq	l_switch.table.port_setup(%rip), %rdx
	movq	(%rdx,%rax,8), %rax
	movl	(%rax), %r14d
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	callq	_PORT_PCR
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_READ4
	movq	_PCR_IRQC_M@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_PCR_IRQC_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	notl	%edx
	andl	%eax, %edx
	shll	%cl, %r14d
	orl	%edx, %r14d
	movl	%ebx, %edi
	callq	_PORT_PCR
	movq	%r13, %rdi
	movl	%eax, %esi
	movl	%r14d, %edx
	callq	_WRITE4
	movq	_event_map@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movq	%r15, (%rax,%rcx,8)
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, 16(%rax,%rcx,8)
	movl	%r12d, 8(%rax,%rcx,8)
	movl	$1, 12(%rax,%rcx,8)
	xorl	%eax, %eax
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_port_sc,8,3                    ## @port_sc
	.comm	_PCR_DMA_RE,4,2                 ## @PCR_DMA_RE
	.comm	_PCR_DMA_FE,4,2                 ## @PCR_DMA_FE
	.comm	_PCR_DMA_EE,4,2                 ## @PCR_DMA_EE
	.comm	_PCR_INT_LZ,4,2                 ## @PCR_INT_LZ
	.comm	_PCR_INT_RE,4,2                 ## @PCR_INT_RE
	.comm	_PCR_INT_FE,4,2                 ## @PCR_INT_FE
	.comm	_PCR_INT_EE,4,2                 ## @PCR_INT_EE
	.comm	_PCR_INT_LO,4,2                 ## @PCR_INT_LO
	.comm	_PCR_IRQC_M,4,2                 ## @PCR_IRQC_M
	.comm	_PCR_IRQC_S,4,2                 ## @PCR_IRQC_S
	.comm	_event_map,8,3                  ## @event_map
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.port_setup
l_switch.table.port_setup:
	.quad	_PCR_INT_RE
	.quad	_PCR_INT_LZ
	.quad	_PCR_INT_LO
	.quad	_PCR_INT_FE
	.quad	_PCR_INT_EE
	.quad	_PCR_DMA_RE
	.quad	_PCR_DMA_FE
	.quad	_PCR_DMA_EE

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_port_setup                     ; -- Begin function port_setup
	.p2align	2
_port_setup:                            ; @port_setup
	.cfi_startproc
; %bb.0:
	sub	w8, w1, #128
	cmp	w8, #7
	b.hi	LBB0_2
; %bb.1:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x3
	mov	x21, x2
	mov	x19, x1
	mov	x22, x0
Lloh0:
	adrp	x9, _port_sc@GOTPAGE
Lloh1:
	ldr	x9, [x9, _port_sc@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x9]
Lloh3:
	adrp	x9, l_switch.table.port_setup@PAGE
Lloh4:
	add	x9, x9, l_switch.table.port_setup@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldr	w24, [x8]
	bl	_PORT_PCR
	mov	x1, x0
	mov	x0, x23
	bl	_READ4
Lloh5:
	adrp	x8, _PCR_IRQC_M@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PCR_IRQC_M@GOTPAGEOFF]
Lloh7:
	adrp	x9, _PCR_IRQC_S@GOTPAGE
Lloh8:
	ldr	x9, [x9, _PCR_IRQC_S@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	bic	w8, w0, w8
	lsl	w9, w24, w9
	orr	w24, w8, w9
	mov	x0, x22
	bl	_PORT_PCR
	mov	x1, x0
	mov	x0, x23
	mov	x2, x24
	bl	_WRITE4
	mov	w0, #0
Lloh11:
	adrp	x8, _event_map@GOTPAGE
Lloh12:
	ldr	x8, [x8, _event_map@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	mov	w9, #24
	smaddl	x8, w22, w9, x8
	str	x21, [x8]
	str	x20, [x8, #16]
	mov	w9, #1
	stp	w19, w9, [x8, #8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_2:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
	.cfi_same_value w23
	.cfi_same_value w24
	mov	w0, #-1
	ret
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_port_sc,8,3                    ; @port_sc
	.comm	_PCR_DMA_RE,4,2                 ; @PCR_DMA_RE
	.comm	_PCR_DMA_FE,4,2                 ; @PCR_DMA_FE
	.comm	_PCR_DMA_EE,4,2                 ; @PCR_DMA_EE
	.comm	_PCR_INT_LZ,4,2                 ; @PCR_INT_LZ
	.comm	_PCR_INT_RE,4,2                 ; @PCR_INT_RE
	.comm	_PCR_INT_FE,4,2                 ; @PCR_INT_FE
	.comm	_PCR_INT_EE,4,2                 ; @PCR_INT_EE
	.comm	_PCR_INT_LO,4,2                 ; @PCR_INT_LO
	.comm	_PCR_IRQC_M,4,2                 ; @PCR_IRQC_M
	.comm	_PCR_IRQC_S,4,2                 ; @PCR_IRQC_S
	.comm	_event_map,8,3                  ; @event_map
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.port_setup
l_switch.table.port_setup:
	.quad	_PCR_INT_RE
	.quad	_PCR_INT_LZ
	.quad	_PCR_INT_LO
	.quad	_PCR_INT_FE
	.quad	_PCR_INT_EE
	.quad	_PCR_DMA_RE
	.quad	_PCR_DMA_FE
	.quad	_PCR_DMA_EE

.subsections_via_symbols
