	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pwm_store
_pwm_store:                             ## @pwm_store
	.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
	movq	%rcx, %r13
	movq	%rdx, %rbx
	callq	_dev_get_drvdata
	movq	%rax, %r14
	movq	16(%rax), %r15
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_kstrtoul
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	cmpq	$256, -48(%rbp)                 ## imm = 0x100
	jb	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_9:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	-48(%rbp), %r12
	movq	_TC654_REG_CONFIG_SDM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testq	%r12, %r12
	je	LBB0_4
## %bb.5:
	notl	%eax
	andl	%eax, 8(%r14)
	jmp	LBB0_6
LBB0_4:
	orl	%eax, 8(%r14)
LBB0_6:
	movq	_tc654_pwm_map@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_find_closest
	movl	%eax, 4(%r14)
	movq	_TC654_REG_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	8(%r14), %edx
	movq	%r15, %rdi
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	js	LBB0_8
## %bb.7:
	movq	_TC654_REG_DUTY_CYCLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r14), %edx
	movq	%r15, %rdi
	callq	_i2c_smbus_write_byte_data
LBB0_8:
	movl	%eax, %r12d
	movq	%r14, %rdi
	callq	_mutex_unlock
	testl	%r12d, %r12d
	cmovsl	%r12d, %r13d
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TC654_REG_CONFIG_SDM,4,2       ## @TC654_REG_CONFIG_SDM
	.comm	_tc654_pwm_map,4,2              ## @tc654_pwm_map
	.comm	_TC654_REG_CONFIG,4,2           ## @TC654_REG_CONFIG
	.comm	_TC654_REG_DUTY_CYCLE,4,2       ## @TC654_REG_DUTY_CYCLE
	.no_dead_strip	_pwm_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pwm_store
_pwm_store:                             ; @pwm_store
	.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	x19, x3
	mov	x22, x2
	bl	_dev_get_drvdata
	mov	x20, x0
	ldr	x21, [x0, #16]
	add	x2, sp, #8
	mov	x0, x22
	mov	w1, #10
	bl	_kstrtoul
	cbnz	x0, LBB0_2
; %bb.1:
	ldr	x8, [sp, #8]
	cmp	x8, #256
	b.lo	LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
LBB0_4:
	mov	x0, x20
	bl	_mutex_lock
	ldr	x22, [sp, #8]
Lloh3:
	adrp	x8, _TC654_REG_CONFIG_SDM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TC654_REG_CONFIG_SDM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cbz	x22, LBB0_6
; %bb.5:
	ldr	w9, [x20, #8]
	bic	w8, w9, w8
	b	LBB0_7
LBB0_6:
	ldr	w9, [x20, #8]
	orr	w8, w9, w8
LBB0_7:
	str	w8, [x20, #8]
Lloh6:
	adrp	x8, _tc654_pwm_map@GOTPAGE
Lloh7:
	ldr	x8, [x8, _tc654_pwm_map@GOTPAGEOFF]
Lloh8:
	ldr	w23, [x8]
	mov	x0, x23
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_find_closest
	str	w0, [x20, #4]
Lloh9:
	adrp	x8, _TC654_REG_CONFIG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TC654_REG_CONFIG@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	w2, [x20, #8]
	mov	x0, x21
	bl	_i2c_smbus_write_byte_data
	tbnz	w0, #31, LBB0_9
; %bb.8:
Lloh12:
	adrp	x8, _TC654_REG_DUTY_CYCLE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TC654_REG_DUTY_CYCLE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldr	w2, [x20, #4]
	mov	x0, x21
	bl	_i2c_smbus_write_byte_data
LBB0_9:
	mov	x22, x0
	mov	x0, x20
	bl	_mutex_unlock
	cmp	w22, #0
	csel	w0, w22, w19, lt
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TC654_REG_CONFIG_SDM,4,2       ; @TC654_REG_CONFIG_SDM
	.comm	_tc654_pwm_map,4,2              ; @tc654_pwm_map
	.comm	_TC654_REG_CONFIG,4,2           ; @TC654_REG_CONFIG
	.comm	_TC654_REG_DUTY_CYCLE,4,2       ; @TC654_REG_DUTY_CYCLE
	.no_dead_strip	_pwm_store
.subsections_via_symbols
