// File: /workspace/github_c_makefile_star2_O3/michaelforney[P]wld/intel/batch.c
// Function: intel_batch_initialize
bool
intel_batch_initialize(struct intel_batch *batch,
                       drm_intel_bufmgr *bufmgr)
{
	int device_id = drm_intel_bufmgr_gem_get_devid(bufmgr);

	batch->command_count = 0;
	batch->device_info = device_info(device_id);

	if (!batch->device_info)
		return false;

	/* Alignment argument (4096) is not used */
	batch->bo = drm_intel_bo_alloc(bufmgr, "batchbuffer", sizeof batch->commands, 4096);

	if (!batch->bo)
		return false;

	return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x9620
movl $0x0, 0x8010(%rbx)
cmpl $0x1901, %eax           # imm = 0x1901
jg 0xbb04
cmpl $0xc05, %eax            # imm = 0xC05
jle 0xbb45
cmpl $0xd25, %eax            # imm = 0xD25
jg 0xbbcd
cmpl $0xd01, %eax            # imm = 0xD01
jg 0xbd40
cmpl $0xc1d, %eax            # imm = 0xC1D
jg 0xbe11
leal -0xc06(%rax), %ecx
cmpl $0x8, %ecx
jbe 0xbf44
addl $0xfffff3ee, %eax       # imm = 0xFFFFF3EE
cmpl $0x9, %eax
ja 0xc1a8
leaq 0x5489(%rip), %rcx      # 0x10f84
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x3e8f, %eax           # imm = 0x3E8F
jg 0xbb97
cmpl $0x22af, %eax           # imm = 0x22AF
jg 0xbc38
leal -0x1902(%rax), %ecx
cmpl $0x3b, %ecx
ja 0xc0fd
leaq 0x55c4(%rip), %rax      # 0x110f4
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x5860(%rip), %rcx      # 0x113a0
jmp 0xc17a
cmpl $0x41d, %eax            # imm = 0x41D
jg 0xbc03
cmpl $0x161, %eax            # imm = 0x161
jg 0xbcbc
cmpl $0x121, %eax            # imm = 0x121
jg 0xbdc7
cmpl $0x105, %eax            # imm = 0x105
jle 0xbf60
cmpl $0x111, %eax            # imm = 0x111
jg 0xc0be
cmpl $0x106, %eax            # imm = 0x106
je 0xbf7d
cmpl $0x10a, %eax            # imm = 0x10A
je 0xbf7d
jmp 0xc1a8
cmpl $0x593a, %eax           # imm = 0x593A
jg 0xbc86
leal -0x5902(%rax), %ecx
cmpl $0x25, %ecx
ja 0xbcec
leaq 0x56a0(%rip), %rax      # 0x11258
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x57f4(%rip), %rcx      # 0x113bc
jmp 0xc17a
cmpl $0xf32, %eax            # imm = 0xF32
jle 0xbda8
leal -0x1602(%rax), %ecx
cmpl $0x2c, %ecx
ja 0xc15c
leaq 0x5452(%rip), %rax      # 0x11040
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x578e(%rip), %rcx      # 0x1138c
jmp 0xc17a
cmpl $0xa11, %eax            # imm = 0xA11
jle 0xbd16
cmpl $0xa25, %eax            # imm = 0xA25
jg 0xbdf2
leal -0xa12(%rax), %ecx
cmpl $0x9, %ecx
ja 0xc024
leaq 0x52e5(%rip), %rax      # 0x10f14
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x5721(%rip), %rcx      # 0x11360
cmpl $0x2a11, %eax           # imm = 0x2A11
jle 0xbd6a
cmpl $0x2e31, %eax           # imm = 0x2E31
jg 0xbe60
cmpl $0x2e01, %eax           # imm = 0x2E01
jle 0xbfd4
cmpl $0x2e02, %eax           # imm = 0x2E02
je 0xbffd
cmpl $0x2e12, %eax           # imm = 0x2E12
je 0xbffd
cmpl $0x2e22, %eax           # imm = 0x2E22
je 0xbffd
jmp 0xc1a8
cmpl $0x5a83, %eax           # imm = 0x5A83
jg 0xc009
leal -0x5a41(%rax), %ecx
cmpl $0x1b, %ecx
ja 0xc13a
leaq 0x5649(%rip), %rax      # 0x112f0
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x5731(%rip), %rcx      # 0x113e8
jmp 0xc17a
cmpl $0x401, %eax            # imm = 0x401
jg 0xbf16
cmpl $0x162, %eax            # imm = 0x162
je 0xbce0
cmpl $0x166, %eax            # imm = 0x166
je 0xbce0
cmpl $0x16a, %eax            # imm = 0x16A
jne 0xc1a8
leaq 0x5691(%rip), %rcx      # 0x11378
jmp 0xc17a
addl $0xffffc170, %eax       # imm = 0xFFFFC170
cmpl $0x18, %eax
ja 0xc1a8
leaq 0x54f3(%rip), %rcx      # 0x111f4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x56c3(%rip), %rcx      # 0x113d4
jmp 0xc17a
cmpl $0xa01, %eax            # imm = 0xA01
jg 0xbe98
leal -0x426(%rax), %ecx
cmpl $0x8, %ecx
ja 0xc05a
leaq 0x5195(%rip), %rax      # 0x10ecc
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
cmpl $0xd11, %eax            # imm = 0xD11
jle 0xbeb7
leal -0xd12(%rax), %ecx
cmpl $0x9, %ecx
ja 0xc09b
leaq 0x5293(%rip), %rax      # 0x10ff4
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leal -0x22b0(%rax), %edx
cmpl $0x3, %edx
jbe 0xbefa
leal -0x2972(%rax), %edx
cmpl $0x30, %edx
ja 0xbd98
movabsq $0x1000100010001, %rsi  # imm = 0x1000100010001
btq %rdx, %rsi
jb 0xc17a
cmpl $0x2a02, %eax           # imm = 0x2A02
je 0xc17a
jmp 0xc1a8
leal -0xd26(%rax), %ecx
cmpl $0x8, %ecx
ja 0xbfb9
leaq 0x525e(%rip), %rax      # 0x1101c
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leal -0x152(%rax), %ecx
cmpl $0x8, %ecx
ja 0xc088
leaq 0x507f(%rip), %rax      # 0x10e5c
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x5587(%rip), %rcx      # 0x11374
jmp 0xc17a
leal -0xa26(%rax), %ecx
cmpl $0x8, %ecx
ja 0xc03f
leaq 0x5134(%rip), %rax      # 0x10f3c
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leal -0xc26(%rax), %ecx
cmpl $0x8, %ecx
ja 0xc071
leaq 0x5185(%rip), %rax      # 0x10fac
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x554d(%rip), %rcx      # 0x11384
jmp 0xc17a
leaq 0x5571(%rip), %rcx      # 0x113b4
jmp 0xc17a
leaq 0x5541(%rip), %rcx      # 0x11390
jmp 0xc17a
leaq 0x5539(%rip), %rcx      # 0x11394
jmp 0xc17a
cmpl $0x2e91, %eax           # imm = 0x2E91
jle 0xbfeb
cmpl $0x2e92, %eax           # imm = 0x2E92
je 0xbffd
cmpl $0x3184, %eax           # imm = 0x3184
je 0xc131
cmpl $0x3185, %eax           # imm = 0x3185
jne 0xc1a8
leaq 0x5539(%rip), %rcx      # 0x113cc
jmp 0xc17a
leal -0xa06(%rax), %ecx
cmpl $0x8, %ecx
ja 0xc14a
leaq 0x5042(%rip), %rax      # 0x10ef0
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leal -0xd06(%rax), %ecx
cmpl $0x8, %ecx
ja 0xc153
leaq 0x5103(%rip), %rax      # 0x10fd0
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x54cb(%rip), %rcx      # 0x113a8
jmp 0xc17a
leaq 0x54b3(%rip), %rcx      # 0x1139c
jmp 0xc17a
leaq 0x54af(%rip), %rcx      # 0x113a4
jmp 0xc17a
leaq 0x52e3(%rip), %rax      # 0x111e4
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x5487(%rip), %rcx      # 0x11398
jmp 0xc17a
leal -0x406(%rax), %ecx
cmpl $0x8, %ecx
jbe 0xc121
leal -0x412(%rax), %ecx
cmpl $0x9, %ecx
ja 0xc16c
leaq 0x4f69(%rip), %rax      # 0x10ea4
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x5015(%rip), %rax      # 0x10f60
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x547d(%rip), %rcx      # 0x113d8
jmp 0xc17a
cmpl $0x42, %eax
je 0xc0e8
cmpl $0x46, %eax
je 0xc0e8
cmpl $0x102, %eax            # imm = 0x102
jne 0xc1a8
leaq 0x53e8(%rip), %rcx      # 0x1136c
jmp 0xc17a
leaq 0x5428(%rip), %rcx      # 0x113b8
jmp 0xc17a
leaq 0x5424(%rip), %rcx      # 0x113c0
jmp 0xc17a
leaq 0x5438(%rip), %rcx      # 0x113e0
jmp 0xc17a
leaq 0x5430(%rip), %rcx      # 0x113e4
jmp 0xc17a
cmpl $0xf31, %eax            # imm = 0xF31
je 0xc163
cmpl $0xf32, %eax            # imm = 0xF32
je 0xc163
jmp 0xc1a8
cmpl $0x2a12, %eax           # imm = 0x2A12
je 0xc17a
cmpl $0x2a42, %eax           # imm = 0x2A42
je 0xbffd
jmp 0xc1a8
cmpl $0x2e32, %eax           # imm = 0x2E32
je 0xbffd
cmpl $0x2e42, %eax           # imm = 0x2E42
jne 0xc1a8
leaq 0x5360(%rip), %rcx      # 0x11364
jmp 0xc17a
cmpl $0x5a84, %eax           # imm = 0x5A84
je 0xc118
cmpl $0x5a85, %eax           # imm = 0x5A85
je 0xc10f
jmp 0xc1a8
cmpl $0xa1e, %eax            # imm = 0xA1E
je 0xc0b2
cmpl $0xa22, %eax            # imm = 0xA22
je 0xbe30
jmp 0xc1a8
cmpl $0xa84, %eax            # imm = 0xA84
je 0xc118
cmpl $0xc02, %eax            # imm = 0xC02
je 0xc173
jmp 0xc1a8
cmpl $0x41e, %eax            # imm = 0x41E
je 0xc0b2
cmpl $0x422, %eax            # imm = 0x422
je 0xbe30
jmp 0xc1a8
cmpl $0xc1e, %eax            # imm = 0xC1E
je 0xc0b2
cmpl $0xc22, %eax            # imm = 0xC22
je 0xbe30
jmp 0xc1a8
cmpl $0x122, %eax            # imm = 0x122
je 0xc0d0
cmpl $0x126, %eax            # imm = 0x126
je 0xc0d0
jmp 0xc1a8
cmpl $0xd1e, %eax            # imm = 0xD1E
je 0xc0b2
cmpl $0xd22, %eax            # imm = 0xD22
je 0xbe30
jmp 0xc1a8
leaq 0x52c7(%rip), %rcx      # 0x11380
jmp 0xc17a
cmpl $0x112, %eax            # imm = 0x112
je 0xc0d0
cmpl $0x116, %eax            # imm = 0x116
jne 0xc1a8
leaq 0x5299(%rip), %rcx      # 0x11370
jmp 0xc17a
leaq 0x52f9(%rip), %rcx      # 0x113dc
jmp 0xc17a
leaq 0x5279(%rip), %rcx      # 0x11368
jmp 0xc17a
leaq 0x52d5(%rip), %rcx      # 0x113d0
jmp 0xc17a
cmpl $0x1a84, %eax           # imm = 0x1A84
je 0xc118
cmpl $0x1a85, %eax           # imm = 0x1A85
jne 0xc1a8
leaq 0x529a(%rip), %rcx      # 0x113b0
jmp 0xc17a
leaq 0x528d(%rip), %rcx      # 0x113ac
jmp 0xc17a
leaq 0x4d58(%rip), %rax      # 0x10e80
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x5290(%rip), %rcx      # 0x113c8
jmp 0xc17a
cmpl $0x593b, %eax           # imm = 0x593B
jne 0xc1a8
leaq 0x527c(%rip), %rcx      # 0x113c4
jmp 0xc17a
cmpl $0xa02, %eax            # imm = 0xA02
je 0xc173
jmp 0xc1a8
cmpl $0xd02, %eax            # imm = 0xD02
je 0xc173
jmp 0xc1a8
cmpl $0xf33, %eax            # imm = 0xF33
jne 0xc1a8
leaq 0x521e(%rip), %rcx      # 0x11388
jmp 0xc17a
cmpl $0x402, %eax            # imm = 0x402
jne 0xc1a8
leaq 0x5202(%rip), %rcx      # 0x1137c
movq %rcx, (%rbx)
leaq 0x5268(%rip), %rsi      # 0x113ec
movl $0x8000, %edx           # imm = 0x8000
movq %r14, %rdi
movl $0x1000, %ecx           # imm = 0x1000
callq 0x90b0
movq %rax, 0x8(%rbx)
testq %rax, %rax
setne %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq $0x0, (%rbx)
xorl %eax, %eax
jmp 0xc1a0