	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lgs8gl5_read_status
_lgs8gl5_read_status:                   ## @lgs8gl5_read_status
	.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
	movq	%rsi, %r14
	movq	(%rdi), %rbx
	movq	_REG_STRENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_lgs8gl5_read_reg
	movl	%eax, %r15d
	movq	_REG_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_lgs8gl5_read_reg
	movl	$0, (%r14)
	movq	_REG_STRENGTH_MASK@GOTPCREL(%rip), %rcx
	testl	%r15d, (%rcx)
	jle	LBB0_1
## %bb.2:
	movq	_FE_HAS_SIGNAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%r14)
	jmp	LBB0_3
LBB0_1:
	xorl	%ecx, %ecx
LBB0_3:
	movq	_REG_STRENGTH_CARRIER@GOTPCREL(%rip), %rdx
	testl	%r15d, (%rdx)
	je	LBB0_5
## %bb.4:
	movq	_FE_HAS_CARRIER@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movl	%ecx, (%r14)
LBB0_5:
	movq	_REG_STATUS_SYNC@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_7
## %bb.6:
	movq	_FE_HAS_SYNC@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movl	%ecx, (%r14)
LBB0_7:
	movq	_REG_STATUS_LOCK@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_9
## %bb.8:
	movq	_FE_HAS_LOCK@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, (%r14)
LBB0_9:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_STRENGTH,4,2               ## @REG_STRENGTH
	.comm	_REG_STATUS,4,2                 ## @REG_STATUS
	.comm	_REG_STRENGTH_MASK,4,2          ## @REG_STRENGTH_MASK
	.comm	_FE_HAS_SIGNAL,4,2              ## @FE_HAS_SIGNAL
	.comm	_REG_STRENGTH_CARRIER,4,2       ## @REG_STRENGTH_CARRIER
	.comm	_FE_HAS_CARRIER,4,2             ## @FE_HAS_CARRIER
	.comm	_REG_STATUS_SYNC,4,2            ## @REG_STATUS_SYNC
	.comm	_FE_HAS_SYNC,4,2                ## @FE_HAS_SYNC
	.comm	_REG_STATUS_LOCK,4,2            ## @REG_STATUS_LOCK
	.comm	_FE_HAS_LOCK,4,2                ## @FE_HAS_LOCK
	.no_dead_strip	_lgs8gl5_read_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lgs8gl5_read_status
_lgs8gl5_read_status:                   ; @lgs8gl5_read_status
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
	ldr	x21, [x0]
Lloh0:
	adrp	x8, _REG_STRENGTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_STRENGTH@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_lgs8gl5_read_reg
	mov	x20, x0
Lloh3:
	adrp	x8, _REG_STATUS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_STATUS@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_lgs8gl5_read_reg
	str	wzr, [x19]
Lloh6:
	adrp	x8, _REG_STRENGTH_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REG_STRENGTH_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	and	w8, w8, w20
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.1:
Lloh9:
	adrp	x8, _FE_HAS_SIGNAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FE_HAS_SIGNAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x19]
	b	LBB0_3
LBB0_2:
	mov	w8, #0
LBB0_3:
Lloh12:
	adrp	x9, _REG_STRENGTH_CARRIER@GOTPAGE
Lloh13:
	ldr	x9, [x9, _REG_STRENGTH_CARRIER@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w20
	b.eq	LBB0_5
; %bb.4:
Lloh15:
	adrp	x9, _FE_HAS_CARRIER@GOTPAGE
Lloh16:
	ldr	x9, [x9, _FE_HAS_CARRIER@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19]
LBB0_5:
Lloh18:
	adrp	x9, _REG_STATUS_SYNC@GOTPAGE
Lloh19:
	ldr	x9, [x9, _REG_STATUS_SYNC@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w0
	b.eq	LBB0_7
; %bb.6:
Lloh21:
	adrp	x9, _FE_HAS_SYNC@GOTPAGE
Lloh22:
	ldr	x9, [x9, _FE_HAS_SYNC@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19]
LBB0_7:
Lloh24:
	adrp	x9, _REG_STATUS_LOCK@GOTPAGE
Lloh25:
	ldr	x9, [x9, _REG_STATUS_LOCK@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	tst	w9, w0
	b.eq	LBB0_9
; %bb.8:
Lloh27:
	adrp	x9, _FE_HAS_LOCK@GOTPAGE
Lloh28:
	ldr	x9, [x9, _FE_HAS_LOCK@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19]
LBB0_9:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_STRENGTH,4,2               ; @REG_STRENGTH
	.comm	_REG_STATUS,4,2                 ; @REG_STATUS
	.comm	_REG_STRENGTH_MASK,4,2          ; @REG_STRENGTH_MASK
	.comm	_FE_HAS_SIGNAL,4,2              ; @FE_HAS_SIGNAL
	.comm	_REG_STRENGTH_CARRIER,4,2       ; @REG_STRENGTH_CARRIER
	.comm	_FE_HAS_CARRIER,4,2             ; @FE_HAS_CARRIER
	.comm	_REG_STATUS_SYNC,4,2            ; @REG_STATUS_SYNC
	.comm	_FE_HAS_SYNC,4,2                ; @FE_HAS_SYNC
	.comm	_REG_STATUS_LOCK,4,2            ; @REG_STATUS_LOCK
	.comm	_FE_HAS_LOCK,4,2                ; @FE_HAS_LOCK
	.no_dead_strip	_lgs8gl5_read_status
.subsections_via_symbols
