	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm_gpio_configure_pins
_bcm_gpio_configure_pins:               ## @bcm_gpio_configure_pins
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movl	%edi, %r15d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_device_get_softc
	movq	%rax, _bcm_gpio_configure_pins.sc(%rip)
	movl	%ebx, %edi
	callq	_OF_node_from_xref
	movl	%eax, %ebx
	movq	$0, -96(%rbp)
	leaq	L_.str(%rip), %rsi
	leaq	-96(%rbp), %rcx
	movl	%ebx, %edi
	movl	$4, %edx
	callq	_OF_getencprop_alloc_multi
	movl	%eax, %r14d
	leaq	L_.str.1(%rip), %rsi
	leaq	-80(%rbp), %rdx
	movl	%ebx, %edi
	movl	$32, %ecx
	callq	_OF_getprop
	testl	%r14d, %r14d
	js	LBB0_1
## %bb.2:
	je	LBB0_3
## %bb.4:
	leaq	L_.str.2(%rip), %rsi
	leaq	-100(%rbp), %rdx
	movl	%ebx, %edi
	movl	$4, %ecx
	callq	_OF_getencprop
	testq	%rax, %rax
	jle	LBB0_5
## %bb.7:
	movq	$0, -88(%rbp)
	leaq	L_.str.3(%rip), %rsi
	leaq	-88(%rbp), %rcx
	movl	%ebx, %edi
	movl	$4, %edx
	callq	_OF_getencprop_alloc_multi
	cmpq	$0, -88(%rbp)
	je	LBB0_9
## %bb.8:
	cmpl	%r14d, %eax
	je	LBB0_9
## %bb.30:
	movq	-96(%rbp), %rdi
	callq	_OF_prop_free
	movq	-88(%rbp), %rdi
	jmp	LBB0_6
LBB0_1:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_28
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_28
LBB0_5:
	movq	-96(%rbp), %rdi
