	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function efuse_write_data_case2
_efuse_write_data_case2:                ## @efuse_write_data_case2
	.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	$184, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -208(%rbp)                 ## 8-byte Spill
	movq	%r8, %rbx
	movq	%rcx, %r13
	movq	%rdx, -200(%rbp)                ## 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%r8, %r15
	shrq	$32, %r15
	callq	_rtl_priv
	movq	%rax, -224(%rbp)                ## 8-byte Spill
	shll	$4, %ebx
	movzbl	%bl, %ebx
	orl	%r15d, %ebx
	movq	(%r12), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_efuse_one_byte_write
	movq	%r12, -216(%rbp)                ## 8-byte Spill
	movq	(%r12), %rsi
	leaq	-188(%rbp), %rdx
	movq	%r14, %rdi
	callq	_efuse_one_byte_read
	movl	-188(%rbp), %r12d
	cmpl	%ebx, %r12d
	jne	LBB0_2
## %bb.1:
	movq	_PG_STATE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r13)
	jmp	LBB0_13
LBB0_2:
	movq	%r13, -184(%rbp)                ## 8-byte Spill
	movq	16(%rbp), %rsi
	cmpl	$255, %r12d
	jne	LBB0_5
## %bb.3:
	movq	_PG_STATE_HEADER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-184(%rbp), %rcx                ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	-208(%rbp), %rdx                ## 8-byte Reload
	movl	(%rdx), %eax
	leal	1(%rax), %ecx
	movl	%ecx, (%rdx)
	movq	_EFUSE_REPEAT_THRESHOLD_@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jl	LBB0_13
## %bb.4:
	movq	-200(%rbp), %rax                ## 8-byte Reload
	movl	$0, (%rax)
	movl	$0, (%rsi)
	jmp	LBB0_13
LBB0_5:
	movl	%r12d, %r15d
	shrl	$4, %r15d
	andl	$15, %r15d
	andl	$15, %r12d
	movl	%r12d, %edi
	callq	_efuse_calculate_word_cnts
	movl	%eax, %r13d
	leaq	-176(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$255, %esi
	movl	$32, %edx
	callq	_memset
	movq	%r14, %rdi
	movl	%r15d, %esi
	movq	%rbx, %rdx
	callq	_efuse_pg_packet_read
	movq	-216(%rbp), %rbx                ## 8-byte Reload
	movq	(%rbx), %rsi
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:
	incq	%rsi
	leaq	-176(%rbp), %rcx
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_enable_efuse_data_write
	movl	%eax, %ecx
	notl	%ecx
	testb	$15, %cl
	jne	LBB0_7
## %bb.8:
	leal	1(%r13,%r13), %eax
	movslq	%eax, %rsi
	addq	(%rbx), %rsi
	jmp	LBB0_10
LBB0_9:
	leal	1(%r13,%r13), %eax
	cltq
	addq	%rax, %rsi
	jmp	LBB0_10
LBB0_7:
	leaq	-176(%rbp), %rcx
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_efuse_pg_packet_write
	movq	%r14, %rdi
	callq	_efuse_get_current_size
	movq	%rax, %rsi
LBB0_10:
	movq	-184(%rbp), %r13                ## 8-byte Reload
	movq	%rsi, (%rbx)
	movq	_PG_STATE_HEADER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r13)
	movq	-208(%rbp), %rdx                ## 8-byte Reload
	movl	(%rdx), %eax
	leal	1(%rax), %ecx
	movl	%ecx, (%rdx)
	movq	_EFUSE_REPEAT_THRESHOLD_@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jl	LBB0_12
## %bb.11:
	movq	-200(%rbp), %rax                ## 8-byte Reload
	movl	$0, (%rax)
	movq	16(%rbp), %rax
	movl	$0, (%rax)
LBB0_12:
	movq	_FEEPROM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_EFUSE_PG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rcx
	movq	-224(%rbp), %rdi                ## 8-byte Reload
	callq	_RTPRINT
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	addq	$184, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PG_STATE_DATA,4,2              ## @PG_STATE_DATA
	.comm	_PG_STATE_HEADER,4,2            ## @PG_STATE_HEADER
	.comm	_EFUSE_REPEAT_THRESHOLD_,4,2    ## @EFUSE_REPEAT_THRESHOLD_
	.comm	_FEEPROM,4,2                    ## @FEEPROM
	.comm	_EFUSE_PG,4,2                   ## @EFUSE_PG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"efuse PG_STATE_HEADER-2\n"

	.no_dead_strip	_efuse_write_data_case2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function efuse_write_data_case2
