	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cros_ec_create_console_log
_cros_ec_create_console_log:            ## @cros_ec_create_console_log
	.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	48(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_ec_read_version_supported
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	8(%rbx), %edi
	movq	_LOG_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r15
	movq	16(%rbx), %rax
	movl	(%rax), %r12d
	movl	8(%rbx), %r13d
	movl	$4, %edi
	movl	%r12d, %esi
	callq	_max
	leaq	24(%rax), %rsi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r13d, %edi
	callq	_devm_kzalloc
	movq	%rax, 40(%r14)
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movl	$1, (%rax)
	movq	_EC_CMD_CONSOLE_READ@GOTPCREL(%rip), %rcx
	movq	(%rbx), %rdx
	addq	(%rcx), %rdx
	movq	%rdx, 16(%rax)
	movl	$4, 4(%rax)
	movl	%r12d, 8(%rax)
	movq	%r15, 16(%r14)
	leaq	12(%r14), %rdi
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%r14)
	callq	_mutex_init
	leaq	8(%r14), %rdi
	callq	_init_waitqueue_head
	movq	_S_IFREG@GOTPCREL(%rip), %rax
	movl	$292, %esi                      ## imm = 0x124
	orl	(%rax), %esi
	movl	4(%r14), %edx
	leaq	L_.str(%rip), %rdi
	movq	_cros_ec_console_log_fops@GOTPCREL(%rip), %r8
	movq	%r14, %rcx
	callq	_debugfs_create_file
	movq	_cros_ec_console_log_work@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_INIT_DELAYED_WORK
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_schedule_delayed_work
	jmp	LBB0_6
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LOG_SIZE,8,3                   ## @LOG_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EC_CMD_CONSOLE_READ,8,3        ## @EC_CMD_CONSOLE_READ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"console_log"

	.comm	_S_IFREG,4,2                    ## @S_IFREG
	.comm	_cros_ec_console_log_fops,4,2   ## @cros_ec_console_log_fops
	.comm	_cros_ec_console_log_work,4,2   ## @cros_ec_console_log_work
	.no_dead_strip	_cros_ec_create_console_log
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function cros_ec_create_console_log
lCPI0_0:
	.long	1                               ; 0x1
	.long	4                               ; 0x4
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_cros_ec_create_console_log:            ; @cros_ec_create_console_log
	.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
	ldr	x20, [x0, #48]
	mov	x0, x20
	bl	_ec_read_version_supported
	cbz	w0, LBB0_5
; %bb.1:
	ldr	w0, [x20, #8]
Lloh0:
	adrp	x8, _LOG_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LOG_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	x1, [x8]
Lloh3:
	adrp	x24, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x24, [x24, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x24]
	bl	_devm_kzalloc
	cbz	x0, LBB0_4
; %bb.2:
	mov	x21, x0
	ldr	x8, [x20, #16]
	ldr	w22, [x8]
	ldr	w23, [x20, #8]
	mov	w0, #4
	mov	x1, x22
	bl	_max
	add	x1, x0, #24
	ldr	w2, [x24]
	mov	x0, x23
	bl	_devm_kzalloc
	str	x0, [x19, #40]
	cbz	x0, LBB0_4
; %bb.3:
Lloh5:
	adrp	x8, _EC_CMD_CONSOLE_READ@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EC_CMD_CONSOLE_READ@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	x9, [x20]
	add	x8, x9, x8
	str	x8, [x0, #16]
Lloh8:
	adrp	x8, lCPI0_0@PAGE
Lloh9:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x0]
	str	w22, [x0, #8]
	add	x0, x19, #12
	stp	xzr, xzr, [x19, #24]
	str	x21, [x19, #16]
	bl	_mutex_init
	add	x0, x19, #8
	bl	_init_waitqueue_head
Lloh10:
	adrp	x8, _S_IFREG@GOTPAGE
Lloh11:
	ldr	x8, [x8, _S_IFREG@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	mov	w9, #292
	orr	w1, w8, w9
	ldr	w2, [x19, #4]
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
Lloh15:
	adrp	x4, _cros_ec_console_log_fops@GOTPAGE
Lloh16:
	ldr	x4, [x4, _cros_ec_console_log_fops@GOTPAGEOFF]
	mov	x3, x19
	bl	_debugfs_create_file
Lloh17:
	adrp	x8, _cros_ec_console_log_work@GOTPAGE
Lloh18:
	ldr	x8, [x8, _cros_ec_console_log_work@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_INIT_DELAYED_WORK
	mov	x0, x19
	mov	w1, #0
	bl	_schedule_delayed_work
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdr	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_LOG_SIZE,8,3                   ; @LOG_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EC_CMD_CONSOLE_READ,8,3        ; @EC_CMD_CONSOLE_READ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"console_log"

	.comm	_S_IFREG,4,2                    ; @S_IFREG
	.comm	_cros_ec_console_log_fops,4,2   ; @cros_ec_console_log_fops
	.comm	_cros_ec_console_log_work,4,2   ; @cros_ec_console_log_work
	.no_dead_strip	_cros_ec_create_console_log
.subsections_via_symbols
