	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qib_7220_tempsense_rd
_qib_7220_tempsense_rd:                 ## @qib_7220_tempsense_rd
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$8, %esi
	jl	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_2:
	movl	%esi, %r15d
	movq	_VALID_TS_RD_REG_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	btl	%esi, %eax
	jae	LBB0_3
## %bb.4:
	movq	%rdi, %r14
	callq	_mutex_lock_interruptible
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	movq	_QIB_TWSI_TEMP_DEV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rcx
	movq	%r14, %rdi
	movl	%r15d, %edx
	movl	$1, %r8d
	callq	_qib_twsi_blk_rd
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movl	-28(%rbp), %ebx
LBB0_7:
	movq	%r14, %rdi
	callq	_mutex_unlock
	jmp	LBB0_8
LBB0_3:
	xorl	%ebx, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_VALID_TS_RD_REG_MASK,4,2       ## @VALID_TS_RD_REG_MASK
	.comm	_QIB_TWSI_TEMP_DEV,4,2          ## @QIB_TWSI_TEMP_DEV
	.no_dead_strip	_qib_7220_tempsense_rd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qib_7220_tempsense_rd
_qib_7220_tempsense_rd:                 ; @qib_7220_tempsense_rd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	cmp	w1, #8
	b.lt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_6
LBB0_2:
	mov	x20, x1
Lloh3:
	adrp	x8, _VALID_TS_RD_REG_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VALID_TS_RD_REG_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsr	w8, w8, w1
	tbz	w8, #0, LBB0_5
; %bb.3:
	mov	x19, x0
	bl	_mutex_lock_interruptible
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.4:
Lloh6:
	adrp	x8, _QIB_TWSI_TEMP_DEV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _QIB_TWSI_TEMP_DEV@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x3, sp, #12
	mov	x0, x19
	mov	x2, x20
	mov	w4, #1
	bl	_qib_twsi_blk_rd
	ldr	w8, [sp, #12]
	cmp	w0, #0
	csel	w21, w8, w0, eq
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_6
LBB0_5:
	mov	w21, #0
LBB0_6:
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_VALID_TS_RD_REG_MASK,4,2       ; @VALID_TS_RD_REG_MASK
	.comm	_QIB_TWSI_TEMP_DEV,4,2          ; @QIB_TWSI_TEMP_DEV
	.no_dead_strip	_qib_7220_tempsense_rd
.subsections_via_symbols
