	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_zone
_set_zone:                              ## @set_zone
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	callq	_dev_get_drvdata
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_to_sensor_dev_attr_2
	movslq	(%rax), %r12
	movl	4(%rax), %ebx
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	movl	$10, %esi
	callq	_kstrtol
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	movq	%r13, %rdi
	callq	_mutex_lock
	leal	-128(%rbx), %eax
	cmpl	$3, %eax
	ja	LBB0_9
## %bb.2:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_8:
	movq	-48(%rbp), %rdi
	callq	_TEMP_TO_REG
	movq	8(%r13), %rcx
	movq	%rax, (%rcx,%r12,8)
	movl	%r12d, %edi
	callq	_DME1737_REG_ZONE_ABS
	movq	8(%r13), %rcx
	jmp	LBB0_5
LBB0_9:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_dev_dbg
	jmp	LBB0_10
LBB0_7:
	movl	%r12d, %edi
	callq	_DME1737_REG_ZONE_LOW
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_dme1737_read
	movq	24(%r13), %rcx
	movq	%rax, (%rcx,%r12,8)
	movq	24(%r13), %rax
	movq	(%rax,%r12,8), %rdi
	movl	$8, %esi
	callq	_TEMP_FROM_REG
	movl	%eax, %r14d
	movq	-48(%rbp), %rdi
	leal	80000(%r14), %edx
	movl	%eax, %esi
	callq	_clamp_val
	movq	%rax, -48(%rbp)
	movl	%r12d, %edi
	callq	_DME1737_REG_PWM_FREQ
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_dme1737_read
	movq	-48(%rbp), %rdi
	movslq	%r14d, %rcx
	subq	%rcx, %rdi
	movq	%rax, %rsi
	callq	_TEMP_RANGE_TO_REG
	movq	16(%r13), %rcx
	movq	%rax, (%rcx,%r12,8)
	movl	%r12d, %edi
	callq	_DME1737_REG_PWM_FREQ
	movq	16(%r13), %rcx
	jmp	LBB0_5
LBB0_3:
	movq	%r12, %r15
	movl	%r15d, %edi
	callq	_DME1737_REG_ZONE_LOW
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_dme1737_read
	movq	24(%r13), %rcx
	movq	%rax, (%rcx,%r12,8)
	movq	24(%r13), %rax
	movq	(%rax,%r12,8), %rdi
	movl	$8, %esi
	callq	_TEMP_FROM_REG
	movl	%eax, %r12d
	xorl	%r14d, %r14d
	cmpl	$2, %r15d
	sete	%r14b
	movl	%r14d, %edi
	callq	_DME1737_REG_ZONE_HYST
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_dme1737_read
	movq	-48(%rbp), %rsi
	movl	%r12d, %edi
	movl	%r15d, %edx
	movq	%rax, %rcx
	callq	_TEMP_HYST_TO_REG
	movq	32(%r13), %rcx
	movq	%rax, (%rcx,%r14,8)
	movl	%r14d, %edi
	callq	_DME1737_REG_ZONE_HYST
	movq	32(%r13), %rcx
	movq	(%rcx,%r14,8), %rdx
	jmp	LBB0_6
LBB0_4:
	movq	-48(%rbp), %rdi
	callq	_TEMP_TO_REG
	movq	24(%r13), %rcx
	movq	%rax, (%rcx,%r12,8)
	movl	%r12d, %edi
	callq	_DME1737_REG_ZONE_LOW
	movq	24(%r13), %rcx
LBB0_5:
	movq	(%rcx,%r12,8), %rdx
LBB0_6:
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_dme1737_write
LBB0_10:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_mutex_unlock
	movl	%r12d, %eax
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
LJTI0_0:
	.long	L0_0_set_8
	.long	L0_0_set_7
	.long	L0_0_set_3
	.long	L0_0_set_4
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown function %d.\n"

	.no_dead_strip	_set_zone
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_zone
_set_zone:                              ; @set_zone
	.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
	mov	x19, x3
	mov	x24, x2
	mov	x21, x1
	mov	x22, x0
	bl	_dev_get_drvdata
	mov	x20, x0
	mov	x0, x21
	bl	_to_sensor_dev_attr_2
	ldp	w21, w23, [x0]
                                        ; kill: def $w21 killed $w21 def $x21
	sxtw	x21, w21
	add	x2, sp, #8
	mov	x0, x24
	mov	w1, #10
	bl	_kstrtol
	cbnz	w0, LBB0_11
