	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pmbus_add_fan_attributes
_pmbus_add_fan_attributes:              ## @pmbus_add_fan_attributes
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	(%rsi), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%rax)
	jle	LBB0_22
## %bb.1:
	movq	%rdi, %r14
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%r12d, %r12d
	movq	_pmbus_fan_registers@GOTPCREL(%rip), %rbx
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r12
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movslq	(%rax), %rax
	cmpq	%rax, %r12
	jge	LBB0_22
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	(%rbx), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_21
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r13d, %r13d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_4 Depth=2
	incl	-44(%rbp)                       ## 4-byte Folded Spill
LBB0_19:                                ##   in Loop: Header=BB0_4 Depth=2
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	_pmbus_fan_registers@GOTPCREL(%rip), %rbx
LBB0_20:                                ##   in Loop: Header=BB0_4 Depth=2
	incq	%r13
	movq	(%rbx), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %r13
	jge	LBB0_21
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	_pmbus_fan_flags@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%r13,4), %ecx
	testl	%ecx, (%rax,%r12,4)
	je	LBB0_21
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	(%rbx), %rax
	movl	(%rax,%r13,4), %edx
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_pmbus_check_word_register
	testq	%rax, %rax
	je	LBB0_21
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	_pmbus_fan_config_registers@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r13,4), %edx
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	__pmbus_read_byte_data
	testl	%eax, %eax
	js	LBB0_20
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	%eax, %r15d
	movq	_PB_FAN_1_INSTALLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%r13d, %r14d
	andl	$1, %r14d
	leal	(,%r14,4), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %eax
	testl	%r15d, %eax
	je	LBB0_19
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	_pmbus_fan_registers@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r13,4), %r9d
	movq	_PSC_FAN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str(%rip), %rsi
	leaq	L_.str.1(%rip), %rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%r12d, %r8d
	pushq	$1
	pushq	$1
	pushq	$1
	pushq	%rax
	callq	_pmbus_add_sensor
	addq	$32, %rsp
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	_pmbus_fan_command_registers@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r13,4), %edx
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_pmbus_check_word_register
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r12d, %ecx
	movl	%r13d, %r8d
	movl	%r15d, %r9d
	callq	_pmbus_add_fan_ctrl
	testl	%eax, %eax
	js	LBB0_23
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=2
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	_pmbus_fan_status_flags@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%r13,4), %ecx
	testl	%ecx, (%rax,%r12,4)
	je	LBB0_18
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	_pmbus_fan_status_registers@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r13,4), %edx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	callq	_pmbus_check_byte_register
	testq	%rax, %rax
	je	LBB0_18
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	_PB_STATUS_FAN_BASE@GOTPCREL(%rip), %rax
	cmpq	$2, %r13
	jb	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	_PB_STATUS_FAN34_BASE@GOTPCREL(%rip), %rax
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=2
	movl	(%rax), %ebx
	addl	%r12d, %ebx
	movq	_PB_FAN_FAN1_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%r14d, %ecx
	sarl	%cl, %eax
	movq	%r15, %rdi
	leaq	L_.str(%rip), %rsi
	leaq	L_.str.2(%rip), %rdx
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%rax
	pushq	%rbx
	callq	_pmbus_add_boolean
	addq	$16, %rsp
	testl	%eax, %eax
	jne	LBB0_23
## %bb.17:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	_PB_FAN_FAN1_FAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%r14d, %ecx
	sarl	%cl, %eax
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str(%rip), %rsi
	leaq	L_.str.3(%rip), %rdx
	movl	%r15d, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%rax
	pushq	%rbx
	callq	_pmbus_add_boolean
	addq	$16, %rsp
	testl	%eax, %eax
	je	LBB0_18
	jmp	LBB0_23
LBB0_22:
	xorl	%eax, %eax
	jmp	LBB0_23
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_23:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pmbus_fan_registers,8,3        ## @pmbus_fan_registers
	.comm	_pmbus_fan_flags,8,3            ## @pmbus_fan_flags
	.comm	_pmbus_fan_config_registers,8,3 ## @pmbus_fan_config_registers
	.comm	_PB_FAN_1_INSTALLED,4,2         ## @PB_FAN_1_INSTALLED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fan"

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

	.comm	_PSC_FAN,4,2                    ## @PSC_FAN
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_pmbus_fan_command_registers,8,3 ## @pmbus_fan_command_registers
	.comm	_pmbus_fan_status_flags,8,3     ## @pmbus_fan_status_flags
	.comm	_pmbus_fan_status_registers,8,3 ## @pmbus_fan_status_registers
	.comm	_PB_STATUS_FAN34_BASE,4,2       ## @PB_STATUS_FAN34_BASE
	.comm	_PB_STATUS_FAN_BASE,4,2         ## @PB_STATUS_FAN_BASE
