	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dmar_parse_one_drhd
_dmar_parse_one_drhd:                   ## @dmar_parse_one_drhd
	.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
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_dmar_find_dmaru
	testq	%rax, %rax
	je	LBB0_1
LBB0_9:
	xorl	%ebx, %ebx
	testq	%r14, %r14
	je	LBB0_11
## %bb.10:
	incl	(%r14)
	jmp	LBB0_11
LBB0_1:
	movq	(%rbx), %rdi
	addq	$40, %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r15
	leaq	40(%rax), %rdi
	movq	%rdi, 32(%rax)
	movq	(%rbx), %rdx
	movq	%rbx, %rsi
	callq	_memcpy
	movl	12(%rbx), %eax
	movl	%eax, 28(%r15)
	movl	8(%rbx), %eax
	movl	%eax, 24(%r15)
	movl	(%rbx), %eax
	andl	$1, %eax
	movl	%eax, (%r15)
	leaq	16(%rbx), %rdi
	movslq	4(%rbx), %rsi
	addq	%rbx, %rsi
	leaq	8(%r15), %r12
	movq	%r12, %rdx
	callq	_dmar_alloc_dev_scope
	movq	%rax, 16(%r15)
	cmpq	$0, 8(%r15)
	je	LBB0_6
## %bb.4:
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	callq	_kfree
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_6:
	movq	%r15, %rdi
	callq	_alloc_iommu
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	movq	%r15, %rdi
	addq	$16, %rdi
	movq	%r12, %rsi
	callq	_dmar_free_dev_scope
	movq	%r15, %rdi
	callq	_kfree
LBB0_11:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r15, %rdi
	callq	_dmar_register_drhd_unit
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_dmar_parse_one_drhd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dmar_parse_one_drhd
_dmar_parse_one_drhd:                   ; @dmar_parse_one_drhd
	.cfi_startproc
; %bb.0:
	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	x19, x1
	mov	x21, x0
	bl	_dmar_find_dmaru
	cbz	x0, LBB0_3
; %bb.1:
	mov	w21, #0
	cbz	x19, LBB0_9
LBB0_2:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	b	LBB0_9
LBB0_3:
	ldr	x8, [x21]
	add	x0, x8, #40
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_kzalloc
	cbz	x0, LBB0_8
; %bb.4:
	mov	x20, x0
	add	x0, x0, #40
	str	x0, [x20, #32]
	ldr	x2, [x21]
	mov	x1, x21
	bl	_memcpy
	ldr	d0, [x21, #8]
	str	d0, [x20, #24]
	ldp	w8, w9, [x21]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	and	w8, w8, #0x1
	str	w8, [x20]
	add	x0, x21, #16
	add	x1, x21, x9
	add	x22, x20, #8
	mov	x2, x22
	bl	_dmar_alloc_dev_scope
	mov	x23, x20
	str	x0, [x23, #16]!
	ldr	x8, [x20, #8]
	cmp	x8, #0
	ccmp	x0, #0, #0, ne
	b.eq	LBB0_7
; %bb.5:
	mov	x0, x20
	bl	_alloc_iommu
	cbz	w0, LBB0_10
; %bb.6:
	mov	x21, x0
	mov	x0, x23
	mov	x1, x22
	bl	_dmar_free_dev_scope
	mov	x0, x20
	bl	_kfree
	b	LBB0_9
LBB0_7:
	mov	x0, x20
	bl	_kfree
LBB0_8:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_9:
	mov	x0, x21
	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_10:
	mov	x0, x20
	bl	_dmar_register_drhd_unit
	mov	w21, #0
	cbnz	x19, LBB0_2
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_dmar_parse_one_drhd
.subsections_via_symbols
