	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_pcib_write_config
_tegra_pcib_write_config:               ## @tegra_pcib_write_config
	.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
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movq	%r8, %r13
	movq	%rcx, %rbx
	movq	%rdx, %r12
	movq	%rsi, %r14
	movl	16(%rbp), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	callq	_device_get_softc
	movq	%rax, %r15
	testq	%r14, %r14
	je	LBB0_1
## %bb.7:
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	movq	%rbx, %rcx
	movq	%r13, %r8
	callq	_tegra_pcbib_map_cfg
	testl	%eax, %eax
	jne	LBB0_18
## %bb.8:
	movl	4(%r15), %r12d
	movq	%r13, %rdi
	callq	_PCI_CFG_BASE_REG
	movl	%eax, %r13d
LBB0_9:
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	cmpl	$1, %eax
	je	LBB0_16
## %bb.10:
	cmpl	$2, %eax
	je	LBB0_14
## %bb.11:
	cmpl	$4, %eax
	jne	LBB0_18
## %bb.12:
	movl	(%r15), %edi
	movl	%r12d, %esi
	movl	%r13d, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	jmp	LBB0_13
LBB0_1:
	testq	%rbx, %rbx
	je	LBB0_2
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_TEGRA_PCIB_MAX_PORTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_18
## %bb.3:
	movq	8(%r15), %rcx
	xorl	%edx, %edx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_4 Depth=1
	incq	%rdx
	cmpq	%rdx, %rax
	je	LBB0_18
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_17
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	%r12, (%rsi)
	jne	LBB0_17
## %bb.6:
	movl	8(%rsi), %r12d
	andl	$4095, %r13d                    ## imm = 0xFFF
	jmp	LBB0_9
LBB0_16:
	movl	(%r15), %edi
	movl	%r13d, %r14d
	andl	$-4, %r14d
	movl	%r12d, %esi
	movl	%r14d, %edx
	callq	_bus_space_read_4
	shll	$3, %r13d
	movl	$255, %edx
	movl	%r13d, %ecx
	shll	%cl, %edx
	movzbl	-44(%rbp), %ebx                 ## 1-byte Folded Reload
	jmp	LBB0_15
LBB0_14:
	movl	(%r15), %edi
	movl	%r13d, %r14d
	andl	$-4, %r14d
	movl	%r12d, %esi
	movl	%r14d, %edx
	callq	_bus_space_read_4
	shll	$3, %r13d
	movl	$65535, %edx                    ## imm = 0xFFFF
	movl	%r13d, %ecx
	shll	%cl, %edx
	movzwl	-44(%rbp), %ebx                 ## 2-byte Folded Reload
LBB0_15:
	shll	%cl, %ebx
	notl	%edx
	andl	%eax, %edx
	orl	%edx, %ebx
	movl	(%r15), %edi
	movl	%r12d, %esi
	movl	%r14d, %edx
	movl	%ebx, %ecx
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bus_space_write_4              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_TEGRA_PCIB_MAX_PORTS,4,2       ## @TEGRA_PCIB_MAX_PORTS
	.no_dead_strip	_tegra_pcib_write_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_pcib_write_config
_tegra_pcib_write_config:               ; @tegra_pcib_write_config
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x6
	mov	x19, x5
	mov	x23, x4
	mov	x24, x3
	mov	x22, x2
	mov	x25, x1
	bl	_device_get_softc
	mov	x20, x0
	cbz	x25, LBB0_6
; %bb.1:
	mov	x0, x20
	mov	x1, x25
	mov	x2, x22
	mov	x3, x24
	mov	x4, x23
	bl	_tegra_pcbib_map_cfg
	cbnz	w0, LBB0_7
; %bb.2:
	ldr	w22, [x20, #4]
	mov	x0, x23
	bl	_PCI_CFG_BASE_REG
	mov	x23, x0
	cmp	w21, #1
	b.eq	LBB0_14
LBB0_3:
	cmp	w21, #2
	b.eq	LBB0_15
; %bb.4:
	cmp	w21, #4
	b.ne	LBB0_7
; %bb.5:
	ldr	w0, [x20]
	mov	x1, x22
	mov	x2, x23
	mov	x3, x19
	b	LBB0_17
LBB0_6:
	cbz	x24, LBB0_8
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_8:
Lloh0:
	adrp	x8, _TEGRA_PCIB_MAX_PORTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TEGRA_PCIB_MAX_PORTS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.9:
	ldr	x9, [x20, #8]
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x9, x9, #8
	subs	x8, x8, #1
	b.eq	LBB0_7
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9]
	cbz	x10, LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x11, [x10]
	cmp	x11, x22
	b.ne	LBB0_10
; %bb.13:
	ldr	w22, [x10, #8]
	and	w23, w23, #0xfff
	cmp	w21, #1
	b.ne	LBB0_3
LBB0_14:
	ldr	w0, [x20]
	and	w21, w23, #0xfffffffc
	mov	x1, x22
	mov	x2, x21
	bl	_bus_space_read_4
	ubfiz	w8, w23, #3, #2
	mov	w9, #255
	lsl	w9, w9, w8
	bic	w9, w0, w9
	and	w10, w19, #0xff
	b	LBB0_16
LBB0_15:
	ldr	w0, [x20]
	and	w21, w23, #0xfffffffc
	mov	x1, x22
	mov	x2, x21
	bl	_bus_space_read_4
	ubfiz	w8, w23, #3, #2
	mov	w9, #65535
	lsl	w9, w9, w8
	bic	w9, w0, w9
	and	w10, w19, #0xffff
LBB0_16:
	lsl	w8, w10, w8
	orr	w3, w9, w8
	ldr	w0, [x20]
	mov	x1, x22
	mov	x2, x21
LBB0_17:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_bus_space_write_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_TEGRA_PCIB_MAX_PORTS,4,2       ; @TEGRA_PCIB_MAX_PORTS
	.no_dead_strip	_tegra_pcib_write_config
.subsections_via_symbols
