	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stm_heartbeat_init
_stm_heartbeat_init:                    ## @stm_heartbeat_init
	.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	_nr_devs@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	testl	%eax, %eax
	js	LBB0_9
## %bb.1:
	movq	_STM_HEARTBEAT_MAX@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jg	LBB0_9
## %bb.2:
	testl	%eax, %eax
	je	LBB0_10
## %bb.3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%edx, %edx
	callq	_kasprintf
	movq	_stm_heartbeat@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movl	%eax, 4(%rcx)
	testl	%eax, %eax
	je	LBB0_13
## %bb.4:
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, (%rcx,%r15)
	movq	_stm_heartbeat_link@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rcx,%r15)
	movq	_stm_heartbeat_unlink@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rcx,%r15)
	leaq	16(%rcx,%r15), %rdi
	movq	_CLOCK_MONOTONIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HRTIMER_MODE_ABS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_hrtimer_init
	movq	_stm_heartbeat_hrtimer_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r12), %rsi
	movl	%eax, 16(%rsi,%r15)
	addq	%r15, %rsi
	xorl	%edi, %edi
	callq	_stm_source_register_device
	testl	%eax, %eax
	jne	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movslq	(%r13), %rax
	cmpq	%rax, %rbx
	jge	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_kasprintf
	movq	(%r12), %rcx
	movl	%eax, 24(%rcx,%r15)
	addq	$20, %r15
	testl	%eax, %eax
	jne	LBB0_5
## %bb.8:
	xorl	%r14d, %r14d
	jmp	LBB0_13
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_16
LBB0_10:
	xorl	%r14d, %r14d
	jmp	LBB0_16
LBB0_11:
	movl	%eax, %r14d
	jmp	LBB0_15
LBB0_13:
	testl	%ebx, %ebx
	jle	LBB0_16
## %bb.14:
	decl	%ebx
	leaq	(%rbx,%rbx,4), %rdi
	shlq	$2, %rdi
	addq	(%r12), %rdi
	callq	_stm_source_unregister_device
LBB0_15:
	movq	(%r12), %rax
	movslq	%ebx, %rcx
	leaq	(%rcx,%rcx,4), %rcx
	movl	4(%rax,%rcx,4), %edi
	callq	_kfree
	jmp	LBB0_13
LBB0_16:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_nr_devs,4,2                    ## @nr_devs
	.comm	_STM_HEARTBEAT_MAX,4,2          ## @STM_HEARTBEAT_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"heartbeat.%d"

	.comm	_stm_heartbeat,8,3              ## @stm_heartbeat
	.comm	_stm_heartbeat_link,4,2         ## @stm_heartbeat_link
	.comm	_stm_heartbeat_unlink,4,2       ## @stm_heartbeat_unlink
	.comm	_CLOCK_MONOTONIC,4,2            ## @CLOCK_MONOTONIC
	.comm	_HRTIMER_MODE_ABS,4,2           ## @HRTIMER_MODE_ABS
	.comm	_stm_heartbeat_hrtimer_handler,4,2 ## @stm_heartbeat_hrtimer_handler
	.no_dead_strip	_stm_heartbeat_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stm_heartbeat_init
_stm_heartbeat_init:                    ; @stm_heartbeat_init
	.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
Lloh0:
	adrp	x23, _nr_devs@GOTPAGE
Lloh1:
	ldr	x23, [x23, _nr_devs@GOTPAGEOFF]
	ldr	w8, [x23]
	tbnz	w8, #31, LBB0_9
; %bb.1:
Lloh2:
	adrp	x9, _STM_HEARTBEAT_MAX@GOTPAGE
