#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 pop();
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
void code_while_end() {
  int index_1 = pop(), index_2 = pop();
  char label_1[256], label_2[256];
  sprintf(label_1, ".L%d", index_1);
  sprintf(label_2, ".L%d", index_2);
  printf("\tgoto %s;\n", label_2);
  printf("%s:\n", label_1);
}


x86 assembly (clang, -O0):
<code_while_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    $0x0,%al
call   1040 <pop@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <pop@plt>
mov    %eax,-0x8(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xea0(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x210(%rbp),%rdi
mov    -0x8(%rbp),%edx
lea    0xe8a(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x210(%rbp),%rsi
lea    0xe7c(%rip),%rdi
call   1030 <printf@plt>
lea    -0x110(%rbp),%rsi
lea    0xe74(%rip),%rdi
call   1030 <printf@plt>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<code_while_end>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x208,%rsp
xor    %eax,%eax
call   1040 <pop@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <pop@plt>
mov    %eax,%ebp
lea    0xeaa(%rip),%r14
lea    0x100(%rsp),%r15
mov    %r15,%rdi
mov    %r14,%rsi
mov    %ebx,%edx
call   1050 <sprintf@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1050 <sprintf@plt>
lea    0xe83(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xe7f(%rip),%rdi
mov    %r15,%rsi
call   1030 <printf@plt>
add    $0x208,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c".L%d\00"
@.str.1 = [11 x i8] c"\09goto %s;\0A\00"
@.str.2 = [5 x i8] c"%s:\0A\00"
define void @code_while_end() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [256 x i8]
%4 = alloca [256 x i8]
%5 = call i32 (...) @pop()
store i32 %5, i32* %1
%6 = call i32 (...) @pop()
store i32 %6, i32* %2
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%8 = load i32, i32* %1
%9 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%11 = load i32, i32* %2
%12 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%14 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %13)
%15 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%16 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %15)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c".L%d\00"
@.str.1 = [11 x i8] c"\09goto %s;\0A\00"
@.str.2 = [5 x i8] c"%s:\0A\00"
define void @code_while_end() {
%1 = alloca [256 x i8]
%2 = alloca [256 x i8]
%3 = tail call i32 (...) @pop()
%4 = tail call i32 (...) @pop()
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%7 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %3)
%8 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %4)
%9 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%10 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %5)
ret void
}