L_.str.2:                               ## @.str.2
	.asciz	"alarm"

	.comm	_PB_FAN_FAN1_WARNING,4,2        ## @PB_FAN_FAN1_WARNING
L_.str.3:                               ## @.str.3
	.asciz	"fault"

	.comm	_PB_FAN_FAN1_FAULT,4,2          ## @PB_FAN_FAN1_FAULT
	.no_dead_strip	_pmbus_add_fan_attributes
.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_attributes
_pmbus_add_fan_attributes:              ; @pmbus_add_fan_attributes
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x26, [x1]
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	mov	x21, #0
Lloh0:
	adrp	x25, _pmbus_fan_registers@GOTPAGE
Lloh1:
	ldr	x25, [x25, _pmbus_fan_registers@GOTPAGEOFF]
Lloh2:
	adrp	x24, _pmbus_fan_flags@GOTPAGE
Lloh3:
	ldr	x24, [x24, _pmbus_fan_flags@GOTPAGEOFF]
	mov	w22, #1
	str	x26, [sp, #8]                   ; 8-byte Folded Spill
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x26]
	cmp	x21, x8
	b.ge	LBB0_18
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	ldr	x0, [x25]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x27, #0
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=2
	add	w22, w22, #1
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	add	x27, x27, #1
	ldr	x0, [x25]
	bl	_ARRAY_SIZE
	cmp	x27, w0, sxtw
	b.ge	LBB0_2
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x26, #8]
	ldr	w8, [x8, x21, lsl #2]
	ldr	x9, [x24]
	ldr	w9, [x9, x27, lsl #2]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	x8, [x25]
	ldr	w2, [x8, x27, lsl #2]
	mov	x0, x20
	mov	x1, x21
	bl	_pmbus_check_word_register
	cbz	x0, LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=2
Lloh4:
	adrp	x8, _pmbus_fan_config_registers@GOTPAGE
Lloh5:
	ldr	x8, [x8, _pmbus_fan_config_registers@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	ldr	w2, [x8, x27, lsl #2]
	mov	x0, x20
	mov	x1, x21
	bl	__pmbus_read_byte_data
	tbnz	w0, #31, LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=2
	mov	x28, x0
Lloh7:
	adrp	x8, _PB_FAN_1_INSTALLED@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PB_FAN_1_INSTALLED@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	and	w23, w27, #0x1
	lsl	w9, w23, #2
	asr	w8, w8, w9
	tst	w8, w0
	b.eq	LBB0_6
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=2
	ldr	x8, [x25]
	ldr	w5, [x8, x27, lsl #2]
Lloh10:
	adrp	x8, _PSC_FAN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PSC_FAN@GOTPAGEOFF]
Lloh12:
	ldr	w6, [x8]
	mov	x8, #4294967297
	str	x8, [sp]
	mov	x0, x19
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
Lloh15:
	adrp	x2, l_.str.1@PAGE
Lloh16:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x3, x22
	mov	x4, x21
	mov	w7, #1
	bl	_pmbus_add_sensor
	cbz	x0, LBB0_19
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=2
Lloh17:
	adrp	x8, _pmbus_fan_command_registers@GOTPAGE
Lloh18:
	ldr	x8, [x8, _pmbus_fan_command_registers@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	ldr	w2, [x8, x27, lsl #2]
	mov	x0, x20
	mov	x1, x21
	bl	_pmbus_check_word_register
	cbz	x0, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_7 Depth=2
	mov	x0, x20
	mov	x1, x19
	mov	x2, x22
	mov	x3, x21
	mov	x4, x27
	mov	x5, x28
	bl	_pmbus_add_fan_ctrl
	tbnz	w0, #31, LBB0_20
LBB0_14:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	x8, [x26, #8]
	ldr	w8, [x8, x21, lsl #2]
Lloh20:
	adrp	x9, _pmbus_fan_status_flags@GOTPAGE
Lloh21:
	ldr	x9, [x9, _pmbus_fan_status_flags@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	ldr	w9, [x9, x27, lsl #2]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.15:                               ;   in Loop: Header=BB0_7 Depth=2
Lloh23:
	adrp	x8, _pmbus_fan_status_registers@GOTPAGE
Lloh24:
	ldr	x8, [x8, _pmbus_fan_status_registers@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	ldr	w2, [x8, x27, lsl #2]
	mov	x0, x20
	mov	x1, x21
	bl	_pmbus_check_byte_register
	cbz	x0, LBB0_5
; %bb.16:                               ;   in Loop: Header=BB0_7 Depth=2
	mov	x26, x25
	mov	x25, x24
	cmp	x27, #1
Lloh26:
	adrp	x8, _PB_STATUS_FAN34_BASE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _PB_STATUS_FAN34_BASE@GOTPAGEOFF]
Lloh28:
	adrp	x9, _PB_STATUS_FAN_BASE@GOTPAGE
Lloh29:
	ldr	x9, [x9, _PB_STATUS_FAN_BASE@GOTPAGEOFF]
	csel	x8, x8, x9, hi
	ldr	w8, [x8]
	add	w28, w8, w21
Lloh30:
	adrp	x8, _PB_FAN_FAN1_WARNING@GOTPAGE
Lloh31:
	ldr	x8, [x8, _PB_FAN_FAN1_WARNING@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	asr	w7, w8, w23
	mov	x0, x19
Lloh33:
	adrp	x24, l_.str@PAGE
Lloh34:
	add	x24, x24, l_.str@PAGEOFF
	mov	x1, x24
Lloh35:
	adrp	x2, l_.str.2@PAGE
Lloh36:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x3, x22
	mov	x4, #0
	mov	x5, #0
	mov	x6, x28
	bl	_pmbus_add_boolean
	cbnz	w0, LBB0_20
; %bb.17:                               ;   in Loop: Header=BB0_7 Depth=2
Lloh37:
	adrp	x8, _PB_FAN_FAN1_FAULT@GOTPAGE
Lloh38:
	ldr	x8, [x8, _PB_FAN_FAN1_FAULT@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	asr	w7, w8, w23
	mov	x0, x19
	mov	x1, x24
Lloh40:
	adrp	x2, l_.str.3@PAGE
Lloh41:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x3, x22
	mov	x4, #0
	mov	x5, #0
	mov	x6, x28
	bl	_pmbus_add_boolean
	mov	x24, x25
	mov	x25, x26
	ldr	x26, [sp, #8]                   ; 8-byte Folded Reload
	cbz	w0, LBB0_5
	b	LBB0_20
LBB0_18:
	mov	w0, #0
	b	LBB0_20
LBB0_19:
Lloh42:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh43:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_20:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_pmbus_fan_registers,8,3        ; @pmbus_fan_registers
	.comm	_pmbus_fan_flags,8,3            ; @pmbus_fan_flags
	.comm	_pmbus_fan_config_registers,8,3 ; @pmbus_fan_config_registers
	.comm	_PB_FAN_1_INSTALLED,4,2         ; @PB_FAN_1_INSTALLED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fan"

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

	.comm	_PSC_FAN,4,2                    ; @PSC_FAN
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_pmbus_fan_command_registers,8,3 ; @pmbus_fan_command_registers
	.comm	_pmbus_fan_status_flags,8,3     ; @pmbus_fan_status_flags
	.comm	_pmbus_fan_status_registers,8,3 ; @pmbus_fan_status_registers
	.comm	_PB_STATUS_FAN34_BASE,4,2       ; @PB_STATUS_FAN34_BASE
	.comm	_PB_STATUS_FAN_BASE,4,2         ; @PB_STATUS_FAN_BASE
l_.str.2:                               ; @.str.2
	.asciz	"alarm"

	.comm	_PB_FAN_FAN1_WARNING,4,2        ; @PB_FAN_FAN1_WARNING
l_.str.3:                               ; @.str.3
	.asciz	"fault"

	.comm	_PB_FAN_FAN1_FAULT,4,2          ; @PB_FAN_FAN1_FAULT
	.no_dead_strip	_pmbus_add_fan_attributes
.subsections_via_symbols
