	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function axp288_charger_usb_set_property
_axp288_charger_usb_set_property:       ## @axp288_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
	cmpl	$128, %ebx
	je	LBB0_7
## %bb.1:
	cmpl	$129, %ebx
	je	LBB0_5
## %bb.2:
	cmpl	$130, %ebx
	jne	LBB0_9
## %bb.3:
	movl	(%r15), %edi
	movl	12(%r14), %esi
	callq	_min
	movl	%eax, %edi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_DIV_ROUND_CLOSEST
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_axp288_charger_set_cc
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_10
## %bb.4:
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	jmp	LBB0_10
LBB0_7:
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_axp288_charger_set_vbus_inlmt
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_10
## %bb.8:
	movq	(%r14), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_warn
	jmp	LBB0_10
LBB0_5:
	movl	(%r15), %edi
	movl	8(%r14), %esi
	callq	_min
	movl	%eax, %edi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_DIV_ROUND_CLOSEST
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_axp288_charger_set_cv
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_10
## %bb.6:
	movq	(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_warn
	jmp	LBB0_10
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set charge current failed\n"

L_.str.1:                               ## @.str.1
	.asciz	"set charge voltage failed\n"

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

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_axp288_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 axp288_charger_usb_set_property
_axp288_charger_usb_set_property:       ; @axp288_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
	cmp	w21, #128
	b.eq	LBB0_5
; %bb.1:
	cmp	w21, #129
	b.eq	LBB0_7
; %bb.2:
	cmp	w21, #130
	b.ne	LBB0_9
; %bb.3:
	ldr	w0, [x20]
	ldr	w1, [x19, #12]
	bl	_min
	mov	w1, #1000
	bl	_DIV_ROUND_CLOSEST
	mov	x1, x0
	mov	x0, x19
	bl	_axp288_charger_set_cc
	mov	x20, x0
	tbz	w0, #31, LBB0_10
; %bb.4:
	ldr	x0, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
	b	LBB0_10
LBB0_5:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_axp288_charger_set_vbus_inlmt
	mov	x20, x0
	tbz	w0, #31, LBB0_10
; %bb.6:
	ldr	x0, [x19]
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_warn
	b	LBB0_10
LBB0_7:
	ldr	w0, [x20]
	ldr	w1, [x19, #8]
	bl	_min
	mov	w1, #1000
	bl	_DIV_ROUND_CLOSEST
	mov	x1, x0
	mov	x0, x19
	bl	_axp288_charger_set_cv
	mov	x20, x0
	tbz	w0, #31, LBB0_10
; %bb.8:
	ldr	x0, [x19]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_warn
	b	LBB0_10
LBB0_9:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set charge current failed\n"

l_.str.1:                               ; @.str.1
	.asciz	"set charge voltage failed\n"

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

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