	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function port_attach
_port_attach:                           ## @port_attach
	.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
	movl	%edi, %r14d
	callq	_device_get_softc
	movq	%rax, %rbx
	movq	_port_spec@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%rbx), %rdx
	movl	%r14d, %edi
	callq	_bus_alloc_resources
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_7
LBB0_2:
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	callq	_rman_get_bustag
	movl	%eax, 20(%rbx)
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	callq	_rman_get_bushandle
	movl	%eax, 16(%rbx)
	movq	_port_sc@GOTPCREL(%rip), %rax
	movq	%rbx, (%rax)
	movq	_NPORTS@GOTPCREL(%rip), %r13
	movq	_port_intr@GOTPCREL(%rip), %r15
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%r13), %rax
	cmpq	%rax, %rdi
	jge	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rbx), %rax
	leaq	1(%rdi), %r12
	movl	4(%rax,%rdi,4), %esi
	movq	_INTR_TYPE_MISC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r15), %ecx
	shlq	$2, %rdi
	addq	(%rbx), %rdi
	movq	%rdi, (%rsp)
	movl	%r14d, %edi
	xorl	%r8d, %r8d
	movq	%rbx, %r9
	callq	_bus_setup_intr
	movq	%r12, %rdi
	testq	%rax, %rax
	je	LBB0_3
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
LBB0_7:
	movl	%r14d, %edi
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_8:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	xorl	%eax, %eax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_port_spec,4,2                  ## @port_spec
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not allocate resources\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_port_sc,8,3                    ## @port_sc
	.comm	_NPORTS,4,2                     ## @NPORTS
	.comm	_INTR_TYPE_MISC,4,2             ## @INTR_TYPE_MISC
	.comm	_port_intr,4,2                  ## @port_intr
L_.str.1:                               ## @.str.1
	.asciz	"ERROR: Unable to register interrupt handler\n"

	.no_dead_strip	_port_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function port_attach
_port_attach:                           ; @port_attach
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	bl	_device_get_softc
	mov	x20, x0
Lloh0:
	adrp	x8, _port_spec@GOTPAGE
Lloh1:
	ldr	x8, [x8, _port_spec@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	x2, [x0, #8]
	mov	x0, x19
	bl	_bus_alloc_resources
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x21, l_.str@PAGE
Lloh4:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_5
LBB0_2:
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
	bl	_rman_get_bustag
	str	w0, [x20, #20]
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
	bl	_rman_get_bushandle
	mov	x8, #0
	str	w0, [x20, #16]
Lloh5:
	adrp	x9, _port_sc@GOTPAGE
Lloh6:
	ldr	x9, [x9, _port_sc@GOTPAGEOFF]
Lloh7:
	str	x20, [x9]
Lloh8:
	adrp	x22, _NPORTS@GOTPAGE
Lloh9:
	ldr	x22, [x22, _NPORTS@GOTPAGEOFF]
Lloh10:
	adrp	x23, _INTR_TYPE_MISC@GOTPAGE
Lloh11:
	ldr	x23, [x23, _INTR_TYPE_MISC@GOTPAGEOFF]
Lloh12:
	adrp	x24, _port_intr@GOTPAGE
Lloh13:
	ldr	x24, [x24, _port_intr@GOTPAGEOFF]
Lloh14:
	adrp	x21, l_.str.1@PAGE
Lloh15:
	add	x21, x21, l_.str.1@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x9, [x22]
	cmp	x8, x9
	b.ge	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x25, x8, #1
	ldp	x10, x9, [x20]
	ldr	w1, [x9, x25, lsl #2]
	ldr	w2, [x23]
	ldr	w3, [x24]
	add	x6, x10, x8, lsl #2
	mov	x0, x19
	mov	x4, #0
	mov	x5, x20
	bl	_bus_setup_intr
	mov	x8, x25
	cbz	x0, LBB0_3
LBB0_5:
	mov	x0, x19
	mov	x1, x21
	bl	_device_printf
Lloh16:
	adrp	x8, _ENXIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	b	LBB0_7
LBB0_6:
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_port_spec,4,2                  ; @port_spec
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not allocate resources\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_port_sc,8,3                    ; @port_sc
	.comm	_NPORTS,4,2                     ; @NPORTS
	.comm	_INTR_TYPE_MISC,4,2             ; @INTR_TYPE_MISC
	.comm	_port_intr,4,2                  ; @port_intr
l_.str.1:                               ; @.str.1
	.asciz	"ERROR: Unable to register interrupt handler\n"

	.no_dead_strip	_port_attach
.subsections_via_symbols
