	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_domain_for_dev
_set_domain_for_dev:                    ## @set_domain_for_dev
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	leaq	-48(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	callq	_device_to_iommu
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movl	-48(%rbp), %ebx
	movl	-44(%rbp), %r13d
	movq	%r14, %rdi
	callq	_dev_is_pci
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	shll	$8, %ebx
	orl	%r13d, %ebx
	movq	%r14, %rdi
	callq	_to_pci_dev
	movq	_get_last_alias@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-52(%rbp), %rdx
	movq	%rax, %rdi
	callq	_pci_for_each_dma_alias
	movl	-52(%rbp), %edi
	cmpl	%edi, %ebx
	je	LBB0_6
## %bb.4:
	callq	_PCI_BUS_NUM
	movzbl	-52(%rbp), %edx
	movq	%r15, %rdi
	movl	%eax, %esi
	xorl	%ecx, %ecx
	movq	%r12, %r8
	callq	_dmar_insert_one_dev_info
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	cmpq	%r12, %rax
	jne	LBB0_7
LBB0_6:
	movl	-48(%rbp), %esi
	movl	-44(%rbp), %edx
	movq	%r15, %rdi
	movq	%r14, %rcx
	movq	%r12, %r8
	callq	_dmar_insert_one_dev_info
	cmpq	%r12, %rax
	cmovneq	%rax, %r12
	testq	%rax, %rax
	cmoveq	%rax, %r12
	movq	%r12, %rax
	jmp	LBB0_7
LBB0_1:
	xorl	%eax, %eax
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_get_last_alias,4,2             ## @get_last_alias
	.no_dead_strip	_set_domain_for_dev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_domain_for_dev
_set_domain_for_dev:                    ; @set_domain_for_dev
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x1
	mov	x20, x0
	add	x1, sp, #8
	add	x2, sp, #4
	bl	_device_to_iommu
	cbz	x0, LBB0_6
; %bb.1:
	mov	x21, x0
	ldp	w23, w22, [sp, #4]
	mov	x0, x20
	bl	_dev_is_pci
	cbz	x0, LBB0_5
; %bb.2:
	orr	w22, w23, w22, lsl #8
	mov	x0, x20
	bl	_to_pci_dev
Lloh0:
	adrp	x8, _get_last_alias@GOTPAGE
Lloh1:
	ldr	x8, [x8, _get_last_alias@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_pci_for_each_dma_alias
	ldr	w0, [sp, #12]
	cmp	w22, w0
	b.eq	LBB0_5
; %bb.3:
	bl	_PCI_BUS_NUM
	mov	x1, x0
	ldrb	w2, [sp, #12]
	mov	x0, x21
	mov	x3, #0
	mov	x4, x19
	bl	_dmar_insert_one_dev_info
	cbz	x0, LBB0_6
; %bb.4:
	cmp	x0, x19
	b.ne	LBB0_6
LBB0_5:
	ldp	w2, w1, [sp, #4]
	mov	x0, x21
	mov	x3, x20
	mov	x4, x19
	bl	_dmar_insert_one_dev_info
	cmp	x0, x19
	ccmp	x0, #0, #4, eq
	csel	x0, x19, x0, ne
LBB0_6:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_get_last_alias,4,2             ; @get_last_alias
	.no_dead_strip	_set_domain_for_dev
.subsections_via_symbols