; %bb.1:
	mov	x0, x20
	bl	_mutex_lock
	sub	w8, w23, #128
	cmp	w8, #3
	b.hi	LBB0_4
; %bb.2:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
	ldr	x0, [sp, #8]
	bl	_TEMP_TO_REG
	ldr	x8, [x20, #8]
	lsl	x22, x21, #3
	str	x0, [x8, x22]
	mov	x0, x21
	bl	_DME1737_REG_ZONE_ABS
	mov	x1, x0
	ldr	x8, [x20, #8]
	b	LBB0_8
LBB0_4:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	mov	x2, x23
	bl	_dev_dbg
	b	LBB0_10
LBB0_5:
	mov	x0, x21
	bl	_DME1737_REG_ZONE_LOW
	mov	x1, x0
	mov	x0, x20
	bl	_dme1737_read
	ldr	x8, [x20, #24]
	lsl	x23, x21, #3
	str	x0, [x8, x23]
	ldr	x8, [x20, #24]
	ldr	x0, [x8, x23]
	mov	w1, #8
	bl	_TEMP_FROM_REG
	mov	x22, x0
	ldr	x0, [sp, #8]
	add	w8, w22, #19, lsl #12           ; =77824
	add	w2, w8, #2176
	mov	x1, x22
	bl	_clamp_val
	str	x0, [sp, #8]
	mov	x0, x21
	bl	_DME1737_REG_PWM_FREQ
	mov	x1, x0
	mov	x0, x20
	bl	_dme1737_read
	mov	x1, x0
	ldr	x8, [sp, #8]
	sub	x0, x8, w22, sxtw
	bl	_TEMP_RANGE_TO_REG
	ldr	x8, [x20, #16]
	str	x0, [x8, x23]
	mov	x0, x21
	bl	_DME1737_REG_PWM_FREQ
	mov	x1, x0
	ldr	x8, [x20, #16]
	ldr	x2, [x8, x23]
	b	LBB0_9
LBB0_6:
	mov	x0, x21
	bl	_DME1737_REG_ZONE_LOW
	mov	x1, x0
	mov	x0, x20
	bl	_dme1737_read
	ldr	x8, [x20, #24]
	lsl	x9, x21, #3
	str	x0, [x8, x9]
	ldr	x8, [x20, #24]
	ldr	x0, [x8, x9]
	mov	w1, #8
	bl	_TEMP_FROM_REG
	mov	x22, x0
	cmp	w21, #2
	cset	w23, eq
	mov	x0, x23
	bl	_DME1737_REG_ZONE_HYST
	mov	x1, x0
	mov	x0, x20
	bl	_dme1737_read
	mov	x3, x0
	ldr	x1, [sp, #8]
	mov	x0, x22
	mov	x2, x21
	bl	_TEMP_HYST_TO_REG
	ldr	x8, [x20, #32]
	lsl	x21, x23, #3
	str	x0, [x8, x21]
	mov	x0, x23
	bl	_DME1737_REG_ZONE_HYST
	mov	x1, x0
	ldr	x8, [x20, #32]
	ldr	x2, [x8, x21]
	b	LBB0_9
LBB0_7:
	ldr	x0, [sp, #8]
	bl	_TEMP_TO_REG
	ldr	x8, [x20, #24]
	lsl	x22, x21, #3
	str	x0, [x8, x22]
	mov	x0, x21
	bl	_DME1737_REG_ZONE_LOW
	mov	x1, x0
	ldr	x8, [x20, #24]
LBB0_8:
	ldr	x2, [x8, x22]
LBB0_9:
	mov	x0, x20
	bl	_dme1737_write
LBB0_10:
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x19
LBB0_11:
	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	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_5-LBB0_3)>>2
	.byte	(LBB0_6-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown function %d.\n"

	.no_dead_strip	_set_zone
.subsections_via_symbols
