	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xsdfec_reg1_write
_xsdfec_reg1_write:                     ## @xsdfec_reg1_write
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_XSDFEC_REG1_PSIZE_MIN@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jg	LBB0_2
## %bb.1:
	movl	%esi, %r12d
	movq	_XSDFEC_REG1_PSIZE_MAX@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jl	LBB0_2
## %bb.4:
	movl	%r8d, %r13d
	movl	%ecx, %r15d
	movl	%edx, %ebx
	cmpl	$2, %edx
	jb	LBB0_6
## %bb.5:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_6:
	movq	_XSDFEC_REG1_NO_PACKING_LSB@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	movq	_XSDFEC_REG1_NO_PACKING_MASK@GOTPCREL(%rip), %rax
	movq	_XSDFEC_REG1_NM_MASK@GOTPCREL(%rip), %rsi
	movl	(%rsi), %edx
	movq	_XSDFEC_REG1_NM_LSB@GOTPCREL(%rip), %rdi
	movb	(%rdi), %cl
	sarl	%cl, %edx
	andl	(%rax), %ebx
	notl	%edx
	testl	%r15d, %edx
	je	LBB0_8
## %bb.7:
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_XSDFEC_REG1_NM_LSB@GOTPCREL(%rip), %rdi
	movq	_XSDFEC_REG1_NM_MASK@GOTPCREL(%rip), %rsi
LBB0_8:
	movq	_XSDFEC_LDPC_CODE_REG1_ADDR_BASE@GOTPCREL(%rip), %rax
	movq	_XSDFEC_LDPC_REG_JUMP@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movslq	%r13d, %rdx
	imulq	%rcx, %rdx
	addq	(%rax), %rdx
	movq	_XSDFEC_LDPC_CODE_REG1_ADDR_HIGH@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jle	LBB0_10
## %bb.9:
	movl	(%r14), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_3
LBB0_2:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_10:
	movb	(%rdi), %cl
	shll	%cl, %r15d
	andl	(%rsi), %r15d
	orl	%r12d, %ebx
	orl	%r15d, %ebx
	movq	%r14, %rdi
	movq	%rdx, %rsi
	movl	%ebx, %edx
	callq	_xsdfec_regwrite
	xorl	%ebx, %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XSDFEC_REG1_PSIZE_MIN,4,2      ## @XSDFEC_REG1_PSIZE_MIN
	.comm	_XSDFEC_REG1_PSIZE_MAX,4,2      ## @XSDFEC_REG1_PSIZE_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Psize is not in range"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"No-packing bit register invalid"

	.comm	_XSDFEC_REG1_NO_PACKING_LSB,4,2 ## @XSDFEC_REG1_NO_PACKING_LSB
	.comm	_XSDFEC_REG1_NO_PACKING_MASK,4,2 ## @XSDFEC_REG1_NO_PACKING_MASK
	.comm	_XSDFEC_REG1_NM_MASK,4,2        ## @XSDFEC_REG1_NM_MASK
	.comm	_XSDFEC_REG1_NM_LSB,4,2         ## @XSDFEC_REG1_NM_LSB
L_.str.2:                               ## @.str.2
	.asciz	"NM is beyond 10 bits"

	.comm	_XSDFEC_LDPC_CODE_REG1_ADDR_BASE,8,3 ## @XSDFEC_LDPC_CODE_REG1_ADDR_BASE
	.comm	_XSDFEC_LDPC_REG_JUMP,4,2       ## @XSDFEC_LDPC_REG_JUMP
	.comm	_XSDFEC_LDPC_CODE_REG1_ADDR_HIGH,8,3 ## @XSDFEC_LDPC_CODE_REG1_ADDR_HIGH
L_.str.3:                               ## @.str.3
	.asciz	"Writing outside of LDPC reg1 space 0x%x"

	.no_dead_strip	_xsdfec_reg1_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xsdfec_reg1_write
_xsdfec_reg1_write:                     ; @xsdfec_reg1_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x0
Lloh0:
	adrp	x8, _XSDFEC_REG1_PSIZE_MIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XSDFEC_REG1_PSIZE_MIN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _XSDFEC_REG1_PSIZE_MAX@GOTPAGE
