	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function repaper_get_temperature
_repaper_get_temperature:               ## @repaper_get_temperature
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	$0, -12(%rbp)
	movl	16(%rdi), %edi
	testl	%edi, %edi
	je	LBB0_11
## %bb.1:
	leaq	-12(%rbp), %rsi
	callq	_thermal_zone_get_temp
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_DRM_DEV_ERROR
	jmp	LBB0_11
LBB0_3:
	movl	-12(%rbp), %ecx
	movl	$170, %eax
	cmpl	$-9999, %ecx                    ## imm = 0xD8F1
	jl	LBB0_10
## %bb.4:
	movl	$120, %eax
	cmpl	$-4999, %ecx                    ## imm = 0xEC79
	jl	LBB0_10
## %bb.5:
	movl	$80, %eax
	cmpl	$6000, %ecx                     ## imm = 0x1770
	jl	LBB0_10
## %bb.6:
	movl	$40, %eax
	cmpl	$11000, %ecx                    ## imm = 0x2AF8
	jb	LBB0_10
## %bb.7:
	movl	$30, %eax
	cmpl	$16000, %ecx                    ## imm = 0x3E80
	jb	LBB0_10
## %bb.8:
	movl	$20, %eax
	cmpl	$21000, %ecx                    ## imm = 0x5208
	jb	LBB0_10
## %bb.9:
	xorl	%eax, %eax
	cmpl	$41000, %ecx                    ## imm = 0xA028
	setb	%al
	leal	(%rax,%rax,2), %eax
	addl	$7, %eax
LBB0_10:
	imull	4(%rbx), %eax
	movl	$3435973837, %ecx               ## imm = 0xCCCCCCCD
	imulq	%rax, %rcx
	shrq	$35, %rcx
	movl	%ecx, (%rbx)
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to get temperature (%d)\n"

	.no_dead_strip	_repaper_get_temperature
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function repaper_get_temperature
_repaper_get_temperature:               ; @repaper_get_temperature
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	str	wzr, [sp, #12]
	ldr	w0, [x0, #16]
	cbz	w0, LBB0_7
; %bb.1:
	add	x1, sp, #12
	bl	_thermal_zone_get_temp
	cbz	w0, LBB0_3
; %bb.2:
	mov	x2, x0
	ldr	x0, [x19, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DRM_DEV_ERROR
	b	LBB0_7
LBB0_3:
	ldr	w8, [sp, #12]
	mov	w9, #-9999
	cmp	w8, w9
	b.ge	LBB0_5
; %bb.4:
	mov	w8, #170
	b	LBB0_6
LBB0_5:
	mov	w9, #120
	mov	w10, #-4999
	mov	w11, #80
	mov	w12, #6000
	mov	w13, #40
	lsr	w14, w8, #3
	mov	w15, #30
	lsr	w16, w8, #7
	mov	w17, #20
	mov	w0, #41000
	mov	w1, #7
	mov	w2, #10
	cmp	w8, w0
	csel	w0, w2, w1, lo
	cmp	w14, #2625
	csel	w17, w17, w0, lo
	cmp	w16, #125
	csel	w15, w15, w17, lo
	cmp	w14, #1375
	csel	w13, w13, w15, lo
	cmp	w8, w12
	csel	w11, w11, w13, lt
	cmp	w8, w10
	csel	w8, w9, w11, lt
LBB0_6:
	ldr	w9, [x19, #4]
	mul	w8, w9, w8
	mov	w9, #52429
	movk	w9, #52428, lsl #16
	umull	x8, w8, w9
	lsr	x8, x8, #35
	str	w8, [x19]
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to get temperature (%d)\n"

	.no_dead_strip	_repaper_get_temperature
.subsections_via_symbols
