#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*/ fprintf(int /*<<< orphan*/ *, char *, char *, int, char *,
                           char *);
char *pS(char *);
void genPrefix(FILE *out, char *op, int prior, int right, char *cmt) {
  char *assoc = right < prior ? "prefix" : "assoc prefix";
  fprintf(out, "\\tt %s&%d&%s&%s\\\\\n", pS(op), prior, assoc, cmt);
}


x86 assembly (clang, -O0):
<genPrefix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x18(%rbp),%edx
mov    -0x14(%rbp),%esi
lea    0xeb9(%rip),%rax
lea    0xeb8(%rip),%rcx
cmp    %esi,%edx
cmovl  %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <pS@plt>
mov    -0x30(%rbp),%rdi
mov    %rax,%rdx
mov    -0x14(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x20(%rbp),%r9
lea    0xe8b(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genPrefix>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %r8,%r14
mov    %edx,%ebp
mov    %rdi,%r15
cmp    %edx,%ecx
lea    0xece(%rip),%rax
lea    0xec1(%rip),%rbx
cmovl  %rax,%rbx
mov    %rsi,%rdi
call   1040 <pS@plt>
lea    0xebb(%rip),%rsi
mov    %r15,%rdi
mov    %rax,%rdx
mov    %ebp,%ecx
mov    %rbx,%r8
mov    %r14,%r9
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"prefix\00"
@.str.1 = [13 x i8] c"assoc prefix\00"
@.str.2 = [19 x i8] c"\\tt %s&%d&%s&%s\\\\\0A\00"
define void @genPrefix(i32* %0, i8* %1, i32 %2, i32 %3, i8* %4) {
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i8*
store i32* %0, i32** %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i8* %4, i8** %10
%12 = load i32, i32* %9
%13 = load i32, i32* %8
%14 = icmp slt i32 %12, %13
%15 = zext i1 %14 to i64
%16 = select i1 %14, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0)
store i8* %16, i8** %11
%17 = load i32*, i32** %6
%18 = load i8*, i8** %7
%19 = call i8* @pS(i8* %18)
%20 = load i32, i32* %8
%21 = load i8*, i8** %11
%22 = load i8*, i8** %10
%23 = call i32 @fprintf(i32* %17, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8* %19, i32 %20, i8* %21, i8* %22)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"prefix\00"
@.str.1 = [13 x i8] c"assoc prefix\00"
@.str.2 = [19 x i8] c"\\tt %s&%d&%s&%s\\\\\0A\00"
define void @genPrefix(i32* nocapture %0, i8* %1, i32 %2, i32 %3, i8* %4) {
%6 = icmp slt i32 %3, %2
%7 = select i1 %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0)
%8 = tail call i8* @pS(i8* %1)
%9 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8* %8, i32 %2, i8* %7, i8* %4)
ret void
}