	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_shmob_drm_backlight_init       ## -- Begin function shmob_drm_backlight_init
	.p2align	4, 0x90
_shmob_drm_backlight_init:              ## @shmob_drm_backlight_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rbx
	movq	8(%rbx), %rax
	movq	(%rax), %r12
	cmpq	$0, (%r12)
	je	LBB0_3
## %bb.1:
	movq	%rdi, %r14
	movl	8(%r12), %edi
	movl	(%rbx), %esi
	movq	_shmob_drm_backlight_ops@GOTPCREL(%rip), %rcx
	movq	%r14, %rdx
	xorl	%r8d, %r8d
	callq	_backlight_device_register
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movl	(%rbx), %r14d
	movq	%r15, %rdi
	callq	_PTR_ERR
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	callq	_dev_err
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_2:
	movq	(%r12), %rax
	movq	%rax, 16(%r15)
	movq	%rax, 8(%r15)
	movq	_FB_BLANK_POWERDOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	%r15, %rdi
	callq	_backlight_update_status
	movq	%r15, (%r14)
LBB0_3:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_shmob_drm_backlight_ops,4,2    ## @shmob_drm_backlight_ops
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to register backlight device: %ld\n"

	.comm	_FB_BLANK_POWERDOWN,4,2         ## @FB_BLANK_POWERDOWN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_shmob_drm_backlight_init       ; -- Begin function shmob_drm_backlight_init
	.p2align	2
_shmob_drm_backlight_init:              ; @shmob_drm_backlight_init
	.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
	ldr	x21, [x0, #8]
	ldr	x8, [x21, #8]
	ldr	x22, [x8]
	ldr	x8, [x22]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	w0, [x22, #8]
	ldr	w1, [x21]
Lloh0:
	adrp	x3, _shmob_drm_backlight_ops@GOTPAGE
Lloh1:
	ldr	x3, [x3, _shmob_drm_backlight_ops@GOTPAGEOFF]
	mov	x2, x19
	mov	x4, #0
	bl	_backlight_device_register
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_3
; %bb.2:
	ldr	w19, [x21]
	mov	x0, x20
	bl	_PTR_ERR
	mov	x2, x0
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	x0, x20
	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
	b	_PTR_ERR
LBB0_3:
	ldr	x8, [x22]
	stp	x8, x8, [x20, #8]
Lloh4:
	adrp	x8, _FB_BLANK_POWERDOWN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _FB_BLANK_POWERDOWN@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [x20]
	mov	x0, x20
	bl	_backlight_update_status
	str	x20, [x19]
LBB0_4:
	mov	w0, #0
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_shmob_drm_backlight_ops,4,2    ; @shmob_drm_backlight_ops
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to register backlight device: %ld\n"

	.comm	_FB_BLANK_POWERDOWN,4,2         ; @FB_BLANK_POWERDOWN
.subsections_via_symbols
