	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hid_sensor_write_samp_freq_value ## -- Begin function hid_sensor_write_samp_freq_value
	.p2align	4, 0x90
_hid_sensor_write_samp_freq_value:      ## @hid_sensor_write_samp_freq_value
	.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
	movl	%edx, %eax
	orl	%esi, %eax
	js	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	movq	_HZ_PER_MHZ@GOTPCREL(%rip), %rax
	imull	(%rax), %esi
	addl	%edx, %esi
	movl	%esi, -12(%rbp)
	je	LBB0_9
## %bb.3:
	movq	8(%rbx), %rax
	movq	_HID_USAGE_SENSOR_UNITS_MILLISECOND@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.4:
	movq	_NSEC_PER_SEC@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_6:
	movq	_HID_USAGE_SENSOR_UNITS_SECOND@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	movq	_USEC_PER_SEC@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	cltd
	idivl	%esi
	movl	%eax, -12(%rbp)
	jmp	LBB0_9
LBB0_8:
	movl	$0, -12(%rbp)
LBB0_9:
	movl	24(%rbx), %edi
	movl	16(%rbx), %edx
	movl	20(%rbx), %esi
	leaq	-12(%rbp), %r8
	movl	$4, %ecx
	callq	_sensor_hub_set_feature
	testl	%eax, %eax
	js	LBB0_1
## %bb.10:
	cmpl	$0, -12(%rbp)
	js	LBB0_1
## %bb.11:
	movl	24(%rbx), %edi
	movl	16(%rbx), %edx
	movl	20(%rbx), %esi
	leaq	-12(%rbp), %r8
	movl	$4, %ecx
	callq	_sensor_hub_get_feature
	testl	%eax, %eax
	js	LBB0_1
## %bb.12:
	movl	-12(%rbp), %eax
	testl	%eax, %eax
	js	LBB0_1
## %bb.13:
	movl	%eax, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_HZ_PER_MHZ,4,2                 ## @HZ_PER_MHZ
	.comm	_HID_USAGE_SENSOR_UNITS_MILLISECOND,8,3 ## @HID_USAGE_SENSOR_UNITS_MILLISECOND
	.comm	_NSEC_PER_SEC,4,2               ## @NSEC_PER_SEC
	.comm	_HID_USAGE_SENSOR_UNITS_SECOND,8,3 ## @HID_USAGE_SENSOR_UNITS_SECOND
	.comm	_USEC_PER_SEC,4,2               ## @USEC_PER_SEC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hid_sensor_write_samp_freq_value ; -- Begin function hid_sensor_write_samp_freq_value
	.p2align	2
_hid_sensor_write_samp_freq_value:      ; @hid_sensor_write_samp_freq_value
	.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
	orr	w8, w2, w1
	tbnz	w8, #31, LBB0_13
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _HZ_PER_MHZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HZ_PER_MHZ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	madd	w8, w8, w1, w2
	str	w8, [sp, #12]
	cbz	w8, LBB0_8
; %bb.2:
	ldr	x9, [x19, #8]
Lloh3:
	adrp	x10, _HID_USAGE_SENSOR_UNITS_MILLISECOND@GOTPAGE
Lloh4:
	ldr	x10, [x10, _HID_USAGE_SENSOR_UNITS_MILLISECOND@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_4
; %bb.3:
Lloh6:
	adrp	x9, _NSEC_PER_SEC@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NSEC_PER_SEC@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh8:
	adrp	x10, _HID_USAGE_SENSOR_UNITS_SECOND@GOTPAGE
Lloh9:
	ldr	x10, [x10, _HID_USAGE_SENSOR_UNITS_SECOND@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_7
; %bb.5:
Lloh11:
	adrp	x9, _USEC_PER_SEC@GOTPAGE
Lloh12:
	ldr	x9, [x9, _USEC_PER_SEC@GOTPAGEOFF]
LBB0_6:
	ldr	w9, [x9]
	sdiv	w8, w9, w8
	str	w8, [sp, #12]
	b	LBB0_8
LBB0_7:
	str	wzr, [sp, #12]
LBB0_8:
	ldp	w1, w0, [x19, #20]
	ldr	w2, [x19, #16]
	add	x4, sp, #12
	mov	w3, #4
	bl	_sensor_hub_set_feature
	tbnz	w0, #31, LBB0_13
; %bb.9:
	ldr	w8, [sp, #12]
	tbnz	w8, #31, LBB0_13
; %bb.10:
	ldp	w1, w0, [x19, #20]
	ldr	w2, [x19, #16]
	add	x4, sp, #12
	mov	w3, #4
	bl	_sensor_hub_get_feature
	tbnz	w0, #31, LBB0_13
; %bb.11:
	ldr	w8, [sp, #12]
	tbnz	w8, #31, LBB0_13
; %bb.12:
	mov	w0, #0
	str	w8, [x19]
	b	LBB0_14
LBB0_13:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HZ_PER_MHZ,4,2                 ; @HZ_PER_MHZ
	.comm	_HID_USAGE_SENSOR_UNITS_MILLISECOND,8,3 ; @HID_USAGE_SENSOR_UNITS_MILLISECOND
	.comm	_NSEC_PER_SEC,4,2               ; @NSEC_PER_SEC
	.comm	_HID_USAGE_SENSOR_UNITS_SECOND,8,3 ; @HID_USAGE_SENSOR_UNITS_SECOND
	.comm	_USEC_PER_SEC,4,2               ; @USEC_PER_SEC
.subsections_via_symbols
