	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function button_hotplug_event
_button_hotplug_event:                  ## @button_hotplug_event
	.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
	movl	%ecx, %r14d
	movl	%edx, %r15d
	movl	%esi, %ebx
	movq	(%rdi), %r12
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	leaq	L_.str(%rip), %rdi
	callq	_BH_DBG
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_6
## %bb.1:
	movl	%r15d, %edi
	callq	_button_get_index
	testl	%eax, %eax
	js	LBB0_6
## %bb.2:
	movq	_button_map@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, %ebx
	movl	(%rcx,%rbx,4), %edi
	movq	(%r12), %rcx
	movq	%r13, %rax
	subq	(%rcx,%rbx,8), %rax
	movq	_HZ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_3
## %bb.4:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_5
LBB0_3:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_5:
	movq	%rax, %rsi
	movl	%r14d, %edx
	callq	_button_hotplug_create_event
	movq	(%r12), %rax
	movq	%r13, (%rax,%rbx,8)
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"event type=%u, code=%u, value=%d\n"

	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.comm	_button_map,8,3                 ## @button_map
	.comm	_HZ,8,3                         ## @HZ
	.no_dead_strip	_button_hotplug_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function button_hotplug_event
_button_hotplug_event:                  ; @button_hotplug_event
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	ldr	x22, [x0]
Lloh0:
	adrp	x8, _jiffies@GOTPAGE
Lloh1:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_BH_DBG
Lloh5:
	adrp	x8, _EV_KEY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EV_KEY@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_button_get_index
	tbnz	w0, #31, LBB0_3
; %bb.2:
Lloh8:
	adrp	x8, _button_map@GOTPAGE
Lloh9:
	ldr	x8, [x8, _button_map@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	mov	w9, w0
	ldr	w0, [x8, w0, uxtw #2]
	ldr	x8, [x22]
	lsl	x20, x9, #3
	ldr	x8, [x8, x20]
	sub	x8, x23, x8
Lloh11:
	adrp	x9, _HZ@GOTPAGE
Lloh12:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	udiv	x1, x8, x9
	mov	x2, x19
	bl	_button_hotplug_create_event
	ldr	x8, [x22]
	str	x23, [x8, x20]
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"event type=%u, code=%u, value=%d\n"

	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.comm	_button_map,8,3                 ; @button_map
	.comm	_HZ,8,3                         ; @HZ
	.no_dead_strip	_button_hotplug_event
.subsections_via_symbols
