	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sony_nc_usb_charge_setup
_sony_nc_usb_charge_setup:              ## @sony_nc_usb_charge_setup
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	xorl	%ebx, %ebx
	leaq	-28(%rbp), %rdx
	movl	$341, %edi                      ## imm = 0x155
	xorl	%esi, %esi
	callq	_sony_call_snc_handle
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	testb	$1, -28(%rbp)
	jne	LBB0_3
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_pr_info
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kzalloc
	movq	_uc_handle@GOTPCREL(%rip), %r15
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	addq	$8, %rax
	movq	%rax, %rdi
	callq	_sysfs_attr_init
	movq	(%r15), %rsi
	leaq	L_.str.1(%rip), %rax
	movq	%rax, 8(%rsi)
	movq	_S_IRUGO@GOTPCREL(%rip), %rax
	movq	_S_IWUSR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, 16(%rsi)
	movq	_sony_nc_usb_charge_show@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rsi)
	movq	_sony_nc_usb_charge_store@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsi)
	movq	%r14, %rdi
	callq	_device_create_file
	movl	%eax, -28(%rbp)
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movq	(%r15), %rdi
	callq	_kfree
	movq	$0, (%r15)
	movl	-28(%rbp), %ebx
	jmp	LBB0_7
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No USB Charge capability found\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_uc_handle,8,3                  ## @uc_handle
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"usb_charge"

	.comm	_S_IRUGO,4,2                    ## @S_IRUGO
	.comm	_S_IWUSR,4,2                    ## @S_IWUSR
	.comm	_sony_nc_usb_charge_show,4,2    ## @sony_nc_usb_charge_show
	.comm	_sony_nc_usb_charge_store,4,2   ## @sony_nc_usb_charge_store
	.no_dead_strip	_sony_nc_usb_charge_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sony_nc_usb_charge_setup
_sony_nc_usb_charge_setup:              ; @sony_nc_usb_charge_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	add	x2, sp, #12
	mov	w0, #341
	mov	w1, #0
	bl	_sony_call_snc_handle
	cbnz	x0, LBB0_2
; %bb.1:
	ldrb	w8, [sp, #12]
	tbnz	w8, #0, LBB0_4
LBB0_2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_4:
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_kzalloc
Lloh5:
	adrp	x20, _uc_handle@GOTPAGE
Lloh6:
	ldr	x20, [x20, _uc_handle@GOTPAGEOFF]
	str	x0, [x20]
	cbz	x0, LBB0_7
; %bb.5:
	add	x0, x0, #8
	bl	_sysfs_attr_init
Lloh7:
	adrp	x8, l_.str.1@PAGE
Lloh8:
	add	x8, x8, l_.str.1@PAGEOFF
	ldr	x1, [x20]
	str	x8, [x1, #8]
Lloh9:
	adrp	x8, _S_IRUGO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _S_IRUGO@GOTPAGEOFF]
Lloh11:
	adrp	x9, _S_IWUSR@GOTPAGE
Lloh12:
	ldr	x9, [x9, _S_IWUSR@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x1, #16]
Lloh15:
	adrp	x8, _sony_nc_usb_charge_show@GOTPAGE
Lloh16:
	ldr	x8, [x8, _sony_nc_usb_charge_show@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _sony_nc_usb_charge_store@GOTPAGE
Lloh19:
	ldr	x9, [x9, _sony_nc_usb_charge_store@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	stp	w9, w8, [x1]
	mov	x0, x19
	bl	_device_create_file
	str	w0, [sp, #12]
	cbz	w0, LBB0_3
; %bb.6:
	ldr	x0, [x20]
	bl	_kfree
	str	xzr, [x20]
	ldr	w0, [sp, #12]
	b	LBB0_3
LBB0_7:
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No USB Charge capability found\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_uc_handle,8,3                  ; @uc_handle
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"usb_charge"

	.comm	_S_IRUGO,4,2                    ; @S_IRUGO
	.comm	_S_IWUSR,4,2                    ; @S_IWUSR
	.comm	_sony_nc_usb_charge_show,4,2    ; @sony_nc_usb_charge_show
	.comm	_sony_nc_usb_charge_store,4,2   ; @sony_nc_usb_charge_store
	.no_dead_strip	_sony_nc_usb_charge_setup
.subsections_via_symbols
