	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function huawei_cdc_ncm_bind
_huawei_cdc_ncm_bind:                   ## @huawei_cdc_ncm_bind
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	callq	_ERR_PTR
	movq	%rax, %r15
	movq	_CDC_NCM_FLAG_NDP_TO_END@GOTPCREL(%rip), %rax
	movq	_CDC_NCM_FLAG_RESET_NTB16@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_cdc_ncm_bind_common
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movq	(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.2:
	movq	16(%rbx), %rax
	movl	(%rax), %edi
	movq	_huawei_cdc_ncm_wdm_manage_power@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$1024, %edx                     ## imm = 0x400
	callq	_usb_cdc_wdm_register
	movq	%rax, %r15
LBB0_3:
	movq	%r15, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_PTR_ERR
	movl	%eax, %r15d
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_cdc_ncm_unbind
	movl	%r15d, %eax
	jmp	LBB0_6
LBB0_5:
	movq	$0, (%rbx)
	movq	%r15, 8(%rbx)
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_CDC_NCM_FLAG_NDP_TO_END,4,2    ## @CDC_NCM_FLAG_NDP_TO_END
	.comm	_CDC_NCM_FLAG_RESET_NTB16,4,2   ## @CDC_NCM_FLAG_RESET_NTB16
	.comm	_huawei_cdc_ncm_wdm_manage_power,4,2 ## @huawei_cdc_ncm_wdm_manage_power
	.no_dead_strip	_huawei_cdc_ncm_bind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function huawei_cdc_ncm_bind
_huawei_cdc_ncm_bind:                   ; @huawei_cdc_ncm_bind
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	bl	_ERR_PTR
	mov	x21, x0
Lloh3:
	adrp	x8, _CDC_NCM_FLAG_NDP_TO_END@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CDC_NCM_FLAG_NDP_TO_END@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _CDC_NCM_FLAG_RESET_NTB16@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CDC_NCM_FLAG_RESET_NTB16@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	bl	_cdc_ncm_bind_common
	cbnz	w0, LBB0_6
; %bb.1:
	ldr	x1, [x19]
	cbz	x1, LBB0_3
; %bb.2:
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
Lloh9:
	adrp	x8, _huawei_cdc_ncm_wdm_manage_power@GOTPAGE
Lloh10:
	ldr	x8, [x8, _huawei_cdc_ncm_wdm_manage_power@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	mov	w2, #1024
	bl	_usb_cdc_wdm_register
	mov	x21, x0
LBB0_3:
	mov	x0, x21
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, x21
	bl	_PTR_ERR
	mov	x21, x0
	mov	x0, x19
	mov	x1, x20
	bl	_cdc_ncm_unbind
	mov	x0, x21
	b	LBB0_6
LBB0_5:
	stp	xzr, x21, [x19]
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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_CDC_NCM_FLAG_NDP_TO_END,4,2    ; @CDC_NCM_FLAG_NDP_TO_END
	.comm	_CDC_NCM_FLAG_RESET_NTB16,4,2   ; @CDC_NCM_FLAG_RESET_NTB16
	.comm	_huawei_cdc_ncm_wdm_manage_power,4,2 ; @huawei_cdc_ncm_wdm_manage_power
	.no_dead_strip	_huawei_cdc_ncm_bind
.subsections_via_symbols
