// File: /workspace/github_c_makefile_star2_O1/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 0xbb0c
cmpl $0xc05, %eax            # imm = 0xC05
jle 0xbb4d
cmpl $0xd25, %eax            # imm = 0xD25
jg 0xbbd5
cmpl $0xd01, %eax            # imm = 0xD01
jg 0xbd48
cmpl $0xc1d, %eax            # imm = 0xC1D
jg 0xbe19
leal -0xc06(%rax), %ecx
cmpl $0x8, %ecx
jbe 0xbf4c
addl $0xfffff3ee, %eax       # imm = 0xFFFFF3EE
cmpl $0x9, %eax
ja 0xc1b0
leaq 0x5481(%rip), %rcx      # 0x10f84
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x3e8f, %eax           # imm = 0x3E8F
jg 0xbb9f
cmpl $0x22af, %eax           # imm = 0x22AF
jg 0xbc40
leal -0x1902(%rax), %ecx
cmpl $0x3b, %ecx
ja 0xc105
leaq 0x55bc(%rip), %rax      # 0x110f4
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x5858(%rip), %rcx      # 0x113a0
jmp 0xc182
cmpl $0x41d, %eax            # imm = 0x41D
jg 0xbc0b
cmpl $0x161, %eax            # imm = 0x161
jg 0xbcc4
cmpl $0x121, %eax            # imm = 0x121
jg 0xbdcf
cmpl $0x105, %eax            # imm = 0x105
jle 0xbf68
cmpl $0x111, %eax            # imm = 0x111
jg 0xc0c6
cmpl $0x106, %eax            # imm = 0x106
je 0xbf85
cmpl $0x10a, %eax            # imm = 0x10A
je 0xbf85
jmp 0xc1b0
cmpl $0x593a, %eax           # imm = 0x593A
jg 0xbc8e
leal -0x5902(%rax), %ecx
cmpl $0x25, %ecx
ja 0xbcf4
leaq 0x5698(%rip), %rax      # 0x11258
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x57ec(%rip), %rcx      # 0x113bc
jmp 0xc182
cmpl $0xf32, %eax            # imm = 0xF32
jle 0xbdb0
leal -0x1602(%rax), %ecx
cmpl $0x2c, %ecx
ja 0xc164
leaq 0x544a(%rip), %rax      # 0x11040
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x5786(%rip), %rcx      # 0x1138c
jmp 0xc182
cmpl $0xa11, %eax            # imm = 0xA11
jle 0xbd1e
cmpl $0xa25, %eax            # imm = 0xA25
jg 0xbdfa
leal -0xa12(%rax), %ecx
cmpl $0x9, %ecx
ja 0xc02c
leaq 0x52dd(%rip), %rax      # 0x10f14
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x5719(%rip), %rcx      # 0x11360
cmpl $0x2a11, %eax           # imm = 0x2A11
jle 0xbd72
cmpl $0x2e31, %eax           # imm = 0x2E31
jg 0xbe68
cmpl $0x2e01, %eax           # imm = 0x2E01
jle 0xbfdc
cmpl $0x2e02, %eax           # imm = 0x2E02
je 0xc005
cmpl $0x2e12, %eax           # imm = 0x2E12
je 0xc005
cmpl $0x2e22, %eax           # imm = 0x2E22
je 0xc005
jmp 0xc1b0
cmpl $0x5a83, %eax           # imm = 0x5A83
jg 0xc011
leal -0x5a41(%rax), %ecx
cmpl $0x1b, %ecx
ja 0xc142
leaq 0x5641(%rip), %rax      # 0x112f0
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x5729(%rip), %rcx      # 0x113e8
jmp 0xc182
cmpl $0x401, %eax            # imm = 0x401
jg 0xbf1e
cmpl $0x162, %eax            # imm = 0x162
je 0xbce8
cmpl $0x166, %eax            # imm = 0x166
je 0xbce8
cmpl $0x16a, %eax            # imm = 0x16A
jne 0xc1b0
leaq 0x5689(%rip), %rcx      # 0x11378
jmp 0xc182
addl $0xffffc170, %eax       # imm = 0xFFFFC170
cmpl $0x18, %eax
ja 0xc1b0
leaq 0x54eb(%rip), %rcx      # 0x111f4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x56bb(%rip), %rcx      # 0x113d4
jmp 0xc182
cmpl $0xa01, %eax            # imm = 0xA01
jg 0xbea0
leal -0x426(%rax), %ecx
cmpl $0x8, %ecx
ja 0xc062
leaq 0x518d(%rip), %rax      # 0x10ecc
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
cmpl $0xd11, %eax            # imm = 0xD11
jle 0xbebf
leal -0xd12(%rax), %ecx
cmpl $0x9, %ecx
ja 0xc0a3
leaq 0x528b(%rip), %rax      # 0x10ff4
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leal -0x22b0(%rax), %edx
cmpl $0x3, %edx
jbe 0xbf02
leal -0x2972(%rax), %edx
cmpl $0x30, %edx
ja 0xbda0
movabsq $0x1000100010001, %rsi  # imm = 0x1000100010001
btq %rdx, %rsi
jb 0xc182
cmpl $0x2a02, %eax           # imm = 0x2A02
je 0xc182
jmp 0xc1b0
leal -0xd26(%rax), %ecx
cmpl $0x8, %ecx
ja 0xbfc1
leaq 0x5256(%rip), %rax      # 0x1101c
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leal -0x152(%rax), %ecx
cmpl $0x8, %ecx
ja 0xc090
leaq 0x5077(%rip), %rax      # 0x10e5c
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x557f(%rip), %rcx      # 0x11374
jmp 0xc182
leal -0xa26(%rax), %ecx
cmpl $0x8, %ecx
ja 0xc047
leaq 0x512c(%rip), %rax      # 0x10f3c
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leal -0xc26(%rax), %ecx
cmpl $0x8, %ecx
ja 0xc079
leaq 0x517d(%rip), %rax      # 0x10fac
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x5545(%rip), %rcx      # 0x11384
jmp 0xc182
leaq 0x5569(%rip), %rcx      # 0x113b4
jmp 0xc182
leaq 0x5539(%rip), %rcx      # 0x11390
jmp 0xc182
leaq 0x5531(%rip), %rcx      # 0x11394
jmp 0xc182
cmpl $0x2e91, %eax           # imm = 0x2E91
jle 0xbff3
cmpl $0x2e92, %eax           # imm = 0x2E92
je 0xc005
cmpl $0x3184, %eax           # imm = 0x3184
je 0xc139
cmpl $0x3185, %eax           # imm = 0x3185
jne 0xc1b0
leaq 0x5531(%rip), %rcx      # 0x113cc
jmp 0xc182
leal -0xa06(%rax), %ecx
cmpl $0x8, %ecx
ja 0xc152
leaq 0x503a(%rip), %rax      # 0x10ef0
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leal -0xd06(%rax), %ecx
cmpl $0x8, %ecx
ja 0xc15b
leaq 0x50fb(%rip), %rax      # 0x10fd0
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x54c3(%rip), %rcx      # 0x113a8
jmp 0xc182
leaq 0x54ab(%rip), %rcx      # 0x1139c
jmp 0xc182
leaq 0x54a7(%rip), %rcx      # 0x113a4
jmp 0xc182
leaq 0x52db(%rip), %rax      # 0x111e4
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x547f(%rip), %rcx      # 0x11398
jmp 0xc182
leal -0x406(%rax), %ecx
cmpl $0x8, %ecx
jbe 0xc129
leal -0x412(%rax), %ecx
cmpl $0x9, %ecx
ja 0xc174
leaq 0x4f61(%rip), %rax      # 0x10ea4
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x500d(%rip), %rax      # 0x10f60
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x5475(%rip), %rcx      # 0x113d8
jmp 0xc182
cmpl $0x42, %eax
je 0xc0f0
cmpl $0x46, %eax
je 0xc0f0
cmpl $0x102, %eax            # imm = 0x102
jne 0xc1b0
leaq 0x53e0(%rip), %rcx      # 0x1136c
jmp 0xc182
leaq 0x5420(%rip), %rcx      # 0x113b8
jmp 0xc182
leaq 0x541c(%rip), %rcx      # 0x113c0
jmp 0xc182
leaq 0x5430(%rip), %rcx      # 0x113e0
jmp 0xc182
leaq 0x5428(%rip), %rcx      # 0x113e4
jmp 0xc182
cmpl $0xf31, %eax            # imm = 0xF31
je 0xc16b
cmpl $0xf32, %eax            # imm = 0xF32
je 0xc16b
jmp 0xc1b0
cmpl $0x2a12, %eax           # imm = 0x2A12
je 0xc182
cmpl $0x2a42, %eax           # imm = 0x2A42
je 0xc005
jmp 0xc1b0
cmpl $0x2e32, %eax           # imm = 0x2E32
je 0xc005
cmpl $0x2e42, %eax           # imm = 0x2E42
jne 0xc1b0
leaq 0x5358(%rip), %rcx      # 0x11364
jmp 0xc182
cmpl $0x5a84, %eax           # imm = 0x5A84
je 0xc120
cmpl $0x5a85, %eax           # imm = 0x5A85
je 0xc117
jmp 0xc1b0
cmpl $0xa1e, %eax            # imm = 0xA1E
je 0xc0ba
cmpl $0xa22, %eax            # imm = 0xA22
je 0xbe38
jmp 0xc1b0
cmpl $0xa84, %eax            # imm = 0xA84
je 0xc120
cmpl $0xc02, %eax            # imm = 0xC02
je 0xc17b
jmp 0xc1b0
cmpl $0x41e, %eax            # imm = 0x41E
je 0xc0ba
cmpl $0x422, %eax            # imm = 0x422
je 0xbe38
jmp 0xc1b0
cmpl $0xc1e, %eax            # imm = 0xC1E
je 0xc0ba
cmpl $0xc22, %eax            # imm = 0xC22
je 0xbe38
jmp 0xc1b0
cmpl $0x122, %eax            # imm = 0x122
je 0xc0d8
cmpl $0x126, %eax            # imm = 0x126
je 0xc0d8
jmp 0xc1b0
cmpl $0xd1e, %eax            # imm = 0xD1E
je 0xc0ba
cmpl $0xd22, %eax            # imm = 0xD22
je 0xbe38
jmp 0xc1b0
leaq 0x52bf(%rip), %rcx      # 0x11380
jmp 0xc182
cmpl $0x112, %eax            # imm = 0x112
je 0xc0d8
cmpl $0x116, %eax            # imm = 0x116
jne 0xc1b0
leaq 0x5291(%rip), %rcx      # 0x11370
jmp 0xc182
leaq 0x52f1(%rip), %rcx      # 0x113dc
jmp 0xc182
leaq 0x5271(%rip), %rcx      # 0x11368
jmp 0xc182
leaq 0x52cd(%rip), %rcx      # 0x113d0
jmp 0xc182
cmpl $0x1a84, %eax           # imm = 0x1A84
je 0xc120
cmpl $0x1a85, %eax           # imm = 0x1A85
jne 0xc1b0
leaq 0x5292(%rip), %rcx      # 0x113b0
jmp 0xc182
leaq 0x5285(%rip), %rcx      # 0x113ac
jmp 0xc182
leaq 0x4d50(%rip), %rax      # 0x10e80
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x5288(%rip), %rcx      # 0x113c8
jmp 0xc182
cmpl $0x593b, %eax           # imm = 0x593B
jne 0xc1b0
leaq 0x5274(%rip), %rcx      # 0x113c4
jmp 0xc182
cmpl $0xa02, %eax            # imm = 0xA02
je 0xc17b
jmp 0xc1b0
cmpl $0xd02, %eax            # imm = 0xD02
je 0xc17b
jmp 0xc1b0
cmpl $0xf33, %eax            # imm = 0xF33
jne 0xc1b0
leaq 0x5216(%rip), %rcx      # 0x11388
jmp 0xc182
cmpl $0x402, %eax            # imm = 0x402
jne 0xc1b0
leaq 0x51fa(%rip), %rcx      # 0x1137c
movq %rcx, (%rbx)
leaq 0x5260(%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 0xc1a8