	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smb347_irq_set
_smb347_irq_set:                        ## @smb347_irq_set
	.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
	movl	%esi, %r15d
	movq	%rdi, %r14
	movl	$1, %esi
	callq	_smb347_set_writable
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	(%r14), %edi
	movq	_CFG_FAULT_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %ecx
	testl	%r15d, %r15d
	je	LBB0_4
## %bb.3:
	movq	_CFG_FAULT_IRQ_DCIN_UV@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_4:
	movl	$255, %edx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_7
## %bb.5:
	movq	_CFG_STATUS_IRQ_TERMINATION_OR_TAPER@GOTPCREL(%rip), %rax
	movq	_CFG_STATUS_IRQ_CHARGE_TIMEOUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%r15d, %r15d
	movl	(%r14), %edi
	movq	_CFG_STATUS_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmovel	%r15d, %ecx
	movl	$255, %edx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_7
## %bb.6:
	testl	%r15d, %r15d
	movl	(%r14), %edi
	movq	_CFG_PIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CFG_PIN_EN_CHARGER_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	cmovnel	%edx, %r15d
	movl	%r15d, %ecx
	callq	_regmap_update_bits
LBB0_7:
	movl	%eax, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_smb347_set_writable
	jmp	LBB0_8
LBB0_1:
	movl	%eax, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CFG_FAULT_IRQ,4,2              ## @CFG_FAULT_IRQ
	.comm	_CFG_FAULT_IRQ_DCIN_UV,4,2      ## @CFG_FAULT_IRQ_DCIN_UV
	.comm	_CFG_STATUS_IRQ,4,2             ## @CFG_STATUS_IRQ
	.comm	_CFG_STATUS_IRQ_TERMINATION_OR_TAPER,4,2 ## @CFG_STATUS_IRQ_TERMINATION_OR_TAPER
	.comm	_CFG_STATUS_IRQ_CHARGE_TIMEOUT,4,2 ## @CFG_STATUS_IRQ_CHARGE_TIMEOUT
	.comm	_CFG_PIN,4,2                    ## @CFG_PIN
	.comm	_CFG_PIN_EN_CHARGER_ERROR,4,2   ## @CFG_PIN_EN_CHARGER_ERROR
	.no_dead_strip	_smb347_irq_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smb347_irq_set
_smb347_irq_set:                        ; @smb347_irq_set
	.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	x20, x1
	mov	x19, x0
	mov	w1, #1
	bl	_smb347_set_writable
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldr	w0, [x19]
Lloh0:
	adrp	x8, _CFG_FAULT_IRQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CFG_FAULT_IRQ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _CFG_FAULT_IRQ_DCIN_UV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CFG_FAULT_IRQ_DCIN_UV@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w20, #0
	csel	w3, wzr, w8, eq
	mov	w2, #255
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_4
; %bb.2:
	ldr	w0, [x19]
Lloh6:
	adrp	x8, _CFG_STATUS_IRQ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CFG_STATUS_IRQ@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _CFG_STATUS_IRQ_TERMINATION_OR_TAPER@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CFG_STATUS_IRQ_TERMINATION_OR_TAPER@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _CFG_STATUS_IRQ_CHARGE_TIMEOUT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CFG_STATUS_IRQ_CHARGE_TIMEOUT@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w9, w8
	cmp	w20, #0
	csel	w3, wzr, w8, eq
	mov	w2, #255
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_4
; %bb.3:
	ldr	w0, [x19]
Lloh15:
	adrp	x8, _CFG_PIN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CFG_PIN@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _CFG_PIN_EN_CHARGER_ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CFG_PIN_EN_CHARGER_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	cmp	w20, #0
	csel	w3, wzr, w2, eq
	bl	_regmap_update_bits
LBB0_4:
	mov	x21, x0
	mov	x0, x19
	mov	w1, #0
	bl	_smb347_set_writable
	b	LBB0_6
LBB0_5:
	mov	x21, x0
LBB0_6:
	mov	x0, x21
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_CFG_FAULT_IRQ,4,2              ; @CFG_FAULT_IRQ
	.comm	_CFG_FAULT_IRQ_DCIN_UV,4,2      ; @CFG_FAULT_IRQ_DCIN_UV
	.comm	_CFG_STATUS_IRQ,4,2             ; @CFG_STATUS_IRQ
	.comm	_CFG_STATUS_IRQ_TERMINATION_OR_TAPER,4,2 ; @CFG_STATUS_IRQ_TERMINATION_OR_TAPER
	.comm	_CFG_STATUS_IRQ_CHARGE_TIMEOUT,4,2 ; @CFG_STATUS_IRQ_CHARGE_TIMEOUT
	.comm	_CFG_PIN,4,2                    ; @CFG_PIN
	.comm	_CFG_PIN_EN_CHARGER_ERROR,4,2   ; @CFG_PIN_EN_CHARGER_ERROR
	.no_dead_strip	_smb347_irq_set
.subsections_via_symbols
