	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtc_do_ioctl
_rtc_do_ioctl:                          ## @rtc_do_ioctl
	.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	%rsi, %r14
	cmpl	$128, %edi
	je	LBB0_4
## %bb.1:
	cmpl	$129, %edi
	jne	LBB0_8
## %bb.2:
	leaq	-32(%rbp), %r15
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	%r15, %rdi
	callq	_get_rtc_time
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	$4, %edx
	callq	_copy_to_user
	testl	%eax, %eax
	jne	LBB0_3
	jmp	LBB0_10
LBB0_4:
	movq	_CAP_SYS_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	leaq	-32(%rbp), %rdi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_copy_from_user
	testl	%eax, %eax
	je	LBB0_7
LBB0_3:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_8:
	movq	_ENOTTY@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_5:
	movq	_EACCES@GOTPCREL(%rip), %rax
LBB0_9:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	-32(%rbp), %rdi
	callq	_set_rtc_time
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_CAP_SYS_TIME,4,2               ## @CAP_SYS_TIME
	.comm	_EACCES,4,2                     ## @EACCES
	.comm	_ENOTTY,4,2                     ## @ENOTTY
	.no_dead_strip	_rtc_do_ioctl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtc_do_ioctl
_rtc_do_ioctl:                          ; @rtc_do_ioctl
	.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, x1
	cmp	w0, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w0, #129
	b.ne	LBB0_6
; %bb.2:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	add	x0, sp, #8
	bl	_get_rtc_time
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #4
	bl	_copy_to_user
	cbnz	w0, LBB0_5
	b	LBB0_9
LBB0_3:
Lloh0:
	adrp	x8, _CAP_SYS_TIME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CAP_SYS_TIME@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_capable
	cbz	w0, LBB0_7
; %bb.4:
	add	x0, sp, #8
	mov	x1, x19
	mov	w2, #4
	bl	_copy_from_user
	cbz	w0, LBB0_10
LBB0_5:
Lloh3:
	adrp	x8, _EFAULT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
Lloh5:
	adrp	x8, _ENOTTY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOTTY@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh7:
	adrp	x8, _EACCES@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
LBB0_8:
	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
LBB0_10:
	add	x0, sp, #8
	bl	_set_rtc_time
	mov	w0, #0
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_CAP_SYS_TIME,4,2               ; @CAP_SYS_TIME
	.comm	_EACCES,4,2                     ; @EACCES
	.comm	_ENOTTY,4,2                     ; @ENOTTY
	.no_dead_strip	_rtc_do_ioctl
.subsections_via_symbols
