	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sony_nc_backlight_setup
_sony_nc_backlight_setup:               ## @sony_nc_backlight_setup
	.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
	movl	$303, %edi                      ## imm = 0x12F
	callq	_sony_find_snc_handle
	testq	%rax, %rax
	js	LBB0_3
## %bb.1:
	movq	_sony_bl_props@GOTPCREL(%rip), %r14
	movl	$256, (%r14)                    ## imm = 0x100
	movl	$303, %edi                      ## imm = 0x12F
	jmp	LBB0_2
LBB0_3:
	movl	$311, %edi                      ## imm = 0x137
	callq	_sony_find_snc_handle
	testq	%rax, %rax
	js	LBB0_5
## %bb.4:
	movq	_sony_bl_props@GOTPCREL(%rip), %r14
	movl	$256, (%r14)                    ## imm = 0x100
	movl	$311, %edi                      ## imm = 0x137
	jmp	LBB0_2
LBB0_5:
	movl	$323, %edi                      ## imm = 0x143
	callq	_sony_find_snc_handle
	testq	%rax, %rax
	js	LBB0_7
## %bb.6:
	movq	_sony_bl_props@GOTPCREL(%rip), %r14
	movl	$12288, (%r14)                  ## imm = 0x3000
	movl	$323, %edi                      ## imm = 0x143
	jmp	LBB0_2
LBB0_7:
	movl	$331, %edi                      ## imm = 0x14B
	callq	_sony_find_snc_handle
	testq	%rax, %rax
	js	LBB0_9
## %bb.8:
	movq	_sony_bl_props@GOTPCREL(%rip), %r14
	movl	$12288, (%r14)                  ## imm = 0x3000
	movl	$331, %edi                      ## imm = 0x14B
	jmp	LBB0_2
LBB0_9:
	movl	$332, %edi                      ## imm = 0x14C
	callq	_sony_find_snc_handle
	testq	%rax, %rax
	js	LBB0_11
## %bb.10:
	movq	_sony_bl_props@GOTPCREL(%rip), %r14
	movl	$12288, (%r14)                  ## imm = 0x3000
	movl	$332, %edi                      ## imm = 0x14C
LBB0_2:
	movq	%r14, %rsi
	callq	_sony_nc_backlight_ng_read_limits
	movl	4(%r14), %ebx
	subl	8(%r14), %ebx
	movq	_sony_backlight_ng_ops@GOTPCREL(%rip), %r14
