	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dmar_find                      ## -- Begin function dmar_find
	.p2align	4, 0x90
_dmar_find:                             ## @dmar_find
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_device_get_parent
	movl	%eax, %edi
	callq	_device_get_devclass
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_devclass_find
	xorl	%r14d, %r14d
	cmpq	%rax, %rbx
	jne	LBB0_1
## %bb.2:
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	movq	%r15, %rdi
	callq	_pci_get_domain
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	callq	_dmar_dev_depth
	movl	%eax, %ebx
	movq	%rsp, %r12
	movl	%eax, %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	leaq	-60(%rbp), %rsi
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movq	%r13, %rdx
	movl	%ebx, %ecx
	callq	_dmar_dev_path
	leaq	L_.str.1(%rip), %rax
	movq	%rax, -80(%rbp)
	movq	_dmar_devcnt@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_3
## %bb.4:
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movq	_dmar_devs@GOTPCREL(%rip), %r12
                                        ## implicit-def: $r15
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%r14
	movslq	%ecx, %rax
	cmpq	%rax, %r14
	jge	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movq	(%rax,%r14,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	callq	_device_get_softc
	movq	%rax, %r15
	movl	-60(%rbp), %edx
	movq	%rax, %rdi
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	movq	%r13, %rcx
	movl	%ebx, %r8d
	leaq	-80(%rbp), %r9
	callq	_dmar_match_by_path
	movq	_dmar_devcnt@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testq	%rax, %rax
	je	LBB0_7
LBB0_8:
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	cmpl	%ecx, %r14d
	jne	LBB0_11
LBB0_10:
	xorl	%r15d, %r15d
	jmp	LBB0_13
LBB0_1:
	xorl	%r15d, %r15d
	jmp	LBB0_14
LBB0_3:
                                        ## implicit-def: $r15
	cmpl	%ecx, %r14d
	je	LBB0_10
LBB0_11:
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_13
## %bb.12:
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_pci_get_bus
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	callq	_pci_get_slot
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	callq	_pci_get_function
	movl	(%r15), %r10d
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	-72(%rbp), %r8d                 ## 4-byte Reload
	movl	%eax, %r9d
	pushq	-80(%rbp)
	pushq	%r10
	callq	_device_printf
	addq	$16, %rsp
	leaq	L_.str.3(%rip), %rdi
	callq	_printf
	movl	-60(%rbp), %edi
	movl	%ebx, %esi
	movq	%r13, %rdx
	callq	_dmar_print_path
	movl	$10, %edi
	callq	_putchar
LBB0_13:
	movq	%r12, %rsp
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	movq	%r15, %rax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pci"

L_.str.1:                               ## @.str.1
	.space	1

	.comm	_dmar_devcnt,4,2                ## @dmar_devcnt
	.comm	_dmar_devs,8,3                  ## @dmar_devs
L_.str.2:                               ## @.str.2
	.asciz	"pci%d:%d:%d:%d matched dmar%d by %s"

L_.str.3:                               ## @.str.3
	.asciz	" scope path "

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dmar_find                      ; -- Begin function dmar_find
	.p2align	2
_dmar_find:                             ; @dmar_find
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #32
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	bl	_device_get_parent
	bl	_device_get_devclass
	mov	x20, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_devclass_find
	cmp	x20, x0
	b.ne	LBB0_8
; %bb.1:
	mov	x0, x19
	bl	_pci_get_domain
	mov	x22, x0
	mov	x0, x19
	bl	_dmar_dev_depth
	mov	x20, x0
	mov	x26, sp
	mov	w8, w0
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x23, x9, x8
	mov	sp, x23
	sub	x1, x29, #100
	mov	x0, x19
	mov	x2, x23
	mov	x3, x20
	bl	_dmar_dev_path
Lloh7:
	adrp	x8, l_.str.1@PAGE
Lloh8:
	add	x8, x8, l_.str.1@PAGEOFF
	stur	x8, [x29, #-96]
Lloh9:
	adrp	x27, _dmar_devcnt@GOTPAGE
Lloh10:
	ldr	x27, [x27, _dmar_devcnt@GOTPAGEOFF]
	ldr	w8, [x27]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.2:
	mov	x25, #0
Lloh11:
	adrp	x28, _dmar_devs@GOTPAGE
Lloh12:
	ldr	x28, [x28, _dmar_devs@GOTPAGEOFF]
                                        ; implicit-def: $x24
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x25, x25, #1
	cmp	x25, w8, sxtw
	b.ge	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x28]
	ldr	x0, [x9, x25, lsl #3]
	cbz	x0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_device_get_softc
	mov	x24, x0
	ldur	w2, [x29, #-100]
	sub	x5, x29, #96
	mov	x1, x22
	mov	x3, x23
	mov	x4, x20
	bl	_dmar_match_by_path
	ldr	w8, [x27]
	cbz	x0, LBB0_3
LBB0_6:
	cmp	w25, w8
	b.ne	LBB0_10
LBB0_7:
	mov	x24, #0
	b	LBB0_12
LBB0_8:
	mov	x24, #0
	b	LBB0_13
LBB0_9:
	mov	w25, #0
                                        ; implicit-def: $x24
	cmp	w25, w8
	b.eq	LBB0_7
LBB0_10:
	cbz	w21, LBB0_12
; %bb.11:
	mov	x0, x19
	bl	_pci_get_bus
	mov	x21, x0
	mov	x0, x19
	bl	_pci_get_slot
	mov	x25, x0
	mov	x0, x19
	bl	_pci_get_function
	mov	x5, x0
	ldr	w6, [x24]
	ldur	x7, [x29, #-96]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	mov	x3, x21
	mov	x4, x25
	bl	_device_printf
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_printf
	ldur	w0, [x29, #-100]
	mov	x1, x20
	mov	x2, x23
	bl	_dmar_print_path
	mov	w0, #10
	bl	_putchar
LBB0_12:
	mov	sp, x26
LBB0_13:
	ldur	x8, [x29, #-88]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	mov	x0, x24
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pci"

l_.str.1:                               ; @.str.1
	.space	1

	.comm	_dmar_devcnt,4,2                ; @dmar_devcnt
	.comm	_dmar_devs,8,3                  ; @dmar_devs
l_.str.2:                               ; @.str.2
	.asciz	"pci%d:%d:%d:%d matched dmar%d by %s"

l_.str.3:                               ; @.str.3
	.asciz	" scope path "

.subsections_via_symbols
