	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdfld_dsi_brightness_init      ## -- Begin function mdfld_dsi_brightness_init
	.p2align	4, 0x90
_mdfld_dsi_brightness_init:             ## @mdfld_dsi_brightness_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	callq	_mdfld_dsi_get_pkg_sender
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	(%rax), %r14
	movq	_write_display_brightness@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$216, %edx
	movl	$1, %ecx
	movl	$1, %r8d
	callq	_mdfld_dsi_send_mcs_short
	movq	_write_cabc_min_bright@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$51, %edx
	movl	$1, %ecx
	movl	$1, %r8d
	callq	_mdfld_dsi_send_mcs_short
	movq	_BRIGHT_CNTL_BLOCK_ON@GOTPCREL(%rip), %rax
	movq	_DISPLAY_DIMMING_ON@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_BACKLIGHT_ON@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_DISPLAY_BRIGHTNESS_AUTO@GOTPCREL(%rip), %rax
	movq	_GAMMA_AUTO@GOTPCREL(%rip), %rsi
	movl	(%rax), %edx
	orl	%ecx, %edx
	orl	(%rsi), %edx
	movq	_LABC_control@GOTPCREL(%rip), %rax
	movq	_AMBIENT_LIGHT_SENSE_ON@GOTPCREL(%rip), %rsi
	orl	(%rsi), %edx
	cmpl	$1, (%rax)
	cmovnel	%ecx, %edx
	movl	%edx, (%r14)
	movq	_write_ctrl_display@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %ecx
	movl	$1, %r8d
	callq	_mdfld_dsi_send_mcs_short
	movq	_write_ctrl_cabc@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_UI_IMAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$1, %ecx
	movl	$1, %r8d
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_mdfld_dsi_send_mcs_short       ## TAILCALL
LBB0_1:
	leaq	L_.str(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_DRM_ERROR                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No sender found\n"

	.comm	_write_display_brightness,4,2   ## @write_display_brightness
	.comm	_write_cabc_min_bright,4,2      ## @write_cabc_min_bright
	.comm	_BRIGHT_CNTL_BLOCK_ON,4,2       ## @BRIGHT_CNTL_BLOCK_ON
	.comm	_DISPLAY_DIMMING_ON,4,2         ## @DISPLAY_DIMMING_ON
	.comm	_BACKLIGHT_ON,4,2               ## @BACKLIGHT_ON
	.comm	_LABC_control,4,2               ## @LABC_control
	.comm	_DISPLAY_BRIGHTNESS_AUTO,4,2    ## @DISPLAY_BRIGHTNESS_AUTO
	.comm	_GAMMA_AUTO,4,2                 ## @GAMMA_AUTO
	.comm	_AMBIENT_LIGHT_SENSE_ON,4,2     ## @AMBIENT_LIGHT_SENSE_ON
	.comm	_write_ctrl_display,4,2         ## @write_ctrl_display
	.comm	_write_ctrl_cabc,4,2            ## @write_ctrl_cabc
	.comm	_UI_IMAGE,4,2                   ## @UI_IMAGE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mdfld_dsi_brightness_init      ; -- Begin function mdfld_dsi_brightness_init
	.p2align	2
_mdfld_dsi_brightness_init:             ; @mdfld_dsi_brightness_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	bl	_mdfld_dsi_get_pkg_sender
	cbz	x0, LBB0_2
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0]
	ldr	x20, [x8]
Lloh0:
	adrp	x8, _write_display_brightness@GOTPAGE
Lloh1:
	ldr	x8, [x8, _write_display_brightness@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #216
	mov	w3, #1
	mov	w4, #1
	bl	_mdfld_dsi_send_mcs_short
Lloh3:
	adrp	x8, _write_cabc_min_bright@GOTPAGE
Lloh4:
	ldr	x8, [x8, _write_cabc_min_bright@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #51
	mov	w3, #1
	mov	w4, #1
	bl	_mdfld_dsi_send_mcs_short
Lloh6:
	adrp	x8, _BRIGHT_CNTL_BLOCK_ON@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BRIGHT_CNTL_BLOCK_ON@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _DISPLAY_DIMMING_ON@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DISPLAY_DIMMING_ON@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _BACKLIGHT_ON@GOTPAGE
Lloh13:
	ldr	x10, [x10, _BACKLIGHT_ON@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh14:
	ldr	w9, [x10]
	orr	w8, w8, w9
Lloh15:
	adrp	x9, _LABC_control@GOTPAGE
Lloh16:
	ldr	x9, [x9, _LABC_control@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
Lloh18:
	adrp	x10, _DISPLAY_BRIGHTNESS_AUTO@GOTPAGE
Lloh19:
	ldr	x10, [x10, _DISPLAY_BRIGHTNESS_AUTO@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
Lloh21:
	adrp	x11, _GAMMA_AUTO@GOTPAGE
Lloh22:
	ldr	x11, [x11, _GAMMA_AUTO@GOTPAGEOFF]
Lloh23:
	ldr	w11, [x11]
	orr	w10, w8, w10
	orr	w10, w10, w11
Lloh24:
	adrp	x11, _AMBIENT_LIGHT_SENSE_ON@GOTPAGE
Lloh25:
	ldr	x11, [x11, _AMBIENT_LIGHT_SENSE_ON@GOTPAGEOFF]
Lloh26:
	ldr	w11, [x11]
	orr	w10, w11, w10
	cmp	w9, #1
	csel	w2, w10, w8, eq
	str	w2, [x20]
Lloh27:
	adrp	x8, _write_ctrl_display@GOTPAGE
Lloh28:
	ldr	x8, [x8, _write_ctrl_display@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w3, #1
	mov	w4, #1
	bl	_mdfld_dsi_send_mcs_short
Lloh30:
	adrp	x8, _write_ctrl_cabc@GOTPAGE
Lloh31:
	ldr	x8, [x8, _write_ctrl_cabc@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
Lloh33:
	adrp	x8, _UI_IMAGE@GOTPAGE
Lloh34:
	ldr	x8, [x8, _UI_IMAGE@GOTPAGEOFF]
Lloh35:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #1
	mov	w4, #1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mdfld_dsi_send_mcs_short
LBB0_2:
Lloh36:
	adrp	x0, l_.str@PAGE
Lloh37:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_DRM_ERROR
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No sender found\n"

	.comm	_write_display_brightness,4,2   ; @write_display_brightness
	.comm	_write_cabc_min_bright,4,2      ; @write_cabc_min_bright
	.comm	_BRIGHT_CNTL_BLOCK_ON,4,2       ; @BRIGHT_CNTL_BLOCK_ON
	.comm	_DISPLAY_DIMMING_ON,4,2         ; @DISPLAY_DIMMING_ON
	.comm	_BACKLIGHT_ON,4,2               ; @BACKLIGHT_ON
	.comm	_LABC_control,4,2               ; @LABC_control
	.comm	_DISPLAY_BRIGHTNESS_AUTO,4,2    ; @DISPLAY_BRIGHTNESS_AUTO
	.comm	_GAMMA_AUTO,4,2                 ; @GAMMA_AUTO
	.comm	_AMBIENT_LIGHT_SENSE_ON,4,2     ; @AMBIENT_LIGHT_SENSE_ON
	.comm	_write_ctrl_display,4,2         ; @write_ctrl_display
	.comm	_write_ctrl_cabc,4,2            ; @write_ctrl_cabc
	.comm	_UI_IMAGE,4,2                   ; @UI_IMAGE
.subsections_via_symbols