_efuse_write_data_case2:                ; @efuse_write_data_case2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #240
	.cfi_def_cfa_offset 240
	stp	x28, x27, [sp, #144]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #160]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #176]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #192]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #208]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #224]            ; 16-byte Folded Spill
	add	x29, sp, #224
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x6
	mov	x21, x5
	mov	x26, x4
	mov	x23, x3
	mov	x20, x2
	mov	x24, x1
	mov	x25, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	lsr	x27, x4, #32
	bl	_rtl_priv
	mov	x22, x0
	ubfiz	w8, w26, #4, #4
	orr	w26, w8, w27
	ldr	x1, [x24]
	mov	x0, x25
	mov	x2, x26
	bl	_efuse_one_byte_write
	ldr	x1, [x24]
	add	x2, sp, #4
	mov	x0, x25
	bl	_efuse_one_byte_read
	ldr	w8, [sp, #4]
	cmp	w8, w26
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _PG_STATE_DATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PG_STATE_DATA@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x23]
	b	LBB0_13
LBB0_2:
	cmp	w8, #255
	b.ne	LBB0_5
; %bb.3:
Lloh6:
	adrp	x8, _PG_STATE_HEADER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PG_STATE_HEADER@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x23]
	ldr	w8, [x21]
	add	w9, w8, #1
	str	w9, [x21]
Lloh9:
	adrp	x9, _EFUSE_REPEAT_THRESHOLD_@GOTPAGE
Lloh10:
	ldr	x9, [x9, _EFUSE_REPEAT_THRESHOLD_@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w8, w9
	b.lt	LBB0_13
; %bb.4:
	str	wzr, [x20]
	str	wzr, [x19]
	b	LBB0_13
LBB0_5:
	ubfx	w26, w8, #4, #4
	and	w28, w8, #0xf
	mov	x0, x28
	bl	_efuse_calculate_word_cnts
	mov	x27, x0
	add	x0, sp, #8
	mov	w1, #255
	mov	w2, #32
	bl	_memset
	add	x2, sp, #8
	mov	x0, x25
	mov	x1, x26
	bl	_efuse_pg_packet_read
	ldr	x8, [x24]
	cbz	x0, LBB0_8
; %bb.6:
	add	x1, x8, #1
	add	x3, sp, #8
	mov	x0, x25
	mov	x2, x28
	bl	_enable_efuse_data_write
	mvn	w8, w0
	tst	w8, #0xf
	b.ne	LBB0_9
; %bb.7:
	ldr	x8, [x24]
LBB0_8:
	mov	w9, #1
	bfi	w9, w27, #1, #31
	add	x0, x8, w9, sxtw
	b	LBB0_10
LBB0_9:
	mov	x2, x0
	add	x3, sp, #8
	mov	x0, x25
	mov	x1, x26
	bl	_efuse_pg_packet_write
	mov	x0, x25
	bl	_efuse_get_current_size
LBB0_10:
	str	x0, [x24]
Lloh12:
	adrp	x8, _PG_STATE_HEADER@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PG_STATE_HEADER@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x23]
	ldr	w8, [x21]
	add	w9, w8, #1
	str	w9, [x21]
Lloh15:
	adrp	x9, _EFUSE_REPEAT_THRESHOLD_@GOTPAGE
Lloh16:
	ldr	x9, [x9, _EFUSE_REPEAT_THRESHOLD_@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w8, w9
	b.lt	LBB0_12
; %bb.11:
	str	wzr, [x20]
	str	wzr, [x19]
LBB0_12:
Lloh18:
	adrp	x8, _FEEPROM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _FEEPROM@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x8, _EFUSE_PG@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EFUSE_PG@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
Lloh24:
	adrp	x3, l_.str@PAGE
Lloh25:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x22
	bl	_RTPRINT
LBB0_13:
	ldur	x8, [x29, #-88]
Lloh26:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh27:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	ldp	x29, x30, [sp, #224]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #208]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #192]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #176]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #160]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #240
	ret
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_PG_STATE_DATA,4,2              ; @PG_STATE_DATA
	.comm	_PG_STATE_HEADER,4,2            ; @PG_STATE_HEADER
	.comm	_EFUSE_REPEAT_THRESHOLD_,4,2    ; @EFUSE_REPEAT_THRESHOLD_
	.comm	_FEEPROM,4,2                    ; @FEEPROM
	.comm	_EFUSE_PG,4,2                   ; @EFUSE_PG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"efuse PG_STATE_HEADER-2\n"

	.no_dead_strip	_efuse_write_data_case2
.subsections_via_symbols
