	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ata_kauai_probe
_ata_kauai_probe:                       ## @ata_kauai_probe
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	callq	_pci_get_devid
	movq	%rax, %r12
	movq	_kauai_pci_devlist@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	8(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_14
## %bb.1:
	xorl	%ebx, %ebx
	xorl	%ecx, %ecx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	24(%rax,%rbx), %rsi
	addq	$16, %rbx
	testq	%rsi, %rsi
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	(%rax,%rbx), %r12
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %edi
	callq	_device_set_desc
	movq	(%r15), %rax
	movl	$1, %ecx
	jmp	LBB0_4
LBB0_5:
	testl	%ecx, %ecx
	je	LBB0_14
## %bb.6:
	movl	%r14d, %edi
	callq	_ofw_bus_get_node
	movl	%r14d, %edi
	callq	_device_get_softc
	movq	%rax, %r15
	movq	%rax, %rdi
	movl	$4, %esi
	callq	_bzero
	movl	%r14d, %edi
	callq	_ofw_bus_get_compat
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_8
## %bb.10:
	cmpl	$0, (%r15)
	jne	LBB0_13
## %bb.11:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_12
	jmp	LBB0_13
LBB0_14:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	cmpl	$0, (%r15)
	jne	LBB0_13
LBB0_12:
	movq	_SYS_RES_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	xorl	%edx, %edx
	movl	$39, %ecx
	movl	$1, %r8d
	callq	_bus_set_resource
	jmp	LBB0_13
LBB0_8:
	movl	$1, (%r15)
LBB0_13:
	movl	%r14d, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ata_probe                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_kauai_pci_devlist,8,3          ## @kauai_pci_devlist
	.comm	_ENXIO,4,2                      ## @ENXIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"shasta-ata"

L_.str.1:                               ## @.str.1
	.asciz	"K2-UATA"

	.comm	_SYS_RES_IRQ,4,2                ## @SYS_RES_IRQ
	.no_dead_strip	_ata_kauai_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ata_kauai_probe
_ata_kauai_probe:                       ; @ata_kauai_probe
	.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
	bl	_pci_get_devid
Lloh0:
	adrp	x21, _kauai_pci_devlist@GOTPAGE
Lloh1:
	ldr	x21, [x21, _kauai_pci_devlist@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x1, [x8, #8]
	cbz	x1, LBB0_10
; %bb.1:
	mov	x20, x0
	mov	x22, #0
	mov	w9, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x10, x8, x22
	ldr	x1, [x10, #24]
	add	x22, x22, #16
	cbz	x1, LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x8, x22]
	cmp	x20, x10
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_device_set_desc
	ldr	x8, [x21]
	mov	w9, #1
	b	LBB0_2
LBB0_5:
	cbz	w9, LBB0_10
; %bb.6:
	mov	x0, x19
	bl	_ofw_bus_get_node
	mov	x0, x19
	bl	_device_get_softc
	mov	x20, x0
	mov	w1, #4
	bl	_bzero
	mov	x0, x19
	bl	_ofw_bus_get_compat
	cbz	x0, LBB0_11
; %bb.7:
	mov	x21, x0
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_13
; %bb.8:
	ldr	w8, [x20]
	cbnz	w8, LBB0_14
; %bb.9:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_strcmp
	cbnz	x0, LBB0_12
	b	LBB0_14
LBB0_10:
Lloh6:
	adrp	x8, _ENXIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	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
	ret
LBB0_11:
	ldr	w8, [x20]
	cbnz	w8, LBB0_14
LBB0_12:
Lloh9:
	adrp	x8, _SYS_RES_IRQ@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SYS_RES_IRQ@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #39
	mov	w4, #1
	bl	_bus_set_resource
	b	LBB0_14
LBB0_13:
	mov	w8, #1
	str	w8, [x20]
LBB0_14:
	mov	x0, x19
	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	_ata_probe
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_kauai_pci_devlist,8,3          ; @kauai_pci_devlist
	.comm	_ENXIO,4,2                      ; @ENXIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"shasta-ata"

l_.str.1:                               ; @.str.1
	.asciz	"K2-UATA"

	.comm	_SYS_RES_IRQ,4,2                ; @SYS_RES_IRQ
	.no_dead_strip	_ata_kauai_probe
.subsections_via_symbols
