	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_rtc_time
_set_rtc_time:                          ## @set_rtc_time
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_to_bcd
	movl	%eax, (%rbx)
	movl	4(%rbx), %edi
	callq	_to_bcd
	movl	%eax, 4(%rbx)
	movl	8(%rbx), %edi
	callq	_to_bcd
	movl	%eax, 8(%rbx)
	movl	12(%rbx), %edi
	callq	_to_bcd
	movl	%eax, 12(%rbx)
	movl	16(%rbx), %edi
	incl	%edi
	callq	_to_bcd
	movl	%eax, 16(%rbx)
	movl	20(%rbx), %edi
	callq	_to_bcd
	movl	%eax, 20(%rbx)
	cmpl	$256, %eax                      ## imm = 0x100
	jl	LBB0_2
## %bb.1:
	addl	$-256, %eax
	movl	%eax, 20(%rbx)
	movq	_RTC_Y2K_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%rbx)
LBB0_2:
	movq	_rtc_lock@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irq
	xorl	%eax, %eax
	callq	_i2c_start
	movq	_RTC_I2C_ADDRESS@GOTPCREL(%rip), %rax
	movq	_I2C_WRITE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	callq	_i2c_outb
	xorl	%edi, %edi
	callq	_i2c_outb
	movl	(%rbx), %edi
	callq	_i2c_outb
	movl	4(%rbx), %edi
	callq	_i2c_outb
	movl	8(%rbx), %edi
	callq	_i2c_outb
	movl	24(%rbx), %edi
	callq	_i2c_outb
	movl	12(%rbx), %edi
	callq	_i2c_outb
	movl	16(%rbx), %edi
	callq	_i2c_outb
	movl	20(%rbx), %edi
	callq	_i2c_outb
	xorl	%eax, %eax
	callq	_i2c_stop
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_spin_unlock_irq                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RTC_Y2K_MASK,4,2               ## @RTC_Y2K_MASK
	.comm	_rtc_lock,4,2                   ## @rtc_lock
	.comm	_RTC_I2C_ADDRESS,4,2            ## @RTC_I2C_ADDRESS
	.comm	_I2C_WRITE_MASK,4,2             ## @I2C_WRITE_MASK
	.no_dead_strip	_set_rtc_time
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_rtc_time
_set_rtc_time:                          ; @set_rtc_time
	.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	w0, [x0]
	bl	_to_bcd
	str	w0, [x19]
	ldr	w0, [x19, #4]
	bl	_to_bcd
	str	w0, [x19, #4]
	ldr	w0, [x19, #8]
	bl	_to_bcd
	str	w0, [x19, #8]
	ldr	w0, [x19, #12]
	bl	_to_bcd
	str	w0, [x19, #12]
	ldr	w8, [x19, #16]
	add	w0, w8, #1
	bl	_to_bcd
	str	w0, [x19, #16]
	ldr	w0, [x19, #20]
	bl	_to_bcd
	str	w0, [x19, #20]
	subs	w8, w0, #256
	b.lt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x9, _RTC_Y2K_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RTC_Y2K_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	ldr	w10, [x19, #16]
	orr	w9, w10, w9
	stp	w9, w8, [x19, #16]
LBB0_2:
Lloh3:
	adrp	x20, _rtc_lock@GOTPAGE
Lloh4:
	ldr	x20, [x20, _rtc_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_spin_lock_irq
	bl	_i2c_start
Lloh5:
	adrp	x8, _RTC_I2C_ADDRESS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RTC_I2C_ADDRESS@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _I2C_WRITE_MASK@GOTPAGE
Lloh9:
	ldr	x9, [x9, _I2C_WRITE_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_i2c_outb
	mov	w0, #0
	bl	_i2c_outb
	ldr	w0, [x19]
	bl	_i2c_outb
	ldr	w0, [x19, #4]
	bl	_i2c_outb
	ldr	w0, [x19, #8]
	bl	_i2c_outb
	ldr	w0, [x19, #24]
	bl	_i2c_outb
	ldr	w0, [x19, #12]
	bl	_i2c_outb
	ldr	w0, [x19, #16]
	bl	_i2c_outb
	ldr	w0, [x19, #20]
	bl	_i2c_outb
	bl	_i2c_stop
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_spin_unlock_irq
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_RTC_Y2K_MASK,4,2               ; @RTC_Y2K_MASK
	.comm	_rtc_lock,4,2                   ; @rtc_lock
	.comm	_RTC_I2C_ADDRESS,4,2            ; @RTC_I2C_ADDRESS
	.comm	_I2C_WRITE_MASK,4,2             ; @I2C_WRITE_MASK
	.no_dead_strip	_set_rtc_time
.subsections_via_symbols
