#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*/ printf(char *, char *);
void printfunc(char *procode, char *ware, char *pro, char *quali) {
  if (*procode != 'q') {
    printf("\nWarehouse: %s\n", ware);
    printf("Product: %s\n", pro);
    printf("Qualifiers: %s\n\n", quali);
  }
}


x86 assembly (clang, -O0):
<printfunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x71,%eax
je     1168 <printfunc+0x58>
mov    -0x10(%rbp),%rsi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%rsi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printfunc>:
push   %r14
push   %rbx
push   %rax
cmpb   $0x71,(%rdi)
jne    1121 <printfunc+0x11>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %rcx,%r14
mov    %rdx,%rbx
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"\0AWarehouse: %s\0A\00"
@.str.1 = [13 x i8] c"Product: %s\0A\00"
@.str.2 = [17 x i8] c"Qualifiers: %s\0A\0A\00"
define void @printfunc(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 113
br i1 %12, label %13, label %20
13: ; preds = %4
%14 = load i8*, i8** %6
%15 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = load i8*, i8** %7
%17 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %16)
%18 = load i8*, i8** %8
%19 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* %18)
br label %20
20: ; preds = %13, %4
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"\0AWarehouse: %s\0A\00"
@.str.1 = [13 x i8] c"Product: %s\0A\00"
@.str.2 = [17 x i8] c"Qualifiers: %s\0A\0A\00"
define void @printfunc(i8* nocapture %0, i8* %1, i8* %2, i8* %3) {
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 113
br i1 %6, label %11, label %7
7: ; preds = %4
%8 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %1)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* %3)
br label %11
11: ; preds = %7, %4
ret void
}