	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function enqueue_events
_enqueue_events:                        ## @enqueue_events
	.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
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	testq	%rdx, %rdx
	je	LBB0_11
## %bb.1:
	movq	%rdx, %rbx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %r13
	leaq	4(%r13), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r12,4), %r15
	movq	%r15, %rdi
	callq	_ec_event_num_words
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_ec_event_size
	movq	_EC_ACPI_MAX_EVENT_WORDS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %r14
	ja	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	%rax, %r12
	cmpq	%rbx, %r12
	ja	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_kmemdup
	testq	%rax, %rax
	je	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rbx
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_spin_lock
	movl	8(%r13), %edi
	movq	%rbx, %rsi
	callq	_event_queue_push
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_spin_unlock
	movq	%rbx, %rdi
	callq	_kfree
	movq	%r13, %rdi
	callq	_wake_up_interruptible
	movq	%r14, %rbx
	cmpq	%r14, %r12
	jb	LBB0_2
LBB0_11:
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rdx
	jmp	LBB0_4
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rdx
	movq	%rbx, %rcx
LBB0_4:
	callq	_dev_err
	movq	_EOVERFLOW@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_9:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EC_ACPI_MAX_EVENT_WORDS,8,3    ## @EC_ACPI_MAX_EVENT_WORDS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Too many event words: %zu > %d\n"

	.comm	_EOVERFLOW,4,2                  ## @EOVERFLOW
L_.str.1:                               ## @.str.1
	.asciz	"Event exceeds buffer: %zu > %d\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_enqueue_events
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function enqueue_events
_enqueue_events:                        ; @enqueue_events
	.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
	cbz	x2, LBB0_6
; %bb.1:
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	mov	x21, #0
	ldr	x23, [x0, #8]
	add	x24, x23, #4
Lloh0:
	adrp	x27, _EC_ACPI_MAX_EVENT_WORDS@GOTPAGE
Lloh1:
	ldr	x27, [x27, _EC_ACPI_MAX_EVENT_WORDS@GOTPAGEOFF]
Lloh2:
	adrp	x28, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x28, [x28, _GFP_KERNEL@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x25, x22, x21, lsl #2
	mov	x0, x25
	bl	_ec_event_num_words
	mov	x26, x0
	mov	x0, x25
	bl	_ec_event_size
	ldr	x3, [x27]
	cmp	x26, x3
	b.hi	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x1, x0
	add	x21, x0, x21
	cmp	x21, x20
	b.hi	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w2, [x28]
	mov	x0, x25
	bl	_kmemdup
	cbz	x0, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x25, x0
	mov	x0, x24
	bl	_spin_lock
	ldr	w0, [x23, #8]
	mov	x1, x25
	bl	_event_queue_push
	mov	x25, x0
	mov	x0, x24
	bl	_spin_unlock
	mov	x0, x25
	bl	_kfree
	mov	x0, x23
	bl	_wake_up_interruptible
	cmp	x21, x20
	b.lo	LBB0_2
LBB0_6:
	mov	w0, #0
	b	LBB0_12
LBB0_7:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x26
	b	LBB0_9
LBB0_8:
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	mov	x3, x20
LBB0_9:
	bl	_dev_err
Lloh8:
	adrp	x8, _EOVERFLOW@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EOVERFLOW@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EC_ACPI_MAX_EVENT_WORDS,8,3    ; @EC_ACPI_MAX_EVENT_WORDS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Too many event words: %zu > %d\n"

	.comm	_EOVERFLOW,4,2                  ; @EOVERFLOW
l_.str.1:                               ; @.str.1
	.asciz	"Event exceeds buffer: %zu > %d\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_enqueue_events
.subsections_via_symbols
