	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdgpu_atif_handler
_amdgpu_atif_handler:                   ## @amdgpu_atif_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	%rsi, %rbx
	movq	%rdi, %r14
	movq	16(%rdi), %r15
	movl	8(%rsi), %esi
	movq	(%rbx), %rdx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_DRIVER
	movl	8(%rbx), %edi
	movq	_ACPI_VIDEO_CLASS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_2
LBB0_1:
	movq	_NOTIFY_DONE@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_2:
	testq	%r15, %r15
	je	LBB0_5
## %bb.3:
	cmpl	$0, 24(%r15)
	je	LBB0_5
## %bb.4:
	movq	(%rbx), %rax
	cmpq	16(%r15), %rax
	jne	LBB0_5
## %bb.6:
	cmpq	$0, 8(%r15)
	je	LBB0_15
## %bb.7:
	leaq	-32(%rbp), %rsi
	movq	%r15, %rdi
	callq	_amdgpu_atif_get_sbios_requests
	testl	%eax, %eax
	jle	LBB0_15
## %bb.8:
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_DRIVER
	movq	_ATIF_PANEL_BRIGHTNESS_CHANGE_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -32(%rbp)
	je	LBB0_12
## %bb.9:
	movq	%r14, %rdi
	callq	_amdgpu_device_has_dc_support
	testl	%eax, %eax
	jne	LBB0_12
## %bb.10:
	movq	(%r15), %rbx
	testq	%rbx, %rbx
	je	LBB0_12
## %bb.11:
	movl	-28(%rbp), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_DRIVER
	movl	-28(%rbp), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_amdgpu_display_backlight_set_level
LBB0_12:
	movq	_ATIF_DGPU_DISPLAY_EVENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -32(%rbp)
	je	LBB0_15
## %bb.13:
	movq	_AMD_IS_PX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_15
## %bb.14:
	movq	8(%r14), %rax
	movl	(%rax), %edi
	callq	_pm_runtime_get_sync
	movq	8(%r14), %rdi
	callq	_drm_helper_hpd_irq_event
	movq	8(%r14), %rax
	movl	(%rax), %edi
	callq	_pm_runtime_mark_last_busy
	movq	8(%r14), %rax
	movl	(%rax), %edi
	callq	_pm_runtime_put_autosuspend
	jmp	LBB0_15
LBB0_5:
	movq	(%rbx), %rax
	movq	_ACPI_VIDEO_NOTIFY_PROBE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
LBB0_15:
	movq	_NOTIFY_BAD@GOTPCREL(%rip), %rax
LBB0_16:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"event, device_class = %s, type = %#x\n"

	.comm	_ACPI_VIDEO_CLASS,4,2           ## @ACPI_VIDEO_CLASS
	.comm	_NOTIFY_DONE,4,2                ## @NOTIFY_DONE
	.comm	_ACPI_VIDEO_NOTIFY_PROBE,8,3    ## @ACPI_VIDEO_NOTIFY_PROBE
	.comm	_NOTIFY_BAD,4,2                 ## @NOTIFY_BAD
L_.str.1:                               ## @.str.1
	.asciz	"ATIF: %d pending SBIOS requests\n"

	.comm	_ATIF_PANEL_BRIGHTNESS_CHANGE_REQUEST,4,2 ## @ATIF_PANEL_BRIGHTNESS_CHANGE_REQUEST
L_.str.2:                               ## @.str.2
	.asciz	"Changing brightness to %d\n"

	.comm	_ATIF_DGPU_DISPLAY_EVENT,4,2    ## @ATIF_DGPU_DISPLAY_EVENT
	.comm	_AMD_IS_PX,4,2                  ## @AMD_IS_PX
	.comm	_BACKLIGHT_UPDATE_HOTKEY,4,2    ## @BACKLIGHT_UPDATE_HOTKEY
	.no_dead_strip	_amdgpu_atif_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amdgpu_atif_handler
