	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dsicm_bl_update_status
_dsicm_bl_update_status:                ## @dsicm_bl_update_status
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	addq	$24, %rdi
	callq	_dev_get_drvdata
	movq	%rax, %r13
	movq	(%rbx), %rax
	movq	_FB_BLANK_UNBLANK@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	movl	$0, %r12d
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movl	$0, %r12d
	cmpq	%rax, 8(%rbx)
	jne	LBB0_3
## %bb.2:
	movl	16(%rbx), %r12d
LBB0_3:
	movq	24(%r13), %r15
	movq	16(%r13), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	callq	_dev_dbg
	movq	%r13, %rdi
	callq	_mutex_lock
	cmpq	$0, 8(%r13)
	je	LBB0_7
## %bb.4:
	movq	(%r15), %rax
	movq	%r15, %rdi
	callq	*8(%rax)
	movq	%r13, %rdi
	callq	_dsicm_wake_up
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	_DCS_BRIGHTNESS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%r12d, %edx
	callq	_dsicm_dcs_write_1
	movl	%eax, %r14d
LBB0_6:
	movq	(%r15), %rax
	movq	%r15, %rdi
	callq	*(%rax)
LBB0_7:
	movq	%r13, %rdi
	callq	_mutex_unlock
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FB_BLANK_UNBLANK,8,3           ## @FB_BLANK_UNBLANK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"update brightness to %d\n"

	.comm	_DCS_BRIGHTNESS,4,2             ## @DCS_BRIGHTNESS
	.no_dead_strip	_dsicm_bl_update_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dsicm_bl_update_status
_dsicm_bl_update_status:                ; @dsicm_bl_update_status
	.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
	mov	x20, x0
	add	x0, x0, #24
	bl	_dev_get_drvdata
	mov	x19, x0
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _FB_BLANK_UNBLANK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FB_BLANK_UNBLANK@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	x9, [x20, #8]
	cmp	x9, x8
	b.ne	LBB0_3
; %bb.2:
	ldr	w21, [x20, #16]
	b	LBB0_4
LBB0_3:
	mov	w21, #0
LBB0_4:
	ldp	x0, x20, [x19, #16]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_dbg
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_8
; %bb.5:
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	mov	x0, x20
	blr	x8
	mov	x0, x19
	bl	_dsicm_wake_up
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.6:
Lloh5:
	adrp	x8, _DCS_BRIGHTNESS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DCS_BRIGHTNESS@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_dsicm_dcs_write_1
	mov	x22, x0
LBB0_7:
	ldr	x8, [x20]
	ldr	x8, [x8]
	mov	x0, x20
	blr	x8
	b	LBB0_9
LBB0_8:
	mov	w22, #0
LBB0_9:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x22
	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	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_FB_BLANK_UNBLANK,8,3           ; @FB_BLANK_UNBLANK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"update brightness to %d\n"

	.comm	_DCS_BRIGHTNESS,4,2             ; @DCS_BRIGHTNESS
	.no_dead_strip	_dsicm_bl_update_status
.subsections_via_symbols
