#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwrite(char *, int, int /*<<< orphan*/,
                          int /*<<< orphan*/ *);
int /*<<< orphan*/ strlen(char *);
void setEmptyResult(int emptys, FILE *FSexpectedResultEmptyFile) {
  int i;
  char emptyString[] = "empty query...\n";
  for (i = 0; i < emptys; i++)
    fwrite(emptyString, sizeof(char), strlen(emptyString),
           FSexpectedResultEmptyFile);
}


x86 assembly (clang, -O0):
<setEmptyResult>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    118b <setEmptyResult+0x6b>
lea    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
lea    -0x30(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x38(%rbp),%rdi
mov    %eax,%edx
mov    -0x10(%rbp),%rcx
mov    $0x1,%esi
call   1040 <fwrite@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114c <setEmptyResult+0x2c>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setEmptyResult>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
movaps 0xed1(%rip),%xmm0
movaps %xmm0,(%rsp)
test   %edi,%edi
jle    115f <setEmptyResult+0x3f>
mov    %rsi,%r14
mov    %edi,%ebp
mov    %rsp,%rbx
nop
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %eax,%edx
mov    %r14,%rcx
call   1040 <fwrite@plt>
add    $0xffffffff,%ebp
jne    1140 <setEmptyResult+0x20>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@__const.setEmptyResult.emptyString = [16 x i8] c"empty query...\0A\00"
define void @setEmptyResult(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca [16 x i8]
store i32 %0, i32* %3
store i32* %1, i32** %4
%7 = bitcast [16 x i8]* %6 to i8*
store i32 0, i32* %5
br label %8
8: ; preds = %18, %2
%9 = load i32, i32* %5
%10 = load i32, i32* %3
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %21
12: ; preds = %8
%13 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%14 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%15 = call i32 @strlen(i8* %14)
%16 = load i32*, i32** %4
%17 = call i32 @fwrite(i8* %13, i32 1, i32 %15, i32* %16)
br label %18
18: ; preds = %12
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %8
21: ; preds = %8
ret void
}

LLVM IR (-O2):
@__const.setEmptyResult.emptyString = [16 x i8] c"empty query...\0A\00"
define void @setEmptyResult(i32 %0, i32* nocapture %1) {
%3 = alloca [16 x i8]
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%5 = icmp sgt i32 %0, 0
br i1 %5, label %6, label %12
6: ; preds = %2, %6
%7 = phi i32 [ %10, %6 ], [ 0, %2 ]
%8 = call i32 @strlen(i8* %4)
%9 = call i32 @fwrite(i8* %4, i32 1, i32 %8, i32* %1)
%10 = add nuw nsw i32 %7, 1
%11 = icmp eq i32 %10, %0
br i1 %11, label %12, label %6
12: ; preds = %6, %2
ret void
}