	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function madt_gicv2m_handler
_madt_gicv2m_handler:                   ## @madt_gicv2m_handler
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rcx
	movq	_ACPI_MADT_TYPE_GENERIC_MSI_FRAME@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jne	LBB0_2
## %bb.1:
	movq	%rdi, %rbx
	movq	(%rsi), %r14
	movl	20(%rdi), %edx
	movl	16(%rdi), %r8d
	movl	8(%rdi), %eax
	movl	12(%rdi), %r9d
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_device_printf
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$-1, %edx
	callq	_device_add_child
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r14
	movq	_M_DEVBUF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_M_WAITOK@GOTPCREL(%rip), %rax
	movq	_M_ZERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	$4, %edi
	callq	_malloc
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_resource_list_init
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rcx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	leaq	(%rcx,%r9), %r8
	decq	%r8
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_resource_list_add
	movq	%r14, %rdi
	movq	%r15, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_device_set_ivars               ## TAILCALL
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ACPI_MADT_TYPE_GENERIC_MSI_FRAME,8,3 ## @ACPI_MADT_TYPE_GENERIC_MSI_FRAME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"frame: %x %lx %x %u %u\n"

	.comm	_M_DEVBUF,4,2                   ## @M_DEVBUF
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_M_ZERO,4,2                     ## @M_ZERO
	.comm	_SYS_RES_MEMORY,4,2             ## @SYS_RES_MEMORY
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.no_dead_strip	_madt_gicv2m_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function madt_gicv2m_handler
_madt_gicv2m_handler:                   ; @madt_gicv2m_handler
	.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
	ldr	x3, [x0]
Lloh0:
	adrp	x8, _ACPI_MADT_TYPE_GENERIC_MSI_FRAME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ACPI_MADT_TYPE_GENERIC_MSI_FRAME@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x3, x8
	b.ne	LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	x20, [x1]
	ldp	w4, w2, [x0, #16]
	ldp	w6, w5, [x0, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_device_printf
	mov	x0, x20
	mov	x1, #0
	mov	w2, #-1
	bl	_device_add_child
	cbz	x0, LBB0_3
; %bb.2:
	mov	x20, x0
Lloh5:
	adrp	x8, _M_DEVBUF@GOTPAGE
Lloh6:
	ldr	x8, [x8, _M_DEVBUF@GOTPAGEOFF]
Lloh7:
	adrp	x9, _M_WAITOK@GOTPAGE
Lloh8:
	ldr	x9, [x9, _M_WAITOK@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	ldr	w8, [x9]
Lloh11:
	adrp	x9, _M_ZERO@GOTPAGE
Lloh12:
	ldr	x9, [x9, _M_ZERO@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	w0, #4
	bl	_malloc
	mov	x21, x0
	bl	_resource_list_init
Lloh14:
	adrp	x8, _SYS_RES_MEMORY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SYS_RES_MEMORY@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	ldr	x3, [x19]
Lloh17:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh19:
	ldr	x5, [x8]
	add	x8, x3, x5
	sub	x4, x8, #1
	mov	x0, x21
	mov	w2, #0
	bl	_resource_list_add
	mov	x0, x20
	mov	x1, x21
	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	_device_set_ivars
LBB0_3:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ACPI_MADT_TYPE_GENERIC_MSI_FRAME,8,3 ; @ACPI_MADT_TYPE_GENERIC_MSI_FRAME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"frame: %x %lx %x %u %u\n"

	.comm	_M_DEVBUF,4,2                   ; @M_DEVBUF
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_M_ZERO,4,2                     ; @M_ZERO
	.comm	_SYS_RES_MEMORY,4,2             ; @SYS_RES_MEMORY
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.no_dead_strip	_madt_gicv2m_handler
.subsections_via_symbols
