	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dip_switch_read                ## -- Begin function dip_switch_read
	.p2align	4, 0x90
_dip_switch_read:                       ## @dip_switch_read
	.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	_NUMBER_OF_DIP_SWITCHES@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.1:
	movl	%edi, %r14d
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	xorl	%r13d, %r13d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_dip_switch_update_kb
	movl	$1, %r13d
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	orq	%r12, %r15
	incq	%rbx
	movq	_NUMBER_OF_DIP_SWITCHES@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jae	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_dip_switch_pad@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_readPin
	xorl	%esi, %esi
	testl	%eax, %eax
	sete	%sil
	movq	%rsi, %r12
	movl	%ebx, %ecx
	shlq	%cl, %r12
	movq	_dip_switch_state@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rsi, (%rax,%rbx,8)
	testl	%r14d, %r14d
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_last_dip_switch_state@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rsi, (%rax,%rbx,8)
	je	LBB0_5
	jmp	LBB0_4
LBB0_6:
	testl	%r13d, %r13d
	je	LBB0_8
## %bb.7:
	movq	%r15, %rdi
	callq	_dip_switch_update_mask_kb
LBB0_8:
	movq	_last_dip_switch_state@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_dip_switch_state@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	$8, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_memcpy                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NUMBER_OF_DIP_SWITCHES,8,3     ## @NUMBER_OF_DIP_SWITCHES
	.comm	_dip_switch_pad,8,3             ## @dip_switch_pad
	.comm	_dip_switch_state,8,3           ## @dip_switch_state
	.comm	_last_dip_switch_state,8,3      ## @last_dip_switch_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dip_switch_read                ; -- Begin function dip_switch_read
	.p2align	2
_dip_switch_read:                       ; @dip_switch_read
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x25, _NUMBER_OF_DIP_SWITCHES@GOTPAGE
Lloh1:
	ldr	x25, [x25, _NUMBER_OF_DIP_SWITCHES@GOTPAGEOFF]
	ldr	x8, [x25]
Lloh2:
	adrp	x23, _last_dip_switch_state@GOTPAGE
Lloh3:
	ldr	x23, [x23, _last_dip_switch_state@GOTPAGEOFF]
Lloh4:
	adrp	x24, _dip_switch_state@GOTPAGE
Lloh5:
	ldr	x24, [x24, _dip_switch_state@GOTPAGEOFF]
	cbz	x8, LBB0_8
; %bb.1:
	mov	x19, x0
	mov	x21, #0
	mov	x20, #0
	mov	w27, #0
Lloh6:
	adrp	x26, _dip_switch_pad@GOTPAGE
Lloh7:
	ldr	x26, [x26, _dip_switch_pad@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	x1, x22
	bl	_dip_switch_update_kb
	mov	w27, #1
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	lsl	x8, x22, x21
	orr	x20, x8, x20
	add	x21, x21, #1
	ldr	x8, [x25]
	cmp	x21, x8
	b.hs	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x26]
	ldr	w0, [x8, x21, lsl #2]
	bl	_readPin
	cmp	w0, #0
	cset	w22, eq
	ldr	x9, [x24]
	lsl	x8, x21, #3
	str	x22, [x9, x8]
	cbnz	w19, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x23]
	ldr	x8, [x9, x8]
	cmp	x8, x22
	b.eq	LBB0_3
	b	LBB0_2
LBB0_6:
	cbz	w27, LBB0_8
; %bb.7:
	mov	x0, x20
	bl	_dip_switch_update_mask_kb
LBB0_8:
	ldr	x0, [x23]
	ldr	x1, [x24]
	mov	w2, #8
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_memcpy
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_NUMBER_OF_DIP_SWITCHES,8,3     ; @NUMBER_OF_DIP_SWITCHES
	.comm	_dip_switch_pad,8,3             ; @dip_switch_pad
	.comm	_dip_switch_state,8,3           ; @dip_switch_state
	.comm	_last_dip_switch_state,8,3      ; @last_dip_switch_state
.subsections_via_symbols