Lloh3:
	ldr	x9, [x9, _STM_HEARTBEAT_MAX@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w8, w9
	b.gt	LBB0_9
; %bb.2:
	cbz	w8, LBB0_10
; %bb.3:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w20, [x8]
Lloh8:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #0
	bl	_kasprintf
Lloh13:
	adrp	x22, _stm_heartbeat@GOTPAGE
Lloh14:
	ldr	x22, [x22, _stm_heartbeat@GOTPAGEOFF]
	ldr	x8, [x22]
	str	w0, [x8, #4]
	cbz	w0, LBB0_11
; %bb.4:
	mov	x25, #0
	mov	x19, #0
Lloh15:
	adrp	x28, _stm_heartbeat_unlink@GOTPAGE
Lloh16:
	ldr	x28, [x28, _stm_heartbeat_unlink@GOTPAGEOFF]
Lloh17:
	adrp	x24, _CLOCK_MONOTONIC@GOTPAGE
Lloh18:
	ldr	x24, [x24, _CLOCK_MONOTONIC@GOTPAGEOFF]
Lloh19:
	adrp	x26, _HRTIMER_MODE_ABS@GOTPAGE
Lloh20:
	ldr	x26, [x26, _HRTIMER_MODE_ABS@GOTPAGEOFF]
Lloh21:
	adrp	x27, _stm_heartbeat_hrtimer_handler@GOTPAGE
Lloh22:
	ldr	x27, [x27, _stm_heartbeat_hrtimer_handler@GOTPAGEOFF]
Lloh23:
	adrp	x20, l_.str@PAGE
Lloh24:
	add	x20, x20, l_.str@PAGEOFF
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x8, x25
	mov	w9, #1
	str	w9, [x8]
Lloh25:
	adrp	x9, _stm_heartbeat_link@GOTPAGE
Lloh26:
	ldr	x9, [x9, _stm_heartbeat_link@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	str	w9, [x8, #12]
	ldr	w9, [x28]
	str	w9, [x8, #8]
	add	x0, x8, #16
	ldr	w1, [x24]
	ldr	w2, [x26]
	bl	_hrtimer_init
	ldr	w8, [x27]
	ldr	x9, [x22]
	add	x1, x9, x25
	str	w8, [x1, #16]
	mov	x0, #0
	bl	_stm_source_register_device
	cbnz	w0, LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x19, x19, #1
	ldrsw	x8, [x23]
	cmp	x19, x8
	b.ge	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh28:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh29:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	mov	x1, x20
	mov	x2, x19
	bl	_kasprintf
	ldr	x8, [x22]
	add	x9, x8, x25
	str	w0, [x9, #24]
	add	x25, x25, #20
	cbnz	w0, LBB0_5
; %bb.8:
	mov	w21, #0
	b	LBB0_13
LBB0_9:
Lloh31:
	adrp	x8, _EINVAL@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_16
LBB0_10:
	mov	w21, #0
	b	LBB0_16
LBB0_11:
	mov	w19, #0
	neg	w21, w20
	b	LBB0_13
LBB0_12:
	mov	x21, x0
	b	LBB0_15
LBB0_13:
	subs	w19, w19, #1
	b.lt	LBB0_16
; %bb.14:
	ldr	x8, [x22]
	mov	w9, #20
	umaddl	x0, w19, w9, x8
	bl	_stm_source_unregister_device
LBB0_15:
	ldr	x8, [x22]
	mov	w9, #20
	smaddl	x8, w19, w9, x8
	ldr	w0, [x8, #4]
	bl	_kfree
	b	LBB0_13
LBB0_16:
	mov	x0, x21
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_nr_devs,4,2                    ; @nr_devs
	.comm	_STM_HEARTBEAT_MAX,4,2          ; @STM_HEARTBEAT_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"heartbeat.%d"

	.comm	_stm_heartbeat,8,3              ; @stm_heartbeat
	.comm	_stm_heartbeat_link,4,2         ; @stm_heartbeat_link
	.comm	_stm_heartbeat_unlink,4,2       ; @stm_heartbeat_unlink
	.comm	_CLOCK_MONOTONIC,4,2            ; @CLOCK_MONOTONIC
	.comm	_HRTIMER_MODE_ABS,4,2           ; @HRTIMER_MODE_ABS
	.comm	_stm_heartbeat_hrtimer_handler,4,2 ; @stm_heartbeat_hrtimer_handler
	.no_dead_strip	_stm_heartbeat_init
.subsections_via_symbols
