#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ ioctl_reap_inquiry(int, int);
int /*<<< orphan*/ printf(char *);
void test_reap_inquiry(int file_desc) {
  printf("\tReap inquiry on CQ = 1...\n");
  ioctl_reap_inquiry(file_desc, 1);
  printf("\tReap inquiry on CQ = 2...\n");
  ioctl_reap_inquiry(file_desc, 2);
  printf("\tReap inquiry on CQ = 3...\n");
  ioctl_reap_inquiry(file_desc, 3);
  printf("\tReap inquiry on CQ = 4...\n");
  ioctl_reap_inquiry(file_desc, 4);
  printf("\tReap inquiry on CQ = 5...\n");
  ioctl_reap_inquiry(file_desc, 5);
  printf("\tReap inquiry on CQ = 6...\n");
  ioctl_reap_inquiry(file_desc, 6);
}


x86 assembly (clang, -O0):
<test_reap_inquiry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <ioctl_reap_inquiry@plt>
lea    0xed1(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
mov    $0x2,%esi
call   1030 <ioctl_reap_inquiry@plt>
lea    0xed4(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
mov    $0x3,%esi
call   1030 <ioctl_reap_inquiry@plt>
lea    0xed7(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
mov    $0x4,%esi
call   1030 <ioctl_reap_inquiry@plt>
lea    0xeda(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
mov    $0x5,%esi
call   1030 <ioctl_reap_inquiry@plt>
lea    0xedd(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
mov    $0x6,%esi
call   1030 <ioctl_reap_inquiry@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_reap_inquiry>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
mov    $0x1,%esi
call   1040 <ioctl_reap_inquiry@plt>
lea    0xed9(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
mov    $0x2,%esi
call   1040 <ioctl_reap_inquiry@plt>
lea    0xedc(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
mov    $0x3,%esi
call   1040 <ioctl_reap_inquiry@plt>
lea    0xedf(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
mov    $0x4,%esi
call   1040 <ioctl_reap_inquiry@plt>
lea    0xee2(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
mov    $0x5,%esi
call   1040 <ioctl_reap_inquiry@plt>
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
mov    $0x6,%esi
pop    %rbx
jmp    1040 <ioctl_reap_inquiry@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"\09Reap inquiry on CQ = 1...\0A\00"
@.str.1 = [28 x i8] c"\09Reap inquiry on CQ = 2...\0A\00"
@.str.2 = [28 x i8] c"\09Reap inquiry on CQ = 3...\0A\00"
@.str.3 = [28 x i8] c"\09Reap inquiry on CQ = 4...\0A\00"
@.str.4 = [28 x i8] c"\09Reap inquiry on CQ = 5...\0A\00"
@.str.5 = [28 x i8] c"\09Reap inquiry on CQ = 6...\0A\00"
define void @test_reap_inquiry(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @ioctl_reap_inquiry(i32 %4, i32 1)
%6 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* %2
%8 = call i32 @ioctl_reap_inquiry(i32 %7, i32 2)
%9 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%10 = load i32, i32* %2
%11 = call i32 @ioctl_reap_inquiry(i32 %10, i32 3)
%12 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
%13 = load i32, i32* %2
%14 = call i32 @ioctl_reap_inquiry(i32 %13, i32 4)
%15 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
%16 = load i32, i32* %2
%17 = call i32 @ioctl_reap_inquiry(i32 %16, i32 5)
%18 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0))
%19 = load i32, i32* %2
%20 = call i32 @ioctl_reap_inquiry(i32 %19, i32 6)
ret void
}

LLVM IR (-O2):
@str = [27 x i8] c"\09Reap inquiry on CQ = 1...\00"
@str.6 = [27 x i8] c"\09Reap inquiry on CQ = 2...\00"
@str.7 = [27 x i8] c"\09Reap inquiry on CQ = 3...\00"
@str.8 = [27 x i8] c"\09Reap inquiry on CQ = 4...\00"
@str.9 = [27 x i8] c"\09Reap inquiry on CQ = 5...\00"
@str.10 = [27 x i8] c"\09Reap inquiry on CQ = 6...\00"
define void @test_reap_inquiry(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @ioctl_reap_inquiry(i32 %0, i32 1)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.6, i64 0, i64 0))
%5 = tail call i32 @ioctl_reap_inquiry(i32 %0, i32 2)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.7, i64 0, i64 0))
%7 = tail call i32 @ioctl_reap_inquiry(i32 %0, i32 3)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.8, i64 0, i64 0))
%9 = tail call i32 @ioctl_reap_inquiry(i32 %0, i32 4)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.9, i64 0, i64 0))
%11 = tail call i32 @ioctl_reap_inquiry(i32 %0, i32 5)
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.10, i64 0, i64 0))
%13 = tail call i32 @ioctl_reap_inquiry(i32 %0, i32 6)
ret void
}