	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atkbd_set_softraw
_atkbd_set_softraw:                     ## @atkbd_set_softraw
	.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	%rdx, %r14
	movq	%rdi, %r15
	leaq	-44(%rbp), %rdx
	movq	%rsi, %rdi
	movl	$10, %esi
	callq	_kstrtouint
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.1:
	movl	-44(%rbp), %eax
	cmpl	$2, %eax
	jb	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_3:
	movl	(%r15), %r12d
	cmpl	%eax, %r12d
	je	LBB0_9
## %bb.4:
	movq	8(%r15), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_input_allocate_device
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r13
	movq	%rax, 8(%r15)
	movl	-44(%rbp), %eax
	movl	%eax, (%r15)
	movq	%r15, %rdi
	callq	_atkbd_set_device_attrs
	movq	8(%r15), %rdi
	callq	_input_register_device
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_input_free_device
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%r15)
	movl	%r12d, (%r15)
	movq	%r15, %rdi
	callq	_atkbd_set_device_attrs
	jmp	LBB0_10
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_8:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_input_unregister_device
LBB0_9:
	movl	%r14d, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_atkbd_set_softraw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atkbd_set_softraw
_atkbd_set_softraw:                     ; @atkbd_set_softraw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x2
	mov	x19, x0
	add	x2, sp, #12
	mov	x0, x1
	mov	w1, #10
	bl	_kstrtouint
	mov	x21, x0
	cbnz	w0, LBB0_11
; %bb.1:
	ldr	w8, [sp, #12]
	cmp	w8, #2
	b.lo	LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_11
LBB0_4:
	ldr	w24, [x19]
	cmp	w24, w8
	b.eq	LBB0_10
; %bb.5:
	ldr	x22, [x19, #8]
	bl	_input_allocate_device
	cbz	x0, LBB0_8
; %bb.6:
	mov	x23, x0
	str	x0, [x19, #8]
	ldr	w8, [sp, #12]
	str	w8, [x19]
	mov	x0, x19
	bl	_atkbd_set_device_attrs
	ldr	x0, [x19, #8]
	bl	_input_register_device
	cbz	w0, LBB0_9
; %bb.7:
	mov	x21, x0
	mov	x0, x23
	bl	_input_free_device
	str	x22, [x19, #8]
	str	w24, [x19]
	mov	x0, x19
	bl	_atkbd_set_device_attrs
	b	LBB0_11
LBB0_8:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_3
LBB0_9:
	mov	x0, x22
	bl	_input_unregister_device
LBB0_10:
	mov	x21, x20
LBB0_11:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_atkbd_set_softraw
.subsections_via_symbols
