	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function dabusb_fpga_download
LCPI0_0:
	.long	43                              ## 0x2b
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	60                              ## 0x3c
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_dabusb_fpga_download:                  ## @dabusb_fpga_download
	.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	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kmalloc
	movq	%rax, %r12
	leaq	L_.str(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_dbg
	movq	(%r14), %rdx
	testq	%r12, %r12
	je	LBB0_1
## %bb.2:
	leaq	L_.str.2(%rip), %rsi
	leaq	-48(%rbp), %rdi
	callq	_request_firmware
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r15d
	movq	(%r14), %rdi
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	%r12, %rdi
	callq	_kfree
	jmp	LBB0_10
LBB0_1:
	leaq	L_.str.1(%rip), %rsi
	movq	%rdx, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_10
LBB0_4:
	movl	$1, (%r12)
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_dabusb_fpga_clear
	movl	$10, %edi
	callq	_mdelay
	movq	-48(%rbp), %rax
	movq	(%rax), %rax
	movl	288(%rax), %r15d
	movl	292(%rax), %r13d
	shll	$8, %r15d
	leal	(%r15,%r13), %esi
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_dbg
	movq	8(%r12), %rdi
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [43,0,0,60]
	movups	%xmm0, (%rdi)
	movl	$64, 16(%r12)
	addq	$16, %rdi
	movq	-48(%rbp), %rax
	movl	$296, %esi                      ## imm = 0x128
	addq	(%rax), %rsi
	movl	$60, %ebx
	movl	$60, %edx
	callq	_memcpy
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_dabusb_bulk
	testl	%eax, %eax
	js	LBB0_8
## %bb.5:
	addl	%r13d, %r15d
	addl	$60, %r15d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_mdelay
	cmpl	%r15d, %ebx
	ja	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	8(%r12), %rdi
	movl	$64, 16(%r12)
	addq	$16, %rdi
	movq	-48(%rbp), %rax
	movq	(%rax), %rax
	movl	%ebx, %ecx
	leaq	(%rax,%rcx,4), %rsi
	addq	$296, %rsi                      ## imm = 0x128
	movl	$60, %edx
	callq	_memcpy
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_dabusb_bulk
	addl	$60, %ebx
	testl	%eax, %eax
	jns	LBB0_6
LBB0_8:
	movq	(%r14), %rdi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_9:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_dabusb_fpga_init
	movl	%eax, %r15d
	movq	%r12, %rdi
	callq	_kfree
	movq	-48(%rbp), %rdi
	callq	_release_firmware
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_dbg
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Enter dabusb_fpga_download (internal)"

L_.str.1:                               ## @.str.1
	.asciz	"kmalloc(sizeof(bulk_transfer_t))==NULL\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"dabusb/bitstream.bin"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to load \"dabusb/bitstream.bin\": %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"Bitstream len: %i"

L_.str.5:                               ## @.str.5
	.asciz	"dabusb_bulk failed.\n"

L_.str.6:                               ## @.str.6
	.asciz	"exit dabusb_fpga_download"

	.no_dead_strip	_dabusb_fpga_download
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function dabusb_fpga_download
lCPI0_0:
	.long	43                              ; 0x2b
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	60                              ; 0x3c
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_dabusb_fpga_download:                  ; @dabusb_fpga_download
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_kmalloc
	mov	x19, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dbg
	ldr	x2, [x20]
	cbz	x19, LBB0_3
; %bb.1:
Lloh5:
	adrp	x1, l_.str.2@PAGE
Lloh6:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x0, sp, #8
	bl	_request_firmware
	cbz	w0, LBB0_4
; %bb.2:
	mov	x21, x0
	ldr	x0, [x20]
	str	x21, [sp]
Lloh7:
	adrp	x1, l_.str.3@PAGE
Lloh8:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
	mov	x0, x19
	bl	_kfree
	b	LBB0_10
LBB0_3:
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x2
	bl	_dev_err
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_10
LBB0_4:
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x20
	mov	x1, x19
	bl	_dabusb_fpga_clear
	mov	w0, #10
	bl	_mdelay
	ldr	x8, [sp, #8]
	ldr	x8, [x8]
	ldr	w9, [x8, #292]
	ldr	w8, [x8, #288]
	add	w22, w9, w8, lsl #8
	str	x22, [sp]
Lloh14:
	adrp	x0, l_.str.4@PAGE
Lloh15:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_dbg
	ldr	x0, [x19, #8]
Lloh16:
	adrp	x8, lCPI0_0@PAGE
Lloh17:
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	str	q0, [x0], #16
	mov	w21, #64
	str	w21, [x19, #16]
	ldr	x8, [sp, #8]
	ldr	x8, [x8]
	add	x1, x8, #296
	mov	w2, #60
	bl	_memcpy
	mov	x0, x20
	mov	x1, x19
	bl	_dabusb_bulk
	tbnz	w0, #31, LBB0_8
; %bb.5:
	add	w22, w22, #60
	mov	w23, #60
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	bl	_mdelay
	cmp	w23, w22
	b.hi	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19, #8]
	str	w21, [x19, #16]
	add	x0, x8, #16
	ldr	x8, [sp, #8]
	ldr	x8, [x8]
	add	x8, x8, w23, uxtw #2
	add	x1, x8, #296
	mov	w2, #60
	bl	_memcpy
	mov	x0, x20
	mov	x1, x19
	bl	_dabusb_bulk
	add	w23, w23, #60
	tbz	w0, #31, LBB0_6
LBB0_8:
	ldr	x0, [x20]
Lloh18:
	adrp	x1, l_.str.5@PAGE
Lloh19:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_err
LBB0_9:
	mov	x0, x20
	mov	x1, x19
	bl	_dabusb_fpga_init
	mov	x21, x0
	mov	x0, x19
	bl	_kfree
	ldr	x0, [sp, #8]
	bl	_release_firmware
Lloh20:
	adrp	x0, l_.str.6@PAGE
Lloh21:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_dbg
LBB0_10:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdr	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Enter dabusb_fpga_download (internal)"

l_.str.1:                               ; @.str.1
	.asciz	"kmalloc(sizeof(bulk_transfer_t))==NULL\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"dabusb/bitstream.bin"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to load \"dabusb/bitstream.bin\": %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"Bitstream len: %i"

l_.str.5:                               ; @.str.5
	.asciz	"dabusb_bulk failed.\n"

l_.str.6:                               ; @.str.6
	.asciz	"exit dabusb_fpga_download"

	.no_dead_strip	_dabusb_fpga_download
.subsections_via_symbols
