	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hl_device_utilization          ## -- Begin function hl_device_utilization
	.p2align	4, 0x90
_hl_device_utilization:                 ## @hl_device_utilization
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	(%rbx), %r12
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_ktime_set
	movq	_USEC_PER_MSEC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	movl	%r14d, -68(%rbp)                ## 4-byte Spill
	imull	%r14d, %r15d
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	8(%rbx), %rcx
	movl	%eax, %ebx
	leaq	(%rcx,%r12,8), %r13
	movl	4(%rcx,%r12,8), %edi
	movl	%eax, %esi
	callq	_ktime_compare
	testq	%rax, %rax
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	jne	LBB0_3
## %bb.1:
	movl	(%r13), %edi
	movl	%ebx, %esi
	callq	_ktime_compare
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	decq	%r12
	movq	_HL_IDLE_BUSY_TS_ARR_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	-1(%rax), %rcx
	cmpq	%rax, %r12
	cmovaq	%rcx, %r12
	leaq	(,%r12,8), %r13
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	addq	8(%rax), %r13
LBB0_3:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	xorl	%edi, %edi
	movq	_HL_IDLE_BUSY_TS_ARR_SIZE@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_15
## %bb.4:
	xorl	%edi, %edi
	xorl	%r15d, %r15d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r13), %esi
	callq	_ktime_sub
	movl	%eax, %edi
	callq	_ktime_to_us
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	addl	%eax, %edi
	decq	%r12
	movq	_HL_IDLE_BUSY_TS_ARR_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	-1(%rax), %rcx
	cmpq	%rax, %r12
	cmovaq	%rcx, %r12
	leaq	(,%r12,8), %r13
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	addq	8(%rcx), %r13
	incq	%r15
	cmpq	%rax, %r15
	jae	LBB0_15
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	(%r13), %esi
	movl	%ebx, %edi
	callq	_ktime_sub
	movl	%eax, %edi
	callq	_ktime_to_us
	movl	%eax, %r14d
	movl	4(%r13), %edi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_ktime_compare
	cmpl	%r14d, -52(%rbp)                ## 4-byte Folded Reload
	jl	LBB0_6
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	%ebx, %edi
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	4(%r13), %edi
	jmp	LBB0_14
LBB0_6:
	testq	%rax, %rax
	je	LBB0_7
## %bb.9:
	movl	4(%r13), %esi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_ktime_sub
	movl	%eax, %edi
	callq	_ktime_to_us
	movl	-52(%rbp), %r15d                ## 4-byte Reload
	cmpl	%r15d, %eax
	jle	LBB0_11
## %bb.10:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_15
LBB0_7:
	movl	(%r13), %edi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_ktime_compare
	testq	%rax, %rax
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	je	LBB0_15
## %bb.8:
	movl	$100, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	(%r13), %esi
	movl	4(%r13), %edi
	callq	_ktime_sub
	movl	%eax, %edi
	callq	_ktime_to_us
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	addl	%r15d, %edi
	subl	%r14d, %edi
	addl	%eax, %edi
LBB0_15:
	movq	_USEC_PER_MSEC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_DIV_ROUND_UP_ULL
	imull	$100, %eax, %edi
	movl	-68(%rbp), %esi                 ## 4-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DIV_ROUND_UP_ULL               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_USEC_PER_MSEC,4,2              ## @USEC_PER_MSEC
	.comm	_HL_IDLE_BUSY_TS_ARR_SIZE,8,3   ## @HL_IDLE_BUSY_TS_ARR_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hl_device_utilization          ; -- Begin function hl_device_utilization
	.p2align	2
_hl_device_utilization:                 ; @hl_device_utilization
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x25, x1
	mov	x21, x0
	bl	_ktime_get
	mov	x20, x0
	ldr	x26, [x21]
	mov	w0, #0
	mov	w1, #0
	bl	_ktime_set
	mov	x22, x0
Lloh0:
	adrp	x8, _USEC_PER_MSEC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _USEC_PER_MSEC@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
	ldr	x8, [x21, #8]
	add	x27, x8, x26, lsl #3
	ldr	w0, [x27, #4]
	mov	x1, x22
	bl	_ktime_compare
Lloh3:
	adrp	x28, _HL_IDLE_BUSY_TS_ARR_SIZE@GOTPAGE
Lloh4:
	ldr	x28, [x28, _HL_IDLE_BUSY_TS_ARR_SIZE@GOTPAGEOFF]
	cbnz	x0, LBB0_3
; %bb.1:
	ldr	w0, [x27]
	mov	x1, x22
	bl	_ktime_compare
	cbnz	x0, LBB0_3
; %bb.2:
	sub	x8, x26, #1
	ldr	x9, [x28]
	sub	x10, x9, #1
	cmp	x8, x9
	csel	x26, x10, x8, hi
	ldr	x8, [x21, #8]
	add	x27, x8, x26, lsl #3
LBB0_3:
	ldr	x8, [x28]
	str	w25, [sp, #12]                  ; 4-byte Folded Spill
	mov	w23, #0
	cbz	x8, LBB0_14
; %bb.4:
	mov	x19, #0
	mul	w25, w24, w25
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [x27]
	bl	_ktime_sub
	bl	_ktime_to_us
	add	w23, w0, w23
	sub	x8, x26, #1
	ldr	x9, [x28]
	sub	x10, x9, #1
	cmp	x8, x9
	csel	x26, x10, x8, hi
	ldr	x8, [x21, #8]
	add	x27, x8, x26, lsl #3
	add	x19, x19, #1
	cmp	x19, x9
	b.hs	LBB0_14
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x27]
	mov	x0, x20
	bl	_ktime_sub
	bl	_ktime_to_us
	mov	x24, x0
	ldr	w0, [x27, #4]
	mov	x1, x22
	bl	_ktime_compare
	mov	x8, x0
	cmp	w25, w24
	b.lt	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x20
	cbz	x8, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x27, #4]
	b	LBB0_5
LBB0_9:
	cbz	x8, LBB0_12
; %bb.10:
	ldr	w1, [x27, #4]
	mov	x0, x20
	bl	_ktime_sub
	bl	_ktime_to_us
	cmp	w0, w25
	b.gt	LBB0_14
; %bb.11:
	ldp	w1, w0, [x27]
	bl	_ktime_sub
	bl	_ktime_to_us
	add	w8, w23, w25
	sub	w8, w8, w24
	add	w23, w8, w0
	b	LBB0_14
LBB0_12:
	ldr	w0, [x27]
	mov	x1, x22
	bl	_ktime_compare
	cbz	x0, LBB0_14
; %bb.13:
	mov	w0, #100
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_14:
Lloh5:
	adrp	x8, _USEC_PER_MSEC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _USEC_PER_MSEC@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_DIV_ROUND_UP_ULL
	mov	w8, #100
	mul	w0, w0, w8
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_DIV_ROUND_UP_ULL
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_USEC_PER_MSEC,4,2              ; @USEC_PER_MSEC
	.comm	_HL_IDLE_BUSY_TS_ARR_SIZE,8,3   ; @HL_IDLE_BUSY_TS_ARR_SIZE
.subsections_via_symbols
