	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxcpld_mux_probe
_mlxcpld_mux_probe:                     ## @mlxcpld_mux_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	%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, %rbx
	movq	8(%rdi), %r15
	callq	_dev_get_platdata
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r12
	movq	_I2C_FUNC_SMBUS_WRITE_BYTE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_i2c_check_functionality
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movq	_CPLD_MUX_MAX_NCHANS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_mlxcpld_mux_select_chan@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_mlxcpld_mux_deselect@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$16, %ecx
	xorl	%r8d, %r8d
	callq	_i2c_mux_alloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_i2c_mux_priv
	movq	%rax, %r13
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_i2c_set_clientdata
	movq	%rbx, 8(%r13)
	movq	$0, (%r13)
	movq	_CPLD_MUX_MAX_NCHANS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_13
## %bb.8:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jge	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	8(%r12), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_i2c_mux_add_adapter
	testl	%eax, %eax
	jne	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_10 Depth=1
	incq	%rbx
	movq	_CPLD_MUX_MAX_NCHANS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rbx
	jl	LBB0_10
	jmp	LBB0_13
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_13:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movl	%eax, %r13d
	movq	%r15, %rdi
	callq	_i2c_mux_del_adapters
	movl	%r13d, %r14d
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_I2C_FUNC_SMBUS_WRITE_BYTE_DATA,4,2 ## @I2C_FUNC_SMBUS_WRITE_BYTE_DATA
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_CPLD_MUX_MAX_NCHANS,4,2        ## @CPLD_MUX_MAX_NCHANS
	.comm	_mlxcpld_mux_select_chan,4,2    ## @mlxcpld_mux_select_chan
	.comm	_mlxcpld_mux_deselect,4,2       ## @mlxcpld_mux_deselect
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_mlxcpld_mux_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxcpld_mux_probe
_mlxcpld_mux_probe:                     ; @mlxcpld_mux_probe
	.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	x21, x0
	ldr	x20, [x0, #8]
	bl	_dev_get_platdata
	cbz	x0, LBB0_9
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _I2C_FUNC_SMBUS_WRITE_BYTE_DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_FUNC_SMBUS_WRITE_BYTE_DATA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_i2c_check_functionality
	cbz	w0, LBB0_10
; %bb.2:
Lloh3:
	adrp	x23, _CPLD_MUX_MAX_NCHANS@GOTPAGE
Lloh4:
	ldr	x23, [x23, _CPLD_MUX_MAX_NCHANS@GOTPAGEOFF]
	ldr	w2, [x23]
Lloh5:
	adrp	x8, _mlxcpld_mux_select_chan@GOTPAGE
Lloh6:
	ldr	x8, [x8, _mlxcpld_mux_select_chan@GOTPAGEOFF]
Lloh7:
	ldr	w5, [x8]
Lloh8:
	adrp	x8, _mlxcpld_mux_deselect@GOTPAGE
Lloh9:
	ldr	x8, [x8, _mlxcpld_mux_deselect@GOTPAGEOFF]
Lloh10:
	ldr	w6, [x8]
	mov	x0, x20
	mov	x1, x21
	mov	w3, #16
	mov	w4, #0
	bl	_i2c_mux_alloc
	cbz	x0, LBB0_11
; %bb.3:
	mov	x20, x0
	bl	_i2c_mux_priv
	mov	x22, x0
	mov	x0, x21
	mov	x1, x20
	bl	_i2c_set_clientdata
	stp	xzr, x21, [x22]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.4:
	mov	x22, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x8, [x19]
	cmp	x22, x8
	b.ge	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #8]
	ldr	w1, [x8, x22, lsl #2]
	mov	x0, x20
	mov	x2, x22
	mov	w3, #0
	bl	_i2c_mux_add_adapter
	cbnz	w0, LBB0_14
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x23]
	cmp	x22, x8
	b.lt	LBB0_5
LBB0_8:
	mov	w21, #0
	b	LBB0_13
LBB0_9:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
Lloh13:
	adrp	x8, _ENODEV@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_13:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_14:
	mov	x21, x0
	mov	x0, x20
	bl	_i2c_mux_del_adapters
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_I2C_FUNC_SMBUS_WRITE_BYTE_DATA,4,2 ; @I2C_FUNC_SMBUS_WRITE_BYTE_DATA
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_CPLD_MUX_MAX_NCHANS,4,2        ; @CPLD_MUX_MAX_NCHANS
	.comm	_mlxcpld_mux_select_chan,4,2    ; @mlxcpld_mux_select_chan
	.comm	_mlxcpld_mux_deselect,4,2       ; @mlxcpld_mux_deselect
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_mlxcpld_mux_probe
.subsections_via_symbols
