	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_picolcd_init_backlight         ## -- Begin function picolcd_init_backlight
	.p2align	4, 0x90
_picolcd_init_backlight:                ## @picolcd_init_backlight
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.3:
	movq	%rdi, %r14
	movq	16(%rdi), %r15
	cmpl	$1, (%rsi)
	jne	LBB0_6
## %bb.4:
	movq	8(%rsi), %rax
	movq	(%rax), %rax
	cmpl	$1, (%rax)
	jne	LBB0_6
## %bb.5:
	cmpl	$8, 4(%rax)
	jne	LBB0_6
## %bb.7:
	leaq	-40(%rbp), %r12
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	_BACKLIGHT_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	movl	$255, -40(%rbp)
	movq	%r15, %rdi
	callq	_dev_name
	movq	_picolcd_blops@GOTPCREL(%rip), %rcx
	movl	%eax, %edi
	movq	%r15, %rsi
	movq	%r14, %rdx
	movq	%r12, %r8
	callq	_backlight_device_register
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	%r12, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_10
LBB0_6:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	$255, (%r12)
	movl	$255, (%r14)
	movq	%r12, 8(%r14)
	movq	%r12, %rdi
	callq	_picolcd_set_brightness
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unsupported BRIGHTNESS report"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BACKLIGHT_RAW,4,2              ## @BACKLIGHT_RAW
	.comm	_picolcd_blops,4,2              ## @picolcd_blops
L_.str.1:                               ## @.str.1
	.asciz	"failed to register backlight\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_picolcd_init_backlight         ; -- Begin function picolcd_init_backlight
	.p2align	2
_picolcd_init_backlight:                ; @picolcd_init_backlight
	.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
	cbz	x1, LBB0_7
; %bb.1:
	mov	x19, x0
	ldr	x20, [x0, #16]
	ldr	w8, [x1]
	cmp	w8, #1
	b.ne	LBB0_6
; %bb.2:
	ldr	x8, [x1, #8]
	ldr	x8, [x8]
	ldr	w9, [x8]
	cmp	w9, #1
	b.ne	LBB0_6
; %bb.3:
	ldr	w8, [x8, #4]
	cmp	w8, #8
	b.ne	LBB0_6
; %bb.4:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh0:
	adrp	x8, _BACKLIGHT_RAW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BACKLIGHT_RAW@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	w22, #255
	stp	w22, w8, [sp, #8]
	mov	x0, x20
	bl	_dev_name
Lloh3:
	adrp	x3, _picolcd_blops@GOTPAGE
Lloh4:
	ldr	x3, [x3, _picolcd_blops@GOTPAGEOFF]
	add	x4, sp, #8
	mov	x1, x20
	mov	x2, x19
	bl	_backlight_device_register
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_10
; %bb.5:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	mov	x0, x21
	bl	_PTR_ERR
	b	LBB0_9
LBB0_6:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh11:
	adrp	x8, _ENODEV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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_10:
	str	w22, [x21]
	str	w22, [x19]
	str	x21, [x19, #8]
	mov	x0, x21
	bl	_picolcd_set_brightness
	mov	w0, #0
	b	LBB0_9
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unsupported BRIGHTNESS report"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BACKLIGHT_RAW,4,2              ; @BACKLIGHT_RAW
	.comm	_picolcd_blops,4,2              ; @picolcd_blops
l_.str.1:                               ; @.str.1
	.asciz	"failed to register backlight\n"

.subsections_via_symbols
