	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function az6007_identify_state
_az6007_identify_state:                 ## @az6007_identify_state
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_pr_debug
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$6, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movl	(%r14), %edi
	movq	_AZ6007_READ_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$6, %edx
	xorl	%ecx, %ecx
	movq	%rbx, %r8
	movl	$6, %r9d
	callq	___az6007_read
	movq	_COLD@GOTPCREL(%rip), %r12
	movq	%r12, %rcx
	cmpl	$6, %eax
	jne	LBB0_4
## %bb.3:
	movq	_WARM@GOTPCREL(%rip), %rcx
LBB0_4:
	movl	(%rcx), %r15d
	movq	%rbx, %rdi
	callq	_kfree
	cmpl	(%r12), %r15d
	jne	LBB0_6
## %bb.5:
	movl	(%r14), %edi
	movl	$9, %esi
	movl	$1, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	___az6007_write
	movl	(%r14), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	___az6007_write
	movl	(%r14), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	___az6007_write
LBB0_6:
	movq	_WARM@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.3(%rip), %rsi
	cmoveq	%rax, %rsi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_debug
	jmp	LBB0_7
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_7:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Identifying az6007 state\n"

	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AZ6007_READ_DATA,4,2           ## @AZ6007_READ_DATA
	.comm	_WARM,4,2                       ## @WARM
	.comm	_COLD,4,2                       ## @COLD
L_.str.1:                               ## @.str.1
	.asciz	"Device is on %s state\n"

L_.str.2:                               ## @.str.2
	.asciz	"warm"

L_.str.3:                               ## @.str.3
	.asciz	"cold"

	.no_dead_strip	_az6007_identify_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function az6007_identify_state
_az6007_identify_state:                 ; @az6007_identify_state
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
Lloh2:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #6
	bl	_kmalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x0
	ldr	w0, [x19]
Lloh5:
	adrp	x8, _AZ6007_READ_DATA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AZ6007_READ_DATA@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w2, #6
	mov	w3, #0
	mov	x4, x21
	mov	w5, #6
	bl	___az6007_read
Lloh8:
	adrp	x22, _WARM@GOTPAGE
Lloh9:
	ldr	x22, [x22, _WARM@GOTPAGEOFF]
Lloh10:
	adrp	x23, _COLD@GOTPAGE
Lloh11:
	ldr	x23, [x23, _COLD@GOTPAGEOFF]
	cmp	w0, #6
	csel	x8, x22, x23, eq
	ldr	w20, [x8]
	mov	x0, x21
	bl	_kfree
	ldr	w8, [x23]
	cmp	w20, w8
	b.ne	LBB0_3
; %bb.2:
	ldr	w0, [x19]
	mov	w1, #9
	mov	w2, #1
	mov	w3, #0
	mov	x4, #0
	mov	w5, #0
	bl	___az6007_write
	ldr	w0, [x19]
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	x4, #0
	mov	w5, #0
	bl	___az6007_write
	ldr	w0, [x19]
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	x4, #0
	mov	w5, #0
	bl	___az6007_write
LBB0_3:
	ldr	w8, [x22]
Lloh12:
	adrp	x9, l_.str.3@PAGE
Lloh13:
	add	x9, x9, l_.str.3@PAGEOFF
Lloh14:
	adrp	x10, l_.str.2@PAGE
Lloh15:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	w20, w8
	csel	x8, x10, x9, eq
	str	x8, [sp]
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_debug
	b	LBB0_5
LBB0_4:
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Identifying az6007 state\n"

	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AZ6007_READ_DATA,4,2           ; @AZ6007_READ_DATA
	.comm	_WARM,4,2                       ; @WARM
	.comm	_COLD,4,2                       ; @COLD
l_.str.1:                               ; @.str.1
	.asciz	"Device is on %s state\n"

l_.str.2:                               ; @.str.2
	.asciz	"warm"

l_.str.3:                               ; @.str.3
	.asciz	"cold"

	.no_dead_strip	_az6007_identify_state
.subsections_via_symbols
