	.file	"extr_smu.c_smu_fan_set_rpm.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	smu_fan_set_rpm, @function
smu_fan_set_rpm:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	sub	rsp, 32
	.cfi_def_cfa_offset 64
	mov	r12d, DWORD PTR 20[rdi]
	mov	edi, DWORD PTR 16[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR SMU_FAN[rip]
	mov	DWORD PTR 16[rsp], eax
	call	max@PLT
	mov	edi, DWORD PTR 12[rbx]
	mov	esi, eax
	call	min@PLT
	mov	rdi, rbx
	mov	ebp, eax
	call	smu_fan_check_old_style@PLT
	mov	eax, DWORD PTR [rbx]
	test	eax, eax
	jne	.L2
	mov	rax, QWORD PTR 8[rsp]
	mov	ecx, ebp
	mov	rsi, rsp
	mov	edi, r12d
	mov	DWORD PTR [rsp], 4
	mov	DWORD PTR [rax], 48
	mov	edx, DWORD PTR 4[rbx]
	mov	DWORD PTR 4[rax], edx
	movzx	edx, ch
	mov	DWORD PTR 8[rax], edx
	movzx	edx, bpl
	mov	DWORD PTR 12[rax], edx
	mov	edx, 1
	call	smu_run_cmd@PLT
	test	eax, eax
	jne	.L3
.L5:
	mov	DWORD PTR 8[rbx], ebp
	xor	eax, eax
.L1:
	mov	rcx, QWORD PTR 24[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L12
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rax, QWORD PTR 8[rsp]
	mov	edx, 1
	mov	rsi, rsp
	mov	edi, r12d
	mov	DWORD PTR [rsp], 14
	mov	DWORD PTR [rax], 0
	mov	ecx, DWORD PTR 4[rbx]
	sal	edx, cl
	mov	ecx, ebp
	mov	DWORD PTR 4[rax], edx
	mov	edx, DWORD PTR 4[rbx]
	movzx	ecx, ch
	lea	edx, 2[rdx+rdx]
	movsx	rdx, edx
	mov	DWORD PTR [rax+rdx*4], ecx
	mov	edx, DWORD PTR 4[rbx]
	movzx	ecx, bpl
	lea	edx, 3[rdx+rdx]
	movsx	rdx, edx
	mov	DWORD PTR [rax+rdx*4], ecx
	mov	edx, 1
	call	smu_run_cmd@PLT
	test	eax, eax
	jne	.L1
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	cmp	DWORD PTR EWOULDBLOCK[rip], eax
	je	.L1
	mov	DWORD PTR [rbx], 1
	jmp	.L1
.L12:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	smu_fan_set_rpm, .-smu_fan_set_rpm
	.comm	SMU_FAN,4,4
	.comm	EWOULDBLOCK,4,4
	.comm	EIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_smu.c_smu_fan_set_rpm.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	smu_fan_set_rpm, %function
smu_fan_set_rpm:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	ldr	r3, .L13
	ldr	r2, .L13+4
	ldr	r3, [r3]
	sub	sp, sp, #16
	ldr	r0, [r0, #16]
	ldr	r2, [r2]
	str	r2, [sp, #12]
	mov	r2,#0
	ldr	r6, [r4, #20]
	str	r3, [sp, #8]
	bl	max
	mov	r1, r0
	ldr	r0, [r4, #12]
	bl	min
	mov	r5, r0
	mov	r0, r4
	bl	smu_fan_check_old_style
	ldr	r3, [r4]
	cmp	r3, #0
	bne	.L2
	mov	r1, #4
	mov	r2, #48
	ldr	r3, [sp, #4]
	str	r1, [sp]
	str	r2, [r3]
	ldr	r1, [r4, #4]
	asr	r2, r5, #8
	and	r2, r2, #255
	str	r1, [r3, #4]
	and	r1, r5, #255
	str	r2, [r3, #8]
	str	r1, [r3, #12]
	mov	r0, r6
	mov	r2, #1
	mov	r1, sp
	bl	smu_run_cmd
	cmp	r0, #0
	bne	.L3
.L5:
	mov	r0, #0
	str	r5, [r4, #8]
.L1:
	ldr	r3, .L13+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L12
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, pc}
.L2:
	mov	r0, #14
	mov	r1, #0
	mov	r2, #1
	ldr	r3, [sp, #4]
	str	r0, [sp]
	str	r1, [r3]
	ldr	r0, [r4, #4]
	asr	r1, r5, #8
	lsl	r0, r2, r0
	str	r0, [r3, #4]
	ldr	r0, [r4, #4]
	and	r1, r1, #255
	add	r0, r0, r2
	str	r1, [r3, r0, lsl #3]
	ldr	r0, [r4, #4]
	and	r1, r5, #255
	add	r3, r3, r0, lsl #3
	str	r1, [r3, #12]
	mov	r0, r6
	mov	r1, sp
	bl	smu_run_cmd
	cmp	r0, #0
	bne	.L1
	b	.L5
.L3:
	ldr	r3, .L13+8
	ldr	r3, [r3]
	cmp	r3, r0
	movne	r3, #1
	strne	r3, [r4]
	b	.L1
.L12:
	bl	__stack_chk_fail
.L14:
	.align	2
.L13:
	.word	SMU_FAN
	.word	.LC0
	.word	EWOULDBLOCK
	.size	smu_fan_set_rpm, .-smu_fan_set_rpm
	.comm	SMU_FAN,4,4
	.comm	EWOULDBLOCK,4,4
	.comm	EIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