_amdgpu_atif_handler:                   ; @amdgpu_atif_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x1
	mov	x19, x0
	ldr	x20, [x0, #16]
	ldr	w1, [x1, #8]
	ldr	x8, [x21]
	str	x8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
	ldr	w0, [x21, #8]
Lloh2:
	adrp	x8, _ACPI_VIDEO_CLASS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ACPI_VIDEO_CLASS@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_strcmp
	cbz	x0, LBB0_2
LBB0_1:
Lloh5:
	adrp	x8, _NOTIFY_DONE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NOTIFY_DONE@GOTPAGEOFF]
	b	LBB0_16
LBB0_2:
	cbz	x20, LBB0_14
; %bb.3:
	ldr	w8, [x20, #24]
	cbz	w8, LBB0_14
; %bb.4:
	ldr	x8, [x21]
	ldr	x9, [x20, #16]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.5:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_15
; %bb.6:
	add	x1, sp, #8
	mov	x0, x20
	bl	_amdgpu_atif_get_sbios_requests
	cmp	w0, #1
	b.lt	LBB0_15
; %bb.7:
	mov	x1, x0
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
	ldr	w8, [sp, #8]
Lloh9:
	adrp	x9, _ATIF_PANEL_BRIGHTNESS_CHANGE_REQUEST@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ATIF_PANEL_BRIGHTNESS_CHANGE_REQUEST@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.8:
	mov	x0, x19
	bl	_amdgpu_device_has_dc_support
	cbnz	w0, LBB0_11
; %bb.9:
	ldr	x20, [x20]
	cbz	x20, LBB0_11
; %bb.10:
	ldr	w1, [sp, #12]
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
	ldr	w2, [sp, #12]
	mov	x0, x19
	mov	x1, x20
	bl	_amdgpu_display_backlight_set_level
LBB0_11:
	ldr	w8, [sp, #8]
Lloh14:
	adrp	x9, _ATIF_DGPU_DISPLAY_EVENT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ATIF_DGPU_DISPLAY_EVENT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.12:
	ldr	w8, [x19]
Lloh17:
	adrp	x9, _AMD_IS_PX@GOTPAGE
Lloh18:
	ldr	x9, [x9, _AMD_IS_PX@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.13:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	bl	_pm_runtime_get_sync
	ldr	x0, [x19, #8]
	bl	_drm_helper_hpd_irq_event
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	bl	_pm_runtime_mark_last_busy
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	bl	_pm_runtime_put_autosuspend
	b	LBB0_15
LBB0_14:
	ldr	x8, [x21]
Lloh20:
	adrp	x9, _ACPI_VIDEO_NOTIFY_PROBE@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ACPI_VIDEO_NOTIFY_PROBE@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_1
LBB0_15:
Lloh23:
	adrp	x8, _NOTIFY_BAD@GOTPAGE
Lloh24:
	ldr	x8, [x8, _NOTIFY_BAD@GOTPAGEOFF]
LBB0_16:
	ldr	w0, [x8]
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"event, device_class = %s, type = %#x\n"

	.comm	_ACPI_VIDEO_CLASS,4,2           ; @ACPI_VIDEO_CLASS
	.comm	_NOTIFY_DONE,4,2                ; @NOTIFY_DONE
	.comm	_ACPI_VIDEO_NOTIFY_PROBE,8,3    ; @ACPI_VIDEO_NOTIFY_PROBE
	.comm	_NOTIFY_BAD,4,2                 ; @NOTIFY_BAD
l_.str.1:                               ; @.str.1
	.asciz	"ATIF: %d pending SBIOS requests\n"

	.comm	_ATIF_PANEL_BRIGHTNESS_CHANGE_REQUEST,4,2 ; @ATIF_PANEL_BRIGHTNESS_CHANGE_REQUEST
l_.str.2:                               ; @.str.2
	.asciz	"Changing brightness to %d\n"

	.comm	_ATIF_DGPU_DISPLAY_EVENT,4,2    ; @ATIF_DGPU_DISPLAY_EVENT
	.comm	_AMD_IS_PX,4,2                  ; @AMD_IS_PX
	.comm	_BACKLIGHT_UPDATE_HOTKEY,4,2    ; @BACKLIGHT_UPDATE_HOTKEY
	.no_dead_strip	_amdgpu_atif_handler
.subsections_via_symbols
