	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sc2731_charger_usb_set_property
_sc2731_charger_usb_set_property:       ## @sc2731_charger_usb_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %ebx
	callq	_power_supply_get_drvdata
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_mutex_lock
	cmpl	$0, 8(%r14)
	je	LBB0_1
## %bb.2:
	cmpl	$128, %ebx
	je	LBB0_6
## %bb.3:
	cmpl	$129, %ebx
	jne	LBB0_8
## %bb.4:
	movslq	(%r15), %rax
	imulq	$274877907, %rax, %rsi          ## imm = 0x10624DD3
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$38, %rsi
	addl	%eax, %esi
	movq	%r14, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_sc2731_charger_set_current
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_9
## %bb.5:
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_9
LBB0_1:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_6:
	movslq	(%r15), %rax
	imulq	$274877907, %rax, %rsi          ## imm = 0x10624DD3
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$38, %rsi
	addl	%eax, %esi
	movq	%r14, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_sc2731_charger_set_current_limit
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_9
## %bb.7:
	movl	4(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_9
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set charge current failed\n"

L_.str.1:                               ## @.str.1
	.asciz	"set input current limit failed\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_sc2731_charger_usb_set_property
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sc2731_charger_usb_set_property
_sc2731_charger_usb_set_property:       ; @sc2731_charger_usb_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	x20, x2
	mov	x21, x1
	bl	_power_supply_get_drvdata
	mov	x19, x0
	bl	_mutex_lock
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_5
; %bb.1:
	cmp	w21, #128
	b.eq	LBB0_6
; %bb.2:
	cmp	w21, #129
	b.ne	LBB0_8
; %bb.3:
	ldrsw	x8, [x20]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w1, w8, w9
	mov	x0, x19
	bl	_sc2731_charger_set_current
	mov	x20, x0
	tbz	w0, #31, LBB0_9
; %bb.4:
	ldr	w0, [x19, #4]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_9
LBB0_5:
	mov	x0, x19
	bl	_mutex_unlock
Lloh2:
	adrp	x8, _ENODEV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_10
LBB0_6:
	ldrsw	x8, [x20]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w1, w8, w9
	mov	x0, x19
	bl	_sc2731_charger_set_current_limit
	mov	x20, x0
	tbz	w0, #31, LBB0_9
; %bb.7:
	ldr	w0, [x19, #4]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_9
LBB0_8:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_9:
	mov	x0, x19
	bl	_mutex_unlock
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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set charge current failed\n"

l_.str.1:                               ; @.str.1
	.asciz	"set input current limit failed\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_sc2731_charger_usb_set_property
.subsections_via_symbols
