	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_acpi_pcie_performance_request ## -- Begin function amdgpu_acpi_pcie_performance_request
	.p2align	4, 0x90
_amdgpu_acpi_pcie_performance_request:  ## @amdgpu_acpi_pcie_performance_request
	.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
	subq	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	callq	_amdgpu_acpi_pcie_notify_device_ready
	testq	%rax, %rax
	je	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_22:
	movl	%ebx, %eax
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	(%rbx), %rdi
	addq	$16, %rdi
	callq	_ACPI_HANDLE
	testl	%eax, %eax
	je	LBB0_1
## %bb.4:
	cmpl	$0, 8(%rbx)
	je	LBB0_1
## %bb.5:
	movl	%eax, %r14d
	movl	$24, -64(%rbp)
	movq	(%rbx), %rax
	movq	8(%rax), %rcx
	movl	(%rcx), %ecx
	shll	$8, %ecx
	orl	(%rax), %ecx
	movl	%ecx, -60(%rbp)
	movq	_ATCS_VALID_FLAGS_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movq	_ATCS_WAIT_FOR_COMPLETION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	testl	%r12d, %r12d
	je	LBB0_7
## %bb.6:
	movq	_ATCS_ADVERTISE_CAPS@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, -48(%rbp)
LBB0_7:
	movq	_ATCS_PCIE_LINK_SPEED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movl	%r15d, -56(%rbp)
	movl	$24, -80(%rbp)
	leaq	-64(%rbp), %rax
	movq	%rax, -72(%rbp)
	movq	_ATCS_FUNCTION_PCIE_PERFORMANCE_REQUEST@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-80(%rbp), %rdx
	movl	%r14d, %edi
	callq	_amdgpu_atcs_call
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rax, %r15
	leaq	-40(%rbp), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	(%r15), %rax
	movq	(%rax), %rsi
	cmpq	$2, %rsi
	ja	LBB0_11
LBB0_10:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_INFO
	movq	%r15, %rdi
	callq	_kfree
	jmp	LBB0_1
LBB0_11:
	movl	$4, %edi
	callq	_min
	movq	(%r15), %rsi
	leaq	-40(%rbp), %rdi
	movq	%rax, %rdx
	callq	_memcpy
	movq	%r15, %rdi
	callq	_kfree
	movl	-40(%rbp), %eax
	cmpl	$129, %eax
	je	LBB0_13
## %bb.12:
	cmpl	$130, %eax
	je	LBB0_22
	jmp	LBB0_1
LBB0_13:
	movl	$10, %edi
	callq	_udelay
	movl	(%r12), %esi
	leaq	-80(%rbp), %rdx
	movl	%r14d, %edi
	callq	_amdgpu_atcs_call
	testq	%rax, %rax
	je	LBB0_8
## %bb.14:
	movq	%rax, %r15
	leaq	-40(%rbp), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	(%r15), %rax
	movq	(%rax), %rsi
	cmpq	$3, %rsi
	jb	LBB0_10
## %bb.15:
	movl	$4, %edi
	callq	_min
	movq	(%r15), %rsi
	leaq	-40(%rbp), %rdi
	movq	%rax, %rdx
	callq	_memcpy
	movq	%r15, %rdi
	callq	_kfree
	movl	-40(%rbp), %eax
	cmpl	$130, %eax
	je	LBB0_22
## %bb.16:
	cmpl	$129, %eax
	jne	LBB0_1
## %bb.17:
	movl	$10, %edi
	callq	_udelay
	movl	(%r12), %esi
	leaq	-80(%rbp), %rdx
	movl	%r14d, %edi
	callq	_amdgpu_atcs_call
	testq	%rax, %rax
	je	LBB0_8
## %bb.18:
	movq	%rax, %r15
	leaq	-40(%rbp), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	(%r15), %rax
	movq	(%rax), %rsi
	cmpq	$3, %rsi
	jb	LBB0_10
## %bb.19:
	movl	$4, %edi
	callq	_min
	movq	(%r15), %rsi
	leaq	-40(%rbp), %rdi
	movq	%rax, %rdx
	callq	_memcpy
	movq	%r15, %rdi
	callq	_kfree
	movl	-40(%rbp), %eax
	cmpl	$130, %eax
	je	LBB0_22
## %bb.20:
	cmpl	$129, %eax
	jne	LBB0_1
## %bb.21:
	movl	$10, %edi
	callq	_udelay
	jmp	LBB0_22
LBB0_8:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ATCS_VALID_FLAGS_MASK,4,2      ## @ATCS_VALID_FLAGS_MASK
	.comm	_ATCS_WAIT_FOR_COMPLETION,4,2   ## @ATCS_WAIT_FOR_COMPLETION
	.comm	_ATCS_ADVERTISE_CAPS,4,2        ## @ATCS_ADVERTISE_CAPS
	.comm	_ATCS_PCIE_LINK_SPEED,4,2       ## @ATCS_PCIE_LINK_SPEED
	.comm	_ATCS_FUNCTION_PCIE_PERFORMANCE_REQUEST,4,2 ## @ATCS_FUNCTION_PCIE_PERFORMANCE_REQUEST
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ATCS buffer is too small: %zu\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_acpi_pcie_performance_request ; -- Begin function amdgpu_acpi_pcie_performance_request
	.p2align	2
