	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gb_svc_watchdog_create         ## -- Begin function gb_svc_watchdog_create
	.p2align	4, 0x90
_gb_svc_watchdog_create:                ## @gb_svc_watchdog_create
	.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
	xorl	%r14d, %r14d
	cmpq	$0, (%rdi)
	jne	LBB0_8
## %bb.1:
	movq	%rdi, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r15
	movl	$0, (%rax)
	movq	%rbx, 16(%rax)
	leaq	8(%rax), %rdi
	movq	_do_work@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_DELAYED_WORK
	movq	%r15, (%rbx)
	movq	_svc_watchdog_pm_notifier@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%r15, %r12
	addq	$4, %r12
	movl	%eax, 4(%r15)
	movq	%r12, %rdi
	callq	_register_pm_notifier
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %r13d
	leaq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_7
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_8
LBB0_5:
	movq	%rbx, %rdi
	callq	_gb_svc_watchdog_enable
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:
	movl	%eax, %r13d
	leaq	8(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movq	%r12, %rdi
	callq	_unregister_pm_notifier
LBB0_7:
	movl	%r13d, %r14d
	movq	$0, (%rbx)
	movq	%r15, %rdi
	callq	_kfree
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_do_work,4,2                    ## @do_work
	.comm	_svc_watchdog_pm_notifier,4,2   ## @svc_watchdog_pm_notifier
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error registering pm notifier(%d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"error enabling watchdog (%d)\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gb_svc_watchdog_create         ; -- Begin function gb_svc_watchdog_create
	.p2align	2
_gb_svc_watchdog_create:                ; @gb_svc_watchdog_create
	.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
	ldr	x8, [x0]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w21, #0
	b	LBB0_9
LBB0_2:
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kmalloc
	cbz	x0, LBB0_5
; %bb.3:
	mov	x20, x0
	str	wzr, [x0]
	str	x19, [x0, #16]
	add	x0, x0, #8
Lloh3:
	adrp	x8, _do_work@GOTPAGE
Lloh4:
	ldr	x8, [x8, _do_work@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_INIT_DELAYED_WORK
	str	x20, [x19]
Lloh6:
	adrp	x8, _svc_watchdog_pm_notifier@GOTPAGE
Lloh7:
	ldr	x8, [x8, _svc_watchdog_pm_notifier@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	mov	x22, x20
	str	w8, [x22, #4]!
	mov	x0, x22
	bl	_register_pm_notifier
	cbz	w0, LBB0_6
; %bb.4:
	mov	x21, x0
	add	x0, x19, #8
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_err
	b	LBB0_8
LBB0_5:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_9
LBB0_6:
	mov	x0, x19
	bl	_gb_svc_watchdog_enable
	mov	x21, x0
	cbz	w0, LBB0_9
; %bb.7:
	add	x0, x19, #8
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_dev_err
	mov	x0, x22
	bl	_unregister_pm_notifier
LBB0_8:
	str	xzr, [x19]
	mov	x0, x20
	bl	_kfree
LBB0_9:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_do_work,4,2                    ; @do_work
	.comm	_svc_watchdog_pm_notifier,4,2   ; @svc_watchdog_pm_notifier
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error registering pm notifier(%d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"error enabling watchdog (%d)\n"

.subsections_via_symbols
