	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function malidp500_enter_config_mode
_malidp500_enter_config_mode:           ## @malidp500_enter_config_mode
	.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	_MALIDP500_DC_CONFIG_REQ@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_MALIDP500_DC_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_malidp_hw_setbits
	movq	$-100, %r12
	movq	_MALIDP_REG_STATUS@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movq	(%r13), %rsi
	addq	(%rax), %rsi
	movq	%r14, %rdi
	callq	_malidp_hw_read
	movq	%rax, %rbx
	movq	_MALIDP500_DC_CONFIG_REQ@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	andq	%r15, %rbx
	cmpq	%r15, %rbx
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$10000, %esi                    ## imm = 0x2710
	callq	_usleep_range
	incq	%r12
	jne	LBB0_1
LBB0_3:
	xorl	%edi, %edi
	cmpq	%r15, %rbx
	setne	%dil
	leaq	L_.str(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WARN                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MALIDP500_DC_CONFIG_REQ,8,3    ## @MALIDP500_DC_CONFIG_REQ
	.comm	_MALIDP500_DC_CONTROL,4,2       ## @MALIDP500_DC_CONTROL
	.comm	_MALIDP_REG_STATUS,8,3          ## @MALIDP_REG_STATUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timeout while entering config mode"

	.no_dead_strip	_malidp500_enter_config_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function malidp500_enter_config_mode
_malidp500_enter_config_mode:           ; @malidp500_enter_config_mode
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _MALIDP500_DC_CONFIG_REQ@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MALIDP500_DC_CONFIG_REQ@GOTPAGEOFF]
	ldr	x1, [x20]
Lloh2:
	adrp	x8, _MALIDP500_DC_CONTROL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MALIDP500_DC_CONTROL@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	bl	_malidp_hw_setbits
	mov	x21, #-100
Lloh5:
	adrp	x22, _MALIDP_REG_STATUS@GOTPAGE
Lloh6:
	ldr	x22, [x22, _MALIDP_REG_STATUS@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	x9, [x22]
	add	x1, x9, x8
	mov	x0, x19
	bl	_malidp_hw_read
	ldr	x23, [x20]
	and	x24, x23, x0
	cmp	x24, x23
	b.eq	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #1000
	mov	w1, #10000
	bl	_usleep_range
	adds	x21, x21, #1
	b.lo	LBB0_1
LBB0_3:
	cmp	x24, x23
	cset	w0, ne
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	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
	b	_WARN
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MALIDP500_DC_CONFIG_REQ,8,3    ; @MALIDP500_DC_CONFIG_REQ
	.comm	_MALIDP500_DC_CONTROL,4,2       ; @MALIDP500_DC_CONTROL
	.comm	_MALIDP_REG_STATUS,8,3          ; @MALIDP_REG_STATUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timeout while entering config mode"

	.no_dead_strip	_malidp500_enter_config_mode
.subsections_via_symbols
