	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sch56xx_watchdog_register      ## -- Begin function sch56xx_watchdog_register
	.p2align	4, 0x90
_sch56xx_watchdog_register:             ## @sch56xx_watchdog_register
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movq	%rcx, %r12
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r13d
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	%rcx, %rdi
	callq	_mutex_lock
	movq	_SCH56XX_REG_WDOG_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r13d, %edi
	callq	_sch56xx_read_virtual_reg
	movl	%eax, %r15d
	movq	_SCH56XX_REG_WDOG_OUTPUT_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r13d, %edi
	callq	_sch56xx_read_virtual_reg
	movl	%eax, %r14d
	movq	%r12, %rdi
	callq	_mutex_unlock
	xorl	%ebx, %ebx
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	testl	%r15d, %r15d
	js	LBB0_14
## %bb.1:
	testl	%r14d, %r14d
	js	LBB0_14
## %bb.2:
	movl	%r14d, %r15d
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_5
## %bb.3:
	movq	_SCH56XX_WDOG_OUTPUT_ENABLE@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_4
LBB0_5:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$88, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_13
## %bb.6:
	movq	%rax, %rbx
	movl	%r13d, 80(%rax)
	movq	%r12, 72(%rax)
	leaq	56(%rax), %r14
	movl	64(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	$4, %edx
	callq	_strlcpy
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 60(%rbx)
	movq	_WDIOF_KEEPALIVEPING@GOTPCREL(%rip), %rcx
	movq	_WDIOF_SETTIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movl	%eax, 56(%rbx)
	movq	_nowayout@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_7
## %bb.8:
	leaq	16(%rbx), %r12
	movq	%r14, 48(%rbx)
	movq	_watchdog_ops@GOTPCREL(%rip), %rax
	movq	%rax, 40(%rbx)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 32(%rbx)
	movabsq	$4294967356, %rax               ## imm = 0x10000003C
	movq	%rax, 16(%rbx)
	movl	$15300, 24(%rbx)                ## imm = 0x3BC4
	movq	_WDOG_NO_WAY_OUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	28(%rbx), %rsi
	callq	_set_bit
	jmp	LBB0_9
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	_pr_warn
	jmp	LBB0_13
LBB0_7:
	movq	_WDIOF_MAGICCLOSE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 56(%rbx)
	leaq	16(%rbx), %r12
	movq	%r14, 48(%rbx)
	movq	_watchdog_ops@GOTPCREL(%rip), %rax
	movq	%rax, 40(%rbx)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 32(%rbx)
	movabsq	$4294967356, %rax               ## imm = 0x10000003C
	movq	%rax, 16(%rbx)
	movl	$15300, 24(%rbx)                ## imm = 0x3BC4
LBB0_9:
	movq	_SCH56XX_WDOG_OUTPUT_ENABLE@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_11
## %bb.10:
	movq	_WDOG_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	addq	$28, %rsi
	callq	_set_bit
LBB0_11:
	movq	_SCH56XX_WDOG_TIME_BASE_SEC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	andl	%edx, %eax
	movl	$1, %eax
	movl	$60, %ecx
	cmovel	%eax, %ecx
	movl	%ecx, (%rbx)
	movl	%edx, 4(%rbx)
	movl	%r15d, 8(%rbx)
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_watchdog_set_drvdata
	movq	%r12, %rdi
	callq	_watchdog_register_device
	testl	%eax, %eax
	je	LBB0_14
## %bb.12:
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_err
	movq	%rbx, %rdi
	callq	_kfree
LBB0_13:
	xorl	%ebx, %ebx
LBB0_14:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SCH56XX_REG_WDOG_CONTROL,4,2   ## @SCH56XX_REG_WDOG_CONTROL
	.comm	_SCH56XX_REG_WDOG_OUTPUT_ENABLE,4,2 ## @SCH56XX_REG_WDOG_OUTPUT_ENABLE
	.comm	_SCH56XX_WDOG_OUTPUT_ENABLE,4,2 ## @SCH56XX_WDOG_OUTPUT_ENABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Watchdog not enabled by BIOS, not registering\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.1:                               ## @.str.1
	.asciz	"sch56xx watchdog"

	.comm	_WDIOF_KEEPALIVEPING,4,2        ## @WDIOF_KEEPALIVEPING
	.comm	_WDIOF_SETTIMEOUT,4,2           ## @WDIOF_SETTIMEOUT
	.comm	_nowayout,8,3                   ## @nowayout
	.comm	_WDIOF_MAGICCLOSE,4,2           ## @WDIOF_MAGICCLOSE
	.comm	_watchdog_ops,4,2               ## @watchdog_ops
	.comm	_WDOG_NO_WAY_OUT,4,2            ## @WDOG_NO_WAY_OUT
	.comm	_WDOG_ACTIVE,4,2                ## @WDOG_ACTIVE
	.comm	_SCH56XX_WDOG_TIME_BASE_SEC,4,2 ## @SCH56XX_WDOG_TIME_BASE_SEC
L_.str.2:                               ## @.str.2
	.asciz	"Registering watchdog chardev: %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function sch56xx_watchdog_register
lCPI0_0:
	.long	60                              ; 0x3c
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_sch56xx_watchdog_register
	.p2align	2
_sch56xx_watchdog_register:             ; @sch56xx_watchdog_register
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x26, x4
	mov	x24, x3
	mov	x23, x2
	mov	x25, x1
	mov	x22, x0
	mov	x0, x3
	bl	_mutex_lock
Lloh0:
	adrp	x8, _SCH56XX_REG_WDOG_CONTROL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SCH56XX_REG_WDOG_CONTROL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x25
	bl	_sch56xx_read_virtual_reg
	mov	x20, x0
Lloh3:
	adrp	x8, _SCH56XX_REG_WDOG_OUTPUT_ENABLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SCH56XX_REG_WDOG_OUTPUT_ENABLE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x25
	bl	_sch56xx_read_virtual_reg
	mov	x21, x0
	mov	x0, x24
	bl	_mutex_unlock
	mov	x19, #0
	tbnz	w20, #31, LBB0_14
; %bb.1:
	tbnz	w21, #31, LBB0_14
; %bb.2:
Lloh6:
	adrp	x27, _SCH56XX_WDOG_OUTPUT_ENABLE@GOTPAGE
Lloh7:
	ldr	x27, [x27, _SCH56XX_WDOG_OUTPUT_ENABLE@GOTPAGEOFF]
	cbz	w26, LBB0_4
; %bb.3:
	ldr	w8, [x27]
	tst	w8, w21
	b.eq	LBB0_7
LBB0_4:
Lloh8:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	w0, #88
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_14
; %bb.5:
	str	w25, [x19, #80]
	str	x24, [x19, #72]
	ldr	w0, [x19, #64]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #4
	bl	_strlcpy
Lloh13:
	adrp	x8, _WDIOF_KEEPALIVEPING@GOTPAGE
Lloh14:
	ldr	x8, [x8, _WDIOF_KEEPALIVEPING@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _WDIOF_SETTIMEOUT@GOTPAGE
Lloh17:
	ldr	x9, [x9, _WDIOF_SETTIMEOUT@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w9, w9, w8
	mov	x8, x19
	stp	w9, w23, [x8, #56]!
Lloh19:
	adrp	x10, _nowayout@GOTPAGE
Lloh20:
	ldr	x10, [x10, _nowayout@GOTPAGEOFF]
Lloh21:
	ldr	x10, [x10]
	cbz	x10, LBB0_8
; %bb.6:
Lloh22:
	adrp	x9, lCPI0_0@PAGE
Lloh23:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
	mov	x23, x19
	str	d0, [x23, #16]!
	str	x8, [x23, #32]
Lloh24:
	adrp	x8, _watchdog_ops@GOTPAGE
Lloh25:
	ldr	x8, [x8, _watchdog_ops@GOTPAGEOFF]
	stp	x22, x8, [x23, #16]
	mov	w8, #15300
	str	w8, [x23, #8]
Lloh26:
	adrp	x8, _WDOG_NO_WAY_OUT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _WDOG_NO_WAY_OUT@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	add	x1, x23, #12
	bl	_set_bit
	b	LBB0_9
LBB0_7:
Lloh29:
	adrp	x0, l_.str@PAGE
Lloh30:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
	b	LBB0_13
LBB0_8:
Lloh31:
	adrp	x10, _WDIOF_MAGICCLOSE@GOTPAGE
Lloh32:
	ldr	x10, [x10, _WDIOF_MAGICCLOSE@GOTPAGEOFF]
Lloh33:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh34:
	adrp	x10, lCPI0_0@PAGE
Lloh35:
	ldr	d0, [x10, lCPI0_0@PAGEOFF]
	mov	x23, x19
	str	d0, [x23, #16]!
	str	w9, [x23, #40]
	str	x8, [x23, #32]
Lloh36:
	adrp	x8, _watchdog_ops@GOTPAGE
Lloh37:
	ldr	x8, [x8, _watchdog_ops@GOTPAGEOFF]
	stp	x22, x8, [x23, #16]
	mov	w8, #15300
	str	w8, [x23, #8]
LBB0_9:
	ldr	w8, [x27]
	tst	w8, w21
	b.eq	LBB0_11
; %bb.10:
Lloh38:
	adrp	x8, _WDOG_ACTIVE@GOTPAGE
Lloh39:
	ldr	x8, [x8, _WDOG_ACTIVE@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
	add	x1, x19, #28
	bl	_set_bit
LBB0_11:
Lloh41:
	adrp	x8, _SCH56XX_WDOG_TIME_BASE_SEC@GOTPAGE
Lloh42:
	ldr	x8, [x8, _SCH56XX_WDOG_TIME_BASE_SEC@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
	tst	w8, w20
	mov	w8, #60
	csinc	w8, w8, wzr, ne
	stp	w8, w20, [x19]
	str	w21, [x19, #8]
	mov	x0, x23
	mov	x1, x19
	bl	_watchdog_set_drvdata
	mov	x0, x23
	bl	_watchdog_register_device
	cbz	w0, LBB0_14
; %bb.12:
	mov	x1, x0
Lloh44:
	adrp	x0, l_.str.2@PAGE
Lloh45:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_err
	mov	x0, x19
	bl	_kfree
LBB0_13:
	mov	x19, #0
LBB0_14:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdr	Lloh22, Lloh23
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdr	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_SCH56XX_REG_WDOG_CONTROL,4,2   ; @SCH56XX_REG_WDOG_CONTROL
	.comm	_SCH56XX_REG_WDOG_OUTPUT_ENABLE,4,2 ; @SCH56XX_REG_WDOG_OUTPUT_ENABLE
	.comm	_SCH56XX_WDOG_OUTPUT_ENABLE,4,2 ; @SCH56XX_WDOG_OUTPUT_ENABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Watchdog not enabled by BIOS, not registering\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.1:                               ; @.str.1
	.asciz	"sch56xx watchdog"

	.comm	_WDIOF_KEEPALIVEPING,4,2        ; @WDIOF_KEEPALIVEPING
	.comm	_WDIOF_SETTIMEOUT,4,2           ; @WDIOF_SETTIMEOUT
	.comm	_nowayout,8,3                   ; @nowayout
	.comm	_WDIOF_MAGICCLOSE,4,2           ; @WDIOF_MAGICCLOSE
	.comm	_watchdog_ops,4,2               ; @watchdog_ops
	.comm	_WDOG_NO_WAY_OUT,4,2            ; @WDOG_NO_WAY_OUT
	.comm	_WDOG_ACTIVE,4,2                ; @WDOG_ACTIVE
	.comm	_SCH56XX_WDOG_TIME_BASE_SEC,4,2 ; @SCH56XX_WDOG_TIME_BASE_SEC
l_.str.2:                               ; @.str.2
	.asciz	"Registering watchdog chardev: %d\n"

.subsections_via_symbols
