	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ab8500_charger_set_vbus_in_curr
_ab8500_charger_set_vbus_in_curr:       ## @ab8500_charger_set_vbus_in_curr
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	32(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %rdi
	callq	_min
	movl	%eax, %ebx
	movq	24(%r14), %rdi
	testq	%rdi, %rdi
	jle	LBB0_2
## %bb.1:
	movl	%ebx, %esi
	callq	_min
	movl	%eax, %ebx
LBB0_2:
	movq	16(%r14), %rdi
	testq	%rdi, %rdi
	js	LBB0_4
## %bb.3:
	movl	%ebx, %esi
	callq	_min
	movl	%eax, %ebx
LBB0_4:
	cmpl	$100, %ebx
	je	LBB0_5
## %bb.6:
	cmpl	$500, %ebx                      ## imm = 0x1F4
	jne	LBB0_10
## %bb.7:
	movq	_USB_CH_IP_CUR_LVL_0P45@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_5:
	movq	_USB_CH_IP_CUR_LVL_0P05@GOTPCREL(%rip), %rax
LBB0_8:
	movl	8(%r14), %ecx
	movq	_VBAT_TRESH_IP_CUR_RED@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jge	LBB0_10
## %bb.9:
	movl	(%rax), %ebx
LBB0_10:
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_info
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_AB8500_USBCH_IPT_CRNTLVL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_ab8500_charger_set_current
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VBAT_TRESH_IP_CUR_RED,4,2      ## @VBAT_TRESH_IP_CUR_RED
	.comm	_USB_CH_IP_CUR_LVL_0P05,4,2     ## @USB_CH_IP_CUR_LVL_0P05
	.comm	_USB_CH_IP_CUR_LVL_0P45,4,2     ## @USB_CH_IP_CUR_LVL_0P45
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"VBUS input current limit set to %d mA\n"

	.comm	_AB8500_USBCH_IPT_CRNTLVL_REG,4,2 ## @AB8500_USBCH_IPT_CRNTLVL_REG
	.no_dead_strip	_ab8500_charger_set_vbus_in_curr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ab8500_charger_set_vbus_in_curr
_ab8500_charger_set_vbus_in_curr:       ; @ab8500_charger_set_vbus_in_curr
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0, #32]
	ldr	x8, [x8]
	ldr	x0, [x8]
	bl	_min
	mov	x20, x0
	ldr	x0, [x19, #24]
	cmp	x0, #1
	b.lt	LBB0_2
; %bb.1:
	mov	x1, x20
	bl	_min
	mov	x20, x0
LBB0_2:
	ldr	x0, [x19, #16]
	tbnz	x0, #63, LBB0_4
; %bb.3:
	mov	x1, x20
	bl	_min
	mov	x20, x0
LBB0_4:
	cmp	w20, #100
	b.eq	LBB0_7
; %bb.5:
	cmp	w20, #500
	b.ne	LBB0_9
; %bb.6:
Lloh0:
	adrp	x8, _USB_CH_IP_CUR_LVL_0P45@GOTPAGE
Lloh1:
	ldr	x8, [x8, _USB_CH_IP_CUR_LVL_0P45@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh2:
	adrp	x8, _USB_CH_IP_CUR_LVL_0P05@GOTPAGE
Lloh3:
	ldr	x8, [x8, _USB_CH_IP_CUR_LVL_0P05@GOTPAGEOFF]
LBB0_8:
	ldr	w9, [x19, #8]
Lloh4:
	adrp	x10, _VBAT_TRESH_IP_CUR_RED@GOTPAGE
Lloh5:
	ldr	x10, [x10, _VBAT_TRESH_IP_CUR_RED@GOTPAGEOFF]
Lloh6:
	ldr	w10, [x10]
	ldr	w8, [x8]
	cmp	w9, w10
	csel	w20, w8, w20, lt
LBB0_9:
	ldr	w0, [x19, #4]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_info
	mov	x0, x19
	bl	_mutex_lock
Lloh9:
	adrp	x8, _AB8500_USBCH_IPT_CRNTLVL_REG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AB8500_USBCH_IPT_CRNTLVL_REG@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_ab8500_charger_set_current
	mov	x20, x0
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_VBAT_TRESH_IP_CUR_RED,4,2      ; @VBAT_TRESH_IP_CUR_RED
	.comm	_USB_CH_IP_CUR_LVL_0P05,4,2     ; @USB_CH_IP_CUR_LVL_0P05
	.comm	_USB_CH_IP_CUR_LVL_0P45,4,2     ; @USB_CH_IP_CUR_LVL_0P45
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"VBUS input current limit set to %d mA\n"

	.comm	_AB8500_USBCH_IPT_CRNTLVL_REG,4,2 ; @AB8500_USBCH_IPT_CRNTLVL_REG
	.no_dead_strip	_ab8500_charger_set_vbus_in_curr
.subsections_via_symbols
