	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ptn5150_i2c_probe
_ptn5150_i2c_probe:                     ## @ptn5150_i2c_probe
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, 8(%rdi)
	je	LBB0_24
## %bb.1:
	movq	%rdi, %rbx
	leaq	8(%rdi), %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$64, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r15
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_i2c_set_clientdata
	movq	%r14, 8(%r15)
	movq	%rbx, 56(%r15)
	movq	_GPIOD_IN@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_gpiod_get
	movq	%rax, 24(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	24(%r15), %rdi
	jmp	LBB0_5
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_25
LBB0_6:
	movl	(%r12), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_gpiod_get
	movq	%rax, 48(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	48(%r15), %rdi
LBB0_5:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_8:
	movq	48(%r15), %rdi
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	callq	_gpiod_direction_output
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_26
LBB0_10:
	leaq	44(%r15), %rdi
	callq	_mutex_init
	movq	%r15, %rdi
	addq	$40, %rdi
	movq	_ptn5150_irq_work@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	movq	_ptn5150_regmap_config@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	callq	_devm_regmap_init_i2c
	movq	%rax, 32(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	32(%r15), %rdi
	callq	_PTR_ERR
	movl	%eax, %r12d
	movq	8(%r15), %rdi
	leaq	L_.str.5(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_27
LBB0_12:
	movq	24(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_18
## %bb.13:
	callq	_gpiod_to_irq
	movq	%rax, (%r15)
	testq	%rax, %rax
	js	LBB0_14
## %bb.15:
	movq	_ptn5150_irq_handler@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_IRQF_TRIGGER_FALLING@GOTPCREL(%rip), %rdx
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r8d
	orl	(%rdx), %r8d
	movl	(%rbx), %r9d
	movq	%r15, (%rsp)
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_devm_request_threaded_irq
	testl	%eax, %eax
	js	LBB0_16
LBB0_18:
	movq	8(%r15), %rdi
	movq	_ptn5150_extcon_cable@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_devm_extcon_dev_allocate
	movq	%rax, 16(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	8(%r15), %rdi
	testq	%rax, %rax
	je	LBB0_20
## %bb.19:
	leaq	L_.str.8(%rip), %rsi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_26
LBB0_14:
	leaq	L_.str.6(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movl	(%r15), %r12d
	jmp	LBB0_27
LBB0_20:
	movq	16(%r15), %rsi
	callq	_devm_extcon_dev_register
	testl	%eax, %eax
	je	LBB0_22
## %bb.21:
	movl	%eax, %r12d
	movq	8(%r15), %rdi
	leaq	L_.str.9(%rip), %rsi
	jmp	LBB0_17
LBB0_16:
	movl	%eax, %r12d
	leaq	L_.str.7(%rip), %rsi
	movq	%r14, %rdi
LBB0_17:
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_27
LBB0_22:
	movq	%r15, %rdi
	callq	_ptn5150_init_dev_type
	testl	%eax, %eax
	je	LBB0_23
LBB0_24:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_25:
	xorl	%r12d, %r12d
LBB0_26:
	subl	(%rax), %r12d
LBB0_27:
	movl	%r12d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	xorl	%r12d, %r12d
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"int"

	.comm	_GPIOD_IN,4,2                   ## @GPIOD_IN
L_.str.1:                               ## @.str.1
	.asciz	"failed to get INT GPIO\n"

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

L_.str.3:                               ## @.str.3
	.asciz	"failed to get VBUS GPIO\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed to set VBUS GPIO direction\n"

	.comm	_ptn5150_irq_work,4,2           ## @ptn5150_irq_work
	.comm	_ptn5150_regmap_config,4,2      ## @ptn5150_regmap_config
L_.str.5:                               ## @.str.5
	.asciz	"failed to allocate register map: %d\n"

L_.str.6:                               ## @.str.6
	.asciz	"failed to get INTB IRQ\n"

	.comm	_ptn5150_irq_handler,4,2        ## @ptn5150_irq_handler
	.comm	_IRQF_TRIGGER_FALLING,4,2       ## @IRQF_TRIGGER_FALLING
	.comm	_IRQF_ONESHOT,4,2               ## @IRQF_ONESHOT
L_.str.7:                               ## @.str.7
	.asciz	"failed to request handler for INTB IRQ\n"

	.comm	_ptn5150_extcon_cable,4,2       ## @ptn5150_extcon_cable
L_.str.8:                               ## @.str.8
	.asciz	"failed to allocate memory for extcon\n"

L_.str.9:                               ## @.str.9
	.asciz	"failed to register extcon device\n"

	.no_dead_strip	_ptn5150_i2c_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ptn5150_i2c_probe
_ptn5150_i2c_probe:                     ; @ptn5150_i2c_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
	ldr	x8, [x20, #8]!
	cbz	x8, LBB0_9
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #64
	bl	_devm_kzalloc
	cbz	x0, LBB0_17
; %bb.2:
	mov	x19, x0
	mov	x0, x21
	mov	x1, x19
	bl	_i2c_set_clientdata
	str	x20, [x19, #8]
	str	x21, [x19, #56]
Lloh3:
	adrp	x22, _GPIOD_IN@GOTPAGE
Lloh4:
	ldr	x22, [x22, _GPIOD_IN@GOTPAGEOFF]
	ldr	w2, [x22]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_devm_gpiod_get
	str	x0, [x19, #24]
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.3:
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	x0, [x19, #24]
	b	LBB0_6
LBB0_4:
	ldr	w2, [x22]
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_devm_gpiod_get
	str	x0, [x19, #48]
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.5:
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	x0, [x19, #48]
LBB0_6:
	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
	add	sp, sp, #64
	b	_PTR_ERR
LBB0_7:
	ldr	x0, [x19, #48]
	mov	w1, #0
	bl	_gpiod_direction_output
	cbz	w0, LBB0_10
; %bb.8:
Lloh13:
	adrp	x1, l_.str.4@PAGE
Lloh14:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_dev_err
LBB0_9:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_18
LBB0_10:
	add	x0, x19, #44
	bl	_mutex_init
	add	x0, x19, #40
Lloh17:
	adrp	x8, _ptn5150_irq_work@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ptn5150_irq_work@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	bl	_INIT_WORK
Lloh20:
	adrp	x1, _ptn5150_regmap_config@GOTPAGE
Lloh21:
	ldr	x1, [x1, _ptn5150_regmap_config@GOTPAGEOFF]
	mov	x0, x21
	bl	_devm_regmap_init_i2c
	str	x0, [x19, #32]
	bl	_IS_ERR
	cbz	x0, LBB0_12
; %bb.11:
	ldr	x0, [x19, #32]
	bl	_PTR_ERR
	mov	x21, x0
	ldr	x0, [x19, #8]
	str	x21, [sp]
Lloh22:
	adrp	x1, l_.str.5@PAGE
Lloh23:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_err
	b	LBB0_19
LBB0_12:
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_15
; %bb.13:
	bl	_gpiod_to_irq
	str	x0, [x19]
	tbnz	x0, #63, LBB0_20
; %bb.14:
	mov	x1, x0
Lloh24:
	adrp	x8, _ptn5150_irq_handler@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ptn5150_irq_handler@GOTPAGEOFF]
Lloh26:
	ldr	w3, [x8]
Lloh27:
	adrp	x8, _IRQF_TRIGGER_FALLING@GOTPAGE
Lloh28:
	ldr	x8, [x8, _IRQF_TRIGGER_FALLING@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
Lloh30:
	adrp	x9, _IRQF_ONESHOT@GOTPAGE
Lloh31:
	ldr	x9, [x9, _IRQF_ONESHOT@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	orr	w4, w9, w8
	ldr	w5, [x21]
	mov	x0, x20
                                        ; kill: def $w1 killed $w1 killed $x1
	mov	x2, #0
	mov	x6, x19
	bl	_devm_request_threaded_irq
	tbnz	w0, #31, LBB0_23
LBB0_15:
	ldr	x0, [x19, #8]
Lloh33:
	adrp	x8, _ptn5150_extcon_cable@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ptn5150_extcon_cable@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	bl	_devm_extcon_dev_allocate
	str	x0, [x19, #16]
	bl	_IS_ERR
	mov	x8, x0
	ldr	x0, [x19, #8]
	cbz	x8, LBB0_21
; %bb.16:
Lloh36:
	adrp	x1, l_.str.8@PAGE
Lloh37:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_dev_err
LBB0_17:
Lloh38:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_18:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_19:
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
LBB0_20:
Lloh40:
	adrp	x1, l_.str.6@PAGE
Lloh41:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	w21, [x19]
	b	LBB0_19
LBB0_21:
	ldr	x1, [x19, #16]
	bl	_devm_extcon_dev_register
	cbz	w0, LBB0_24
; %bb.22:
	mov	x21, x0
	ldr	x0, [x19, #8]
Lloh42:
	adrp	x1, l_.str.9@PAGE
Lloh43:
	add	x1, x1, l_.str.9@PAGEOFF
	bl	_dev_err
	b	LBB0_19
LBB0_23:
	mov	x21, x0
Lloh44:
	adrp	x1, l_.str.7@PAGE
Lloh45:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_19
LBB0_24:
	mov	x0, x19
	bl	_ptn5150_init_dev_type
	cbnz	w0, LBB0_9
; %bb.25:
	mov	w21, #0
	b	LBB0_19
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"int"

	.comm	_GPIOD_IN,4,2                   ; @GPIOD_IN
l_.str.1:                               ; @.str.1
	.asciz	"failed to get INT GPIO\n"

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

l_.str.3:                               ; @.str.3
	.asciz	"failed to get VBUS GPIO\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed to set VBUS GPIO direction\n"

	.comm	_ptn5150_irq_work,4,2           ; @ptn5150_irq_work
	.comm	_ptn5150_regmap_config,4,2      ; @ptn5150_regmap_config
l_.str.5:                               ; @.str.5
	.asciz	"failed to allocate register map: %d\n"

l_.str.6:                               ; @.str.6
	.asciz	"failed to get INTB IRQ\n"

	.comm	_ptn5150_irq_handler,4,2        ; @ptn5150_irq_handler
	.comm	_IRQF_TRIGGER_FALLING,4,2       ; @IRQF_TRIGGER_FALLING
	.comm	_IRQF_ONESHOT,4,2               ; @IRQF_ONESHOT
l_.str.7:                               ; @.str.7
	.asciz	"failed to request handler for INTB IRQ\n"

	.comm	_ptn5150_extcon_cable,4,2       ; @ptn5150_extcon_cable
l_.str.8:                               ; @.str.8
	.asciz	"failed to allocate memory for extcon\n"

l_.str.9:                               ; @.str.9
	.asciz	"failed to register extcon device\n"

	.no_dead_strip	_ptn5150_i2c_probe
.subsections_via_symbols
