	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function imx_wdog_enable
_imx_wdog_enable:                       ## @imx_wdog_enable
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	leal	-129(%rbx), %eax
	cmpl	$-129, %eax
	ja	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_7
LBB0_2:
	movq	%rdi, %r15
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_mtx_lock
	cmpl	%ebx, (%r15)
	je	LBB0_4
## %bb.3:
	movl	%ebx, (%r15)
	movq	_WDOG_CR_REG@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_RD2
	movq	_WDOG_CR_WT_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	leal	(%rbx,%rbx), %edx
	decl	%edx
	movq	_WDOG_CR_WT_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edx
	orl	%esi, %edx
	movl	(%r12), %esi
	movq	_WDOG_CR_WDE@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r15, %rdi
	callq	_WR2
LBB0_4:
	movq	_WDOG_SR_REG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_WDOG_SR_STEP1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_WR2
	movl	(%rbx), %esi
	movq	_WDOG_SR_STEP2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_WR2
	cmpl	$0, 4(%r15)
	je	LBB0_6
## %bb.5:
	movl	$0, 4(%r15)
	movq	_WDOG_MCR_REG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_RD2
	movl	(%rbx), %esi
	movq	_WDOG_MCR_PDE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movq	%r15, %rdi
	callq	_WR2
LBB0_6:
	movq	%r14, %rdi
	callq	_mtx_unlock
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_WDOG_CR_REG,4,2                ## @WDOG_CR_REG
	.comm	_WDOG_CR_WT_MASK,4,2            ## @WDOG_CR_WT_MASK
	.comm	_WDOG_CR_WT_SHIFT,4,2           ## @WDOG_CR_WT_SHIFT
	.comm	_WDOG_CR_WDE,4,2                ## @WDOG_CR_WDE
	.comm	_WDOG_SR_REG,4,2                ## @WDOG_SR_REG
	.comm	_WDOG_SR_STEP1,4,2              ## @WDOG_SR_STEP1
	.comm	_WDOG_SR_STEP2,4,2              ## @WDOG_SR_STEP2
	.comm	_WDOG_MCR_REG,4,2               ## @WDOG_MCR_REG
	.comm	_WDOG_MCR_PDE,4,2               ## @WDOG_MCR_PDE
	.no_dead_strip	_imx_wdog_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function imx_wdog_enable
_imx_wdog_enable:                       ; @imx_wdog_enable
	.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
	sub	w8, w1, #129
	cmn	w8, #129
	b.hi	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_7
LBB0_2:
	mov	x21, x1
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_mtx_lock
	ldr	w8, [x20]
	cmp	w8, w21
	b.eq	LBB0_4
; %bb.3:
	str	w21, [x20]
Lloh3:
	adrp	x22, _WDOG_CR_REG@GOTPAGE
Lloh4:
	ldr	x22, [x22, _WDOG_CR_REG@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_RD2
Lloh5:
	adrp	x8, _WDOG_CR_WT_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _WDOG_CR_WT_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	bic	w8, w0, w8
	lsl	w9, w21, #1
	sub	w9, w9, #1
Lloh8:
	adrp	x10, _WDOG_CR_WT_SHIFT@GOTPAGE
Lloh9:
	ldr	x10, [x10, _WDOG_CR_WT_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w8, w9, w8
	ldr	w1, [x22]
Lloh11:
	adrp	x9, _WDOG_CR_WDE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _WDOG_CR_WDE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x20
	bl	_WR2
LBB0_4:
Lloh14:
	adrp	x21, _WDOG_SR_REG@GOTPAGE
Lloh15:
	ldr	x21, [x21, _WDOG_SR_REG@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh16:
	adrp	x8, _WDOG_SR_STEP1@GOTPAGE
Lloh17:
	ldr	x8, [x8, _WDOG_SR_STEP1@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_WR2
	ldr	w1, [x21]
Lloh19:
	adrp	x8, _WDOG_SR_STEP2@GOTPAGE
Lloh20:
	ldr	x8, [x8, _WDOG_SR_STEP2@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_WR2
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_6
; %bb.5:
	str	wzr, [x20, #4]
Lloh22:
	adrp	x21, _WDOG_MCR_REG@GOTPAGE
Lloh23:
	ldr	x21, [x21, _WDOG_MCR_REG@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x20
	bl	_RD2
	ldr	w1, [x21]
Lloh24:
	adrp	x8, _WDOG_MCR_PDE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _WDOG_MCR_PDE@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	bic	w2, w0, w8
	mov	x0, x20
	bl	_WR2
LBB0_6:
	mov	x0, x19
	bl	_mtx_unlock
	mov	w0, #0
LBB0_7:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_WDOG_CR_REG,4,2                ; @WDOG_CR_REG
	.comm	_WDOG_CR_WT_MASK,4,2            ; @WDOG_CR_WT_MASK
	.comm	_WDOG_CR_WT_SHIFT,4,2           ; @WDOG_CR_WT_SHIFT
	.comm	_WDOG_CR_WDE,4,2                ; @WDOG_CR_WDE
	.comm	_WDOG_SR_REG,4,2                ; @WDOG_SR_REG
	.comm	_WDOG_SR_STEP1,4,2              ; @WDOG_SR_STEP1
	.comm	_WDOG_SR_STEP2,4,2              ; @WDOG_SR_STEP2
	.comm	_WDOG_MCR_REG,4,2               ; @WDOG_MCR_REG
	.comm	_WDOG_MCR_PDE,4,2               ; @WDOG_MCR_PDE
	.no_dead_strip	_imx_wdog_enable
.subsections_via_symbols
