	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_init_mcp23017                  ## -- Begin function init_mcp23017
	.p2align	4, 0x90
_init_mcp23017:                         ## @init_mcp23017
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	_i2c_initializied@GOTPCREL(%rip), %rbx
	cmpl	$0, (%rbx)
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_i2c_init
	movl	$1, (%rbx)
LBB0_2:
	movabsq	$270582939648, %rax             ## imm = 0x3F00000000
	movq	%rax, -32(%rbp)
	movq	_I2C_ADDR@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_I2C_IODIRA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	movl	$2, %ecx
	movl	$50000, %r8d                    ## imm = 0xC350
	callq	_i2c_writeReg
	movq	_mcp23017_status@GOTPCREL(%rip), %rbx
	movl	%eax, (%rbx)
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movl	$255, -32(%rbp)
	movl	(%r14), %edi
	movq	_I2C_GPIOA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	movl	$1, %ecx
	movl	$5000, %r8d                     ## imm = 0x1388
	callq	_i2c_writeReg
	movl	%eax, (%rbx)
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	leaq	-28(%rbp), %rdx
	movl	(%r14), %edi
	movq	_I2C_GPPUB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %ecx
	movl	$2, %r8d
	callq	_i2c_writeReg
	movl	%eax, (%rbx)
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_7
## %bb.6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_i2c_initializied,4,2           ## @i2c_initializied
	.comm	_I2C_ADDR,4,2                   ## @I2C_ADDR
	.comm	_I2C_IODIRA,4,2                 ## @I2C_IODIRA
	.comm	_mcp23017_status,4,2            ## @mcp23017_status
	.comm	_I2C_GPIOA,4,2                  ## @I2C_GPIOA
	.comm	_I2C_GPPUB,4,2                  ## @I2C_GPPUB
.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 init_mcp23017
lCPI0_0:
	.long	0                               ; 0x0
	.long	63                              ; 0x3f
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_init_mcp23017
	.p2align	2
_init_mcp23017:                         ; @init_mcp23017
	.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
Lloh0:
	adrp	x19, _i2c_initializied@GOTPAGE
Lloh1:
	ldr	x19, [x19, _i2c_initializied@GOTPAGEOFF]
	ldr	w8, [x19]
	cbnz	w8, LBB0_2
; %bb.1:
	bl	_i2c_init
	mov	w8, #1
	str	w8, [x19]
LBB0_2:
	add	x19, sp, #8
Lloh2:
	adrp	x8, lCPI0_0@PAGE
Lloh3:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #8]
Lloh4:
	adrp	x20, _I2C_ADDR@GOTPAGE
Lloh5:
	ldr	x20, [x20, _I2C_ADDR@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh6:
	adrp	x8, _I2C_IODIRA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _I2C_IODIRA@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	w3, #2
	mov	w4, #50000
	bl	_i2c_writeReg
Lloh9:
	adrp	x21, _mcp23017_status@GOTPAGE
Lloh10:
	ldr	x21, [x21, _mcp23017_status@GOTPAGEOFF]
	str	w0, [x21]
	cbnz	w0, LBB0_5
; %bb.3:
	mov	w8, #255
	str	w8, [sp, #8]
	ldr	w0, [x20]
Lloh11:
	adrp	x8, _I2C_GPIOA@GOTPAGE
Lloh12:
	ldr	x8, [x8, _I2C_GPIOA@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	w3, #1
	mov	w4, #5000
	bl	_i2c_writeReg
	str	w0, [x21]
	cbnz	w0, LBB0_5
; %bb.4:
	orr	x2, x19, #0x4
	ldr	w0, [x20]
Lloh14:
	adrp	x8, _I2C_GPPUB@GOTPAGE
Lloh15:
	ldr	x8, [x8, _I2C_GPPUB@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	w3, #1
	mov	w4, #2
	bl	_i2c_writeReg
	str	w0, [x21]
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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdrp	Lloh2, Lloh6
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_i2c_initializied,4,2           ; @i2c_initializied
	.comm	_I2C_ADDR,4,2                   ; @I2C_ADDR
	.comm	_I2C_IODIRA,4,2                 ; @I2C_IODIRA
	.comm	_mcp23017_status,4,2            ; @mcp23017_status
	.comm	_I2C_GPIOA,4,2                  ; @I2C_GPIOA
	.comm	_I2C_GPPUB,4,2                  ; @I2C_GPPUB
.subsections_via_symbols
