	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_em28xx_register_snapshot_button ## -- Begin function em28xx_register_snapshot_button
	.p2align	4, 0x90
_em28xx_register_snapshot_button:       ## @em28xx_register_snapshot_button
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	callq	_em28xx_info
	xorl	%eax, %eax
	callq	_input_allocate_device
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %rbx
	movq	16(%r14), %rdi
	movl	24(%r14), %esi
	movl	$4, %edx
	callq	_usb_make_path
	movl	24(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	$4, %edx
	callq	_strlcat
	movq	_em28xx_query_sbutton@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_INIT_DELAYED_WORK
	leaq	L_.str.3(%rip), %rax
	movq	%rax, (%rbx)
	movl	24(%r14), %eax
	movl	%eax, 76(%rbx)
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT_MASK
	movl	%eax, %r15d
	movq	_EV_REP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT_MASK
	orl	%r15d, %eax
	movq	8(%rbx), %rcx
	movl	%eax, (%rcx)
	movq	_EM28XX_SNAPSHOT_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	72(%rbx), %esi
	callq	_set_bit
	xorps	%xmm0, %xmm0
	movups	%xmm0, 56(%rbx)
	movq	_BUS_USB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	movq	16(%r14), %rax
	movl	8(%rax), %edi
	callq	_le16_to_cpu
	movq	%rax, 40(%rbx)
	movq	16(%r14), %rax
	movl	4(%rax), %edi
	callq	_le16_to_cpu
	movq	%rax, 32(%rbx)
	movl	$1, 24(%rbx)
	movq	16(%r14), %rax
	movq	%rax, 16(%rbx)
	movq	%rbx, %rdi
	callq	_input_register_device
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:
	leaq	L_.str.4(%rip), %rdi
	callq	_em28xx_errdev
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_input_free_device              ## TAILCALL
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_em28xx_errdev                  ## TAILCALL
LBB0_2:
	movq	%rbx, 8(%r14)
	movq	_EM28XX_SBUTTON_QUERY_INTERVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%r14, %rdi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_schedule_delayed_work          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Registering snapshot button...\n"

L_.str.1:                               ## @.str.1
	.asciz	"input_allocate_device failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"/sbutton"

	.comm	_em28xx_query_sbutton,4,2       ## @em28xx_query_sbutton
L_.str.3:                               ## @.str.3
	.asciz	"em28xx snapshot button"

	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.comm	_EV_REP,4,2                     ## @EV_REP
	.comm	_EM28XX_SNAPSHOT_KEY,4,2        ## @EM28XX_SNAPSHOT_KEY
	.comm	_BUS_USB,4,2                    ## @BUS_USB
L_.str.4:                               ## @.str.4
	.asciz	"input_register_device failed\n"

	.comm	_EM28XX_SBUTTON_QUERY_INTERVAL,4,2 ## @EM28XX_SBUTTON_QUERY_INTERVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_em28xx_register_snapshot_button ; -- Begin function em28xx_register_snapshot_button
	.p2align	2
_em28xx_register_snapshot_button:       ; @em28xx_register_snapshot_button
	.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
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_em28xx_info
	bl	_input_allocate_device
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	ldr	x0, [x19, #16]
	ldr	w1, [x19, #24]
	mov	w2, #4
	bl	_usb_make_path
	ldr	w0, [x19, #24]
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w2, #4
	bl	_strlcat
Lloh4:
	adrp	x8, _em28xx_query_sbutton@GOTPAGE
Lloh5:
	ldr	x8, [x8, _em28xx_query_sbutton@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_INIT_DELAYED_WORK
Lloh7:
	adrp	x8, l_.str.3@PAGE
Lloh8:
	add	x8, x8, l_.str.3@PAGEOFF
	str	x8, [x20]
	ldr	w8, [x19, #24]
	str	w8, [x20, #76]
Lloh9:
	adrp	x8, _EV_KEY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EV_KEY@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_BIT_MASK
	mov	x21, x0
Lloh12:
	adrp	x8, _EV_REP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EV_REP@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_BIT_MASK
	orr	w8, w0, w21
	ldr	x9, [x20, #8]
	str	w8, [x9]
Lloh15:
	adrp	x8, _EM28XX_SNAPSHOT_KEY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EM28XX_SNAPSHOT_KEY@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	ldr	w1, [x20, #72]
	bl	_set_bit
	stp	xzr, xzr, [x20, #56]
Lloh18:
	adrp	x8, _BUS_USB@GOTPAGE
Lloh19:
	ldr	x8, [x8, _BUS_USB@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	str	w8, [x20, #48]
	ldr	x8, [x19, #16]
	ldr	w0, [x8, #8]
	bl	_le16_to_cpu
	str	x0, [x20, #40]
	ldr	x8, [x19, #16]
	ldr	w0, [x8, #4]
	bl	_le16_to_cpu
	str	x0, [x20, #32]
	mov	w8, #1
	str	w8, [x20, #24]
	ldr	x8, [x19, #16]
	str	x8, [x20, #16]
	mov	x0, x20
	bl	_input_register_device
	cbz	w0, LBB0_4
; %bb.2:
Lloh21:
	adrp	x0, l_.str.4@PAGE
Lloh22:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_em28xx_errdev
	mov	x0, x20
	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
	b	_input_free_device
LBB0_3:
Lloh23:
	adrp	x0, l_.str.1@PAGE
Lloh24:
	add	x0, x0, l_.str.1@PAGEOFF
	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
	b	_em28xx_errdev
LBB0_4:
	str	x20, [x19, #8]
Lloh25:
	adrp	x8, _EM28XX_SBUTTON_QUERY_INTERVAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EM28XX_SBUTTON_QUERY_INTERVAL@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x19
	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
	b	_schedule_delayed_work
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Registering snapshot button...\n"

l_.str.1:                               ; @.str.1
	.asciz	"input_allocate_device failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"/sbutton"

	.comm	_em28xx_query_sbutton,4,2       ; @em28xx_query_sbutton
l_.str.3:                               ; @.str.3
	.asciz	"em28xx snapshot button"

	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.comm	_EV_REP,4,2                     ; @EV_REP
	.comm	_EM28XX_SNAPSHOT_KEY,4,2        ; @EM28XX_SNAPSHOT_KEY
	.comm	_BUS_USB,4,2                    ; @BUS_USB
l_.str.4:                               ; @.str.4
	.asciz	"input_register_device failed\n"

	.comm	_EM28XX_SBUTTON_QUERY_INTERVAL,4,2 ; @EM28XX_SBUTTON_QUERY_INTERVAL
.subsections_via_symbols
