	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sysfs_set_reg
_sysfs_set_reg:                         ## @sysfs_set_reg
	.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
	movl	%r8d, %ebx
	movq	%rcx, %r14
	movq	%rdx, %r13
	callq	_dev_get_drvdata
	movq	%rax, %r15
	movq	%rax, %r12
	movq	_DPOT_ADDR_OTP_EN@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_4
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_sysfs_streq
	movq	_DPOT_RDAC_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %ebx
	movl	12(%r12), %esi
	movl	%ebx, %edi
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	callq	_set_bit
	jmp	LBB0_15
LBB0_4:
	movq	_DPOT_ADDR_OTP@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_7
## %bb.5:
	movq	_DPOT_RDAC_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	%ebx, %edi
	movl	12(%r12), %esi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_6
LBB0_7:
	leaq	-48(%rbp), %rdx
	movq	%r13, %rdi
	movl	$10, %esi
	callq	_kstrtoul
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movslq	%eax, %r14
	jmp	LBB0_15
LBB0_3:
	callq	_clear_bit
	jmp	LBB0_15
LBB0_9:
	movq	(%r12), %rax
	cmpq	%rax, -48(%rbp)
	jbe	LBB0_11
## %bb.10:
	movq	%rax, -48(%rbp)
LBB0_11:
	addq	$8, %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	-48(%rbp), %rdx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_dpot_write
	movq	_DPOT_ADDR_EEPROM@GOTPCREL(%rip), %rax
	movl	$26, %edi
	testl	%ebx, (%rax)
	jne	LBB0_13
## %bb.12:
	movl	$400, %edi                      ## imm = 0x190
	movq	_DPOT_ADDR_OTP@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_14
LBB0_13:
	callq	_msleep
LBB0_14:
	movq	%r15, %rdi
	callq	_mutex_unlock
	jmp	LBB0_15
LBB0_6:
	movq	_EPERM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subq	(%rax), %r14
LBB0_15:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DPOT_ADDR_OTP_EN,4,2           ## @DPOT_ADDR_OTP_EN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"enabled"

	.comm	_DPOT_RDAC_MASK,4,2             ## @DPOT_RDAC_MASK
	.comm	_DPOT_ADDR_OTP,4,2              ## @DPOT_ADDR_OTP
	.comm	_EPERM,8,3                      ## @EPERM
	.comm	_DPOT_ADDR_EEPROM,4,2           ## @DPOT_ADDR_EEPROM
	.no_dead_strip	_sysfs_set_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sysfs_set_reg
_sysfs_set_reg:                         ; @sysfs_set_reg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x4
	mov	x19, x3
	mov	x22, x2
	bl	_dev_get_drvdata
	mov	x21, x0
Lloh0:
	adrp	x8, _DPOT_ADDR_OTP_EN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DPOT_ADDR_OTP_EN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_3
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_sysfs_streq
	mov	x8, x0
Lloh5:
	adrp	x9, _DPOT_RDAC_MASK@GOTPAGE
Lloh6:
	ldr	x9, [x9, _DPOT_RDAC_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	and	w0, w9, w20
	ldr	w1, [x21, #12]
	cbz	x8, LBB0_7
; %bb.2:
	bl	_set_bit
	b	LBB0_17
LBB0_3:
Lloh8:
	adrp	x23, _DPOT_ADDR_OTP@GOTPAGE
Lloh9:
	ldr	x23, [x23, _DPOT_ADDR_OTP@GOTPAGEOFF]
	ldr	w8, [x23]
	tst	w8, w20
	b.eq	LBB0_5
; %bb.4:
Lloh10:
	adrp	x8, _DPOT_RDAC_MASK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DPOT_RDAC_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	and	w0, w8, w20
	ldr	w1, [x21, #12]
	bl	_test_bit
	cbz	w0, LBB0_12
LBB0_5:
	add	x2, sp, #8
	mov	x0, x22
	mov	w1, #10
	bl	_kstrtoul
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_8
; %bb.6:
	sxtw	x19, w0
	b	LBB0_17
LBB0_7:
	bl	_clear_bit
	b	LBB0_17
LBB0_8:
	ldr	x9, [sp, #8]
	ldr	x8, [x21]
	cmp	x9, x8
	b.ls	LBB0_10
; %bb.9:
	str	x8, [sp, #8]
LBB0_10:
	add	x22, x21, #8
	mov	x0, x22
	bl	_mutex_lock
	ldr	x2, [sp, #8]
	mov	x0, x21
	mov	x1, x20
	bl	_dpot_write
Lloh13:
	adrp	x8, _DPOT_ADDR_EEPROM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DPOT_ADDR_EEPROM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_13
; %bb.11:
	mov	w0, #26
	b	LBB0_15
LBB0_12:
Lloh16:
	adrp	x8, _EPERM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	neg	x19, x8
	b	LBB0_17
LBB0_13:
	ldr	w8, [x23]
	tst	w8, w20
	b.eq	LBB0_16
; %bb.14:
	mov	w0, #400
LBB0_15:
	bl	_msleep
LBB0_16:
	mov	x0, x22
	bl	_mutex_unlock
LBB0_17:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_DPOT_ADDR_OTP_EN,4,2           ; @DPOT_ADDR_OTP_EN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"enabled"

	.comm	_DPOT_RDAC_MASK,4,2             ; @DPOT_RDAC_MASK
	.comm	_DPOT_ADDR_OTP,4,2              ; @DPOT_ADDR_OTP
	.comm	_EPERM,8,3                      ; @EPERM
	.comm	_DPOT_ADDR_EEPROM,4,2           ; @DPOT_ADDR_EEPROM
	.no_dead_strip	_sysfs_set_reg
.subsections_via_symbols
