#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*/ emitString(int, char *);
int /*<<< orphan*/ print(char *);
char *yyBEGIN(char *);
int /*<<< orphan*/ yyEND(char const *);
void s_defstring(int len, char *s) {
  do {
    const char *yytag = yyBEGIN("LI");
    print("defstring ");
    do {
      const char *yytag = yyBEGIN("code");
      print("\"");
      emitString(len, s);
      print("\"");
      yyEND(yytag);
    } while (0);
    yyEND(yytag);
  } while (0);
}


x86 assembly (clang, -O0):
<s_defstring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeaa(%rip),%rdi
call   1060 <yyBEGIN@plt>
mov    %rax,-0x18(%rbp)
lea    0xe9d(%rip),%rdi
call   1050 <print@plt>
lea    0xe9c(%rip),%rdi
call   1060 <yyBEGIN@plt>
mov    %rax,-0x20(%rbp)
lea    0xe91(%rip),%rdi
call   1050 <print@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <emitString@plt>
lea    0xe79(%rip),%rdi
call   1050 <print@plt>
mov    -0x20(%rbp),%rdi
call   1030 <yyEND@plt>
mov    -0x18(%rbp),%rdi
call   1030 <yyEND@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_defstring>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rsi,%r15
mov    %edi,%r12d
lea    0xeab(%rip),%rdi
call   1060 <yyBEGIN@plt>
mov    %rax,%r14
lea    0xe9f(%rip),%rdi
call   1050 <print@plt>
lea    0xe9e(%rip),%rdi
call   1060 <yyBEGIN@plt>
mov    %rax,%rbx
lea    0xe94(%rip),%rbp
mov    %rbp,%rdi
call   1050 <print@plt>
mov    %r12d,%edi
mov    %r15,%rsi
call   1040 <emitString@plt>
mov    %rbp,%rdi
call   1050 <print@plt>
mov    %rbx,%rdi
call   1030 <yyEND@plt>
mov    %r14,%rdi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <yyEND@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"LI\00"
@.str.1 = [11 x i8] c"defstring \00"
@.str.2 = [5 x i8] c"code\00"
@.str.3 = [2 x i8] c"\22\00"
define void @s_defstring(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
br label %7
7: ; preds = %2
%8 = call i8* @yyBEGIN(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i8* %8, i8** %5
%9 = call i32 @print(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %7
%11 = call i8* @yyBEGIN(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
store i8* %11, i8** %6
%12 = call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%13 = load i32, i32* %3
%14 = load i8*, i8** %4
%15 = call i32 @emitString(i32 %13, i8* %14)
%16 = call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%17 = load i8*, i8** %6
%18 = call i32 @yyEND(i8* %17)
br label %19
19: ; preds = %10
%20 = load i8*, i8** %5
%21 = call i32 @yyEND(i8* %20)
br label %22
22: ; preds = %19
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"LI\00"
@.str.1 = [11 x i8] c"defstring \00"
@.str.2 = [5 x i8] c"code\00"
@.str.3 = [2 x i8] c"\22\00"
define void @s_defstring(i32 %0, i8* %1) {
%3 = tail call i8* @yyBEGIN(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @print(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i8* @yyBEGIN(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%7 = tail call i32 @emitString(i32 %0, i8* %1)
%8 = tail call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%9 = tail call i32 @yyEND(i8* %5)
%10 = tail call i32 @yyEND(i8* %3)
ret void
}