Lloh4:
	ldr	x9, [x9, _XSDFEC_REG1_PSIZE_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w1
	ccmp	w9, w1, #8, le
	b.ge	LBB0_2
; %bb.1:
	ldr	w0, [x19]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_8
LBB0_2:
	mov	x23, x4
	mov	x21, x3
	mov	x22, x2
	mov	x20, x1
	cmp	w2, #2
	b.lo	LBB0_4
; %bb.3:
	ldr	w0, [x19]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
LBB0_4:
Lloh10:
	adrp	x8, _XSDFEC_REG1_NO_PACKING_LSB@GOTPAGE
Lloh11:
	ldr	x8, [x8, _XSDFEC_REG1_NO_PACKING_LSB@GOTPAGEOFF]
Lloh12:
	ldr	w25, [x8]
Lloh13:
	adrp	x8, _XSDFEC_REG1_NO_PACKING_MASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _XSDFEC_REG1_NO_PACKING_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w26, [x8]
Lloh16:
	adrp	x24, _XSDFEC_REG1_NM_MASK@GOTPAGE
Lloh17:
	ldr	x24, [x24, _XSDFEC_REG1_NM_MASK@GOTPAGEOFF]
	ldr	w8, [x24]
Lloh18:
	adrp	x27, _XSDFEC_REG1_NM_LSB@GOTPAGE
Lloh19:
	ldr	x27, [x27, _XSDFEC_REG1_NM_LSB@GOTPAGEOFF]
	ldr	w9, [x27]
	asr	w8, w8, w9
	bics	wzr, w21, w8
	b.eq	LBB0_6
; %bb.5:
	ldr	w0, [x19]
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_dbg
LBB0_6:
Lloh22:
	adrp	x8, _XSDFEC_LDPC_CODE_REG1_ADDR_BASE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _XSDFEC_LDPC_CODE_REG1_ADDR_BASE@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
Lloh25:
	adrp	x9, _XSDFEC_LDPC_REG_JUMP@GOTPAGE
Lloh26:
	ldr	x9, [x9, _XSDFEC_LDPC_REG_JUMP@GOTPAGEOFF]
Lloh27:
	ldrsw	x9, [x9]
	sxtw	x10, w23
	madd	x1, x9, x10, x8
Lloh28:
	adrp	x8, _XSDFEC_LDPC_CODE_REG1_ADDR_HIGH@GOTPAGE
Lloh29:
	ldr	x8, [x8, _XSDFEC_LDPC_CODE_REG1_ADDR_HIGH@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
	cmp	x1, x8
	b.le	LBB0_9
; %bb.7:
	ldr	w0, [x19]
	str	x1, [sp]
Lloh31:
	adrp	x1, l_.str.3@PAGE
Lloh32:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_8:
	bl	_dev_dbg
Lloh33:
	adrp	x8, _EINVAL@GOTPAGE
Lloh34:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_9:
	lsl	w8, w22, w25
	and	w8, w8, w26
	ldr	w9, [x27]
	lsl	w9, w21, w9
	ldr	w10, [x24]
	and	w9, w9, w10
	orr	w8, w8, w20
	orr	w2, w8, w9
	mov	x0, x19
	bl	_xsdfec_regwrite
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_XSDFEC_REG1_PSIZE_MIN,4,2      ; @XSDFEC_REG1_PSIZE_MIN
	.comm	_XSDFEC_REG1_PSIZE_MAX,4,2      ; @XSDFEC_REG1_PSIZE_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Psize is not in range"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"No-packing bit register invalid"

	.comm	_XSDFEC_REG1_NO_PACKING_LSB,4,2 ; @XSDFEC_REG1_NO_PACKING_LSB
	.comm	_XSDFEC_REG1_NO_PACKING_MASK,4,2 ; @XSDFEC_REG1_NO_PACKING_MASK
	.comm	_XSDFEC_REG1_NM_MASK,4,2        ; @XSDFEC_REG1_NM_MASK
	.comm	_XSDFEC_REG1_NM_LSB,4,2         ; @XSDFEC_REG1_NM_LSB
l_.str.2:                               ; @.str.2
	.asciz	"NM is beyond 10 bits"

	.comm	_XSDFEC_LDPC_CODE_REG1_ADDR_BASE,8,3 ; @XSDFEC_LDPC_CODE_REG1_ADDR_BASE
	.comm	_XSDFEC_LDPC_REG_JUMP,4,2       ; @XSDFEC_LDPC_REG_JUMP
	.comm	_XSDFEC_LDPC_CODE_REG1_ADDR_HIGH,8,3 ; @XSDFEC_LDPC_CODE_REG1_ADDR_HIGH
l_.str.3:                               ; @.str.3
	.asciz	"Writing outside of LDPC reg1 space 0x%x"

	.no_dead_strip	_xsdfec_reg1_write
.subsections_via_symbols
