	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cros_ec_create_panicinfo
_cros_ec_create_panicinfo:              ## @cros_ec_create_panicinfo
	.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
	movq	(%rdi), %rax
	movq	8(%rax), %r15
	movl	(%r15), %r12d
	movl	(%rax), %edi
	leal	12(%r12), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	_EC_CMD_GET_PANIC_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movl	%r12d, (%rbx)
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_cros_ec_cmd_xfer_status
	testl	%eax, %eax
	jle	LBB0_4
## %bb.3:
	movl	4(%rbx), %edx
	leaq	8(%r14), %rcx
	movl	%edx, 12(%r14)
	movl	%eax, 8(%r14)
	movq	_S_IFREG@GOTPCREL(%rip), %rax
	movl	$292, %esi                      ## imm = 0x124
	orl	(%rax), %esi
	movl	16(%r14), %edx
	leaq	L_.str(%rip), %rdi
	callq	_debugfs_create_blob
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_4:
	movq	(%r14), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_devm_kfree
LBB0_5:
	xorl	%eax, %eax
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EC_CMD_GET_PANIC_INFO,4,2      ## @EC_CMD_GET_PANIC_INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"panicinfo"

	.comm	_S_IFREG,4,2                    ## @S_IFREG
	.no_dead_strip	_cros_ec_create_panicinfo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cros_ec_create_panicinfo
_cros_ec_create_panicinfo:              ; @cros_ec_create_panicinfo
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x8, [x0]
	ldr	x21, [x8, #8]
	ldr	w22, [x21]
	ldr	w0, [x8]
	add	w1, w22, #12
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_devm_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x8, _EC_CMD_GET_PANIC_INFO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EC_CMD_GET_PANIC_INFO@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x0, #8]
	str	w22, [x0]
	mov	x0, x21
	mov	x1, x20
	bl	_cros_ec_cmd_xfer_status
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.2:
	ldr	w8, [x20, #4]
	stp	w0, w8, [x19, #8]!
Lloh6:
	adrp	x8, _S_IFREG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _S_IFREG@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	mov	w9, #292
	orr	w1, w8, w9
	ldr	w2, [x19, #8]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	x3, x19
	bl	_debugfs_create_blob
	b	LBB0_5
LBB0_3:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_4:
	ldr	x8, [x19]
	ldr	w0, [x8]
	mov	x1, x20
	bl	_devm_kfree
LBB0_5:
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EC_CMD_GET_PANIC_INFO,4,2      ; @EC_CMD_GET_PANIC_INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"panicinfo"

	.comm	_S_IFREG,4,2                    ; @S_IFREG
	.no_dead_strip	_cros_ec_create_panicinfo
.subsections_via_symbols
