	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bq24735_charger_set_property
_bq24735_charger_set_property:          ## @bq24735_charger_set_property
	.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	%rdx, %r12
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_to_bq24735
	cmpl	$131, %ebx
	jne	LBB0_8
## %bb.1:
	movq	%rax, %r15
	movl	(%r12), %eax
	leal	-128(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_2
## %bb.6:
	movq	%r15, %r12
	addq	$4, %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movl	$0, (%r15)
	movq	%r15, %rdi
	callq	_bq24735_disable_charging
	jmp	LBB0_4
LBB0_8:
	movq	_EPERM@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_2:
	cmpl	$130, %eax
	jne	LBB0_7
## %bb.3:
	movq	%r15, %r12
	addq	$4, %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movl	$1, (%r15)
	movq	%r15, %rdi
	callq	_bq24735_enable_charging
LBB0_4:
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	jne	LBB0_10
## %bb.5:
	movq	%r14, %rdi
	callq	_power_supply_changed
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_9:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EPERM,4,2                      ## @EPERM
	.no_dead_strip	_bq24735_charger_set_property
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bq24735_charger_set_property
_bq24735_charger_set_property:          ; @bq24735_charger_set_property
	.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
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	bl	_to_bq24735
	cmp	w22, #131
	b.ne	LBB0_3
; %bb.1:
	mov	x20, x0
	ldr	w8, [x21]
	sub	w9, w8, #128
	cmp	w9, #2
	b.hs	LBB0_4
; %bb.2:
	add	x21, x20, #4
	mov	x0, x21
	bl	_mutex_lock
	str	wzr, [x20]
	mov	x0, x20
	bl	_bq24735_disable_charging
	b	LBB0_6
LBB0_3:
Lloh0:
	adrp	x8, _EPERM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_9
LBB0_4:
	cmp	w8, #130
	b.ne	LBB0_8
; %bb.5:
	add	x21, x20, #4
	mov	x0, x21
	bl	_mutex_lock
	mov	w8, #1
	str	w8, [x20]
	mov	x0, x20
	bl	_bq24735_enable_charging
LBB0_6:
	mov	x20, x0
	mov	x0, x21
	bl	_mutex_unlock
	cbnz	w20, LBB0_10
; %bb.7:
	mov	x0, x19
	bl	_power_supply_changed
	mov	w20, #0
	b	LBB0_10
LBB0_8:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_10:
	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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EPERM,4,2                      ; @EPERM
	.no_dead_strip	_bq24735_charger_set_property
.subsections_via_symbols
