	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ibmpex_find_sensors
_ibmpex_find_sensors:                   ## @ibmpex_find_sensors
	.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
	movq	%rdi, %r13
	callq	_ibmpex_query_sensor_count
	testl	%eax, %eax
	jle	LBB0_1
## %bb.3:
	movl	%eax, (%r13)
	shll	$4, %eax
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_kzalloc
	movq	%rax, 8(%r13)
	testq	%rax, %rax
	je	LBB0_32
## %bb.4:
	cmpl	$0, (%r13)
	jle	LBB0_14
## %bb.5:
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	%r14d, %ebx
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	incq	%r15
	movslq	(%r13), %rax
	cmpq	%rax, %r15
	jge	LBB0_14
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_20 Depth 2
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_ibmpex_query_sensor_name
	testl	%eax, %eax
	jne	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	20(%r13), %esi
	movl	24(%r13), %edi
	callq	_is_power_sensor
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	_POWER_SENSOR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	incl	%ebx
	movl	20(%r13), %edx
	movl	24(%r13), %esi
	movq	%r13, %rdi
	callq	_power_sensor_multiplier
	movl	%ebx, %r14d
	jmp	LBB0_11
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	20(%r13), %esi
	movl	24(%r13), %edi
	callq	_is_temp_sensor
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	%ebx, %r14d
	movq	_TEMP_SENSOR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	incl	%r12d
	movl	$1000, %eax                     ## imm = 0x3E8
	movl	%r12d, %ebx
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	8(%r13), %rcx
	movq	%r15, %rdx
	shlq	$4, %rdx
	movl	%eax, (%rcx,%rdx)
	movl	$1, 4(%rcx,%rdx)
	movq	_PEX_NUM_SENSOR_FUNCS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_12
## %bb.19:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_20:                                ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r13, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%ebx, %edx
	movl	%r15d, %ecx
	movl	%r12d, %r8d
	callq	_create_sensor
	testl	%eax, %eax
	jne	LBB0_21
## %bb.17:                              ##   in Loop: Header=BB0_20 Depth=2
	incl	%r12d
	movq	_PEX_NUM_SENSOR_FUNCS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jl	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_12
LBB0_1:
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_32:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_31
LBB0_14:
	movl	16(%r13), %edi
	movq	_sensor_dev_attr_reset_high_low@GOTPCREL(%rip), %rsi
	callq	_device_create_file
	testl	%eax, %eax
	jne	LBB0_21
## %bb.15:
	movl	16(%r13), %edi
	movq	_sensor_dev_attr_name@GOTPCREL(%rip), %rsi
	callq	_device_create_file
	testl	%eax, %eax
	je	LBB0_16
LBB0_21:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	16(%r13), %edi
	movq	_sensor_dev_attr_reset_high_low@GOTPCREL(%rip), %rsi
	callq	_device_remove_file
	movl	16(%r13), %edi
	movq	_sensor_dev_attr_name@GOTPCREL(%rip), %rsi
	callq	_device_remove_file
	movl	(%r13), %ecx
	testl	%ecx, %ecx
	jle	LBB0_30
## %bb.22:
	movq	_PEX_NUM_SENSOR_FUNCS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r15d, %r15d
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_28:                                ##   in Loop: Header=BB0_23 Depth=1
	movl	(%r13), %ecx
LBB0_29:                                ##   in Loop: Header=BB0_23 Depth=1
	incq	%r15
	movslq	%ecx, %rdx
	cmpq	%rdx, %r15
	jge	LBB0_30
LBB0_23:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_25 Depth 2
	testl	%eax, %eax
	jle	LBB0_29
## %bb.24:                              ##   in Loop: Header=BB0_23 Depth=1
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	jmp	LBB0_25
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_25 Depth=2
	incq	%r14
	movslq	%eax, %rcx
	addq	$8, %rbx
	cmpq	%rcx, %r14
	jge	LBB0_28
LBB0_25:                                ##   Parent Loop BB0_23 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%r13), %rcx
	movq	%r15, %r12
	shlq	$4, %r12
	movq	8(%rcx,%r12), %rsi
	cmpq	$0, (%rsi,%rbx)
	je	LBB0_27
## %bb.26:                              ##   in Loop: Header=BB0_25 Depth=2
	addq	%rbx, %rsi
	movl	16(%r13), %edi
	callq	_device_remove_file
	movq	8(%r13), %rax
	movq	8(%rax,%r12), %rax
	movq	(%rax,%rbx), %rdi
	callq	_kfree
	movq	_PEX_NUM_SENSOR_FUNCS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_27
LBB0_30:
	movq	8(%r13), %rdi
	callq	_kfree
	movl	-44(%rbp), %eax                 ## 4-byte Reload
LBB0_31:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	xorl	%eax, %eax
	jmp	LBB0_31
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_POWER_SENSOR,4,2               ## @POWER_SENSOR
	.comm	_TEMP_SENSOR,4,2                ## @TEMP_SENSOR
	.comm	_PEX_NUM_SENSOR_FUNCS,4,2       ## @PEX_NUM_SENSOR_FUNCS
	.comm	_sensor_dev_attr_reset_high_low,8,3 ## @sensor_dev_attr_reset_high_low
	.comm	_sensor_dev_attr_name,8,3       ## @sensor_dev_attr_name
	.no_dead_strip	_ibmpex_find_sensors
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ibmpex_find_sensors
_ibmpex_find_sensors:                   ; @ibmpex_find_sensors
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	bl	_ibmpex_query_sensor_count
	cmp	w0, #0
	b.le	LBB0_15
; %bb.1:
	str	w0, [x19]
	lsl	w0, w0, #4
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_kzalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_16
; %bb.2:
	ldr	w8, [x19]