LBB0_13:
	leaq	-32(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	_BACKLIGHT_PLATFORM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -28(%rbp)
	movl	%ebx, -32(%rbp)
	leaq	L_.str.1(%rip), %rdi
	movq	_sony_bl_props@GOTPCREL(%rip), %rbx
	xorl	%esi, %esi
	movq	%rbx, %rdx
	movq	%r14, %rcx
	movq	%r15, %r8
	callq	_backlight_device_register
	movq	%rax, 16(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_warn
	movq	$0, 16(%rbx)
	jmp	LBB0_16
LBB0_15:
	movq	16(%rbx), %rdi
	callq	*(%r14)
	movq	16(%rbx), %rcx
	movl	%eax, (%rcx)
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_sony_nc_acpi_handle@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_acpi_has_method
	testq	%rax, %rax
	je	LBB0_16
## %bb.12:
	movq	_SONY_MAX_BRIGHTNESS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	decl	%ebx
	movq	_sony_backlight_ops@GOTPCREL(%rip), %r14
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_sony_backlight_ng_ops,8,3      ## @sony_backlight_ng_ops
	.comm	_sony_bl_props,24,3             ## @sony_bl_props
	.comm	_sony_nc_acpi_handle,4,2        ## @sony_nc_acpi_handle
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GBRT"

	.comm	_sony_backlight_ops,8,3         ## @sony_backlight_ops
	.comm	_SONY_MAX_BRIGHTNESS,4,2        ## @SONY_MAX_BRIGHTNESS
	.comm	_BACKLIGHT_PLATFORM,4,2         ## @BACKLIGHT_PLATFORM
L_.str.1:                               ## @.str.1
	.asciz	"sony"

L_.str.2:                               ## @.str.2
	.asciz	"unable to register backlight device\n"

	.no_dead_strip	_sony_nc_backlight_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sony_nc_backlight_setup
_sony_nc_backlight_setup:               ; @sony_nc_backlight_setup
	.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	w0, #303
	bl	_sony_find_snc_handle
Lloh0:
	adrp	x19, _sony_bl_props@GOTPAGE
Lloh1:
	ldr	x19, [x19, _sony_bl_props@GOTPAGEOFF]
	tbnz	x0, #63, LBB0_2
; %bb.1:
	mov	w8, #256
	str	w8, [x19]
	mov	w0, #303
	b	LBB0_10
LBB0_2:
	mov	w0, #311
	bl	_sony_find_snc_handle
	tbnz	x0, #63, LBB0_4
; %bb.3:
	mov	w8, #256
	str	w8, [x19]
	mov	w0, #311
	b	LBB0_10
LBB0_4:
	mov	w0, #323
	bl	_sony_find_snc_handle
	tbnz	x0, #63, LBB0_6
; %bb.5:
	mov	w8, #12288
	str	w8, [x19]
	mov	w0, #323
	b	LBB0_10
LBB0_6:
	mov	w0, #331
	bl	_sony_find_snc_handle
	tbnz	x0, #63, LBB0_8
; %bb.7:
	mov	w8, #12288
	str	w8, [x19]
	mov	w0, #331
	b	LBB0_10
LBB0_8:
	mov	w0, #332
	bl	_sony_find_snc_handle
	tbnz	x0, #63, LBB0_15
; %bb.9:
	mov	w8, #12288
	str	w8, [x19]
	mov	w0, #332
LBB0_10:
	mov	x1, x19
	bl	_sony_nc_backlight_ng_read_limits
	ldp	w8, w9, [x19, #4]
	sub	w21, w8, w9
Lloh2:
	adrp	x20, _sony_backlight_ng_ops@GOTPAGE
Lloh3:
	ldr	x20, [x20, _sony_backlight_ng_ops@GOTPAGEOFF]
LBB0_11:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh4:
	adrp	x8, _BACKLIGHT_PLATFORM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _BACKLIGHT_PLATFORM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	stp	w21, w8, [sp, #8]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	add	x4, sp, #8
	mov	x1, #0
	mov	x2, x19
	mov	x3, x20
	bl	_backlight_device_register
	str	x0, [x19, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_13
; %bb.12:
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_warn
	str	xzr, [x19, #16]
	b	LBB0_14
LBB0_13:
	ldr	x8, [x20]
	ldr	x0, [x19, #16]
	blr	x8
	ldr	x8, [x19, #16]
	str	w0, [x8]
LBB0_14:
	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
LBB0_15:
Lloh11:
	adrp	x8, _sony_nc_acpi_handle@GOTPAGE
Lloh12:
	ldr	x8, [x8, _sony_nc_acpi_handle@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_acpi_has_method
	cbz	x0, LBB0_14
; %bb.16:
Lloh16:
	adrp	x8, _SONY_MAX_BRIGHTNESS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SONY_MAX_BRIGHTNESS@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	sub	w21, w8, #1
Lloh19:
	adrp	x20, _sony_backlight_ops@GOTPAGE
Lloh20:
	ldr	x20, [x20, _sony_backlight_ops@GOTPAGEOFF]
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_sony_backlight_ng_ops,8,3      ; @sony_backlight_ng_ops
	.comm	_sony_bl_props,24,3             ; @sony_bl_props
	.comm	_sony_nc_acpi_handle,4,2        ; @sony_nc_acpi_handle
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GBRT"

	.comm	_sony_backlight_ops,8,3         ; @sony_backlight_ops
	.comm	_SONY_MAX_BRIGHTNESS,4,2        ; @SONY_MAX_BRIGHTNESS
	.comm	_BACKLIGHT_PLATFORM,4,2         ; @BACKLIGHT_PLATFORM
l_.str.1:                               ; @.str.1
	.asciz	"sony"

l_.str.2:                               ; @.str.2
	.asciz	"unable to register backlight device\n"

	.no_dead_strip	_sony_nc_backlight_setup
.subsections_via_symbols
