	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pwc_set_motor
_pwc_set_motor:                         ## @pwc_set_motor
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rcx
	movl	$0, (%rcx)
	movq	32(%rdi), %rax
	cmpq	$0, (%rax)
	je	LBB0_1
## %bb.2:
	movl	$1, (%rcx)
	movq	24(%rbx), %rax
	xorl	%edx, %edx
	cmpq	$0, (%rax)
	setne	%dl
	leal	(%rdx,%rdx), %eax
	incl	%eax
	jmp	LBB0_3
LBB0_1:
	movq	24(%rbx), %rdx
	movl	$2, %eax
	cmpq	$0, (%rdx)
	je	LBB0_5
LBB0_3:
	movl	%eax, (%rcx)
	movq	_SET_MPT_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PT_RESET_CONTROL_FORMATTER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$1, %r8d
	callq	_send_control_msg
	testl	%eax, %eax
	js	LBB0_12
## %bb.4:
	movq	(%rbx), %rcx
LBB0_5:
	movq	%rcx, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	16(%rbx), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_6
## %bb.8:
	movzbl	(%rax), %edx
	movq	(%rbx), %rcx
	movl	%edx, (%rcx)
	movl	(%rax), %eax
	sarl	$8, %eax
	movl	%eax, 4(%rcx)
	movq	8(%rbx), %rax
	cmpq	$0, 8(%rax)
	jne	LBB0_9
	jmp	LBB0_10
LBB0_6:
	movq	8(%rbx), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_11
## %bb.7:
	movq	(%rbx), %rcx
LBB0_9:
	movzbl	(%rax), %edx
	movl	%edx, 8(%rcx)
	movl	(%rax), %eax
	sarl	$8, %eax
	movl	%eax, 12(%rcx)
LBB0_10:
	movq	_SET_MPT_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PT_RELATIVE_CONTROL_FORMATTER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$4, %r8d
	callq	_send_control_msg
	testl	%eax, %eax
	js	LBB0_12
LBB0_11:
	xorl	%eax, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SET_MPT_CTL,4,2                ## @SET_MPT_CTL
	.comm	_PT_RESET_CONTROL_FORMATTER,4,2 ## @PT_RESET_CONTROL_FORMATTER
	.comm	_PT_RELATIVE_CONTROL_FORMATTER,4,2 ## @PT_RELATIVE_CONTROL_FORMATTER
	.no_dead_strip	_pwc_set_motor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pwc_set_motor
_pwc_set_motor:                         ; @pwc_set_motor
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x3, [x0]
	str	wzr, [x3]
	ldr	x8, [x0, #32]
	ldr	x8, [x8]
Lloh0:
	adrp	x20, _SET_MPT_CTL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _SET_MPT_CTL@GOTPAGEOFF]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w8, #1
	str	w8, [x3]
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	cmp	x8, #0
	mov	w8, #3
	csinc	w8, w8, wzr, ne
	b	LBB0_4
LBB0_2:
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.3:
	mov	w8, #2
LBB0_4:
	str	w8, [x3]
	ldr	w1, [x20]
Lloh2:
	adrp	x8, _PT_RESET_CONTROL_FORMATTER@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PT_RESET_CONTROL_FORMATTER@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w4, #1
	bl	_send_control_msg
	tbnz	w0, #31, LBB0_13
; %bb.5:
	ldr	x3, [x19]
LBB0_6:
	mov	x0, x3
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	x9, [x19, #16]
	ldr	x8, [x9, #8]
	cbz	x8, LBB0_8
; %bb.7:
	ldrb	w10, [x9]
	ldp	x3, x8, [x19]
	str	w10, [x3]
	ldr	w9, [x9]
	asr	w9, w9, #8
	str	w9, [x3, #4]
	ldr	x9, [x8, #8]
	cbnz	x9, LBB0_10
	b	LBB0_11
LBB0_8:
	ldr	x8, [x19, #8]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_12
; %bb.9:
	ldr	x3, [x19]
LBB0_10:
	ldrb	w9, [x8]
	str	w9, [x3, #8]
	ldr	w8, [x8]
	asr	w8, w8, #8
	str	w8, [x3, #12]
LBB0_11:
	ldr	w1, [x20]
Lloh5:
	adrp	x8, _PT_RELATIVE_CONTROL_FORMATTER@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PT_RELATIVE_CONTROL_FORMATTER@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w4, #4
	bl	_send_control_msg
	tbnz	w0, #31, LBB0_13
LBB0_12:
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SET_MPT_CTL,4,2                ; @SET_MPT_CTL
	.comm	_PT_RESET_CONTROL_FORMATTER,4,2 ; @PT_RESET_CONTROL_FORMATTER
	.comm	_PT_RELATIVE_CONTROL_FORMATTER,4,2 ; @PT_RELATIVE_CONTROL_FORMATTER
	.no_dead_strip	_pwc_set_motor
.subsections_via_symbols
