	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_init_mcp23018                  ## -- Begin function init_mcp23018
	.p2align	4, 0x90
_init_mcp23018:                         ## @init_mcp23018
	.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	_mcp23018_status@GOTPCREL(%rip), %r15
	movl	$32, (%r15)
	movq	_i2c_initialized@GOTPCREL(%rip), %rbx
	cmpl	$0, (%rbx)
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_i2c_init
	movl	$1, (%rbx)
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	__delay_ms
LBB0_2:
	movq	_I2C_ADDR_WRITE@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_i2c_start
	movl	%eax, (%r15)
	testl	%eax, %eax
	jne	LBB0_10
## %bb.3:
	movq	_IODIRA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_i2c_write
	movl	%eax, (%r15)
	testl	%eax, %eax
	jne	LBB0_10
## %bb.4:
	movl	$255, %edi
	callq	_i2c_write
	movl	%eax, (%r15)
	testl	%eax, %eax
	jne	LBB0_10
## %bb.5:
	xorl	%edi, %edi
	callq	_i2c_write
	movl	%eax, (%r15)
	testl	%eax, %eax
	jne	LBB0_10
## %bb.6:
	xorl	%eax, %eax
	callq	_i2c_stop
	movl	(%r14), %edi
	callq	_i2c_start
	movl	%eax, (%r15)
	testl	%eax, %eax
	jne	LBB0_10
## %bb.7:
	movq	_GPPUA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_i2c_write
	movl	%eax, (%r15)
	testl	%eax, %eax
	jne	LBB0_10
## %bb.8:
	movl	$255, %edi
	callq	_i2c_write
	movl	%eax, (%r15)
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	xorl	%edi, %edi
	callq	_i2c_write
	movl	%eax, (%r15)
LBB0_10:
	xorl	%eax, %eax
	callq	_i2c_stop
	movl	(%r15), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mcp23018_status,4,2            ## @mcp23018_status
	.comm	_i2c_initialized,4,2            ## @i2c_initialized
	.comm	_I2C_ADDR_WRITE,4,2             ## @I2C_ADDR_WRITE
	.comm	_IODIRA,4,2                     ## @IODIRA
	.comm	_GPPUA,4,2                      ## @GPPUA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_init_mcp23018                  ; -- Begin function init_mcp23018
	.p2align	2
_init_mcp23018:                         ; @init_mcp23018
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x19, _mcp23018_status@GOTPAGE
Lloh1:
	ldr	x19, [x19, _mcp23018_status@GOTPAGEOFF]
	mov	w8, #32
	str	w8, [x19]
Lloh2:
	adrp	x20, _i2c_initialized@GOTPAGE
Lloh3:
	ldr	x20, [x20, _i2c_initialized@GOTPAGEOFF]
	ldr	w8, [x20]
	cbnz	w8, LBB0_2
; %bb.1:
	bl	_i2c_init
	mov	w8, #1
	str	w8, [x20]
	mov	w0, #1000
	bl	__delay_ms
LBB0_2:
Lloh4:
	adrp	x20, _I2C_ADDR_WRITE@GOTPAGE
Lloh5:
	ldr	x20, [x20, _I2C_ADDR_WRITE@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_i2c_start
	str	w0, [x19]
	cbnz	w0, LBB0_10
; %bb.3:
Lloh6:
	adrp	x8, _IODIRA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IODIRA@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_i2c_write
	str	w0, [x19]
	cbnz	w0, LBB0_10
; %bb.4:
	mov	w0, #255
	bl	_i2c_write
	str	w0, [x19]
	cbnz	w0, LBB0_10
; %bb.5:
	bl	_i2c_write
	str	w0, [x19]
	cbnz	w0, LBB0_10
; %bb.6:
	bl	_i2c_stop
	ldr	w0, [x20]
	bl	_i2c_start
	str	w0, [x19]
	cbnz	w0, LBB0_10
; %bb.7:
Lloh9:
	adrp	x8, _GPPUA@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GPPUA@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_i2c_write
	str	w0, [x19]
	cbnz	w0, LBB0_10
; %bb.8:
	mov	w0, #255
	bl	_i2c_write
	str	w0, [x19]
	cbnz	w0, LBB0_10
; %bb.9:
	bl	_i2c_write
	str	w0, [x19]
LBB0_10:
	bl	_i2c_stop
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_mcp23018_status,4,2            ; @mcp23018_status
	.comm	_i2c_initialized,4,2            ; @i2c_initialized
	.comm	_I2C_ADDR_WRITE,4,2             ; @I2C_ADDR_WRITE
	.comm	_IODIRA,4,2                     ; @IODIRA
	.comm	_GPPUA,4,2                      ; @GPPUA
.subsections_via_symbols
