	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_atif_handler
_radeon_atif_handler:                   ## @radeon_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
	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
	movq	_NOTIFY_DONE@GOTPCREL(%rip), %r15
	testq	%rax, %rax
	je	LBB0_1
LBB0_11:
	movl	(%r15), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	cmpl	$0, 48(%r14)
	je	LBB0_11
## %bb.2:
	movq	(%rbx), %rax
	cmpq	40(%r14), %rax
	jne	LBB0_11
## %bb.3:
	movq	24(%r14), %rdi
	callq	_ACPI_HANDLE
	leaq	-32(%rbp), %rsi
	movl	%eax, %edi
	callq	_radeon_atif_get_sbios_requests
	testl	%eax, %eax
	jle	LBB0_11
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_DRIVER
	movl	-32(%rbp), %eax
	movq	_ATIF_PANEL_BRIGHTNESS_CHANGE_REQUEST@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.5:
	movq	32(%r14), %rbx
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.6:
	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	_radeon_set_backlight_level
	movl	-32(%rbp), %eax
LBB0_7:
	movq	_ATIF_DGPU_DISPLAY_EVENT@GOTPCREL(%rip), %rcx
	movq	_NOTIFY_BAD@GOTPCREL(%rip), %r15
	testl	%eax, (%rcx)
	je	LBB0_11
## %bb.8:
	movq	_RADEON_IS_PX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_11
## %bb.9:
	xorl	%eax, %eax
	callq	_radeon_atpx_dgpu_req_power_for_displays
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	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_11
	.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
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	_RADEON_IS_PX,4,2               ## @RADEON_IS_PX
	.comm	_NOTIFY_BAD,4,2                 ## @NOTIFY_BAD
	.comm	_BACKLIGHT_UPDATE_HOTKEY,4,2    ## @BACKLIGHT_UPDATE_HOTKEY
	.no_dead_strip	_radeon_atif_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_atif_handler
_radeon_atif_handler:                   ; @radeon_atif_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	w1, [x1, #8]
	ldr	x8, [x20]
	str	x8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
	ldr	w0, [x20, #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_3
LBB0_1:
Lloh5:
	adrp	x8, _NOTIFY_DONE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NOTIFY_DONE@GOTPAGEOFF]
LBB0_2:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_3:
	ldr	w8, [x19, #48]
	cbz	w8, LBB0_1
; %bb.4:
	ldr	x8, [x20]
	ldr	x9, [x19, #40]
	cmp	x8, x9
	b.ne	LBB0_1
; %bb.5:
	ldr	x0, [x19, #24]
	bl	_ACPI_HANDLE
	add	x1, sp, #8
	bl	_radeon_atif_get_sbios_requests
	cmp	w0, #1
	b.lt	LBB0_1
; %bb.6:
	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_9
; %bb.7:
	ldr	x20, [x19, #32]
	cbz	x20, LBB0_9
; %bb.8:
	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	_radeon_set_backlight_level
	ldr	w8, [sp, #8]
LBB0_9:
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_13
; %bb.10:
	ldr	w8, [x19]
Lloh17:
	adrp	x9, _RADEON_IS_PX@GOTPAGE
Lloh18:
	ldr	x9, [x9, _RADEON_IS_PX@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.11:
	bl	_radeon_atpx_dgpu_req_power_for_displays
	cbz	x0, LBB0_13
; %bb.12:
	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
LBB0_13:
Lloh20:
	adrp	x8, _NOTIFY_BAD@GOTPAGE
Lloh21:
	ldr	x8, [x8, _NOTIFY_BAD@GOTPAGEOFF]
	b	LBB0_2
	.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 AdrpLdrGot	Lloh20, Lloh21
	.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
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	_RADEON_IS_PX,4,2               ; @RADEON_IS_PX
	.comm	_NOTIFY_BAD,4,2                 ; @NOTIFY_BAD
	.comm	_BACKLIGHT_UPDATE_HOTKEY,4,2    ; @BACKLIGHT_UPDATE_HOTKEY
	.no_dead_strip	_radeon_atif_handler
.subsections_via_symbols
