	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pmbus_add_fan_ctrl
_pmbus_add_fan_ctrl:                    ## @pmbus_add_fan_ctrl
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, %r14d
	movq	%rsi, %r13
	movq	_PMBUS_VIRT_FAN_TARGET_1@GOTPCREL(%rip), %rax
	movslq	%r8d, %r12
	movq	(%rax), %r9
	addq	%r12, %r9
	movq	_PSC_FAN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	L_.str(%rip), %rsi
	leaq	L_.str.1(%rip), %rdx
	movq	%r13, %rdi
	movl	%r14d, %ecx
	movl	%r15d, %r8d
	pushq	$1
	pushq	$0
	pushq	$0
	pushq	%rax
	callq	_pmbus_add_sensor
	addq	$32, %rsp
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	(%r13), %rax
	movq	(%rax), %rax
	movslq	%r15d, %rcx
	movl	(%rax,%rcx,4), %eax
	movq	_PMBUS_HAVE_PWM12@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_4
## %bb.2:
	movq	_PMBUS_HAVE_PWM34@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
LBB0_4:
	movq	_PMBUS_VIRT_PWM_1@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	addq	%r12, %r9
	movq	_PSC_PWM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%edx, %edx
	movl	%r14d, %ecx
	movl	%r15d, %r8d
	pushq	$1
	pushq	$0
	pushq	$0
	pushq	%rax
	callq	_pmbus_add_sensor
	addq	$32, %rsp
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_PMBUS_VIRT_PWM_ENABLE_1@GOTPCREL(%rip), %rax
	addq	(%rax), %r12
	movq	_PSC_PWM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	L_.str.2(%rip), %rsi
	leaq	L_.str.3(%rip), %rdx
	movq	%r13, %rdi
	movl	%r14d, %ecx
	movl	%r15d, %r8d
	movq	%r12, %r9
	pushq	$0
	pushq	$0
	pushq	$1
	pushq	%rax
	callq	_pmbus_add_sensor
	addq	$32, %rsp
	testq	%rax, %rax
	jne	LBB0_7
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fan"

L_.str.1:                               ## @.str.1
	.asciz	"target"

	.comm	_PMBUS_VIRT_FAN_TARGET_1,8,3    ## @PMBUS_VIRT_FAN_TARGET_1
	.comm	_PSC_FAN,4,2                    ## @PSC_FAN
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PMBUS_HAVE_PWM12,4,2           ## @PMBUS_HAVE_PWM12
	.comm	_PMBUS_HAVE_PWM34,4,2           ## @PMBUS_HAVE_PWM34
L_.str.2:                               ## @.str.2
	.asciz	"pwm"

	.comm	_PMBUS_VIRT_PWM_1,8,3           ## @PMBUS_VIRT_PWM_1
	.comm	_PSC_PWM,4,2                    ## @PSC_PWM
L_.str.3:                               ## @.str.3
	.asciz	"enable"

	.comm	_PMBUS_VIRT_PWM_ENABLE_1,8,3    ## @PMBUS_VIRT_PWM_ENABLE_1
	.no_dead_strip	_pmbus_add_fan_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pmbus_add_fan_ctrl
_pmbus_add_fan_ctrl:                    ; @pmbus_add_fan_ctrl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
                                        ; kill: def $w4 killed $w4 def $x4
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
Lloh0:
	adrp	x8, _PMBUS_VIRT_FAN_TARGET_1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PMBUS_VIRT_FAN_TARGET_1@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	sxtw	x22, w4
	add	x5, x8, x22
Lloh3:
	adrp	x8, _PSC_FAN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PSC_FAN@GOTPAGEOFF]
Lloh5:
	ldr	w6, [x8]
	mov	x8, #4294967296
	str	x8, [sp]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x3, x20
	mov	x4, x19
	mov	w7, #0
	bl	_pmbus_add_sensor
	cbz	x0, LBB0_6
; %bb.1:
	ldr	x8, [x21]
	ldr	x8, [x8]
	ldr	w8, [x8, w19, sxtw #2]
Lloh10:
	adrp	x9, _PMBUS_HAVE_PWM12@GOTPAGE
Lloh11:
	ldr	x9, [x9, _PMBUS_HAVE_PWM12@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_3
; %bb.2:
Lloh13:
	adrp	x9, _PMBUS_HAVE_PWM34@GOTPAGE
Lloh14:
	ldr	x9, [x9, _PMBUS_HAVE_PWM34@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
LBB0_3:
Lloh16:
	adrp	x8, _PMBUS_VIRT_PWM_1@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PMBUS_VIRT_PWM_1@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	add	x5, x8, x22
Lloh19:
	adrp	x23, _PSC_PWM@GOTPAGE
Lloh20:
	ldr	x23, [x23, _PSC_PWM@GOTPAGEOFF]
	ldr	w6, [x23]
	mov	x8, #4294967296
	str	x8, [sp]
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	mov	x2, #0
	mov	x3, x20
	mov	x4, x19
	mov	w7, #0
	bl	_pmbus_add_sensor
	cbz	x0, LBB0_6
; %bb.4:
Lloh23:
	adrp	x8, _PMBUS_VIRT_PWM_ENABLE_1@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PMBUS_VIRT_PWM_ENABLE_1@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	add	x5, x8, x22
	ldr	w6, [x23]
	str	xzr, [sp]
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
Lloh28:
	adrp	x2, l_.str.3@PAGE
Lloh29:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x21
	mov	x3, x20
	mov	x4, x19
	mov	w7, #1
	bl	_pmbus_add_sensor
	cbz	x0, LBB0_6
LBB0_5:
	mov	w0, #0
	b	LBB0_7
LBB0_6:
Lloh30:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fan"

l_.str.1:                               ; @.str.1
	.asciz	"target"

	.comm	_PMBUS_VIRT_FAN_TARGET_1,8,3    ; @PMBUS_VIRT_FAN_TARGET_1
	.comm	_PSC_FAN,4,2                    ; @PSC_FAN
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PMBUS_HAVE_PWM12,4,2           ; @PMBUS_HAVE_PWM12
	.comm	_PMBUS_HAVE_PWM34,4,2           ; @PMBUS_HAVE_PWM34
l_.str.2:                               ; @.str.2
	.asciz	"pwm"

	.comm	_PMBUS_VIRT_PWM_1,8,3           ; @PMBUS_VIRT_PWM_1
	.comm	_PSC_PWM,4,2                    ; @PSC_PWM
l_.str.3:                               ; @.str.3
	.asciz	"enable"

	.comm	_PMBUS_VIRT_PWM_ENABLE_1,8,3    ; @PMBUS_VIRT_PWM_ENABLE_1
	.no_dead_strip	_pmbus_add_fan_ctrl
.subsections_via_symbols
