	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function roccat_common2_receive_control_status
_roccat_common2_receive_control_status: ## @roccat_common2_receive_control_status
	.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, %rbx
	movl	$50, %edi
	callq	_msleep
	movq	_ROCCAT_COMMON_COMMAND_CONTROL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-32(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$4, %ecx
	callq	_roccat_common2_receive
	testl	%eax, %eax
	jne	LBB0_8
## %bb.1:
	leaq	-32(%rbp), %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	-32(%rbp), %edx
	cmpl	$132, %edx
	jne	LBB0_3
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_msleep
	movl	$50, %edi
	callq	_msleep
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	movl	$4, %ecx
	callq	_roccat_common2_receive
	testl	%eax, %eax
	je	LBB0_2
	jmp	LBB0_8
LBB0_3:
	leal	-129(%rdx), %eax
	cmpl	$3, %eax
	jb	LBB0_6
## %bb.4:
	xorl	%eax, %eax
	cmpl	$128, %edx
	je	LBB0_8
## %bb.5:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_dev_err
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ROCCAT_COMMON_COMMAND_CONTROL,4,2 ## @ROCCAT_COMMON_COMMAND_CONTROL
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"roccat_common2_receive_control_status: unknown response value 0x%x\n"

	.no_dead_strip	_roccat_common2_receive_control_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function roccat_common2_receive_control_status
_roccat_common2_receive_control_status: ; @roccat_common2_receive_control_status
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	mov	w0, #50
	bl	_msleep
Lloh0:
	adrp	x20, _ROCCAT_COMMON_COMMAND_CONTROL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _ROCCAT_COMMON_COMMAND_CONTROL@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x20]
	add	x2, sp, #8
	mov	x0, x19
	mov	w3, #4
	bl	_roccat_common2_receive
	cbnz	w0, LBB0_9
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w2, [sp, #8]
	cmp	w2, #132
	b.ne	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #500
	bl	_msleep
	mov	w0, #50
	bl	_msleep
	b	LBB0_1
LBB0_4:
	sub	w8, w2, #129
	cmp	w8, #3
	b.lo	LBB0_8
; %bb.5:
	cmp	w2, #128
	b.ne	LBB0_7
; %bb.6:
	mov	w0, #0
	b	LBB0_9
LBB0_7:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
LBB0_8:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ROCCAT_COMMON_COMMAND_CONTROL,4,2 ; @ROCCAT_COMMON_COMMAND_CONTROL
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"roccat_common2_receive_control_status: unknown response value 0x%x\n"

	.no_dead_strip	_roccat_common2_receive_control_status
.subsections_via_symbols
