	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxreg_hotplug_health_work_helper
_mlxreg_hotplug_health_work_helper:     ## @mlxreg_hotplug_health_work_helper
	.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
	cmpl	$0, (%rsi)
	jle	LBB0_15
## %bb.1:
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	8(%rsi), %rbx
	xorl	%r13d, %r13d
	movq	_MLXREG_HOTPLUG_MASK_OFF@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r15), %edi
	movq	(%r12), %rsi
	addq	8(%rbx), %rsi
	xorl	%edx, %edx
	callq	_regmap_write
	testl	%eax, %eax
	jne	LBB0_14
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%r15), %edi
	movq	8(%rbx), %rsi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	jne	LBB0_14
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %eax
	andl	4(%rbx), %eax
	movl	%eax, -44(%rbp)
	cmpl	%eax, 4(%r14)
	je	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %ecx
	movq	_MLXREG_HOTPLUG_GOOD_HEALTH_MASK@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%ecx, %ecx
	jne	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_mlxreg_hotplug_device_create
	movl	$1, (%rbx)
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	testl	%ecx, %ecx
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_mlxreg_hotplug_device_destroy
	movl	$0, (%rbx)
	movq	$0, 16(%rbx)
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %eax
	movl	%eax, 4(%r14)
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%r15), %edi
	movq	_MLXREG_HOTPLUG_EVENT_OFF@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	xorl	%edx, %edx
	callq	_regmap_write
	testl	%eax, %eax
	jne	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%r15), %edi
	movq	(%r12), %rsi
	addq	8(%rbx), %rsi
	movl	4(%rbx), %edx
	callq	_regmap_write
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	incl	%r13d
	addq	$24, %rbx
	cmpl	(%r14), %r13d
	jl	LBB0_2
	jmp	LBB0_15
LBB0_14:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLXREG_HOTPLUG_MASK_OFF,8,3    ## @MLXREG_HOTPLUG_MASK_OFF
	.comm	_MLXREG_HOTPLUG_GOOD_HEALTH_MASK,4,2 ## @MLXREG_HOTPLUG_GOOD_HEALTH_MASK
	.comm	_MLXREG_HOTPLUG_EVENT_OFF,8,3   ## @MLXREG_HOTPLUG_EVENT_OFF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to complete workqueue.\n"

	.no_dead_strip	_mlxreg_hotplug_health_work_helper
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxreg_hotplug_health_work_helper
_mlxreg_hotplug_health_work_helper:     ; @mlxreg_hotplug_health_work_helper
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	w8, [x1]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	mov	w22, #0
Lloh0:
	adrp	x23, _MLXREG_HOTPLUG_MASK_OFF@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MLXREG_HOTPLUG_MASK_OFF@GOTPAGEOFF]
	ldr	x21, [x1, #8]
Lloh2:
	adrp	x24, _MLXREG_HOTPLUG_EVENT_OFF@GOTPAGE
Lloh3:
	ldr	x24, [x24, _MLXREG_HOTPLUG_EVENT_OFF@GOTPAGEOFF]
	mov	w25, #1
Lloh4:
	adrp	x26, _MLXREG_HOTPLUG_GOOD_HEALTH_MASK@GOTPAGE
Lloh5:
	ldr	x26, [x26, _MLXREG_HOTPLUG_GOOD_HEALTH_MASK@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #4]
	ldr	x8, [x21, #8]
	ldr	x9, [x23]
	add	x1, x9, x8
	mov	w2, #0
	bl	_regmap_write
	cbnz	w0, LBB0_14
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x19, #4]
	ldr	x1, [x21, #8]
	add	x2, sp, #12
	bl	_regmap_read
	cbnz	w0, LBB0_14
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x21, #4]
	ldr	w9, [sp, #12]
	and	w8, w9, w8
	str	w8, [sp, #12]
	ldr	w9, [x20, #4]
	cmp	w9, w8
	b.eq	LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w10, [x26]
	ldr	w9, [x21]
	cmp	w8, w10
	b.ne	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	cbnz	w9, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_mlxreg_hotplug_device_create
	str	w25, [x21]
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=1
	cbz	w9, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_mlxreg_hotplug_device_destroy
	str	wzr, [x21]
	str	xzr, [x21, #16]
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [sp, #12]
	str	w8, [x20, #4]
LBB0_11:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x19, #4]
	ldr	x8, [x21, #8]
	ldr	x9, [x24]
	add	x1, x9, x8
	mov	w2, #0
	bl	_regmap_write
	cbnz	w0, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x19, #4]
	ldr	x8, [x21, #8]
	ldr	x9, [x23]
	add	x1, x9, x8
	ldr	w2, [x21, #4]
	bl	_regmap_write
	cbnz	w0, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_2 Depth=1
	add	w22, w22, #1
	add	x21, x21, #24
	ldr	w8, [x20]
	cmp	w22, w8
	b.lt	LBB0_2
	b	LBB0_15
LBB0_14:
	ldr	w0, [x19]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_15:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MLXREG_HOTPLUG_MASK_OFF,8,3    ; @MLXREG_HOTPLUG_MASK_OFF
	.comm	_MLXREG_HOTPLUG_GOOD_HEALTH_MASK,4,2 ; @MLXREG_HOTPLUG_GOOD_HEALTH_MASK
	.comm	_MLXREG_HOTPLUG_EVENT_OFF,8,3   ; @MLXREG_HOTPLUG_EVENT_OFF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to complete workqueue.\n"

	.no_dead_strip	_mlxreg_hotplug_health_work_helper
.subsections_via_symbols
