	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ds1553_settime                 ## -- Begin function ds1553_settime
	.p2align	4, 0x90
_ds1553_settime:                        ## @ds1553_settime
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movl	%edi, %r14d
	callq	_device_get_softc
	movq	%rax, %r13
	leaq	-104(%rbp), %rdi
	movl	$56, %esi
	callq	_bzero
	cmpl	$500000000, (%rbx)              ## imm = 0x1DCD6500
	jl	LBB0_2
## %bb.1:
	incl	4(%rbx)
LBB0_2:
	movl	$0, (%rbx)
	leaq	-104(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_clock_ts_to_ct
	movq	24(%r13), %rax
	subq	%rax, -104(%rbp)
	movq	%r13, %rdi
	addq	$8, %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mtx_lock_spin
	movq	_DS1553_OFF_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rax, %rbx
	movl	%r14d, %edi
	callq	*(%r13)
	movl	%eax, %r12d
	movq	_DS1553_BIT_WRITE@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	movl	(%rbx), %esi
	movl	%r14d, %edi
	movl	%r12d, %edx
	callq	*16(%r13)
	movq	16(%r13), %r15
	movq	_DS1553_OFF_SECONDS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-56(%rbp), %rdi
	callq	_TOBCD
	movq	_DS1553_MASK_SECONDS@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	%r14d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	*%r15
	movq	16(%r13), %r15
	movq	_DS1553_OFF_MINUTES@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-64(%rbp), %rdi
	callq	_TOBCD
	movq	_DS1553_MASK_MINUTES@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	%r14d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	*%r15
	movq	16(%r13), %r15
	movq	_DS1553_OFF_HOURS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-72(%rbp), %rdi
	callq	_TOBCD
	movq	_DS1553_MASK_HOUR@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	%r14d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	*%r15
	movq	16(%r13), %r15
	movq	_DS1553_OFF_DAYOFWEEK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-80(%rbp), %rdi
	incq	%rdi
	callq	_TOBCD
	movq	_DS1553_MASK_DAYOFWEEK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	%r14d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	*%r15
	movq	16(%r13), %r15
	movq	_DS1553_OFF_DATE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-88(%rbp), %rdi
	callq	_TOBCD
	movq	_DS1553_MASK_DATE@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	%r14d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	*%r15
	movq	16(%r13), %r15
	movq	_DS1553_OFF_MONTH@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-96(%rbp), %rdi
	callq	_TOBCD
	movq	_DS1553_MASK_MONTH@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	%r14d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	*%r15
	movq	16(%r13), %r15
	movq	_DS1553_OFF_YEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-104(%rbp), %rdi
	callq	_TOBCD
	movl	%r14d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	*%r15
	movq	_DS1553_BIT_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	%r12d, %edx
	movq	_DS1553_OFF_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	*16(%r13)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mtx_unlock_spin
	xorl	%eax, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DS1553_OFF_CONTROL,4,2         ## @DS1553_OFF_CONTROL
	.comm	_DS1553_BIT_WRITE,4,2           ## @DS1553_BIT_WRITE
	.comm	_DS1553_OFF_SECONDS,4,2         ## @DS1553_OFF_SECONDS
	.comm	_DS1553_MASK_SECONDS,4,2        ## @DS1553_MASK_SECONDS
	.comm	_DS1553_OFF_MINUTES,4,2         ## @DS1553_OFF_MINUTES
	.comm	_DS1553_MASK_MINUTES,4,2        ## @DS1553_MASK_MINUTES
	.comm	_DS1553_OFF_HOURS,4,2           ## @DS1553_OFF_HOURS
	.comm	_DS1553_MASK_HOUR,4,2           ## @DS1553_MASK_HOUR
	.comm	_DS1553_OFF_DAYOFWEEK,4,2       ## @DS1553_OFF_DAYOFWEEK
	.comm	_DS1553_MASK_DAYOFWEEK,4,2      ## @DS1553_MASK_DAYOFWEEK
	.comm	_DS1553_OFF_DATE,4,2            ## @DS1553_OFF_DATE
	.comm	_DS1553_MASK_DATE,4,2           ## @DS1553_MASK_DATE
	.comm	_DS1553_OFF_MONTH,4,2           ## @DS1553_OFF_MONTH
	.comm	_DS1553_MASK_MONTH,4,2          ## @DS1553_MASK_MONTH
	.comm	_DS1553_OFF_YEAR,4,2            ## @DS1553_OFF_YEAR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ds1553_settime                 ; -- Begin function ds1553_settime
	.p2align	2
_ds1553_settime:                        ; @ds1553_settime
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x1
	mov	x19, x0
	bl	_device_get_softc
	mov	x20, x0
	add	x0, sp, #8
	mov	w1, #56
	bl	_bzero
	ldr	w8, [x21]
	mov	w9, #25856
	movk	w9, #7629, lsl #16
	cmp	w8, w9
	b.lt	LBB0_2
; %bb.1:
	ldr	w8, [x21, #4]
	add	w8, w8, #1
	str	w8, [x21, #4]
LBB0_2:
	str	wzr, [x21]
	add	x1, sp, #8
	mov	x0, x21
	bl	_clock_ts_to_ct
	ldr	x8, [x20, #24]
	ldr	x9, [sp, #8]
	sub	x8, x9, x8
	str	x8, [sp, #8]
	add	x21, x20, #8
	mov	x0, x21
	bl	_mtx_lock_spin
	ldr	x8, [x20]
Lloh0:
	adrp	x24, _DS1553_OFF_CONTROL@GOTPAGE
Lloh1:
	ldr	x24, [x24, _DS1553_OFF_CONTROL@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	blr	x8
Lloh2:
	adrp	x25, _DS1553_BIT_WRITE@GOTPAGE
Lloh3:
	ldr	x25, [x25, _DS1553_BIT_WRITE@GOTPAGEOFF]
	ldr	w8, [x25]
	orr	w22, w8, w0
	ldr	x8, [x20, #16]
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x22
	blr	x8
	ldr	x26, [x20, #16]
Lloh4:
	adrp	x8, _DS1553_OFF_SECONDS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DS1553_OFF_SECONDS@GOTPAGEOFF]
Lloh6:
	ldr	w23, [x8]
	ldr	x0, [sp, #56]
	bl	_TOBCD
Lloh7:
	adrp	x8, _DS1553_MASK_SECONDS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DS1553_MASK_SECONDS@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	and	w2, w8, w0
	mov	x0, x19
	mov	x1, x23
	blr	x26
	ldr	x26, [x20, #16]
Lloh10:
	adrp	x8, _DS1553_OFF_MINUTES@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DS1553_OFF_MINUTES@GOTPAGEOFF]
Lloh12:
	ldr	w23, [x8]
	ldr	x0, [sp, #48]
	bl	_TOBCD
Lloh13:
	adrp	x8, _DS1553_MASK_MINUTES@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DS1553_MASK_MINUTES@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	and	w2, w8, w0
	mov	x0, x19
	mov	x1, x23
	blr	x26
	ldr	x26, [x20, #16]
Lloh16:
	adrp	x8, _DS1553_OFF_HOURS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DS1553_OFF_HOURS@GOTPAGEOFF]
Lloh18:
	ldr	w23, [x8]
	ldr	x0, [sp, #40]
	bl	_TOBCD
Lloh19:
	adrp	x8, _DS1553_MASK_HOUR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _DS1553_MASK_HOUR@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	and	w2, w8, w0
	mov	x0, x19
	mov	x1, x23
	blr	x26
	ldr	x26, [x20, #16]
Lloh22:
	adrp	x8, _DS1553_OFF_DAYOFWEEK@GOTPAGE
Lloh23:
	ldr	x8, [x8, _DS1553_OFF_DAYOFWEEK@GOTPAGEOFF]
Lloh24:
	ldr	w23, [x8]
	ldr	x8, [sp, #32]
	add	x0, x8, #1
	bl	_TOBCD
Lloh25:
	adrp	x8, _DS1553_MASK_DAYOFWEEK@GOTPAGE
Lloh26:
	ldr	x8, [x8, _DS1553_MASK_DAYOFWEEK@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	and	w2, w8, w0
	mov	x0, x19
	mov	x1, x23
	blr	x26
	ldr	x26, [x20, #16]
Lloh28:
	adrp	x8, _DS1553_OFF_DATE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _DS1553_OFF_DATE@GOTPAGEOFF]
Lloh30:
	ldr	w23, [x8]
	ldr	x0, [sp, #24]
	bl	_TOBCD
Lloh31:
	adrp	x8, _DS1553_MASK_DATE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _DS1553_MASK_DATE@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	and	w2, w8, w0
	mov	x0, x19
	mov	x1, x23
	blr	x26
	ldr	x26, [x20, #16]
Lloh34:
	adrp	x8, _DS1553_OFF_MONTH@GOTPAGE
Lloh35:
	ldr	x8, [x8, _DS1553_OFF_MONTH@GOTPAGEOFF]
Lloh36:
	ldr	w23, [x8]
	ldr	x0, [sp, #16]
	bl	_TOBCD
Lloh37:
	adrp	x8, _DS1553_MASK_MONTH@GOTPAGE
Lloh38:
	ldr	x8, [x8, _DS1553_MASK_MONTH@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	and	w2, w8, w0
	mov	x0, x19
	mov	x1, x23
	blr	x26
	ldr	x26, [x20, #16]
Lloh40:
	adrp	x8, _DS1553_OFF_YEAR@GOTPAGE
Lloh41:
	ldr	x8, [x8, _DS1553_OFF_YEAR@GOTPAGEOFF]
Lloh42:
	ldr	w23, [x8]
	ldr	x0, [sp, #8]
	bl	_TOBCD
	mov	x2, x0
	mov	x0, x19
	mov	x1, x23
	blr	x26
	ldr	w8, [x25]
	bic	w2, w22, w8
	ldr	x8, [x20, #16]
	ldr	w1, [x24]
	mov	x0, x19
	blr	x8
	mov	x0, x21
	bl	_mtx_unlock_spin
	mov	w0, #0
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_DS1553_OFF_CONTROL,4,2         ; @DS1553_OFF_CONTROL
	.comm	_DS1553_BIT_WRITE,4,2           ; @DS1553_BIT_WRITE
	.comm	_DS1553_OFF_SECONDS,4,2         ; @DS1553_OFF_SECONDS
	.comm	_DS1553_MASK_SECONDS,4,2        ; @DS1553_MASK_SECONDS
	.comm	_DS1553_OFF_MINUTES,4,2         ; @DS1553_OFF_MINUTES
	.comm	_DS1553_MASK_MINUTES,4,2        ; @DS1553_MASK_MINUTES
	.comm	_DS1553_OFF_HOURS,4,2           ; @DS1553_OFF_HOURS
	.comm	_DS1553_MASK_HOUR,4,2           ; @DS1553_MASK_HOUR
	.comm	_DS1553_OFF_DAYOFWEEK,4,2       ; @DS1553_OFF_DAYOFWEEK
	.comm	_DS1553_MASK_DAYOFWEEK,4,2      ; @DS1553_MASK_DAYOFWEEK
	.comm	_DS1553_OFF_DATE,4,2            ; @DS1553_OFF_DATE
	.comm	_DS1553_MASK_DATE,4,2           ; @DS1553_MASK_DATE
	.comm	_DS1553_OFF_MONTH,4,2           ; @DS1553_OFF_MONTH
	.comm	_DS1553_MASK_MONTH,4,2          ; @DS1553_MASK_MONTH
	.comm	_DS1553_OFF_YEAR,4,2            ; @DS1553_OFF_YEAR
.subsections_via_symbols
