	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hp_sdc_rtc_set_fhs
_hp_sdc_rtc_set_fhs:                    ## @hp_sdc_rtc_set_fhs
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$48, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	_HP_SDC_ACT_PRECMD@GOTPCREL(%rip), %rax
	movq	_HP_SDC_ACT_DATAOUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, -32(%rbp)
	movq	_HP_SDC_CMD_SET_FHS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -28(%rbp)
	movl	$2, -24(%rbp)
	movl	$4, -48(%rbp)
	movl	(%rdi), %ecx
	movl	$-1, %eax
	cmpl	$65535, %ecx                    ## imm = 0xFFFF
	jg	LBB0_4
## %bb.1:
	movl	4(%rdi), %edx
	cmpl	$655359999, %edx                ## imm = 0x270FFFFF
	jg	LBB0_4
## %bb.2:
	movslq	%edx, %rdx
	imulq	$1759218605, %rdx, %rdx         ## imm = 0x68DB8BAD
	movq	%rdx, %rsi
	shrq	$63, %rsi
	sarq	$44, %rdx
	addl	%esi, %edx
	imull	$100, %ecx, %ecx
	addl	%edx, %ecx
	cmpl	$65535, %ecx                    ## imm = 0xFFFF
	jg	LBB0_4
## %bb.3:
	movzbl	%cl, %eax
	movl	%eax, -20(%rbp)
	movzbl	%ch, %eax
	movl	%eax, -16(%rbp)
	leaq	-32(%rbp), %rax
	movq	%rax, -40(%rbp)
	leaq	-48(%rbp), %rdi
	callq	_hp_sdc_enqueue_transaction
	movq	%rax, %rcx
	xorl	%eax, %eax
	negq	%rcx
	sbbl	%eax, %eax
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-8(%rbp), %rcx
	jne	LBB0_6
## %bb.5:
	addq	$48, %rsp
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_HP_SDC_ACT_PRECMD,4,2          ## @HP_SDC_ACT_PRECMD
	.comm	_HP_SDC_ACT_DATAOUT,4,2         ## @HP_SDC_ACT_DATAOUT
	.comm	_HP_SDC_CMD_SET_FHS,4,2         ## @HP_SDC_CMD_SET_FHS
	.no_dead_strip	_hp_sdc_rtc_set_fhs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hp_sdc_rtc_set_fhs
_hp_sdc_rtc_set_fhs:                    ; @hp_sdc_rtc_set_fhs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-8]
Lloh3:
	adrp	x8, _HP_SDC_ACT_PRECMD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HP_SDC_ACT_PRECMD@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _HP_SDC_ACT_DATAOUT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _HP_SDC_ACT_DATAOUT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh9:
	adrp	x9, _HP_SDC_CMD_SET_FHS@GOTPAGE
Lloh10:
	ldr	x9, [x9, _HP_SDC_CMD_SET_FHS@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #20]
	mov	w8, #2
	str	w8, [sp, #28]
	mov	w8, #4
	str	w8, [sp]
	ldr	w8, [x0]
	cmp	w8, #16, lsl #12                ; =65536
	b.ge	LBB0_3
; %bb.1:
	ldr	w9, [x0, #4]
	mov	w10, #655359999
	cmp	w9, w10
	b.gt	LBB0_3
; %bb.2:
	mov	w10, #35757
	movk	w10, #26843, lsl #16
	smull	x9, w9, w10
	lsr	x10, x9, #63
	asr	x9, x9, #44
	add	w9, w9, w10
	mov	w10, #100
	madd	w8, w8, w10, w9
	cmp	w8, #16, lsl #12                ; =65536
	b.lt	LBB0_6
LBB0_3:
	mov	w0, #-1
LBB0_4:
	ldur	x8, [x29, #-8]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_6:
	and	w9, w8, #0xff
	ubfx	w8, w8, #8, #8
	stp	w9, w8, [sp, #32]
	add	x8, sp, #20
	str	x8, [sp, #8]
	mov	x0, sp
	bl	_hp_sdc_enqueue_transaction
	cmp	x0, #0
	csetm	w0, ne
	b	LBB0_4
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_HP_SDC_ACT_PRECMD,4,2          ; @HP_SDC_ACT_PRECMD
	.comm	_HP_SDC_ACT_DATAOUT,4,2         ; @HP_SDC_ACT_DATAOUT
	.comm	_HP_SDC_CMD_SET_FHS,4,2         ; @HP_SDC_CMD_SET_FHS
	.no_dead_strip	_hp_sdc_rtc_set_fhs
.subsections_via_symbols
