	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_power_supply_set_input_current_limit_from_supplier ## -- Begin function power_supply_set_input_current_limit_from_supplier
	.p2align	4, 0x90
_power_supply_set_input_current_limit_from_supplier: ## @power_supply_set_input_current_limit_from_supplier
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %rax
	cmpq	$0, (%rax)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	movq	_power_supply_class@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	___power_supply_get_supplier_max_current@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	_class_for_each_device
	testl	%eax, %eax
	jle	LBB0_3
## %bb.4:
	movl	%eax, -24(%rbp)
	movq	(%r14), %rax
	movq	_POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-24(%rbp), %rdx
	movq	%r14, %rdi
	callq	*(%rax)
	movl	%eax, %ebx
	jmp	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_3:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	subl	(%rcx), %ebx
	testl	%eax, %eax
	cmovnel	%eax, %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_power_supply_class,4,2         ## @power_supply_class
	.comm	___power_supply_get_supplier_max_current,4,2 ## @__power_supply_get_supplier_max_current
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT,4,2 ## @POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_power_supply_set_input_current_limit_from_supplier ; -- Begin function power_supply_set_input_current_limit_from_supplier
	.p2align	2
_power_supply_set_input_current_limit_from_supplier: ; @power_supply_set_input_current_limit_from_supplier
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	ldr	x8, [x0]
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _power_supply_class@GOTPAGE
Lloh1:
	ldr	x8, [x8, _power_supply_class@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, ___power_supply_get_supplier_max_current@GOTPAGE
Lloh4:
	ldr	x8, [x8, ___power_supply_get_supplier_max_current@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x1, #0
	mov	x2, x19
	bl	_class_for_each_device
	cmp	w0, #0
	b.le	LBB0_4
; %bb.2:
	str	w0, [sp, #8]
	ldr	x8, [x19]
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x9]
	add	x2, sp, #8
	mov	x0, x19
	blr	x8
	b	LBB0_5
LBB0_3:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_4:
Lloh12:
	adrp	x8, _ENODEV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	csneg	w0, w0, w8, ne
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_power_supply_class,4,2         ; @power_supply_class
	.comm	___power_supply_get_supplier_max_current,4,2 ; @__power_supply_get_supplier_max_current
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT,4,2 ; @POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT
.subsections_via_symbols
