	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_idmac_lock_enable          ## -- Begin function ipu_idmac_lock_enable
	.p2align	4, 0x90
_ipu_idmac_lock_enable:                 ## @ipu_idmac_lock_enable
	.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
	cmpl	$8, %esi
	ja	LBB0_12
## %bb.1:
	movq	%rdi, %r13
	movq	8(%rdi), %r14
	movl	$1, %eax
	xorl	%r15d, %r15d
	movl	%esi, %ecx
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_3:
	movl	$2, %eax
	jmp	LBB0_4
LBB0_2:
	movl	$3, %eax
LBB0_4:
	movq	(%r14), %rcx
	movq	_IPUV3H@GOTPCREL(%rip), %rdx
	movl	%eax, %r15d
	cmpq	(%rdx), %rcx
	jne	LBB0_12
LBB0_5:
	movq	_idmac_lock_en_info@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_6
## %bb.7:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movq	(%r12), %rdi
	cmpq	(%rdi,%r14), %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	addq	$16, %r14
	cmpq	%rax, %rbx
	jl	LBB0_8
LBB0_10:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_11
LBB0_6:
	xorl	%ebx, %ebx
LBB0_11:
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %ebx
	jge	LBB0_12
## %bb.13:
	leaq	8(%r14), %r13
	movq	%r13, %rdi
	callq	_spin_lock_irqsave
	movq	(%r12), %rax
	movl	%ebx, %ebx
	shlq	$4, %rbx
	movl	12(%rax,%rbx), %esi
	movq	%r14, %rdi
	callq	_ipu_idmac_read
	movq	(%r12), %rdx
	movb	8(%rdx,%rbx), %cl
	movl	$3, %esi
	shll	%cl, %esi
	shll	%cl, %r15d
	notl	%esi
	andl	%eax, %esi
	orl	%esi, %r15d
	movl	12(%rdx,%rbx), %edx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_ipu_idmac_write
	movq	%r13, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
	.long	L0_0_set_5
	.long	L0_0_set_5
	.long	L0_0_set_4
	.long	L0_0_set_12
	.long	L0_0_set_3
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_12
	.long	L0_0_set_2
	.end_data_region
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IPUV3H,8,3                     ## @IPUV3H
	.comm	_idmac_lock_en_info,8,3         ## @idmac_lock_en_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_idmac_lock_enable          ; -- Begin function ipu_idmac_lock_enable
	.p2align	2
_ipu_idmac_lock_enable:                 ; @ipu_idmac_lock_enable
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	cmp	w1, #8
	b.hi	LBB0_12
; %bb.1:
	mov	x20, x0
	mov	w21, #0
	ldr	x19, [x0, #8]
	mov	w8, #1
	mov	w9, w1
Lloh0:
	adrp	x10, lJTI0_0@PAGE
Lloh1:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_2
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_2:
	mov	w8, #2
	b	LBB0_4
LBB0_3:
	mov	w8, #3
LBB0_4:
	ldr	x9, [x19]
Lloh2:
	adrp	x10, _IPUV3H@GOTPAGE
Lloh3:
	ldr	x10, [x10, _IPUV3H@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	mov	x21, x8
	cmp	x9, x10
	b.ne	LBB0_12
LBB0_5:
Lloh5:
	adrp	x22, _idmac_lock_en_info@GOTPAGE
Lloh6:
	ldr	x22, [x22, _idmac_lock_en_info@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.6:
	mov	x24, #0
	mov	x23, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	x0, [x22]
	ldr	x9, [x0, x24]
	cmp	x8, x9
	b.eq	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x23, x23, #1
	bl	_ARRAY_SIZE
	add	x24, x24, #16
	cmp	x23, w0, sxtw
	b.lt	LBB0_7
	b	LBB0_10
LBB0_9:
	mov	w23, #0
LBB0_10:
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w23, w0
	b.ge	LBB0_12
; %bb.11:
	add	x20, x19, #8
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x8, [x22]
	mov	w9, w23
	lsl	x23, x9, #4
	add	x8, x8, x23
	ldr	w1, [x8, #12]
	mov	x0, x19
	bl	_ipu_idmac_read
	ldr	x8, [x22]
	add	x8, x8, x23
	mov	w9, #3
	ldp	w10, w2, [x8, #8]
	lsl	w8, w9, w10
	bic	w8, w0, w8
	lsl	w9, w21, w10
	orr	w1, w8, w9
	mov	x0, x19
	bl	_ipu_idmac_write
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	b	LBB0_13
LBB0_12:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_12-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_12-LBB0_2)>>2
	.byte	(LBB0_12-LBB0_2)>>2
	.byte	(LBB0_12-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IPUV3H,8,3                     ; @IPUV3H
	.comm	_idmac_lock_en_info,8,3         ; @idmac_lock_en_info
.subsections_via_symbols
