	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smb347_update_ps_status
_smb347_update_ps_status:               ## @smb347_update_ps_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	%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	%rdi, %r14
	movl	24(%rdi), %edi
	movq	_IRQSTAT_E@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	16(%r14), %rax
	xorl	%r12d, %r12d
	cmpq	$0, 8(%rax)
	movl	$0, %r13d
	je	LBB0_4
## %bb.3:
	movq	_IRQSTAT_E_DCIN_UV_STAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%r13d, %r13d
	testl	%ecx, -44(%rbp)
	sete	%r13b
LBB0_4:
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.5:
	movq	_IRQSTAT_E_USBIN_UV_STAT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r12d, %r12d
	testl	%eax, -44(%rbp)
	sete	%r12b
LBB0_6:
	leaq	8(%r14), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movl	$1, %ebx
	cmpl	%r13d, (%r14)
	jne	LBB0_8
## %bb.7:
	xorl	%ebx, %ebx
	cmpl	%r12d, 4(%r14)
	setne	%bl
LBB0_8:
	movl	%r13d, (%r14)
	movl	%r12d, 4(%r14)
	movq	%r15, %rdi
	callq	_mutex_unlock
	jmp	LBB0_9
LBB0_1:
	movl	%eax, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQSTAT_E,4,2                  ## @IRQSTAT_E
	.comm	_IRQSTAT_E_DCIN_UV_STAT,4,2     ## @IRQSTAT_E_DCIN_UV_STAT
	.comm	_IRQSTAT_E_USBIN_UV_STAT,4,2    ## @IRQSTAT_E_USBIN_UV_STAT
	.no_dead_strip	_smb347_update_ps_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smb347_update_ps_status
_smb347_update_ps_status:               ; @smb347_update_ps_status
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x0
	ldr	w0, [x0, #24]
Lloh0:
	adrp	x8, _IRQSTAT_E@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQSTAT_E@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	tbnz	w0, #31, LBB0_4
; %bb.1:
	ldr	x8, [x19, #16]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_5
; %bb.2:
	ldr	w9, [sp, #12]
Lloh3:
	adrp	x10, _IRQSTAT_E_DCIN_UV_STAT@GOTPAGE
Lloh4:
	ldr	x10, [x10, _IRQSTAT_E_DCIN_UV_STAT@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w9
	cset	w22, eq
	ldr	x8, [x8]
	cbz	x8, LBB0_6
LBB0_3:
	ldr	w8, [sp, #12]
Lloh6:
	adrp	x9, _IRQSTAT_E_USBIN_UV_STAT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IRQSTAT_E_USBIN_UV_STAT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w23, eq
	b	LBB0_7
LBB0_4:
	mov	x21, x0
	b	LBB0_11
LBB0_5:
	mov	w22, #0
	ldr	x8, [x8]
	cbnz	x8, LBB0_3
LBB0_6:
	mov	w23, #0
LBB0_7:
	add	x20, x19, #8
	mov	x0, x20
	bl	_mutex_lock
	ldr	w8, [x19]
	cmp	w8, w22
	b.ne	LBB0_9
; %bb.8:
	ldr	w8, [x19, #4]
	cmp	w8, w23
	cset	w21, ne
	b	LBB0_10
LBB0_9:
	mov	w21, #1
LBB0_10:
	stp	w22, w23, [x19]
	mov	x0, x20
	bl	_mutex_unlock
LBB0_11:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQSTAT_E,4,2                  ; @IRQSTAT_E
	.comm	_IRQSTAT_E_DCIN_UV_STAT,4,2     ; @IRQSTAT_E_DCIN_UV_STAT
	.comm	_IRQSTAT_E_USBIN_UV_STAT,4,2    ; @IRQSTAT_E_USBIN_UV_STAT
	.no_dead_strip	_smb347_update_ps_status
.subsections_via_symbols