_amdgpu_acpi_pcie_performance_request:  ; @amdgpu_acpi_pcie_performance_request
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x21, x2
	mov	x20, x1
	mov	x22, x0
	bl	_amdgpu_acpi_pcie_notify_device_ready
	cbz	x0, LBB0_4
LBB0_1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
	add	sp, sp, #96
	ret
LBB0_4:
	ldr	x8, [x22]
	add	x0, x8, #16
	bl	_ACPI_HANDLE
	cbz	w0, LBB0_1
; %bb.5:
	ldr	w8, [x22, #8]
	cbz	w8, LBB0_1
; %bb.6:
	mov	x19, x0
	mov	w8, #24
	str	w8, [sp, #24]
	ldr	x9, [x22]
	ldr	w10, [x9]
	ldr	x9, [x9, #8]
	ldr	w9, [x9]
	orr	w10, w10, w9, lsl #8
Lloh2:
	adrp	x9, _ATCS_VALID_FLAGS_MASK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ATCS_VALID_FLAGS_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	str	w9, [sp, #44]
Lloh5:
	adrp	x9, _ATCS_WAIT_FOR_COMPLETION@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ATCS_WAIT_FOR_COMPLETION@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	str	w10, [sp, #28]
	str	w9, [sp, #40]
	cbz	w21, LBB0_8
; %bb.7:
Lloh8:
	adrp	x10, _ATCS_ADVERTISE_CAPS@GOTPAGE
Lloh9:
	ldr	x10, [x10, _ATCS_ADVERTISE_CAPS@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	orr	w9, w10, w9
	str	w9, [sp, #40]
LBB0_8:
Lloh11:
	adrp	x9, _ATCS_PCIE_LINK_SPEED@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ATCS_PCIE_LINK_SPEED@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	stp	w20, w9, [sp, #32]
	str	w8, [sp]
	add	x8, sp, #24
	str	x8, [sp, #8]
Lloh14:
	adrp	x21, _ATCS_FUNCTION_PCIE_PERFORMANCE_REQUEST@GOTPAGE
Lloh15:
	ldr	x21, [x21, _ATCS_FUNCTION_PCIE_PERFORMANCE_REQUEST@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x2, sp
	mov	x0, x19
	bl	_amdgpu_atcs_call
	cbz	x0, LBB0_23
; %bb.9:
	mov	x20, x0
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	x8, [x20]
	ldr	x1, [x8]
	cmp	x1, #2
	b.hi	LBB0_11
LBB0_10:
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_INFO
	mov	x0, x20
	bl	_kfree
	b	LBB0_1
LBB0_11:
	mov	w0, #4
	bl	_min
	mov	x2, x0
	ldr	x1, [x20]
	add	x0, sp, #16
	bl	_memcpy
	mov	x0, x20
	bl	_kfree
	ldr	w8, [sp, #16]
	cmp	w8, #129
	b.eq	LBB0_14
; %bb.12:
	cmp	w8, #130
	b.ne	LBB0_1
LBB0_13:
	mov	w0, #0
	b	LBB0_3
LBB0_14:
	mov	w0, #10
	bl	_udelay
	ldr	w1, [x21]
	mov	x2, sp
	mov	x0, x19
	bl	_amdgpu_atcs_call
	cbz	x0, LBB0_23
; %bb.15:
	mov	x20, x0
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	x8, [x20]
	ldr	x1, [x8]
	cmp	x1, #3
	b.lo	LBB0_10
; %bb.16:
	mov	w0, #4
	bl	_min
	mov	x2, x0
	ldr	x1, [x20]
	add	x0, sp, #16
	bl	_memcpy
	mov	x0, x20
	bl	_kfree
	ldr	w8, [sp, #16]
	cmp	w8, #130
	b.eq	LBB0_13
; %bb.17:
	cmp	w8, #129
	b.ne	LBB0_1
; %bb.18:
	mov	w0, #10
	bl	_udelay
	ldr	w1, [x21]
	mov	x2, sp
	mov	x0, x19
	bl	_amdgpu_atcs_call
	cbz	x0, LBB0_23
; %bb.19:
	mov	x20, x0
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	x8, [x20]
	ldr	x1, [x8]
	cmp	x1, #3
	b.lo	LBB0_10
; %bb.20:
	mov	w0, #4
	bl	_min
	mov	x2, x0
	ldr	x1, [x20]
	add	x0, sp, #16
	bl	_memcpy
	mov	x0, x20
	bl	_kfree
	ldr	w8, [sp, #16]
	cmp	w8, #130
	b.eq	LBB0_13
; %bb.21:
	cmp	w8, #129
	b.ne	LBB0_1
; %bb.22:
	mov	w0, #10
	bl	_udelay
	b	LBB0_13
LBB0_23:
Lloh18:
	adrp	x8, _EIO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ATCS_VALID_FLAGS_MASK,4,2      ; @ATCS_VALID_FLAGS_MASK
	.comm	_ATCS_WAIT_FOR_COMPLETION,4,2   ; @ATCS_WAIT_FOR_COMPLETION
	.comm	_ATCS_ADVERTISE_CAPS,4,2        ; @ATCS_ADVERTISE_CAPS
	.comm	_ATCS_PCIE_LINK_SPEED,4,2       ; @ATCS_PCIE_LINK_SPEED
	.comm	_ATCS_FUNCTION_PCIE_PERFORMANCE_REQUEST,4,2 ; @ATCS_FUNCTION_PCIE_PERFORMANCE_REQUEST
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ATCS buffer is too small: %zu\n"

.subsections_via_symbols
