	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sec_hw_init
_sec_hw_init:                           ## @sec_hw_init
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movq	$0, -64(%rbp)
	movl	16(%rdi), %edi
	callq	_iommu_get_domain_for_dev
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	___IOMMU_DOMAIN_PAGING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_3
## %bb.2:
	movl	$4, %edi
	movl	$5, %eax
	jmp	LBB0_4
LBB0_3:
	movl	$9, %edi
	movl	$10, %eax
LBB0_4:
	movl	%eax, (%r12)
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_GENMASK
	movq	8(%r12), %rcx
	movq	_SEC_SAA@GOTPCREL(%rip), %r13
	movq	(%r13), %rdx
	movq	_SEC_CLK_EN_REG@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	addq	(%rcx,%rdx,8), %rsi
	movl	%eax, %edi
	callq	_writel_relaxed
	movq	%r12, %rdi
	callq	_sec_bd_endian_little
	movq	%r12, %rdi
	callq	_sec_cache_config
	movq	%r12, %rdi
	movl	$7, %esi
	callq	_sec_data_axiwr_otsd_cfg
	movq	%r12, %rdi
	movl	$7, %esi
	callq	_sec_data_axird_otsd_cfg
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_sec_clk_gate_en
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_sec_comm_cnt_cfg
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_sec_commsnap_en
	movq	8(%r12), %rax
	movq	(%r13), %rcx
	movq	_SEC_FSM_MAX_CNT_REG@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	addq	(%rax,%rcx,8), %rsi
	movl	$-1, %edi
	callq	_writel_relaxed
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_sec_ipv4_hashmask
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	16(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_14
LBB0_6:
	leaq	-96(%rbp), %rsi
	movq	%r12, %rdi
	callq	_sec_ipv6_hashmask
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_sec_set_dbg_bd_cfg
	testq	%r15, %r15
	je	LBB0_11
## %bb.7:
	movq	___IOMMU_DOMAIN_PAGING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_11
## %bb.8:
	movq	_SEC_Q_NUM@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_11
## %bb.9:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_sec_streamid
	movq	8(%r12), %rax
	movq	(%r13), %rcx
	movq	(%rax,%rcx,8), %r15
	movl	%ebx, %edi
	callq	_SEC_Q_WEIGHT_CFG_REG
	addq	%rax, %r15
	movl	$63, %edi
	movq	%r15, %rsi
	callq	_writel_relaxed
	incl	%ebx
	cmpl	(%r14), %ebx
	jl	LBB0_10
LBB0_11:
	cmpl	$0, (%r12)
	movl	$0, %r14d
	jle	LBB0_14
## %bb.12:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	$1, %edx
	callq	_sec_saa_getqm_en
	movq	%r12, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_sec_saa_int_mask
	incl	%ebx
	cmpl	(%r12), %ebx
	jl	LBB0_13
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	___IOMMU_DOMAIN_PAGING,4,2      ## @__IOMMU_DOMAIN_PAGING
	.comm	_SEC_SAA,8,3                    ## @SEC_SAA
	.comm	_SEC_CLK_EN_REG,8,3             ## @SEC_CLK_EN_REG
	.comm	_SEC_FSM_MAX_CNT_REG,8,3        ## @SEC_FSM_MAX_CNT_REG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to set ipv4 hashmask %d\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_SEC_Q_NUM,4,2                  ## @SEC_Q_NUM
	.no_dead_strip	_sec_hw_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sec_hw_init
_sec_hw_init:                           ; @sec_hw_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	str	xzr, [sp, #32]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp]
	ldr	w0, [x0, #16]
	bl	_iommu_get_domain_for_dev
	mov	x20, x0
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w8, [x20]
Lloh3:
	adrp	x9, ___IOMMU_DOMAIN_PAGING@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___IOMMU_DOMAIN_PAGING@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	mov	w0, #4
	mov	w8, #5
	b	LBB0_4
LBB0_3:
	mov	w0, #9
	mov	w8, #10
LBB0_4:
	str	w8, [x19]
	mov	w1, #0
	bl	_GENMASK
	ldr	x8, [x19, #8]
Lloh6:
	adrp	x21, _SEC_SAA@GOTPAGE
Lloh7:
	ldr	x21, [x21, _SEC_SAA@GOTPAGEOFF]
	ldr	x9, [x21]
	ldr	x8, [x8, x9, lsl #3]
Lloh8:
	adrp	x9, _SEC_CLK_EN_REG@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SEC_CLK_EN_REG@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel_relaxed
	mov	x0, x19
	bl	_sec_bd_endian_little
	mov	x0, x19
	bl	_sec_cache_config
	mov	x0, x19
	mov	w1, #7
	bl	_sec_data_axiwr_otsd_cfg
	mov	x0, x19
	mov	w1, #7
	bl	_sec_data_axird_otsd_cfg
	mov	x0, x19
	mov	w1, #1
	bl	_sec_clk_gate_en
	mov	x0, x19
	mov	w1, #0
	bl	_sec_comm_cnt_cfg
	mov	x0, x19
	mov	w1, #0
	bl	_sec_commsnap_en
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	ldr	x8, [x8, x9, lsl #3]
Lloh11:
	adrp	x9, _SEC_FSM_MAX_CNT_REG@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SEC_FSM_MAX_CNT_REG@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #-1
	bl	_writel_relaxed
	mov	x0, x19
	mov	w1, #0
	bl	_sec_ipv4_hashmask
	cbz	w0, LBB0_6
; %bb.5:
	mov	x2, x0
	ldr	w0, [x19, #16]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh16:
	adrp	x8, _EIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_15
LBB0_6:
	mov	x1, sp
	mov	x0, x19
	bl	_sec_ipv6_hashmask
	mov	x0, x19
	mov	w1, #0
	bl	_sec_set_dbg_bd_cfg
	cbz	x20, LBB0_11
; %bb.7:
	ldr	w8, [x20]
Lloh19:
	adrp	x9, ___IOMMU_DOMAIN_PAGING@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___IOMMU_DOMAIN_PAGING@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.8:
Lloh22:
	adrp	x22, _SEC_Q_NUM@GOTPAGE
Lloh23:
	ldr	x22, [x22, _SEC_Q_NUM@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.9:
	mov	w20, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_sec_streamid
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	ldr	x23, [x8, x9, lsl #3]
	mov	x0, x20
	bl	_SEC_Q_WEIGHT_CFG_REG
	add	x1, x0, x23
	mov	w0, #63
	bl	_writel_relaxed
	add	w20, w20, #1
	ldr	w8, [x22]
	cmp	w20, w8
	b.lt	LBB0_10
LBB0_11:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.12:
	mov	w20, #0
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	bl	_sec_saa_getqm_en
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_sec_saa_int_mask
	add	w20, w20, #1
	ldr	w8, [x19]
	cmp	w20, w8
	b.lt	LBB0_13
LBB0_14:
	mov	w0, #0
LBB0_15:
	ldr	x8, [sp, #40]
Lloh24:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh25:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	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
	add	sp, sp, #112
	ret
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	___IOMMU_DOMAIN_PAGING,4,2      ; @__IOMMU_DOMAIN_PAGING
	.comm	_SEC_SAA,8,3                    ; @SEC_SAA
	.comm	_SEC_CLK_EN_REG,8,3             ; @SEC_CLK_EN_REG
	.comm	_SEC_FSM_MAX_CNT_REG,8,3        ; @SEC_FSM_MAX_CNT_REG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to set ipv4 hashmask %d\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_SEC_Q_NUM,4,2                  ; @SEC_Q_NUM
	.no_dead_strip	_sec_hw_init
.subsections_via_symbols
