	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxl_h_control_faults           ## -- Begin function cxl_h_control_faults
	.p2align	4, 0x90
_cxl_h_control_faults:                  ## @cxl_h_control_faults
	.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
                                        ## kill: def $ecx killed $ecx def $rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, %r15d
	movl	%esi, %r13d
	movl	%edi, %r12d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_PLPAR_HCALL_BUFSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r14, %rax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	leal	(,%r14,8), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_memset
	movq	_H_CONTROL_CA_FAULTS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_H_CONTROL_CA_FAULTS_RESPOND_PSL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	subq	$8, %rsp
	movq	%rbx, %rsi
	movl	%r12d, %edx
	movl	%r12d, %r14d
	movl	%r13d, %r12d
	movl	%r13d, %r8d
	movl	%r15d, %r13d
	movl	%r15d, %r9d
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	pushq	%r15
	callq	_plpar_hcall
	addq	$16, %rsp
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	movl	%r14d, %edx
	movl	%r12d, %ecx
	movl	%r13d, %r8d
	movl	%r15d, %r9d
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	pushq	(%r15)
	pushq	%rax
	callq	__PRINT_MSG
	addq	$16, %rsp
	movq	(%r15), %r8
	movl	%r14d, %edi
	movl	%r12d, %esi
	movl	%r13d, %edx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	movq	%rbx, %r9
	callq	_trace_cxl_hcall_control_faults
	leaq	-128(%rbx), %rax
	cmpq	$6, %rax
	ja	LBB0_3
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rdx
	addq	%rcx, %rdx
	xorl	%eax, %eax
	jmpq	*%rdx
LBB0_2:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	movq	%rbx, %rdx
	callq	_WARN
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_5:
	xorl	%eax, %eax
	subq	(%rcx), %rax
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_8
## %bb.7:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
LJTI0_0:
	.long	L0_0_set_6
	.long	L0_0_set_2
	.long	L0_0_set_4
	.long	L0_0_set_4
	.long	L0_0_set_2
	.long	L0_0_set_4
	.long	L0_0_set_2
	.end_data_region
                                        ## -- End function
	.comm	_PLPAR_HCALL_BUFSIZE,4,2        ## @PLPAR_HCALL_BUFSIZE
	.comm	_H_CONTROL_CA_FAULTS,4,2        ## @H_CONTROL_CA_FAULTS
	.comm	_H_CONTROL_CA_FAULTS_RESPOND_PSL,4,2 ## @H_CONTROL_CA_FAULTS_RESPOND_PSL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cxl_h_control_faults(%#.16llx, 0x%llx, %#llx, %#llx): %li (%#lx)\n"

	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_EBUSY,8,3                      ## @EBUSY
L_.str.1:                               ## @.str.1
	.asciz	"Unexpected return code: %lx"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxl_h_control_faults           ; -- Begin function cxl_h_control_faults
	.p2align	2
_cxl_h_control_faults:                  ; @cxl_h_control_faults
	.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
	sub	sp, sp, #16
	mov	x19, x3
	mov	x20, x2
	mov	x22, x1
	mov	x23, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _PLPAR_HCALL_BUFSIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PLPAR_HCALL_BUFSIZE@GOTPAGEOFF]
Lloh5:
	ldr	w12, [x8]
	lsl	x8, x12, #3
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x24, x9, x8
	mov	sp, x24
	lsl	w2, w12, #3
	mov	x0, x24
	mov	w1, #0
	bl	_memset
Lloh8:
	adrp	x8, _H_CONTROL_CA_FAULTS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _H_CONTROL_CA_FAULTS@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x8, _H_CONTROL_CA_FAULTS_RESPOND_PSL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _H_CONTROL_CA_FAULTS_RESPOND_PSL@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	mov	x1, x24
	mov	x2, x23
	mov	x4, x22
	mov	x5, x20
	mov	x6, x19
	bl	_plpar_hcall
	mov	x21, x0
	ldr	x7, [x24]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	mov	x3, x22
	mov	x4, x20
	mov	x5, x19
	mov	x6, x0
	bl	__PRINT_MSG
	ldr	x4, [x24]
	mov	x0, x23
	mov	x1, x22
	mov	x2, x20
	mov	x3, x19
	mov	x5, x21
	bl	_trace_cxl_hcall_control_faults
	sub	x8, x21, #128
	cmp	x8, #6
	b.hi	LBB0_3
; %bb.1:
	mov	x0, #0
Lloh16:
	adrp	x9, lJTI0_0@PAGE
Lloh17:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
Lloh18:
	adrp	x8, _EBUSY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	mov	x2, x21
	bl	_WARN
LBB0_4:
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	x8, [x8]
	neg	x0, x8
LBB0_6:
	ldur	x8, [x29, #-56]
Lloh24:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh25:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	sub	sp, x29, #48
	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_8:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
                                        ; -- End function
	.comm	_PLPAR_HCALL_BUFSIZE,4,2        ; @PLPAR_HCALL_BUFSIZE
	.comm	_H_CONTROL_CA_FAULTS,4,2        ; @H_CONTROL_CA_FAULTS
	.comm	_H_CONTROL_CA_FAULTS_RESPOND_PSL,4,2 ; @H_CONTROL_CA_FAULTS_RESPOND_PSL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cxl_h_control_faults(%#.16llx, 0x%llx, %#llx, %#llx): %li (%#lx)\n"

	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_EBUSY,8,3                      ; @EBUSY
l_.str.1:                               ; @.str.1
	.asciz	"Unexpected return code: %lx"

.subsections_via_symbols
