	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_fan_div
_set_fan_div:                           ## @set_fan_div
	.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	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r14
	movq	%rsi, %rbx
	callq	_to_i2c_client
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_i2c_get_clientdata
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_to_sensor_dev_attr
	movq	%rax, %r12
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$10, %edx
	callq	_simple_strtol
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	_ADM1029_REG_FAN_DIV@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	(%r12), %rcx
	movl	(%rax,%rcx,4), %esi
	movq	%r13, %rdi
	callq	_i2c_smbus_read_byte_data
	cmpq	$1, %rbx
	je	LBB0_1
## %bb.2:
	cmpq	$4, %rbx
	je	LBB0_6
## %bb.3:
	cmpq	$2, %rbx
	jne	LBB0_5
## %bb.4:
	movl	$128, %ecx
	jmp	LBB0_7
LBB0_1:
	movl	$64, %ecx
	jmp	LBB0_7
LBB0_6:
	movl	$192, %ecx
LBB0_7:
	andl	$63, %eax
	orl	%ecx, %eax
	movq	(%r14), %rcx
	movq	(%r12), %rdx
	movl	(%rcx,%rdx,4), %esi
	movq	%r13, %rdi
	movl	%eax, %edx
	callq	_i2c_smbus_write_byte_data
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	jmp	LBB0_8
LBB0_5:
	movq	%r15, %rdi
	callq	_mutex_unlock
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	movq	%rbx, %rdx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subq	(%rcx), %rax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADM1029_REG_FAN_DIV,8,3        ## @ADM1029_REG_FAN_DIV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fan_div value %ld not supported. Choose one of 1, 2 or 4!\n"

	.comm	_EINVAL,8,3                     ## @EINVAL
	.no_dead_strip	_set_fan_div
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_fan_div
_set_fan_div:                           ; @set_fan_div
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x23, x2
	mov	x22, x1
	bl	_to_i2c_client
	mov	x20, x0
	bl	_i2c_get_clientdata
	mov	x21, x0
	mov	x0, x22
	bl	_to_sensor_dev_attr
	mov	x22, x0
	mov	x0, x23
	mov	x1, #0
	mov	w2, #10
	bl	_simple_strtol
	mov	x23, x0
	mov	x0, x21
	bl	_mutex_lock
Lloh0:
	adrp	x24, _ADM1029_REG_FAN_DIV@GOTPAGE
Lloh1:
	ldr	x24, [x24, _ADM1029_REG_FAN_DIV@GOTPAGEOFF]
	ldr	x8, [x24]
	ldr	x9, [x22]
	ldr	w1, [x8, x9, lsl #2]
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	cmp	x23, #1
	b.eq	LBB0_4
; %bb.1:
	cmp	x23, #4
	b.eq	LBB0_5
; %bb.2:
	cmp	x23, #2
	b.ne	LBB0_7
; %bb.3:
	mov	w8, #128
	b	LBB0_6
LBB0_4:
	mov	w8, #64
	b	LBB0_6
LBB0_5:
	mov	w8, #192
LBB0_6:
	and	w9, w0, #0x3f
	orr	w2, w8, w9
	ldr	x8, [x24]
	ldr	x9, [x22]
	ldr	w1, [x8, x9, lsl #2]
	mov	x0, x20
	bl	_i2c_smbus_write_byte_data
	mov	x0, x21
	bl	_mutex_unlock
	b	LBB0_8
LBB0_7:
	mov	x0, x21
	bl	_mutex_unlock
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x23
	bl	_dev_err
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	neg	x19, x8
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_ADM1029_REG_FAN_DIV,8,3        ; @ADM1029_REG_FAN_DIV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fan_div value %ld not supported. Choose one of 1, 2 or 4!\n"

	.comm	_EINVAL,8,3                     ; @EINVAL
	.no_dead_strip	_set_fan_div
.subsections_via_symbols