LBB0_6:
	callq	_OF_prop_free
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_28
LBB0_9:
	movl	%r14d, %ebx
	movq	_bootverbose@GOTPCREL(%rip), %r12
	xorl	%r13d, %r13d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_10 Depth=1
	incq	%r13
	cmpq	%r13, %rbx
	je	LBB0_26
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	-96(%rbp), %rax
	movl	(%rax,%r13,4), %r14d
	movl	-100(%rbp), %edx
	movl	%r15d, %edi
	movl	%r14d, %esi
	callq	_bcm_gpio_set_alternate
	cmpq	$0, (%r12)
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	-100(%rbp), %ecx
	movl	%r15d, %edi
	leaq	L_.str.4(%rip), %rsi
	movl	%r14d, %edx
	callq	_device_printf
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	-88(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_23
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpq	$0, (%r12)
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	(%rax,%r13,4), %esi
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	movq	-88(%rbp), %rax
LBB0_15:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	(%rax,%r13,4), %ecx
	cmpl	$128, %ecx
	je	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpl	$130, %ecx
	je	LBB0_21
## %bb.17:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpl	$129, %ecx
	jne	LBB0_22
## %bb.18:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	%r15d, %edi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_bcm_gpio_pin_setflags
	cmpq	$0, (%r12)
	jne	LBB0_24
	jmp	LBB0_25
LBB0_19:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	_GPIO_PIN_PULLUP@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_21:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	_GPIO_PIN_PULLDOWN@GOTPCREL(%rip), %rax
LBB0_20:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	(%rax), %edx
	movl	%r15d, %edi
	movl	%r14d, %esi
	callq	_bcm_gpio_pin_setflags
LBB0_23:                                ##   in Loop: Header=BB0_10 Depth=1
	cmpq	$0, (%r12)
	je	LBB0_25
LBB0_24:                                ##   in Loop: Header=BB0_10 Depth=1
	movl	$10, %edi
	callq	_putchar
	jmp	LBB0_25
LBB0_22:                                ##   in Loop: Header=BB0_10 Depth=1
	leaq	L_.str.6(%rip), %rdi
	leaq	-80(%rbp), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_printf
	cmpq	$0, (%r12)
	jne	LBB0_24
	jmp	LBB0_25
LBB0_26:
	movq	-96(%rbp), %rdi
	callq	_OF_prop_free
	movq	-88(%rbp), %rdi
	xorl	%ebx, %ebx
	testq	%rdi, %rdi
	je	LBB0_28
## %bb.27:
	callq	_OF_prop_free
LBB0_28:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_31
## %bb.29:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_31:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_bcm_gpio_configure_pins.sc,8,3 ## @bcm_gpio_configure_pins.sc
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"brcm,pins"

L_.str.1:                               ## @.str.1
	.asciz	"name"

	.comm	_ENOENT,4,2                     ## @ENOENT
L_.str.2:                               ## @.str.2
	.asciz	"brcm,function"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.3:                               ## @.str.3
	.asciz	"brcm,pull"

	.comm	_bootverbose,8,3                ## @bootverbose
L_.str.4:                               ## @.str.4
	.asciz	"set pin %d to func %d"

L_.str.5:                               ## @.str.5
	.asciz	", pull %d"

	.comm	_GPIO_PIN_PULLUP,4,2            ## @GPIO_PIN_PULLUP
	.comm	_GPIO_PIN_PULLDOWN,4,2          ## @GPIO_PIN_PULLDOWN
L_.str.6:                               ## @.str.6
	.asciz	"%s: invalid pull value for pin %d: %d\n"

	.no_dead_strip	_bcm_gpio_configure_pins
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm_gpio_configure_pins
_bcm_gpio_configure_pins:               ; @bcm_gpio_configure_pins
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x28, x27, [sp, #96]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #88]
	bl	_device_get_softc
	adrp	x8, _bcm_gpio_configure_pins.sc@PAGE
	str	x0, [x8, _bcm_gpio_configure_pins.sc@PAGEOFF]
	mov	x0, x20
	bl	_OF_node_from_xref
	mov	x20, x0
	str	xzr, [sp, #48]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	add	x3, sp, #48
	mov	x0, x20
	mov	w2, #4
	bl	_OF_getencprop_alloc_multi
	mov	x21, x0
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #56
	mov	x0, x20
	mov	w3, #32
	bl	_OF_getprop
	tbnz	w21, #31, LBB0_6
; %bb.1:
	cbz	w21, LBB0_28
; %bb.2:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x2, sp, #36
	mov	x0, x20
	mov	w3, #4
	bl	_OF_getencprop
	cmp	x0, #0
	b.le	LBB0_7
; %bb.3:
	str	xzr, [sp, #40]
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	add	x3, sp, #40
	mov	x0, x20
	mov	w2, #4
	bl	_OF_getencprop_alloc_multi
	ldr	x8, [sp, #40]
	cbz	x8, LBB0_9
; %bb.4:
	cmp	w0, w21
	b.eq	LBB0_9
; %bb.5:
	ldr	x0, [sp, #48]
	bl	_OF_prop_free
	ldr	x0, [sp, #40]
	b	LBB0_8
LBB0_6:
Lloh11:
	adrp	x8, _ENOENT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	b	LBB0_29
LBB0_7:
	ldr	x0, [sp, #48]
LBB0_8:
	bl	_OF_prop_free
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	b	LBB0_29
LBB0_9:
	mov	x24, #0
	mov	w8, w21
Lloh17:
	adrp	x25, _bootverbose@GOTPAGE
Lloh18:
	ldr	x25, [x25, _bootverbose@GOTPAGEOFF]
	lsl	x26, x8, #2
Lloh19:
	adrp	x28, _GPIO_PIN_PULLDOWN@GOTPAGE
Lloh20:
	ldr	x28, [x28, _GPIO_PIN_PULLDOWN@GOTPAGEOFF]
	add	x27, sp, #56
Lloh21:
	adrp	x20, l_.str.6@PAGE
Lloh22:
	add	x20, x20, l_.str.6@PAGEOFF
Lloh23:
	adrp	x21, l_.str.5@PAGE
Lloh24:
	add	x21, x21, l_.str.5@PAGEOFF
Lloh25:
	adrp	x22, l_.str.4@PAGE
Lloh26:
	add	x22, x22, l_.str.4@PAGEOFF
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x24, x24, #4
	cmp	x26, x24
	b.eq	LBB0_26
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #48]
	ldr	w23, [x8, x24]
	ldr	w2, [sp, #36]
	mov	x0, x19
	mov	x1, x23
	bl	_bcm_gpio_set_alternate
	ldr	x8, [x25]
	cbz	x8, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w3, [sp, #36]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_device_printf
LBB0_13:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [sp, #40]
	cbz	x8, LBB0_23
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x9, [x25]
	cbz	x9, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x8, x24]
	str	x8, [sp]
	mov	x0, x21
	bl	_printf
	ldr	x8, [sp, #40]
LBB0_16:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x8, x24]
	cmp	w8, #128
	b.eq	LBB0_20
; %bb.17:                               ;   in Loop: Header=BB0_11 Depth=1
	cmp	w8, #130
	b.eq	LBB0_21
; %bb.18:                               ;   in Loop: Header=BB0_11 Depth=1
	cmp	w8, #129
	b.ne	LBB0_25
; %bb.19:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x19
	mov	x1, x23
	mov	w2, #0
	bl	_bcm_gpio_pin_setflags
	ldr	x8, [x25]
	cbnz	x8, LBB0_24
	b	LBB0_10
LBB0_20:                                ;   in Loop: Header=BB0_11 Depth=1
Lloh27:
	adrp	x8, _GPIO_PIN_PULLUP@GOTPAGE
Lloh28:
	ldr	x8, [x8, _GPIO_PIN_PULLUP@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	b	LBB0_22
LBB0_21:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w2, [x28]
LBB0_22:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x19
	mov	x1, x23
	bl	_bcm_gpio_pin_setflags
LBB0_23:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x25]
	cbz	x8, LBB0_10
LBB0_24:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	w0, #10
	bl	_putchar
	b	LBB0_10
LBB0_25:                                ;   in Loop: Header=BB0_11 Depth=1
	stp	x23, x8, [sp, #8]
	str	x27, [sp]
	mov	x0, x20
	bl	_printf
	ldr	x8, [x25]
	cbnz	x8, LBB0_24
	b	LBB0_10
LBB0_26:
	ldr	x0, [sp, #48]
	bl	_OF_prop_free
	ldr	x0, [sp, #40]
	cbz	x0, LBB0_29
; %bb.27:
	bl	_OF_prop_free
LBB0_28:
	mov	w0, #0
LBB0_29:
	ldr	x8, [sp, #88]
Lloh30:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh31:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_31
; %bb.30:
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_31:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_bcm_gpio_configure_pins.sc,8,3 ; @bcm_gpio_configure_pins.sc
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"brcm,pins"

l_.str.1:                               ; @.str.1
	.asciz	"name"

	.comm	_ENOENT,4,2                     ; @ENOENT
l_.str.2:                               ; @.str.2
	.asciz	"brcm,function"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.3:                               ; @.str.3
	.asciz	"brcm,pull"

	.comm	_bootverbose,8,3                ; @bootverbose
l_.str.4:                               ; @.str.4
	.asciz	"set pin %d to func %d"

l_.str.5:                               ; @.str.5
	.asciz	", pull %d"

	.comm	_GPIO_PIN_PULLUP,4,2            ; @GPIO_PIN_PULLUP
	.comm	_GPIO_PIN_PULLDOWN,4,2          ; @GPIO_PIN_PULLDOWN
l_.str.6:                               ; @.str.6
	.asciz	"%s: invalid pull value for pin %d: %d\n"

	.no_dead_strip	_bcm_gpio_configure_pins
.subsections_via_symbols