Lloh3:
	adrp	x25, _PEX_NUM_SENSOR_FUNCS@GOTPAGE
Lloh4:
	ldr	x25, [x25, _PEX_NUM_SENSOR_FUNCS@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.3:
	mov	x21, #0
	mov	w26, #0
	mov	w28, #0
	mov	w24, #1
Lloh5:
	adrp	x27, _POWER_SENSOR@GOTPAGE
Lloh6:
	ldr	x27, [x27, _POWER_SENSOR@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x19]
	cmp	x21, x8
	b.ge	LBB0_18
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	mov	x0, x19
	mov	x1, x21
	bl	_ibmpex_query_sensor_name
	cbnz	w0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldp	w1, w0, [x19, #20]
	bl	_is_power_sensor
	cbz	x0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w22, [x27]
	add	w23, w28, #1
	ldp	w2, w1, [x19, #20]
	mov	x0, x19
	bl	_power_sensor_multiplier
	mov	x28, x23
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldp	w1, w0, [x19, #20]
	bl	_is_temp_sensor
	cbz	x0, LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh7:
	adrp	x8, _TEMP_SENSOR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _TEMP_SENSOR@GOTPAGEOFF]
Lloh9:
	ldr	w22, [x8]
	add	w23, w26, #1
	mov	w0, #1000
	mov	x26, x23
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #8]
	add	x8, x8, x21, lsl #4
	stp	w0, w24, [x8]
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w24, #0
LBB0_12:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	mov	x3, x21
	mov	x4, x24
	bl	_create_sensor
	cbnz	w0, LBB0_20
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=2
	add	w24, w24, #1
	ldr	w8, [x25]
	cmp	w24, w8
	b.lt	LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w24, #1
	b	LBB0_4
LBB0_15:
Lloh10:
	adrp	x8, _ENOENT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_17
LBB0_16:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_17:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_31
LBB0_18:
	ldr	w0, [x19, #16]
Lloh14:
	adrp	x1, _sensor_dev_attr_reset_high_low@GOTPAGE
Lloh15:
	ldr	x1, [x1, _sensor_dev_attr_reset_high_low@GOTPAGEOFF]
	bl	_device_create_file
	mov	x20, x0
	cbnz	w0, LBB0_21
; %bb.19:
	ldr	w0, [x19, #16]
Lloh16:
	adrp	x1, _sensor_dev_attr_name@GOTPAGE
Lloh17:
	ldr	x1, [x1, _sensor_dev_attr_name@GOTPAGEOFF]
	bl	_device_create_file
	mov	x20, x0
	cbnz	w0, LBB0_21
	b	LBB0_31
LBB0_20:
	mov	x20, x0
LBB0_21:
	ldr	w0, [x19, #16]
Lloh18:
	adrp	x1, _sensor_dev_attr_reset_high_low@GOTPAGE
Lloh19:
	ldr	x1, [x1, _sensor_dev_attr_reset_high_low@GOTPAGEOFF]
	bl	_device_remove_file
	ldr	w0, [x19, #16]
Lloh20:
	adrp	x1, _sensor_dev_attr_name@GOTPAGE
Lloh21:
	ldr	x1, [x1, _sensor_dev_attr_name@GOTPAGEOFF]
	bl	_device_remove_file
	ldr	w9, [x19]
	cmp	w9, #1
	b.lt	LBB0_30
; %bb.22:
	mov	x21, #0
	ldr	w8, [x25]
	b	LBB0_25
LBB0_23:                                ;   in Loop: Header=BB0_25 Depth=1
	ldr	w9, [x19]
LBB0_24:                                ;   in Loop: Header=BB0_25 Depth=1
	add	x21, x21, #1
	cmp	x21, w9, sxtw
	b.ge	LBB0_30
LBB0_25:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_28 Depth 2
	cmp	w8, #1
	b.lt	LBB0_24
; %bb.26:                               ;   in Loop: Header=BB0_25 Depth=1
	mov	x22, #0
	mov	x23, #0
	b	LBB0_28
LBB0_27:                                ;   in Loop: Header=BB0_28 Depth=2
	add	x23, x23, #1
	add	x22, x22, #8
	cmp	x23, w8, sxtw
	b.ge	LBB0_23
LBB0_28:                                ;   Parent Loop BB0_25 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x9, [x19, #8]
	add	x9, x9, x21, lsl #4
	ldr	x9, [x9, #8]
	add	x1, x9, x22
	ldr	x9, [x1]
	cbz	x9, LBB0_27
; %bb.29:                               ;   in Loop: Header=BB0_28 Depth=2
	ldr	w0, [x19, #16]
	bl	_device_remove_file
	ldr	x8, [x19, #8]
	add	x8, x8, x21, lsl #4
	ldr	x8, [x8, #8]
	ldr	x0, [x8, x22]
	bl	_kfree
	ldr	w8, [x25]
	b	LBB0_27
LBB0_30:
	ldr	x0, [x19, #8]
	bl	_kfree
LBB0_31:
	mov	x0, x20
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_POWER_SENSOR,4,2               ; @POWER_SENSOR
	.comm	_TEMP_SENSOR,4,2                ; @TEMP_SENSOR
	.comm	_PEX_NUM_SENSOR_FUNCS,4,2       ; @PEX_NUM_SENSOR_FUNCS
	.comm	_sensor_dev_attr_reset_high_low,8,3 ; @sensor_dev_attr_reset_high_low
	.comm	_sensor_dev_attr_name,8,3       ; @sensor_dev_attr_name
	.no_dead_strip	_ibmpex_find_sensors
.subsections_via_symbols
